Protected
_distanceReadonly
hasRead-only flag to check if a given object is of type HasLayers.
Readonly
idThe unique identifier of this entity.
Readonly
isRead-only flag to check if a given object is of type Entity.
Readonly
isRead-only flag to check if a given object is of type Entity3D.
Readonly
isReadonly flag to indicate that his object implements MemoryUsage.
Readonly
isReadonly
isReadonly flag to indicate that this object is a PointCloud instance.
The name of this entity.
Readonly
sourceThe source of this entity.
Readonly
typeThe name of the type of this object.
Readonly
userAn object that can be used to store custom data about the Entity.
Gets the active attribute.
Note: to set the active attribute, use setActiveAttribute.
Gets the classification array. The array contains 256 entries that can be updated, but the array itself may not be resized.
The delay, in milliseconds, to remove unused data for each node. Must be a positive integer greater or equal to zero.
Setting it to zero will cleanup immediately after a node becomes invisible.
Gets or sets the clipping planes set on this entity. Default is null
(no clipping planes).
Note: custom entities must ensure that the materials and shaders used do support the clipping plane feature of three.js. Refer to the three.js documentation for more information.
The amount of decimation to apply to currently displayed point meshes. A value of 1
means
that all points are displayed. A value of N
means that we display only 1 every Nth point.
Note: this has no effect on the quantity of data that point cloud sources must fetch, as it is a purely graphical setting. This does, however, improve rendering performance by reducing the number of points to draw on the screen.
Enables or disables depth testing for point cloud meshes.
Gets the number of points currently displayed.
Gets or sets the frozen status of this entity. A frozen entity is still visible but will not be updated automatically.
Useful for debugging purposes.
Returns the number of layers currently in this object.
Gets whether this entity is currently loading data.
Returns the root object of this entity.
Gets or sets the opacity of this entity.
Gets or sets the point budget. A non-null point budget will automatically compute the
decimation property every frame, based on the number of currently displayed points.
A value of null
removes the point budget and stop automatic decimation computation.
Gets the total number of points in this point cloud, or undefined
if this value is not known.
Note: the entity must be initialized to be able to access this property.
The point size, in pixels.
Note: a value of zero triggers automatic size computation.
Gets the current loading progress (between 0 and 1).
Note: This property is only meaningful if loading is true
.
Determine if this entity is ready to use.
Gets or sets the render order of this entity.
Toggles the visibility of individual node content volumes.
Note: octree-based point clouds have cube-shaped node volumes, whereas their node data volume is a tight bounding box around the actual points of the node.
Toggles the visibility of invidividual node volumes.
Enables or disables the display of the point cloud.
Toggles the visibility of the point cloud volume.
The global factor that drives LOD computation. The lower this value, the sooner a node is subdivided. Note: changing this scale to a value less than 1 can drastically increase the number of nodes displayed in the scene, and can even lead to browser crashes.
Gets or sets the visibility of this entity. A non-visible entity will not be automatically updated.
Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Protected
assignAssigns the render order of this object.
This may be overriden to perform custom logic.
Fire an event type.
The event that gets fired.
Filters what objects need to be updated, based on updatedSources
.
The returned objects are then passed to preUpdate and postUpdate.
Inherited classes should override shouldFullUpdate and shouldUpdate if they need to change this behavior.
Sources that triggered an update
Set of objects to update
Applies the callback to each layer in the object.
Returns a new array containing the layers in this object. Optionally, the predicate can be used to filter out unwanted layers.
// Get all layers from the object.
const allLayers = obj.getLayers();
// Get all color layers from the object.
const colorLayers = obj.getLayers((layer) => layer.isColorLayer);
Optional
predicate: ((arg0: Layer<LayerEvents, LayerUserData>) => boolean)Returns an approximation of the memory used by this object, in bytes.
Returns the list of supported attributes in the source.
Checks if listener is added to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Protected
isProtected
notifyProtected
onApplies entity-level setup on a new object.
Note: this method should be called from the subclassed entity to notify the parent class that a new 3D object has just been created, so that it can be setup with entity-wide parameters.
The object to prepare.
Picks objects from this entity.
Implementations must respect at least limit
and filter
options.
Coordinates on the rendering canvas
Optional
options: PickOptionsOptions
Target
Method called after Entity.update.
the update context.
Protected
preprocessAsynchronously preprocess the entity. This method may be overriden to perform any operation that must be done before the entity can be used in the scene, such as fetching metadata about a dataset, etc.
A promise that resolves when the entity is ready to be used.
This method is called just before update()
to filter and select
which elements should be actually updated. For example, in the
case of complex entities made of a hierarchy of elements, the entire
hierarchy may not need to be updated.
Use this method to optimize the update step by reducing the number of elements to process.
Note: if this functions returns nothing, update()
will not be called.
the update context.
the elements to update during update()
.
Removes a listener from an event type.
The type of the listener that gets removed.
The listener function that gets removed.
Sets the active attribute.
Note: to enable coloring from the attribute, use setColoringMode with mode 'attribute'
.
Note: To get the supported attributes, use getSupportedAttributes.
The active attribute.
UnsupportedAttributeError If the attribute is not supported by the source.
Sets the coloring mode of the entity:
layer
: the point cloud is colorized from a color layer previously set with setColorLayer.attribute
: the point cloud is colorized from the source attributes (e.g color, classification...)
previously set with setActiveAttribute.Sets the color layer to colorize the points.
Note: to enable coloring from the color layer, use setColoringMode with mode 'layer'
.
The color layer.
Protected
setupApplies entity-level setup on new object's material.
Subclasses can override this to setup custom logic, for instance if the entity can produce objects that are naturally transparent.
the material of the newly created object
This method is called before update
to check if the MainLoop
should try to update this entity or not. For better performances,
it should return false
if the entity has no impact on the
rendering (e.g. the element is not visible).
The inherited child can completely ignore this value if it makes sense.
true
if should check for update
This method is called at the beginning of the update
step to determine
if we should do a full render of the object. This should be the case if, for
instance, the source is the camera.
You can override this depending on your needs. The inherited child should
not ignore this value, it should do a boolean OR, e.g.:
return super.shouldFullUpdate(updateSource) || this.contains(updateSource);
Source of change
true
if requires a full update of this object
This method is called at the beginning of the update
step to determine
if we should re-render updateSource
.
Not used when shouldFullUpdate
returns true
.
You can override this depending on your needs. The inherited child should
not ignore this value, it should do a boolean OR, e.g.:
return super.shouldUpdate(updateSource) || this.contains(updateSource);
Source of change
true
if requires an update of updateSource
Traverses all objects in the hierarchy of this entity.
The callback.
The traversal root. If undefined, the traversal starts at the root object of this entity.
Traverses all materials in the hierarchy of this entity.
The callback.
The traversal root. If undefined, the traversal starts at the root object of this entity.
Traverses all meshes in the hierarchy of this entity.
The callback.
The raversal root. If undefined, the traversal starts at the root object of this entity.
Displays point clouds coming from a PointCloudSource.
This entity supports two coloring modes:
'attribute'
and'layer'
. In coloring mode'attribute'
, points are colorized from the selected attribute (e.g color, intensity, classification...).In coloring mode
'layer'
, points are colorized using a ColorLayer that must be set with setColorLayer.Note: the layer does not have to be in the same coordinate system as the point cloud.