API

Class MeshDebugPluginMaterial

Plugin that implements various mesh debug visualizations, List of available visualizations can be found in MeshDebugMode enum.

Hierarchy (View Summary)

Index
doNotSerialize: boolean = false

Specifies if the material plugin should be serialized, true to skip serialization

markAllDefinesAsDirty: () => void

Helper function to mark defines as being dirty.

name: string

Defines the name of the plugin

priority: number = 500

Defines the priority of the plugin. Lower numbers run first.

registerForExtraEvents: boolean = false

Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)

resolveIncludes: boolean = false

Indicates that any #include directive in the plugin code must be replaced by the corresponding code.

shadedDiffuseColor: Color3

Diffuse color used to shade the mesh. Defaults to (1.0, 1.0, 1.0).

shadedSpecularColor: Color3

Specular color used to shade the mesh. Defaults to (0.8, 0.8, 0.8).

shadedSpecularPower: number

Specular power used to shade the mesh. Defaults to 10.

uvPrimaryColor: Color3

1st color of checkerboard grid in UV1 or UV2 modes. Defaults to (1.0, 1.0, 1.0).

uvScale: number

Size of tiles in UV1 or UV2 modes. Defaults to 20.

uvSecondaryColor: Color3

2nd color of checkerboard grid in UV1 or UV2 modes. Defaults to (0.5, 0.5, 0.5).

vertexColor: Color3

Color of vertices in TRIANGLES_VERTICES and VERTICES mode. Defaults to (0.0, 0.0, 0.0).

vertexRadius: number

Radius of dots drawn over vertices in TRIANGLE_VERTICES and VERTICES mode. Defaults to 1.2.

wireframeThickness: number

Width of edge lines in TRIANGLES and TRIANGLE_VERTICES modes. Defaults to 0.7.

wireframeTrianglesColor: Color3

Color of edge lines in TRIANGLES mode. Defaults to (0.0, 0.0, 0.0).

wireframeVerticesColor: Color3

Color of edge lines in TRIANGLES_VERTICES modes. Defaults to (0.8, 0.8, 0.8).

MaterialColors: Color3[] = defaultMaterialColors

Color palette used for MATERIALIDS mode. Defaults to defaultMaterialColors

The mesh debug visualization. Defaults to NONE.

multiply: boolean

Whether the mesh debug visualization should multiply with color underneath. Defaults to true.

  • Renders triangles in a mesh 3 times by tripling the indices in the index buffer. Used to prepare a mesh to be rendered in TRIANGLES, VERTICES, or TRIANGLES_VERTICES modes. NOTE: This is a destructive operation. The mesh's index buffer and vertex buffers are modified, and a new vertex buffer is allocated. If you'd like the ability to revert these changes, toggle the optional returnRollback flag.

    Parameters

    • mesh: Mesh

      the mesh to target

    • returnRollback: boolean = false

      whether or not to return a function that reverts mesh to its initial state. Default: false.

    Returns () => void

    a rollback function if returnRollback is true, otherwise an empty function.