Namespace: MLJ

MLJ

MLJ namespace

Author:
  • Stefano Gabriele
Source:

Classes

Error

Namespaces

gui
util

Members

(static) ColorMode

The supported color modes are:

Uniform - color is per mesh, stored in the 'diffuse' uniform of the material

Face - color is per face (achieved by replicating vertices for each face)

Vertex - color is per vertex, interpolated across each face

Rendering plugins that want to interact with color modes need to include the following uniform/attributes (managed by the framework) in the material and shader definitions:

'diffuse' - uniform (vec3) - will encode the mesh color specified with the relative ColorWheel control

'VCGColor' - attribute (vec3) - will hold the primitive color according to the appropriate mode (per vertex or per face)

'mljColorMode' - uniform int - must be used as a switch to instruct the shader whether to use the 'diffuse' uniform (if == 0) or the incoming varying attribute (if == 1 or == 2) as base color

The uniform variables will be updated by the framework, while the VCGColor attribute is stored in the THREE.BufferGeometry object of the layer. See Layer.js as a use case of this plugin.

Source:

(static) widget :Object

Contains all installed and running widget

Type:
  • Object
Source:

Methods

(static) this.extend(base, sub)

Utility function used to inherit from a superclass

Parameters:
Name Type Description
base class

The superclass

sub class

The subclass

Source:

(static) this.getLastError() → {MLJ.Error}

Get last error

Author:
  • Stefano Gabriele
Source:
Returns:

The last error

Type
MLJ.Error

(static) this.setError(error)

Set an error

Parameters:
Name Type Description
error MLJ.Error

The error to set

Author:
  • Stefano Gabriele
Source: