Mixin: physical

syngen.utility.physical

Provides properties and methods to orient and move objects through three-dimensional space. The static decorate method grants objects these qualities.

Source:
See:
To Do:
  • Improve clarity and proximity of documentation and source

Members

angularVelocity :syngen.utility.quaternion

Angular velocity, in radians per second.

Type:
Source:

quaternion :syngen.utility.quaternion

Orientation with respect to the coordinate system.

Type:
Source:

velocity :syngen.utility.vector3d

Lateral velocity, in meters per second.

Type:
Source:

x :Number

Position along the x-axis, in meters.

Type:
  • Number
Source:

y :Number

Position along the y-axis, in meters.

Type:
  • Number
Source:

z :Number

Position along the z-axis, in meters.

Type:
  • Number
Source:

Methods

(static) decorate(target)

Decorates target with physical properties and methods and returns it.

Parameters:
Name Type Description
target Object
Source:

euler() → {syngen.utility.euler}

Returns the orientation as an Euler angle.

Source:
Returns:
Type
syngen.utility.euler

resetPhysics()

Resets angular and lateral velocities to zero.

Source:

updatePhysics(deltaopt)

Updates the coordinates and orientation due to angular and lateral velocities.

Parameters:
Name Type Attributes Default Description
delta Number <optional>
syngen.loop.delta()
Source:

vector() → {syngen.utility.vector3d}

Returns the coordinates as a vector.

Source:
Returns:
Type
syngen.utility.vector3d