A renderable node that pairs a GPU Mesh with a scene-tree transform and per-surface material overrides.
Inherits from: Node
Lua full name: lysa.nodes.MeshInstance
|
| MeshInstance | create (mesh: lysa.Mesh)static |
| | Creates a new MeshInstance from the given Mesh. More...
|
| |
| MeshInstance | create (mesh: lysa.Mesh, name: string)static |
| | Creates a named MeshInstance from the given Mesh. More...
|
| |
| lysa.Material | get_surface_material (index: integer) |
| | Returns the effective material for the given surface (override if set, otherwise the mesh default). More...
|
| |
| nil | set_surface_override_material (index: integer, material: lysa.Material|lysa.StandardMaterial|lysa.ShaderMaterial|nil) |
| | Sets a per-instance material override for the given surface index; pass nil to clear. More...
|
| |
| lysa.Material|nil | get_surface_override_material (index: integer) |
| | Returns the per-instance override material for the given surface index, or nil if none is set. More...
|
| |
| nil | remove_surface_override_material (index: integer) |
| | Removes the per-instance override material for the given surface, restoring the mesh default. More...
|
| |
|
| lysa.Mesh | mesh |
| | The GPU Mesh used by this instance. (read-only)
|
| |
| lysa.AABB | aabb |
| | World-space axis-aligned bounding box of this instance. (read-only)
|
| |
| boolean | cast_shadows |
| | Whether this instance contributes to shadow maps.
|
| |