new Dynamics()
- Source:
- mapspace/interaction/dynamics.js
Methods
-
<static> equals(d1, d2)
-
Returns true or false if both d1 and d2 objects are equal.
Parameters:
Name Type Description d1
Mapspace.interaction.Dynamics Object 1.
d2
Mapspace.interaction.Dynamics Object 2.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return true or false.
- Type
- boolean
-
equals(other)
-
Returns true or false if other and this object are equal.
Parameters:
Name Type Description other
Mapspace.interaction.Dynamics Object.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return true or false.
- Type
- boolean
-
nullVelocityTime()
-
Returns the time to stop.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return zero if there isn't any velocity, Infinity if there isn't any friction, or the time to stop if both exist.
- Type
- number
-
offsetFromVelocity(elapsed)
-
Returns offset after a time.
Parameters:
Name Type Description elapsed
number Time in milliseconds to pass.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return the new offset.
- Type
- number
-
reset()
-
Reinitialize values.
- Source:
- mapspace/interaction/dynamics.js
-
toString()
-
Returns a string representation of this param.
- Source:
- mapspace/interaction/dynamics.js
Returns:
- Type
- string
-
update(other, elapsed)
-
Updates this object with values from other object.
Parameters:
Name Type Description other
Mapspace.interaction.Dynamics Object.
elapsed
number Time in milliseconds to apply the update.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return true or false.
- Type
- boolean
-
velocityAfter(elapsed)
-
Returns velocity after a time.
Parameters:
Name Type Description elapsed
number Time in milliseconds to pass.
- Source:
- mapspace/interaction/dynamics.js
Returns:
Return the new velocity or null if there isn't any.
- Type
- number