The same entity as in Lens Scripting.
LensScripting.BaseMeshVisual.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const scene = model.project.scene; // Create a RenderMeshVisual and set shadow mode to Caster const obj = scene.createSceneObject('ShadowCaster'); const rmv = obj.addComponent('RenderMeshVisual'); rmv.meshShadowMode = Editor.Components.MeshShadowMode.Caster; console.log(`meshShadowMode: ${rmv.meshShadowMode}`); Copy
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const scene = model.project.scene; // Create a RenderMeshVisual and set shadow mode to Caster const obj = scene.createSceneObject('ShadowCaster'); const rmv = obj.addComponent('RenderMeshVisual'); rmv.meshShadowMode = Editor.Components.MeshShadowMode.Caster; console.log(`meshShadowMode: ${rmv.meshShadowMode}`);
Mesh casts shadows onto other objects.
Mesh neither casts nor receives shadows.
Mesh receives shadows from other objects.
The same entity as in Lens Scripting.
See
LensScripting.BaseMeshVisual.
Example