This Parameter class defines all parameters that can be consumed and committed by a ParameterObservable. Use addParameterObserver or commitParameters to either add or commit parameters on your observable objects.

Hierarchy

  • Parameter

Properties

ANGLE: "angle" = 'angle'

Mutates the angle of Lights.

Scopes:

Parser

parseNumber

CAST_SHADOW: "castShadow" = 'castShadow'

Mutates whether a shadow should be casted or not.

Scopes:

Parser

parseBoolean

CAST_SHADOW_FROM_LIGHTS: "castShadow.fromLights" = 'castShadow.fromLights'

Mutates from which lights a shadow should be casted.

Scopes:

Parser

parseCommaSeparatedList

COLOR: "color" = 'color'

Mutates the color.

Scopes:

Parser

parseColor

DIFFUSE: "diffuse" = 'diffuse'

Mutates the diffuse color of Lights.

Scopes:

Parser

parseNumber

DIRECTION: "direction" = 'direction'

Mutates the direction of Lights.

Scopes:

Parser

parseNumber

ENVIRONMENT: "environment" = 'environment'

Sets the environment. See BABYLON.Scene.environmentTexture.

Usually the URL to an *.env file.

See environment page for details on how to use this.

Scopes:

Parser

string

ENVIRONMENT_BACKGROUND: "environment.background" = 'environment.background'

Background texture on a PhotoDome. Just background, no IBL or reflection.

Recommended format is *.jpg. HDR files are not supported as background but can be converted to *.jpg using tools like Photoshop, Gimp or various free online converters.

See environment page for details on how to use this.

Scopes:

Parser

string

ENVIRONMENT_COLOR: "environment.color" = 'environment.color'

Sets BABYLON.Scene.clearColor

See environment page for details on how to use this.

Scopes:

Parser

parseColor

ENVIRONMENT_INTENSITY: "environment.intensity" = 'environment.intensity'

Intensity of IBL. Defaults to 1, usually between 0 & 2.

See environment page for details on how to use this.

Scopes:

Parser

parseNumber

ENVIRONMENT_ROTATION: "environment.rotation" = 'environment.rotation'

Rotates connected textures, i.e. IBL, reflection, background, ... Rotation angle in degree.

See environment page for details on how to use this.

Scopes:

Parser

parseNumber

ENVIRONMENT_USEDEFAULT: "environment.usedefault" = 'environment.usedefault'

If true, sets a scene.environmentTexture and creates a BackgroundHelper Node (via scene.createDefaultEnvironment) with two subnodes/meshes:

  • BackgroundPlane
  • BackgroundSkybox

The value of this parameter is ignored if ENVIRONMENT_BACKGROUND is also set.

See environment page for details on how to use this.

Scopes:

Parser

parseBoolean

EXPONENT: "exponent" = 'exponent'

Mutates the exponent of Lights.

Scopes:

Parser

parseNumber

HIGHLIGHTED: "highlighted" = 'highlighted'

Mutates the highlighted state. Getter and setter is highlighted.

Scopes:

Parser

parseBoolean

HIGHLIGHT_COLOR: "highlight.color" = 'highlight.color'

Changes the highlight color.

Scopes:

Parser

parseColor

HIGHLIGHT_ENABLED: "highlight.enabled" = 'highlight.enabled'

Mutates whether a highlight layer should be enabled.

Scopes:

Parser

parseBoolean

INTENSITY: "intensity" = 'intensity'

Mutates the intensity of Lights.

Scopes:

Parser

parseNumber

MATERIAL: "material" = 'material'

Mutates the material. Getter and setter is material. The value of this parameter represents the ID of a baked-in glTF or custom created material in the Variant tree.

Scopes:

Parser

string

MATERIAL_COLOR: "material.color" = 'material.color'

Mutates the material color.

Scopes:

Parser

parseColor

MATERIAL_METALLNESS: "material.metallness" = 'material.metallness'

Mutates the material metallness.

Scopes:

Parser

parseNumber

MATERIAL_ROUGHNESS: "material.roughness" = 'material.roughness'

Mutates the material roughness.

Scopes:

Parser

parseNumber

METALLIC: "metallic" = 'metallic'

Mutates the metallic.

Scopes:

Parser

parseNumber

PAINTABLE: "paintable" = 'paintable'

Paintables can be used to let the client/browser draw graphics on a 3d model by mutating the texture of a material.
For detailed information have a look at the paintables page.

Also see parsePaintable for detailed information on which values you can pass to the paintable parameter.

Scopes:

Parser

parsePaintable

POSITION: "position" = 'position'

Mutates the position relative to its origin position. Getter and setter is position.

Scopes:

Parser

parseVector

RECEIVE_SHADOWS: "receiveShadows" = 'receiveShadows'

Mutates whether to receive shadows or not.

Scopes:

Parser

parseBoolean

ROTATION: "rotation" = 'rotation'

Mutates the rotation relative to its origin rotation. Getter and setter is rotation.

Scopes:

Parser

parseRotation

ROUGHNESS: "roughness" = 'roughness'

Mutates the roughness.

Scopes:

Parser

parseNumber

SCALING: "scaling" = 'scaling'

Stretches or compresses some meshes. Getter and setter is scaling.

Scopes:

Parser

parseScaling

SPECULAR: "specular" = 'specular'

Mutates the specular color of Lights.

Scopes:

Parser

parseNumber

VISIBLE: "visible" = 'visible'

Mutates the visibility. Helper methods are show and hide. Getter and setter is visible.

Scopes:

Parser

parseBoolean

Accessors

Methods

  • Parses string defintion of a paintable into a paintable object.
    Here are some examples:

    // Default definition as JSON object:
    '{ "src": "https://path.to/image.jpg", "uScale": 0.5 }'

    // Short hand definition, only contains source string:
    'https://path.to/image.jpg'

    // Full content, paintable texture is flipped in both directions
    '{ "src": "https://path.to/image.jpg", "uScale": -1, "vScale": -1, "uOffset": 0, "vOffset": 0 }'

    // SVG content can be used directly:
    '<svg>...</svg>'

    // SVG in src property works as well:
    '{ "src": "<svg>...</svg>", "uScale": 0.5 }'

    Parameters

    Returns PaintableValue

Generated using TypeDoc