@pixiv/three-vrm-springbone 1.0.0-beta.9 → 1.0.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.
Files changed (35) hide show
  1. package/LICENSE +1 -1
  2. package/lib/three-vrm-springbone.js +1039 -1045
  3. package/lib/three-vrm-springbone.min.js +2 -16
  4. package/lib/three-vrm-springbone.module.js +1035 -1039
  5. package/lib/three-vrm-springbone.module.min.js +2 -16
  6. package/package.json +10 -9
  7. package/ts3.4/types/VRMSpringBoneJoint.d.ts +10 -23
  8. package/ts3.4/types/VRMSpringBoneManager.d.ts +17 -3
  9. package/types/VRMSpringBoneCollider.d.ts +12 -12
  10. package/types/VRMSpringBoneColliderGroup.d.ts +14 -14
  11. package/types/VRMSpringBoneColliderShape.d.ts +20 -20
  12. package/types/VRMSpringBoneColliderShapeCapsule.d.ts +23 -23
  13. package/types/VRMSpringBoneColliderShapeSphere.d.ts +18 -18
  14. package/types/VRMSpringBoneJoint.d.ts +110 -123
  15. package/types/VRMSpringBoneJointSettings.d.ts +10 -10
  16. package/types/VRMSpringBoneLoaderPlugin.d.ts +34 -34
  17. package/types/VRMSpringBoneLoaderPluginOptions.d.ts +14 -14
  18. package/types/VRMSpringBoneManager.d.ts +47 -33
  19. package/types/helpers/VRMSpringBoneColliderHelper.d.ts +10 -10
  20. package/types/helpers/VRMSpringBoneJointHelper.d.ts +10 -10
  21. package/types/helpers/index.d.ts +2 -2
  22. package/types/helpers/utils/ColliderShapeBufferGeometry.d.ts +4 -4
  23. package/types/helpers/utils/ColliderShapeCapsuleBufferGeometry.d.ts +15 -15
  24. package/types/helpers/utils/ColliderShapeSphereBufferGeometry.d.ts +14 -14
  25. package/types/helpers/utils/SpringBoneBufferGeometry.d.ts +13 -13
  26. package/types/index.d.ts +10 -10
  27. package/types/tests/VRMSpringBoneColliderShapeCapsule.test.d.ts +1 -1
  28. package/types/tests/VRMSpringBoneColliderShapeSphere.test.d.ts +1 -1
  29. package/types/tests/matchers/toBeCloseToArray.d.ts +9 -9
  30. package/types/tests/matchers/toBeCloseToVector3.d.ts +10 -10
  31. package/types/utils/Matrix4InverseCache.d.ts +28 -28
  32. package/types/utils/getWorldQuaternionLite.d.ts +8 -8
  33. package/types/utils/mat4InvertCompat.d.ts +8 -8
  34. package/types/utils/traverseAncestorsFromRoot.d.ts +2 -2
  35. package/types/utils/traverseChildrenUntilConditionMet.d.ts +8 -8
