# SceneScript Class IModelData
IModelData is an interface representing model data that can be used to create a model layer with custom geometry. Created via thisScene.createModelData(configuration), see IScene for more information.
See the dynamic model tutorial for concrete implementation advice.
# Constants
The constants are mainly relevant when configuring the model during the creation call.
# readonly POSITION: String
Vertex format position flag, 3 floats.
# readonly NORMAL: String
Vertex format normal flag, 3 floats.
# readonly UV: String
Vertex format uv flag, 2 floats.
# readonly TANGENT_SIGNED: String
Vertex format signed tangent flag, 4 floats. Tangent vector in first 3 floats, sign of cross(normal, tangent) in last float.
# readonly COLOR: String
Vertex format color flag, RGBA, 4 floats.
# Functions
# applyData(shapes: Object|Array): void
Updates the model data for one or multiple shapes. This is a high performance method that you may call every frame in any update event. You need to ensure that your data can be accepted: same buffer lengths, same formats/types. See IScene.createModelData for details of the shape configuration object. You should only pass the options that you intend to update. You can also skip the shapes array here and just pass a single shape config object if you only care about the first shape.
# replaceData(shapes: Object|Array): void
Replaces the model data with different, potentially incompatible data. This method can not be called every frame in any global update() event, but rather only in callback functions like applyUserProperties(). It allows you to change buffer lengths, the format and it allows shapes to be added or removed. See IScene.createModelData for details of the shape configuration object. You should only pass the options that you intend to change. You can also skip the shapes array here and just pass a single shape config object if you only care about the first shape. If you pass null for a shape in the array or for the index buffer, you can delete the existing shape/buffer in the engine.