diff --git a/src/api/XRRigidTransform.js b/src/api/XRRigidTransform.js index 7ff5dcf..2194ea5 100644 --- a/src/api/XRRigidTransform.js +++ b/src/api/XRRigidTransform.js @@ -16,6 +16,7 @@ import * as mat4 from 'gl-matrix/src/gl-matrix/mat4'; import * as vec3 from 'gl-matrix/src/gl-matrix/vec3'; import * as quat from 'gl-matrix/src/gl-matrix/quat'; +import DOMPointReadOnly from '../lib/DOMPointReadOnly'; export const PRIVATE = Symbol('@@webxr-polyfill/XRRigidTransform'); diff --git a/src/lib/DOMPointReadOnly.js b/src/lib/DOMPointReadOnly.js index 9851761..a147d03 100644 --- a/src/lib/DOMPointReadOnly.js +++ b/src/lib/DOMPointReadOnly.js @@ -60,6 +60,8 @@ if (!domPointROExport) { * @return {number} */ get w() { return this[PRIVATE].w } + + static fromPoint(p) { return new DOMPointReadOnly(p.x, p.y, p.z, p.w); } } }