@objectifthunes/three-book 0.4.1 → 0.4.2

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.
@@ -1,8 +1,9 @@
1
1
  import * as THREE from 'three';
2
2
  /**
3
3
  * Clamps a point to the surface of an ellipse if it lies outside.
4
- * (Note: the original C# method was named "Calmp" -- a typo preserved here
5
- * in the comment but corrected in the exported function name.)
4
+ * Writes result into `out` to avoid allocation.
5
+ *
6
+ * `point` and `out` may be the same object (in-place operation is safe).
6
7
  */
7
- export declare function clamp(point: THREE.Vector2, ellipseCenter: THREE.Vector2, ellipseSize: THREE.Vector2): THREE.Vector2;
8
+ export declare function clamp(point: THREE.Vector2, ellipseCenter: THREE.Vector2, ellipseSize: THREE.Vector2, out: THREE.Vector2): THREE.Vector2;
8
9
  //# sourceMappingURL=EllipseUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EllipseUtility.d.ts","sourceRoot":"","sources":["../../src/utils/EllipseUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuC/B;;;;GAIG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,aAAa,EAAE,KAAK,CAAC,OAAO,EAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,GACzB,KAAK,CAAC,OAAO,CASf"}
1
+ {"version":3,"file":"EllipseUtility.d.ts","sourceRoot":"","sources":["../../src/utils/EllipseUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6C/B;;;;;GAKG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,aAAa,EAAE,KAAK,CAAC,OAAO,EAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,EAC1B,GAAG,EAAE,KAAK,CAAC,OAAO,GACjB,KAAK,CAAC,OAAO,CAWf"}
@@ -7,7 +7,8 @@ import * as THREE from 'three';
7
7
  * projective row. THREE.Vector3.applyMatrix4 does the same for affine
8
8
  * matrices (w is assumed 1 and the perspective divide is a no-op).
9
9
  *
10
- * Returns a new THREE.Ray with the transformed origin and direction.
10
+ * Returns a module-level scratch Ray use the result immediately before
11
+ * calling transformRay again.
11
12
  */
12
13
  export declare function transformRay(ray: THREE.Ray, matrix: THREE.Matrix4): THREE.Ray;
13
14
  //# sourceMappingURL=MatrixUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MatrixUtility.d.ts","sourceRoot":"","sources":["../../src/utils/MatrixUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,MAAM,EAAE,KAAK,CAAC,OAAO,GACpB,KAAK,CAAC,GAAG,CAIX"}
1
+ {"version":3,"file":"MatrixUtility.d.ts","sourceRoot":"","sources":["../../src/utils/MatrixUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,MAAM,EAAE,KAAK,CAAC,OAAO,GACpB,KAAK,CAAC,GAAG,CAKX"}
@@ -5,12 +5,12 @@
5
5
  */
6
6
  import * as THREE from 'three';
7
7
  /**
8
- * Flip the X axis of a texture ST vector.
8
+ * Flip the X axis of a texture ST vector in place.
9
9
  * ST format: (scaleX, scaleY, offsetX, offsetY)
10
10
  */
11
- export declare function xFlipST(st: THREE.Vector4): THREE.Vector4;
11
+ export declare function xFlipST(st: THREE.Vector4): void;
12
12
  /**
13
- * Flip the Y axis of a texture ST vector.
13
+ * Flip the Y axis of a texture ST vector in place.
14
14
  */
15
- export declare function yFlipST(st: THREE.Vector4): THREE.Vector4;
15
+ export declare function yFlipST(st: THREE.Vector4): void;
16
16
  //# sourceMappingURL=TextureUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureUtility.d.ts","sourceRoot":"","sources":["../../src/utils/TextureUtility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAExD"}
1
+ {"version":3,"file":"TextureUtility.d.ts","sourceRoot":"","sources":["../../src/utils/TextureUtility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAG/C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAG/C"}
@@ -8,10 +8,12 @@ import * as THREE from 'three';
8
8
  export declare function smoothDamp(current: THREE.Vector3, target: THREE.Vector3, currentVelocity: THREE.Vector3, smoothTime: THREE.Vector3, maxSpeed?: number, deltaTime?: number): THREE.Vector3;
9
9
  /**
10
10
  * Converts an XY vector to XZ (y -> z, y set to 0).
11
+ * Writes into `out` to avoid allocation.
11
12
  */
12
- export declare function xy2xz(v: THREE.Vector3): THREE.Vector3;
13
+ export declare function xy2xz(v: THREE.Vector2, out: THREE.Vector3): THREE.Vector3;
13
14
  /**
14
- * Converts an XZ vector to XY (z -> y, z set to 0).
15
+ * Converts an XZ vector to XY (z -> y).
16
+ * Writes into `out` to avoid allocation.
15
17
  */
16
- export declare function xz2xy(v: THREE.Vector3): THREE.Vector3;
18
+ export declare function xz2xy(v: THREE.Vector3, out: THREE.Vector2): THREE.Vector2;
17
19
  //# sourceMappingURL=VectorUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VectorUtility.d.ts","sourceRoot":"","sources":["../../src/utils/VectorUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4D/B;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,MAAM,EAAE,KAAK,CAAC,OAAO,EACrB,eAAe,EAAE,KAAK,CAAC,OAAO,EAC9B,UAAU,EAAE,KAAK,CAAC,OAAO,EACzB,QAAQ,GAAE,MAAiB,EAC3B,SAAS,GAAE,MAAe,GACzB,KAAK,CAAC,OAAO,CA8Bf;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAErD"}
1
+ {"version":3,"file":"VectorUtility.d.ts","sourceRoot":"","sources":["../../src/utils/VectorUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4D/B;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,MAAM,EAAE,KAAK,CAAC,OAAO,EACrB,eAAe,EAAE,KAAK,CAAC,OAAO,EAC9B,UAAU,EAAE,KAAK,CAAC,OAAO,EACzB,QAAQ,GAAE,MAAiB,EAC3B,SAAS,GAAE,MAAe,GACzB,KAAK,CAAC,OAAO,CA+Bf;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAEzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectifthunes/three-book",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",