Preparing search index...

    Base class for mesh-based visual components.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Create a RenderMeshVisual (extends BaseMeshVisual) and configure its properties
    const obj = scene.createSceneObject('MeshObj');
    const visual = obj.addComponent('RenderMeshVisual') as Editor.Components.RenderMeshVisual;

    // Configure shadow casting
    visual.meshShadowMode = Editor.Components.MeshShadowMode.Caster;
    visual.shadowDensity = 0.8;
    console.log(`Shadow: mode=${visual.meshShadowMode}, density=${visual.shadowDensity}`);

    // Set stretch and alignment
    visual.stretchMode = Editor.Components.StretchMode.Fit;
    visual.horizontalAlignment = Editor.Alignment.Horizontal.Center;
    visual.verticalAlignment = Editor.Alignment.Vertical.Center;
    console.log(`Stretch: ${visual.stretchMode}, align: h=${visual.horizontalAlignment}, v=${visual.verticalAlignment}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean

    Whether the component is active.

    horizontalAlignment: Horizontal

    Horizontal alignment of the mesh visual.

    id: Uuid

    The unique id of the entity.

    meshShadowMode: MeshShadowMode

    Shadow rendering mode for the mesh.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    Name of the component.

    renderOrder: number

    Determines the order in which this visual component is rendered relative to others.

    sceneObject: SceneObject

    Scene object this component is attached to.

    shadowColor: vec4

    Color of the mesh shadow.

    shadowDensity: number

    Opacity of the mesh shadow.

    stretchMode: StretchMode

    How the mesh stretches to fit its container.

    type: string

    The entity's type.

    verticalAlignment: Vertical

    Vertical alignment of the mesh visual.

    Methods

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean