petrbroz / svf-utils

Utilities for working with the SVF file format used by Autodesk Platform Services.
https://petrbroz.github.io/svf-utils/
MIT License
123 stars 53 forks source link

Normalise rotation quaternion #61

Closed Rennzie closed 2 years ago

Rennzie commented 2 years ago

Normalise Node rotation quaternions per the GlTF spec.

We noticed some converted files where invalid when run against the gltf-Validator. The error message:

  "code": "ROTATION_NON_UNIT",
  "message": "Rotation quaternion must be normalized."

Added a normalise function similar to gl-matrix which solves the problem.

Rennzie commented 2 years ago

Sorry, I've mixed up branches here. I'll re-open an new PR