JavaScript (and WebGL) use 64‑bit floating point numbers for CPU-side calculations, but GPU shaders typically use 32‑bit floats. A 32-bit float has ~7.2 decimal digits of precision. If passing 64-bit floating vertices data to GPU directly, it will destroy number preciesion.
So we adopt a simpler but effective version of the “origin-shift” idea. Recompute geometry using re-centered coordinates and apply offset to its position. The base point is extractly offset value.
Get the rendering base point.
Return the rendering base point.
The name of the layer referenced by this entity
Object id of the associated entity in drawing database. When adding this entity into scene, do remember setting the value of this property.
The object Id of the owner of the object. When adding this entity into scene, do remember setting the value of this property.
An object that can be used to store custom data about the entity.
Object's visibility
Apply the matrix transform to the object and updates the object's position, rotation and scale.
Input the matrix to apply
Return a clone of this object and its direct children (not all descendants). So it means that you need to gurantee the object is flatten by call method 'flatten' before calling this function. This function will deeply clone geometry in this object. But materials are reused directly and not deeply cloned.
Return a clone of this object and optionally all descendants.
Interface that all of display objects need to implement.