Service which holds a list of instances for each model. This will be used to check if a model can be updated.
Basically acts like a singleton when imported.
Methods
clearAll()
Clears all existing registrations. Mainly used for sceneManager's clearScene
hasInstances(modelId)
Checks if a model has registered instances.
Parameters:
Name | Type | Description |
---|---|---|
modelId |
string |
register(modelId, instance)
Registers a new instance for a model.
Parameters:
Name | Type | Description |
---|---|---|
modelId |
string | The model id of the instance. |
instance |
ModelInstance | The instance to register. |
unregister(instance)
Unregisters an instance from a model.
Parameters:
Name | Type | Description |
---|---|---|
instance |
ModelInstance | The instance to unregister. |