Class: Clone

shf3d.Clone

Class representing a cloned entity.

Multiple clones may reference the same entity but apply individual transformations to each clone. This way expensive entities need to be created or held in memory only once.

new shf3d.Clone ()

Properties:
Name Type Description
entity shf3d.Entity

(default: null) The shared entity.

Example
Clone {
     id: a
     entity: Cube { }
}

Clone {
     location: vec3(5, 0, 0)
     entity: a.entity
}

Clone {
     location: vec3(10, 0, 0)
     entity: a.entity
}

Extends