Quick Start
DailyCuble Language (DCL) is a domain-specific language for creating 3D voxel shapes. Write a single expression that evaluates at every point in a 3D grid to determine its color.
Your DCL code runs for every coordinate (x, y, z) in the grid. The result must be a color - that's what fills the voxel at that position. Use NULL (or BLANK) to make voxels empty/transparent.
Your First Shape
The simplest DCL program is just a color name:
This fills every voxel with red. Simple! But let's make it more interesting.
Using Coordinates
DCL provides three built-in variables: x, y, and z. These range from -SIZE/2 to SIZE/2, centered at the origin.
Conditionals
Use if ... then ... else ... end to make decisions:
if condition then
color_when_true
else
color_when_false
endMaking Shapes
The length(x, y, z) function calculates distance from the origin. Creating a centered sphere is simple:
Use SIZE to make your shapes scale-independent. Try changing the grid size - the sphere stays proportional!
Patterns
The modulo operator % is great for repeating patterns:
Colors
DCL supports multiple color formats:
- Named colors:
RED,GREEN,BLUE,YELLOW, etc. - RGB:
rgb(255, 128, 0) - Hex:
#FF8000 - HSL:
hsl(30, 1, 0.5)
Next Steps
You've learned the basics! Explore the other tabs to:
- Reference: Complete syntax documentation
- Examples: Gallery of shapes and patterns
- API: All functions and color constants