UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

28 lines (18 loc) 411 B
import Vector3 from '../../../core/geom/Vector3.js'; class Motion { /** * @readonly * @type {Vector3} */ velocity = new Vector3(); toJSON() { return { velocity: this.velocity.toJSON() }; } fromJSON(json) { this.velocity.fromJSON(json.velocity); } } Motion.typeName = "Motion"; export default Motion;