@@ -1,10 +1,10 @@
1
- /// <reference types="jest" />
2
- import * as THREE from 'three';
3
- export declare function toBeCloseToVector3(received: THREE.Vector3, expected: THREE.Vector3, precision?: number): jest.CustomMatcherResult;
4
- declare global {
5
- namespace jest {
6
- interface Matchers<R> {
7
- toBeCloseToVector3(expected: THREE.Vector3, precision?: number): R;
8
- }
9
- }
10
- }
1
+ /// <reference types="jest" />
2
+ import * as THREE from 'three';
3
+ export declare function toBeCloseToVector3(received: THREE.Vector3, expected: THREE.Vector3, precision?: number): jest.CustomMatcherResult;
4
+ declare global {
5
+ namespace jest {
6
+ interface Matchers<R> {
7
+ toBeCloseToVector3(expected: THREE.Vector3, precision?: number): R;
8
+ }
9
+ }
10
+ }
@@ -1,28 +1,28 @@
1
- import * as THREE from 'three';
2
- export declare class Matrix4InverseCache {
3
- /**
4
- * The target matrix.
5
- */
6
- readonly matrix: THREE.Matrix4;
7
- /**
8
- * A cache of inverse of current matrix.
9
- */
10
- private readonly _inverseCache;
11
- /**
12
- * A flag that makes it want to recalculate its {@link _inverseCache}.
13
- * Will be set `true` when `elements` are mutated and be used in `getInverse`.
14
- */
15
- private _shouldUpdateInverse;
16
- /**
17
- * The original of `matrix.elements`
18
- */
19
- private readonly _originalElements;
20
- /**
21
- * Inverse of given matrix.
22
- * Note that it will return its internal private instance.
23
- * Make sure copying this before mutate this.
24
- */
25
- get inverse(): THREE.Matrix4;
26
- constructor(matrix: THREE.Matrix4);
27
- revert(): void;
28
- }
1
+ import * as THREE from 'three';
2
+ export declare class Matrix4InverseCache {
3
+ /**
4
+ * The target matrix.
5
+ */
6
+ readonly matrix: THREE.Matrix4;
7
+ /**
8
+ * A cache of inverse of current matrix.
9
+ */
10
+ private readonly _inverseCache;
11
+ /**
12
+ * A flag that makes it want to recalculate its {@link _inverseCache}.
13
+ * Will be set `true` when `elements` are mutated and be used in `getInverse`.
14
+ */
15
+ private _shouldUpdateInverse;
16
+ /**
17
+ * The original of `matrix.elements`
18
+ */
19
+ private readonly _originalElements;
20
+ /**
21
+ * Inverse of given matrix.
22
+ * Note that it will return its internal private instance.
23
+ * Make sure copying this before mutate this.
24
+ */
25
+ get inverse(): THREE.Matrix4;
26
+ constructor(matrix: THREE.Matrix4);
27
+ revert(): void;
28
+ }
@@ -1,8 +1,8 @@
1
- import * as THREE from 'three';
2
- /**
3
- * Extract world rotation of an object from its world space matrix, in cheaper way.
4
- *
5
- * @param object The object
6
- * @param out Target vector
7
- */
8
- export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
1
+ import * as THREE from 'three';
2
+ /**
3
+ * Extract world rotation of an object from its world space matrix, in cheaper way.
4
+ *
5
+ * @param object The object
6
+ * @param out Target vector
7
+ */
8
+ export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
@@ -1,8 +1,8 @@
1
- import * as THREE from 'three';
2
- /**
3
- * A compat function for `Matrix4.invert()` / `Matrix4.getInverse()`.
4
- * `Matrix4.invert()` is introduced in r123 and `Matrix4.getInverse()` emits a warning.
5
- * We are going to use this compat for a while.
6
- * @param target A target matrix
7
- */
8
- export declare function mat4InvertCompat<T extends THREE.Matrix4>(target: T): T;
1
+ import * as THREE from 'three';
2
+ /**
3
+ * A compat function for `Matrix4.invert()` / `Matrix4.getInverse()`.
4
+ * `Matrix4.invert()` is introduced in r123 and `Matrix4.getInverse()` emits a warning.
5
+ * We are going to use this compat for a while.
6
+ * @param target A target matrix
7
+ */
8
+ export declare function mat4InvertCompat<T extends THREE.Matrix4>(target: T): T;
@@ -1,2 +1,2 @@
1
- import type * as THREE from 'three';
2
- export declare function traverseAncestorsFromRoot(object: THREE.Object3D, callback: (object: THREE.Object3D) => void): void;
1
+ import type * as THREE from 'three';
2
+ export declare function traverseAncestorsFromRoot(object: THREE.Object3D, callback: (object: THREE.Object3D) => void): void;
@@ -1,8 +1,8 @@
1
- /**
2
- * Traverse children of given object and execute given callback.
3
- * The given object itself wont be given to the callback.
4
- * If the return value of the callback is `true`, it will halt the traversal of its children.
5
- * @param object A root object
6
- * @param callback A callback function called for each children
7
- */
8
- export declare function traverseChildrenUntilConditionMet(object: THREE.Object3D, callback: (object: THREE.Object3D) => boolean): void;
1
+ /**
2
+ * Traverse children of given object and execute given callback.
3
+ * The given object itself wont be given to the callback.
4
+ * If the return value of the callback is `true`, it will halt the traversal of its children.
5
+ * @param object A root object
6
+ * @param callback A callback function called for each children
7
+ */
8
+ export declare function traverseChildrenUntilConditionMet(object: THREE.Object3D, callback: (object: THREE.Object3D) => boolean): void;