Skip to content

changes to Vector3 for ES6 modules #101

Description

@pixelzoom

Noted while using Vector3 in Natural Selection, and working on #100.

In Vector3:

import dot from './dot.js';
import './Utils.js';
import './Vector3.js';
...
  slerp: function( start, end, ratio ) {
    // NOTE: we can't create a require() loop here
    return dot.Quaternion.slerp( new dot.Quaternion(), dot.Quaternion.getRotationQuaternion( start, end ), ratio ).timesVector3( start );
  },

Now that's we're using ES6 modules:

  • Can the odd imports be changed/removed?
  • Can the "NOTE" comment be removed/revised?
  • Can dot.Quaternion be replaced with an import?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions