Viam-related utilities for THREE.js
A class for Viam's Orientation Vector rotation type.
This class closely resembles other rotation formats like THREE.Quaternion
or THREE.Euler
.
import * as THREE from 'three';
import { OrientationVector } from '@viamrobotics/three';
const ov = new OrientationVector();
const quat = new THREE.Quaternion();
const euler = new THREE.Euler();
// Common conversions:
ov.toQuaternion(quat);
ov.toEuler(euler);
ov.setFromQuaternion(quat);
Extends THREE.Object3D and adds an .orientationVector
that auto-updates when other rotation formats are updated.
import { ViamObject3D } from '@viamrobotics/three';