Creates a new Data.
See @xeokit/sdk/data for usage.
True once this Component has been destroyed.
Don't use this Component if this is true
.
Protected
dirtyUnique ID of this Component.
Readonly
modelsThe DataModels belonging to this Data, each keyed to its DataModel.id.
Readonly
objectsThe DataObjects in this Data, mapped to DataObject.id.
Readonly
objectsThe DataObjects belonging to this Data, each map keyed to DataObject.type, containing DataObjects keyed to DataObject.id.
Readonly
propertyThePropertySets belonging to this Data, mapped toPropertySet.id.
Readonly
rootThe root DataObjects belonging to this Data, each keyed to its DataObject.id.
Readonly
typeTracks number of DataObjects of each type in this Data.
Protected
cleanForces this component to action any deferred state updates.
Protected
cleanGives this component an opportunity to action any defered state updates.
Destroys all contained DataModels.
Fires Data.onModelDestroyed and DataModel.onDestroyed for each existing DataModel in this Data.
See @xeokit/sdk/data for usage.
void
Creates a new DataModel in this Data.
Remember to call DataModel.build when you've finished building or loading the DataModel. That will fire events via Data.onModelCreated and DataModel.onBuilt, to indicate to any subscribers that the DataModel is built and ready for use.
Note that while we're building/loading the DataModel, each call that we make to DataModel.createObject will create a new DataObject in Data.objects and DataModel.objects, and will also fire an event via Data.onObjectCreated. However, only when we've received the Data.onModelCreated and DataModel.onBuilt events can we actually consider the DataModel to be fully constructed.
See @xeokit/sdk/data for more details on usage.
Creation parameters for the new DataModel.
Destroys this Data and all contained DataModels.
See @xeokit/sdk/data for usage.
void
Protected
errorProtected
Logs an error for this component to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
The error message to log
Gets the DataObject.ids of the DataObjects that have the given DataObject.type.
See @xeokit/sdk/data for usage.
The type.
Protected
logProtected
Logs a message for this component.
The message will have this format: [LOG] [<component type> <component id>: <message>
The message to log
Protected
setFlags this component as having a defered state updates it needs to perform.
Protected
warnProtected
Logs a warning for this component to the JavaScript console.
The console message will have this format: [WARN] [<component type> =<component id>: <message>
The warning message to log
Emits an event when the Component has been destroyed.
Readonly
onEmits an event each time a DataModel has been created in this Data.
Readonly
onEmits an event each time a DataModel has been destroyed within this Data.
Readonly
onEmits an event each time a DataObject is created within this Data.
Readonly
onEmits an event each time a DataObject is destroyed within this Data.
Container of model semantic data.
A Data is a container of DataModels, DataObjects, Relationships, PropertySets and Properties.
See @xeokit/sdk/data for usage.