mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
21 lines
631 B
Markdown
21 lines
631 B
Markdown
# ModelNode
|
|
|
|
`ModelNode` is simply a `ScenegraphNode` that contains a `Model` for drawing.
|
|
|
|
## Constructor
|
|
|
|
`ModelNode(webglContextOrModel, props: Object)`
|
|
|
|
- If a WebGL context is passed, a `Model` will be created internally, otherwise the passed `Model` will be used.
|
|
- `props` is the same props as `Model`, plus `props.managedResources`, an array of resources that this model owns.
|
|
|
|
## Methods
|
|
|
|
`ModelNode` wraps the following `Model` method and simply proxies them to its internal `Model`:
|
|
|
|
- `draw`
|
|
- `setUniforms`
|
|
- `setAttributes`
|
|
- `updateModuleSettings`
|
|
- `delete` (calls `Model.delete` and also deletes managed resource)
|