How to use the quaternion.fromEuler function in quaternion

To help you get started, we’ve selected a few quaternion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nickyvanurk / 3d-multiplayer-browser-shooter / app.js View on Github external
spawn() {
    this.position = new Vector3(
      Math.floor(Math.random() * 41) - 20,
      Math.floor(Math.random() * 41) - 20,
      Math.floor(Math.random() * 41) - 20
    );

    this.rotation = new Quaternion.fromEuler(
      Math.random() * 361 * Math.PI / 180,
      Math.random() * 361 * Math.PI / 180,
      Math.random() * 361 * Math.PI / 180
    );
  }

quaternion

A rotation library using quaternions

MIT
Latest version published 24 days ago

Package Health Score

71 / 100
Full package analysis