Properties
You can modify any object property, regardless of depth, by adding $ in front of its name and separating levels with a dot.
<br x-3.meshBasicMaterial x-3.$color="'red'" />No need to add a $ in front of each property level, just the first one. This allows Norska to differentiate between an attempted class instantiation and a property change.
Any properties associated with objects featuring a .set() method can be assigned values directly by passing the same arguments as one would for the set method. For instance, instead of specifying $color={new $three.Color('red')}, you can directly use $color="'red'" .
When set() requires several arguments, you can use an array like this $position="[1, 2, 3]".
Just using a directive with no props will return true by default.
<div
x-3.mesh
x-3.$cast-shadow
x-3.$receive-shadow
>
<!-- ... -->
</div>Last updated