Properties

Number

Just simple number. Now we support only integers

rule {
    number: 100;
}

We support mathematical operators:

rule {
    math: 100 * (2 + 2);
}

Percents

Used mainly for properties like width, depth and height. Percents inherits from parent sizes.

rule {
    width: 100%;
    height: 50%;
}

Strings

Used mainly for urls to textures.

tex.brick {
    texture: "path-to-texture";
}

Selectors

Used to link to another element like in cube to join walls:

cube {
    roof: wall.roof;
    wall: wall.brick.red;
}

Or to select textures in a wall:

wall.brick {
    texture: tex.brick;
}

Or used in containers as array of selector:

x-series {
    body:
        house.modern,
        house.old,
        factory.brick;
}

Warning

it is only possible to send element name and/or classes, is not possible to join with parent operator or another pseudoclasses

Functions

It is possible to use special functions in properties.

random

Random integer between A and B

Usage:

random(A, B)

Example:

/* randoms number between 0 and 50 */
rule {
    random-number: random(0, 50);
}

choice

Randoms one element from arguments list

Usage:

choice(arg1, arg2, ..., argN)

Example:

/* select only one element from the list of arguments */
rule {
    random_obj: choice(obj1, obj2, obj3);
}