Package Information
- Last Updated
- Authors
- Rodrigo Alcántara
- Categories
- visualizationcomponentsfun
- Dependencies
- @preview/cetz:0.5.2
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/magic-cubes:0.1.02. Import in your Typst file
Add this to your .typ file:
#import "@preview/magic-cubes:0.1.0": *magic-cubes
magic-cubes is a Typst package built on top of CeTZ that allows you to create, manipulate, and render Rubik’s cubes of any size.
See the manual for documentation.
Examples
|
|
|
|
|
|
|
|
|
|
|
Quick Start
To start using magic-cubes, add the following import at the top of your .typ file:
#import "@preview/magic-cubes:0.1.0": *
Creating and rendering a solved cube only requires two functions:
#draw-cube(cube())
You can apply an algorithm before rendering the cube:
#draw-cube(
apply(
cube(),
"R U R' U'"
)
)
The package supports cubes of arbitrary size:
#draw-cube(
cube(size: 5)
)
Changelog
v0.1.0
- Initial release