Attach

Use attach to link objects to their parent.

If the directive's element is removed from the DOM, it will automatically detach from its parent.

The following example shows how to attach a material and a geometry to a mesh object:

<div x-3.mesh>
    <br         
        x-3.boxGeometry="[1, 1, 1]"
        x-3.attach.geometry
    />
    <br         
        x-3.meshBasicMaterial="{color: 0xff0000}"
        x-3.attach.material
    />
</div>

Last updated