NativeCommandManager

  • Manage native command

Constructor

new NativeCommandManager()

Extends

  • ScriptBase

Members

map :AbstractMap|null

Type:
  • AbstractMap | null

objectsMoving :Object.<string, Array>

state of the objects moving

Type:
  • Object.<string, Array>

(static) DEFAULT_VARIABLES

(static) ID_SCRIPT

Gets the script ID.

Methods

checkMaxAltitude(object3D) → {boolean}

Checks if the given object's altitude is below the maximum allowed altitude.

Parameters:
NameTypeDescription
object3DObject3D

The object to check.

Returns:
  • True if the object's altitude is below the maximum allowed altitude, false otherwise.
Type: 
boolean

checkMinAltitude(object3D) → {boolean}

Checks if the given object's altitude is above the minimum allowed altitude.

Parameters:
NameTypeDescription
object3DObject3D

The object to check.

Returns:
  • True if the object's altitude is above the minimum allowed altitude, false otherwise.
Type: 
boolean

clampRotation(object3D)

Parameters:
NameTypeDescription
object3DObject3D

object3d to clamp rotation

computeMaxAltitude() → {number}

Computes the maximum allowed altitude. If you want to have different max altitude for gameobject you should override this method

Returns:
  • The maximum allowed altitude.
Type: 
number

computeMinAltitude() → {number}

Computes the minimum allowed altitude. If you want to have different min altitude for gameobject you should override this method

Returns:
  • The minimum allowed altitude.
Type: 
number

computeObjectSpeedRotate() → {number}

If you want to have different rotation speed for gameobject you should override this method

Returns:

speed of the rotation

Type: 
number

computeObjectSpeedTranslate() → {number}

If you want to have different translation speed for gameobject you should override this method

Returns:

speed of the translation

Type: 
number

freeze(object3D, value)

An object3D freezed cant be move by manager

Parameters:
NameTypeDescription
object3DObject3D

object3D to freeze or not

valueboolean

freeze or not an object3D

stop(object3D)

End Movement of an object3D

Parameters:
NameTypeDescription
object3DObject3D

object3D to stop

tick()

Handles the tick event.

(static) move(object3D, vector, map, withMap) → {boolean}

Move object3D on a map

Parameters:
NameTypeDescription
object3DObject3D

object3D to move

vectorVector3

move vector

mapAbstractMap

map script

withMapboolean

map should be consider

Returns:

isOutOfMap - the movement make the object3D leaves the map

Type: 
boolean

(static) moveBackward(object3D, value, map, withMapopt) → {boolean}

Move backward object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move backward

valuenumber

amount to move backward

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) moveDown(object3D, value, map, withMapopt) → {boolean}

Move up object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move up

valuenumber

amount to move up

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) moveForward(object3D, value, map, withMapopt) → {boolean}

Move forward object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move forward

valuenumber

amount to move forward

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) moveLeft(object3D, value, map, withMapopt) → {boolean}

Move letf object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move left

valuenumber

amount to move left

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) moveRight(object3D, value, map, withMapopt) → {boolean}

Move right object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move right

valuenumber

amount to move right

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) moveUp(object3D, value, map, withMapopt) → {boolean}

Move up object3D of a certain value

Parameters:
NameTypeAttributesDefaultDescription
object3DObject3D

object3D to move up

valuenumber

amount to move up

mapAbstractMap

map script

withMapboolean<optional>
true

map should be consider

Returns:
  • the movement make the object3D leaves the map
Type: 
boolean

(static) rotate(object3D, euler)

Rotate an object3D with an euler

Parameters:
NameTypeDescription
object3DObject3D

object3D to rotate

eulerEuler

euler to rotate from