@pixiv/three-vrm-springbone 2.1.0-beta.2 → 2.1.0-beta.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 (31) hide show
  1. package/lib/three-vrm-springbone.js +1 -1
  2. package/lib/three-vrm-springbone.module.js +1 -1
  3. package/package.json +4 -5
  4. package/LICENSE +0 -22
  5. package/ts3.4/types/VRMSpringBoneCollider.d.ts +0 -12
  6. package/ts3.4/types/VRMSpringBoneColliderGroup.d.ts +0 -14
  7. package/ts3.4/types/VRMSpringBoneColliderShape.d.ts +0 -20
  8. package/ts3.4/types/VRMSpringBoneColliderShapeCapsule.d.ts +0 -23
  9. package/ts3.4/types/VRMSpringBoneColliderShapeSphere.d.ts +0 -18
  10. package/ts3.4/types/VRMSpringBoneJoint.d.ts +0 -116
  11. package/ts3.4/types/VRMSpringBoneJointSettings.d.ts +0 -10
  12. package/ts3.4/types/VRMSpringBoneLoaderPlugin.d.ts +0 -34
  13. package/ts3.4/types/VRMSpringBoneLoaderPluginOptions.d.ts +0 -14
  14. package/ts3.4/types/VRMSpringBoneManager.d.ts +0 -47
  15. package/ts3.4/types/helpers/VRMSpringBoneColliderHelper.d.ts +0 -10
  16. package/ts3.4/types/helpers/VRMSpringBoneJointHelper.d.ts +0 -10
  17. package/ts3.4/types/helpers/index.d.ts +0 -2
  18. package/ts3.4/types/helpers/utils/ColliderShapeBufferGeometry.d.ts +0 -5
  19. package/ts3.4/types/helpers/utils/ColliderShapeCapsuleBufferGeometry.d.ts +0 -16
  20. package/ts3.4/types/helpers/utils/ColliderShapeSphereBufferGeometry.d.ts +0 -15
  21. package/ts3.4/types/helpers/utils/SpringBoneBufferGeometry.d.ts +0 -14
  22. package/ts3.4/types/index.d.ts +0 -10
  23. package/ts3.4/types/tests/VRMSpringBoneColliderShapeCapsule.test.d.ts +0 -1
  24. package/ts3.4/types/tests/VRMSpringBoneColliderShapeSphere.test.d.ts +0 -1
  25. package/ts3.4/types/tests/matchers/toBeCloseToArray.d.ts +0 -9
  26. package/ts3.4/types/tests/matchers/toBeCloseToVector3.d.ts +0 -10
  27. package/ts3.4/types/utils/Matrix4InverseCache.d.ts +0 -28
  28. package/ts3.4/types/utils/getWorldQuaternionLite.d.ts +0 -10
  29. package/ts3.4/types/utils/mat4InvertCompat.d.ts +0 -8
  30. package/ts3.4/types/utils/traverseAncestorsFromRoot.d.ts +0 -2
  31. package/ts3.4/types/utils/traverseChildrenUntilConditionMet.d.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @pixiv/three-vrm-springbone v2.1.0-beta.2
2
+ * @pixiv/three-vrm-springbone v2.1.0-beta.3
3
3
  * Spring bone module for @pixiv/three-vrm
4
4
  *
5
5
  * Copyright (c) 2020-2024 pixiv Inc.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @pixiv/three-vrm-springbone v2.1.0-beta.2
2
+ * @pixiv/three-vrm-springbone v2.1.0-beta.3
3
3
  * Spring bone module for @pixiv/three-vrm
4
4
  *
5
5
  * Copyright (c) 2020-2024 pixiv Inc.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixiv/three-vrm-springbone",
3
- "version": "2.1.0-beta.2",
3
+ "version": "2.1.0-beta.3",
4
4
  "description": "Spring bone module for @pixiv/three-vrm",
5
5
  "license": "MIT",
6
6
  "author": "pixiv",
@@ -50,14 +50,13 @@
50
50
  ]
51
51
  },
52
52
  "dependencies": {
53
- "@pixiv/types-vrm-0.0": "2.0.8",
54
- "@pixiv/types-vrmc-springbone-1.0": "2.0.8"
53
+ "@pixiv/types-vrm-0.0": "2.1.0-beta.3",
54
+ "@pixiv/types-vrmc-springbone-1.0": "2.1.0-beta.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "three": "^0.160.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "three": "^0.160.0"
61
- },
62
- "gitHead": "22f562d401e2d1e7084e7c9fa0c6e1f23f83edd6"
61
+ }
63
62
  }
