Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Index

Constructors

Properties

markAllDefinesAsDirty: (() => void)

Type declaration

    • (): void
    • Helper function to mark defines as being dirty.

      Returns void

The mesh debug visualization. Defaults to NONE.

multiply: boolean

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

name: string

Defines the name of the plugin

priority: number

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

registerForExtraEvents: boolean

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

resolveIncludes: boolean

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[]

Color palette used for MATERIALIDS mode. Defaults to defaultMaterialColors

Accessors

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): void
  • Gets whether the mesh debug plugin is enabled in the material.

    Returns boolean

  • Sets whether the mesh debug plugin is enabled in the material.

    Parameters

    • value: boolean

      enabled

    Returns void

Methods

  • Add fallbacks to the effect fallbacks list.

    Parameters

    • defines: MaterialDefines

      defines the Base texture to use.

    • fallbacks: EffectFallbacks

      defines the current fallback list.

    • currentRank: number

      defines the current fallback rank.

    Returns number

    the new fallback rank.

  • collectDefines(defines: {}): void
  • Collects all defines.

    Parameters

    • defines: {}

      The object to append to.

      • [name: string]: { default: any; type: string }
        • default: any
        • type: string

    Returns void

  • Makes a duplicate of the current configuration into another one.

    Parameters

    Returns void

  • dispose(forceDisposeTextures?: boolean): void
  • Disposes the resources of the material.

    Parameters

    • Optional forceDisposeTextures: boolean

      Forces the disposal of all textures.

    Returns void

  • getAttributes(attributes: string[]): void
  • Get the shader attributes

    Parameters

    • attributes: string[]

      Array of attributes

    Returns void

  • getClassName(): string
  • getCustomCode(shaderType: string): Nullable<{}>
  • getSamplers(samplers: string[]): void
  • Gets the samplers used by the plugin.

    Parameters

    • samplers: string[]

      list that the sampler names should be added to.

    Returns void

  • getUniformBuffersNames(ubos: string[]): void
  • Gets the uniform buffers names added by the plugin.

    Parameters

    • ubos: string[]

      list that the ubo names should be added to.

    Returns void

  • getUniforms(): { fragment: string; ubo: { name: string; size: number; type: string }[] }
  • Get the shader uniforms

    Returns { fragment: string; ubo: { name: string; size: number; type: string }[] }

    Uniforms

    • fragment: string
    • ubo: { name: string; size: number; type: string }[]
  • Binds the material data (this function is called even if mustRebind() returns false)

    Parameters

    • uniformBuffer: UniformBuffer

      defines the Uniform buffer to fill in.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      defines the engine the material belongs to.

    • subMesh: SubMesh

      the submesh to bind data for

    Returns void

  • hasRenderTargetTextures(): boolean
  • Gets a boolean indicating that current material needs to register RTT

    Returns boolean

    true if this uses a render target otherwise false.

  • Checks to see if a texture is used in the material.

    Parameters

    Returns boolean

    • Boolean specifying if a texture is used in the material.
  • Specifies that the submesh is ready to be used.

    Parameters

    • defines: MaterialDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      the engine this scene belongs to.

    • subMesh: SubMesh

      the submesh to check for readiness

    Returns boolean

    • boolean indicating that the submesh is ready or not.
  • parse(source: any, scene: Scene, rootUrl: string): void
  • Parses a plugin configuration from a serialized object.

    Parameters

    • source: any

      Serialized object.

    • scene: Scene

      Defines the scene we are parsing for

    • rootUrl: string

      Defines the rootUrl to load from

    Returns void

  • Sets the defines for the next rendering. Called before MaterialHelper.PrepareDefinesForAttributes is called.

    Parameters

    • defines: MaterialDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene to the material belongs to.

    • mesh: AbstractMesh

      the mesh being rendered

    Returns void

  • serialize(): any
  • Serializes this plugin configuration.

    Returns any

    • An object with the serialized config.
  • PrepareMeshForTrianglesAndVerticesMode(mesh: Mesh, returnRollback?: boolean): (() => void)
  • 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

    • Optional returnRollback: boolean

      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.

      • (): void
      • 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.

        Returns void

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

  • Reset(): void
  • Resets static variables of the plugin to their original state

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme