Preparing search index...

    Visual component for rendering eye color on a face mesh.

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

    // Create a scene object with an EyeColorVisual for eye color effects
    const obj = scene.createSceneObject('EyeColor');
    const visual = obj.addComponent('EyeColorVisual') as Editor.Components.EyeColorVisual;

    // Configure for both eyes on the first face
    visual.faceIndex = 0;
    visual.eyeToRender = Editor.Components.EyeToRender.Both;
    visual.rotationEnabled = true;
    console.log(`EyeColorVisual: face=${visual.faceIndex}, eye=${visual.eyeToRender}, rotation=${visual.rotationEnabled}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean

    Whether the component is active.

    eyeToRender: EyeToRender

    Which eye to render.

    faceIndex: number

    Index of the face mesh to apply color to.

    horizontalAlignment: Horizontal

    Horizontal alignment of the mesh visual.

    id: Uuid

    The unique id of the entity.

    mainMaterial: Material

    Primary material used for rendering.

    materials: Material[]

    Array of all materials on this mesh visual.

    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.

    rotationEnabled: boolean

    Whether the eye visual rotates with the face.

    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 true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Move a material from one index to another.

      Parameters

      • origin: number
      • destination: number

      Returns void