JSTransparency

API for setting up excavation analysis features.

Creates with the Module.getTransparency API.

var transparency = Module.getTransparency();

clear()

Deletes all created excavations.

Module.getTransparency().clear();

create(coordinates) → number

Creates an excavation object with the given coordinates.

The coordinates input is a list of area coordinates (JSVector3D, JSVector3D, ...).

Name
Type
Description

coordinates

List of excavation area coordinates.

  • Return

    • Success (returns the size of the coordinate list) or failure (-1)

  • Sample

setAutoMove(coordinates, frame) → boolean

Sets the path and speed for an automatically moving circular excavation.

The coordinates input is a list of path coordinates (JSVector2D, JSVector2D, ...).

Name
Type
Description

coordinates

List of excavation path coordinates.

frame

number

Frame count for updating the excavation position.

  • Return

    • true : Setting successful.

    • false : Setting failed.

  • Sample

setDepth(depth)

Sets the depth of the excavation.

Name
Type
Description

depth

number

Depth of the excavation from the ground surface (in meters).

setRadius(radius)

Sets the radius of the circular excavation.

Name
Type
Description

radius

number

Radius of the circular excavation (in meters).

setTexture(data, width, height, type) → boolean

Sets the texture image for the excavation surface.

The data variable is a binary array data based on Uint8Array.

Name
Type
Description

data

object

Image Byte Array

width

number

Image width

height

number

Image height

type

boolean

true for side texture. false for bottom texture.

startAutoMove() → boolean

Starts the automatic movement of the excavation along a predefined path.

  • Return

    • true : Movement start successful.

    • false : Movement start failed.

  • Sample

stopAutoMove()

Stops the automatic movement of the excavation along a predefined path.

Last updated