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