@skewedaspect/sage 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import { GameEntityManager } from "../managers/entity.d.ts";
2
+ export declare function createEntityProxy(entityManager: GameEntityManager): GameEntityManager & Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import { Quaternion, Vector3 } from '@babylonjs/core';
1
+ import { Quaternion, TransformNode, Vector3 } from '@babylonjs/core';
2
2
  import { QuatConfig, Vec3Config } from "../interfaces/level.d.ts";
3
3
  /**
4
4
  * Convert a BabylonJS Vector3 to a plain { x, y, z } object.
@@ -16,3 +16,20 @@ export declare function toQuatObject(quat: Quaternion): QuatConfig;
16
16
  * Convert a plain { x, y, z, w } object to a BabylonJS Quaternion.
17
17
  */
18
18
  export declare function toQuaternion(quat: QuatConfig): Quaternion;
19
+ /**
20
+ * Compute a node's transform in canonical Babylon space by walking the parent
21
+ * chain and individually cancelling each import conversion ancestor.
22
+ *
23
+ * For each ancestor, computes its local contribution from BabylonJS's own world
24
+ * matrices. If that local contribution has negative determinant (import conversion
25
+ * node like glTF's __root__), it is individually cancelled from the running matrix
26
+ * via left-multiplication by its inverse.
27
+ *
28
+ * Each conversion node is handled one at a time — no assumptions about hierarchy
29
+ * depth or which node is "the" root. Handles arbitrarily nested import hierarchies.
30
+ */
31
+ export declare function getCanonicalTransform(node: TransformNode): {
32
+ position: Vector3;
33
+ rotation: Quaternion;
34
+ scaling: Vector3;
35
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skewedaspect/sage",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "main": "dist/sage.umd.js",
5
5
  "module": "dist/sage.es.js",
6
6
  "types": "dist/sage.d.ts",