package/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2019-2024 pixiv Inc.
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,12 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderShape } from './VRMSpringBoneColliderShape';
3
- /**
4
- * Represents a collider of a VRM.
5
- */
6
- export declare class VRMSpringBoneCollider extends THREE.Object3D {
7
- /**
8
- * The shape of the collider.
9
- */
10
- readonly shape: VRMSpringBoneColliderShape;
11
- constructor(shape: VRMSpringBoneColliderShape);
12
- }
@@ -1,14 +0,0 @@
1
- import { VRMSpringBoneCollider } from './VRMSpringBoneCollider';
2
- /**
3
- * Represents a collider group of a VRM.
4
- */
5
- export interface VRMSpringBoneColliderGroup {
6
- /**
7
- * The colliders of the collider group.
8
- */
9
- colliders: VRMSpringBoneCollider[];
10
- /**
11
- * The name of the collider.
12
- */
13
- name?: string;
14
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Represents a shape of a collider.
3
- */
4
- export declare abstract class VRMSpringBoneColliderShape {
5
- /*
6
- * The type of the shape.
7
- */
8
- abstract readonly type: string;
9
- /**
10
- * Calculate a distance and a direction from the collider to a target object.
11
- * It's hit if the distance is negative.
12
- * The direction will be contained in the given target vector.
13
- *
14
- * @param colliderMatrix A matrix represents the transform of the collider
15
- * @param objectPosition A vector represents the position of the target object
16
- * @param objectRadius The radius of the object
17
- * @param target The result direction will be contained in this vector
18
- */
19
- abstract calculateCollision(colliderMatrix: THREE.Matrix4, objectPosition: THREE.Vector3, objectRadius: number, target: THREE.Vector3): number;
20
- }
@@ -1,23 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderShape } from './VRMSpringBoneColliderShape';
3
- export declare class VRMSpringBoneColliderShapeCapsule extends VRMSpringBoneColliderShape {
4
- readonly type: 'capsule';
5
- /**
6
- * The offset of the head from the origin.
7
- */
8
- offset: THREE.Vector3;
9
- /**
10
- * The offset of the tail from the origin.
11
- */
12
- tail: THREE.Vector3;
13
- /**
14
- * The radius.
15
- */
16
- radius: number;
17
- constructor(params?: {
18
- radius?: number;
19
- offset?: THREE.Vector3;
20
- tail?: THREE.Vector3;
21
- });
22
- calculateCollision(colliderMatrix: THREE.Matrix4, objectPosition: THREE.Vector3, objectRadius: number, target: THREE.Vector3): number;
23
- }
@@ -1,18 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderShape } from './VRMSpringBoneColliderShape';
3
- export declare class VRMSpringBoneColliderShapeSphere extends VRMSpringBoneColliderShape {
4
- readonly type: 'sphere';
5
- /**
6
- * The offset from the origin.
7
- */
8
- offset: THREE.Vector3;
9
- /**
10
- * The radius.
11
- */
12
- radius: number;
13
- constructor(params?: {
14
- radius?: number;
15
- offset?: THREE.Vector3;
16
- });
17
- calculateCollision(colliderMatrix: THREE.Matrix4, objectPosition: THREE.Vector3, objectRadius: number, target: THREE.Vector3): number;
18
- }
@@ -1,116 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
3
- import { VRMSpringBoneJointSettings } from './VRMSpringBoneJointSettings';
4
- /**
5
- * A class represents a single joint of a spring bone.
6
- * It should be managed by a [[VRMSpringBoneManager]].
7
- */
8
- export declare class VRMSpringBoneJoint {
9
- /**
10
- * Settings of the bone.
11
- */
12
- settings: VRMSpringBoneJointSettings;
13
- /**
14
- * Collider groups attached to this bone.
15
- */
16
- colliderGroups: VRMSpringBoneColliderGroup[];
17
- /**
18
- * An Object3D attached to this bone.
19
- */
20
- readonly bone: THREE.Object3D;
21
- /**
22
- * An Object3D that will be used as a tail of this spring bone.
23
- * It can be null when the spring bone is imported from VRM 0.0.
24
- */
25
- readonly child: THREE.Object3D | null;
26
- /**
27
- * Current position of child tail, in center unit. Will be used for verlet integration.
28
- */
29
- private _currentTail;
30
- /**
31
- * Previous position of child tail, in center unit. Will be used for verlet integration.
32
- */
33
- private _prevTail;
34
- /**
35
- * Initial axis of the bone, in local unit.
36
- */
37
- private _boneAxis;
38
- /**
39
- * Length of the bone in world unit.
40
- * Will be used for normalization in update loop, will be updated by {@link _calcWorldSpaceBoneLength}.
41
- *
42
- * It's same as local unit length unless there are scale transformations in the world space.
43
- */
44
- private _worldSpaceBoneLength;
45
- /**
46
- * This springbone will be calculated based on the space relative from this object.
47
- * If this is `null`, springbone will be calculated in world space.
48
- */
49
- private _center;
50
- center: THREE.Object3D | null;
51
- /**
52
- * Initial state of the local matrix of the bone.
53
- */
54
- private _initialLocalMatrix;
55
- /**
56
- * Initial state of the rotation of the bone.
57
- */
58
- private _initialLocalRotation;
59
- /**
60
- * Initial state of the position of its child.
61
- */
62
- private _initialLocalChildPosition;
63
- readonly initialLocalChildPosition: THREE.Vector3;
64
- /*
65
- * Returns the world matrix of its parent object.
66
- * Note that it returns a reference to the matrix. Don't mutate this directly!
67
- */
68
- private readonly _parentMatrixWorld: any;
69
- /**
70
- * Create a new VRMSpringBone.
71
- *
72
- * @param bone An Object3D that will be attached to this bone
73
- * @param child An Object3D that will be used as a tail of this spring bone. It can be null when the spring bone is imported from VRM 0.0
74
- * @param settings Several parameters related to behavior of the spring bone
75
- * @param colliderGroups Collider groups that will be collided with this spring bone
76
- */
77
- constructor(bone: THREE.Object3D, child: THREE.Object3D | null, settings?: Partial<VRMSpringBoneJointSettings>, colliderGroups?: VRMSpringBoneColliderGroup[]);
78
- /**
79
- * Set the initial state of this spring bone.
80
- * You might want to call {@link VRMSpringBoneManager.setInitState} instead.
81
- */
82
- setInitState(): void;
83
- /**
84
- * Reset the state of this bone.
85
- * You might want to call [[VRMSpringBoneManager.reset]] instead.
86
- */
87
- reset(): void;
88
- /**
89
- * Update the state of this bone.
90
- * You might want to call [[VRMSpringBoneManager.update]] instead.
91
- *
92
- * @param delta deltaTime
93
- */
94
- update(delta: number): void;
95
- /**
96
- * Do collision math against every colliders attached to this bone.
97
- *
98
- * @param tail The tail you want to process
99
- */
100
- private _collision;
101
- /**
102
- * Calculate the {@link _worldSpaceBoneLength}.
103
- * Intended to be used in {@link update}.
104
- */
105
- private _calcWorldSpaceBoneLength;
106
- /**
107
- * Create a matrix that converts center space into world space.
108
- * @param target Target matrix
109
- */
110
- private _getMatrixCenterToWorld;
111
- /**
112
- * Create a matrix that converts world space into center space.
113
- * @param target Target matrix
114
- */
115
- private _getMatrixWorldToCenter;
116
- }
@@ -1,10 +0,0 @@
1
- export interface VRMSpringBoneJointSettings {
2
- /**
3
- * Radius of the bone, will be used for collision.
4
- */
5
- hitRadius: number;
6
- stiffness: number;
7
- gravityPower: number;
8
- gravityDir: THREE.Vector3;
9
- dragForce: number;
10
- }
@@ -1,34 +0,0 @@
1
- import * as THREE from 'three';
2
- import { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
3
- import { VRMSpringBoneLoaderPluginOptions } from './VRMSpringBoneLoaderPluginOptions';
4
- export declare class VRMSpringBoneLoaderPlugin implements GLTFLoaderPlugin {
5
- static readonly EXTENSION_NAME = "VRMC_springBone";
6
- /**
7
- * Specify an Object3D to add {@link VRMSpringBoneJointHelper} s.
8
- * If not specified, helper will not be created.
9
- * If `renderOrder` is set to the root, helpers will copy the same `renderOrder` .
10
- */
11
- jointHelperRoot?: THREE.Object3D;
12
- /**
13
- * Specify an Object3D to add {@link VRMSpringBoneJointHelper} s.
14
- * If not specified, helper will not be created.
15
- * If `renderOrder` is set to the root, helpers will copy the same `renderOrder` .
16
- */
17
- colliderHelperRoot?: THREE.Object3D;
18
- readonly parser: GLTFParser;
19
- readonly name: string;
20
- constructor(parser: GLTFParser, options?: VRMSpringBoneLoaderPluginOptions);
21
- afterRoot(gltf: GLTF): Promise<void>;
22
- /**
23
- * Import spring bones from a GLTF and return a {@link VRMSpringBoneManager}.
24
- * It might return `null` instead when it does not need to be created or something go wrong.
25
- *
26
- * @param gltf A parsed result of GLTF taken from GLTFLoader
27
- */
28
- private _import;
29
- private _v1Import;
30
- private _v0Import;
31
- private _importJoint;
32
- private _importSphereCollider;
33
- private _importCapsuleCollider;
34
- }
@@ -1,14 +0,0 @@
1
- export interface VRMSpringBoneLoaderPluginOptions {
2
- /**
3
- * Specify an Object3D to add {@link VRMSpringBoneJointHelper} s.
4
- * If not specified, helper will not be created.
5
- * If `renderOrder` is set to the root, helpers will copy the same `renderOrder` .
6
- */
7
- jointHelperRoot?: THREE.Object3D;
8
- /**
9
- * Specify an Object3D to add {@link VRMSpringBoneColliderHelper} s.
10
- * If not specified, helper will not be created.
11
- * If `renderOrder` is set to the root, helpers will copy the same `renderOrder` .
12
- */
13
- colliderHelperRoot?: THREE.Object3D;
14
- }
@@ -1,47 +0,0 @@
1
- import { VRMSpringBoneJoint } from './VRMSpringBoneJoint';
2
- import { VRMSpringBoneCollider } from './VRMSpringBoneCollider';
3
- import { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
4
- export declare class VRMSpringBoneManager {
5
- private _joints;
6
- readonly joints: Set<VRMSpringBoneJoint>;
7
- /*
8
- * @deprecated Use {@link joints} instead.
9
- */
10
- readonly springBones: Set<VRMSpringBoneJoint>;
11
- readonly colliderGroups: VRMSpringBoneColliderGroup[];
12
- readonly colliders: VRMSpringBoneCollider[];
13
- private _objectSpringBonesMap;
14
- addJoint(joint: VRMSpringBoneJoint): void;
15
- /**
16
- * @deprecated Use {@link addJoint} instead.
17
- */
18
- addSpringBone(joint: VRMSpringBoneJoint): void;
19
- deleteJoint(joint: VRMSpringBoneJoint): void;
20
- /**
21
- * @deprecated Use {@link deleteJoint} instead.
22
- */
23
- deleteSpringBone(joint: VRMSpringBoneJoint): void;
24
- setInitState(): void;
25
- reset(): void;
26
- update(delta: number): void;
27
- /**
28
- * Update a spring bone.
29
- * If there are other spring bone that are dependant, it will try to update them recursively.
30
- * It updates matrixWorld of all ancestors and myself.
31
- * It might throw an error if there are circular dependencies.
32
- *
33
- * Intended to be used in {@link update} and {@link _processSpringBone} itself recursively.
34
- *
35
- * @param springBone A springBone you want to update
36
- * @param springBonesTried Set of springBones that are already tried to be updated
37
- * @param springBonesDone Set of springBones that are already up to date
38
- * @param objectUpdated Set of object3D whose matrixWorld is updated
39
- */
40
- private _processSpringBone;
41
- /**
42
- * Return a set of objects that are dependant of given spring bone.
43
- * @param springBone A spring bone
44
- * @return A set of objects that are dependant of given spring bone
45
- */
46
- private _getDependencies;
47
- }
@@ -1,10 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneCollider } from '../VRMSpringBoneCollider';
3
- export declare class VRMSpringBoneColliderHelper extends THREE.Group {
4
- readonly collider: VRMSpringBoneCollider;
5
- private readonly _geometry;
6
- private readonly _line;
7
- constructor(collider: VRMSpringBoneCollider);
8
- dispose(): void;
9
- updateMatrixWorld(force: boolean): void;
10
- }
@@ -1,10 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneJoint } from '../VRMSpringBoneJoint';
3
- export declare class VRMSpringBoneJointHelper extends THREE.Group {
4
- readonly springBone: VRMSpringBoneJoint;
5
- private readonly _geometry;
6
- private readonly _line;
7
- constructor(springBone: VRMSpringBoneJoint);
8
- dispose(): void;
9
- updateMatrixWorld(force: boolean): void;
10
- }
@@ -1,2 +0,0 @@
1
- export { VRMSpringBoneColliderHelper } from './VRMSpringBoneColliderHelper';
2
- export { VRMSpringBoneJointHelper } from './VRMSpringBoneJointHelper';
@@ -1,5 +0,0 @@
1
- import * as THREE from 'three';
2
- export interface ColliderShapeBufferGeometry extends THREE.BufferGeometry {
3
- worldScale: number;
4
- update: () => void;
5
- }
@@ -1,16 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderShapeCapsule } from '../../VRMSpringBoneColliderShapeCapsule';
3
- import { ColliderShapeBufferGeometry } from './ColliderShapeBufferGeometry';
4
- export declare class ColliderShapeCapsuleBufferGeometry extends THREE.BufferGeometry implements ColliderShapeBufferGeometry {
5
- worldScale: number;
6
- private readonly _attrPos;
7
- private readonly _attrIndex;
8
- private readonly _shape;
9
- private _currentRadius;
10
- private readonly _currentOffset;
11
- private readonly _currentTail;
12
- constructor(shape: VRMSpringBoneColliderShapeCapsule);
13
- update(): void;
14
- private _buildPosition;
15
- private _buildIndex;
16
- }
@@ -1,15 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneColliderShapeSphere } from '../../VRMSpringBoneColliderShapeSphere';
3
- import { ColliderShapeBufferGeometry } from './ColliderShapeBufferGeometry';
4
- export declare class ColliderShapeSphereBufferGeometry extends THREE.BufferGeometry implements ColliderShapeBufferGeometry {
5
- worldScale: number;
6
- private readonly _attrPos;
7
- private readonly _attrIndex;
8
- private readonly _shape;
9
- private _currentRadius;
10
- private readonly _currentOffset;
11
- constructor(shape: VRMSpringBoneColliderShapeSphere);
12
- update(): void;
13
- private _buildPosition;
14
- private _buildIndex;
15
- }
@@ -1,14 +0,0 @@
1
- import * as THREE from 'three';
2
- import { VRMSpringBoneJoint } from '../../VRMSpringBoneJoint';
3
- export declare class SpringBoneBufferGeometry extends THREE.BufferGeometry {
4
- worldScale: number;
5
- private readonly _attrPos;
6
- private readonly _attrIndex;
7
- private readonly _springBone;
8
- private _currentRadius;
9
- private readonly _currentTail;
10
- constructor(springBone: VRMSpringBoneJoint);
11
- update(): void;
12
- private _buildPosition;
13
- private _buildIndex;
14
- }
@@ -1,10 +0,0 @@
1
- export * from './helpers';
2
- export * from './VRMSpringBoneCollider';
3
- export * from './VRMSpringBoneColliderGroup';
4
- export * from './VRMSpringBoneColliderShape';
5
- export * from './VRMSpringBoneColliderShapeCapsule';
6
- export * from './VRMSpringBoneColliderShapeSphere';
7
- export * from './VRMSpringBoneJoint';
8
- export * from './VRMSpringBoneLoaderPlugin';
9
- export * from './VRMSpringBoneManager';
10
- export * from './VRMSpringBoneJointSettings';
@@ -1,9 +0,0 @@
1
- /// <reference types="jest" />
2
- export declare function toBeCloseToArray(received: number[], expected: number[], precision?: number): jest.CustomMatcherResult;
3
- declare global {
4
- namespace jest {
5
- interface Matchers<R> {
6
- toBeCloseToArray(expected: number[], precision?: number): R;
7
- }
8
- }
9
- }
@@ -1,10 +0,0 @@
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 +0,0 @@
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
- readonly inverse: THREE.Matrix4;
26
- constructor(matrix: THREE.Matrix4);
27
- revert(): void;
28
- }
@@ -1,10 +0,0 @@
1
- import * as THREE from 'three';
2
- /**
3
- * A replacement of `Object3D.getWorldQuaternion`.
4
- * Extract the world quaternion of an object from its world space matrix, without calling `Object3D.updateWorldMatrix`.
5
- * Use this when you're sure that the world matrix is up-to-date.
6
- *
7
- * @param object The object
8
- * @param out A target quaternion
9
- */
10
- export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
@@ -1,8 +0,0 @@
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 +0,0 @@
1
- import * as THREE from 'three';
2
- export declare function traverseAncestorsFromRoot(object: THREE.Object3D, callback: (object: THREE.Object3D) => void): void;
@@ -1,8 +0,0 @@
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;