@pixiv/three-vrm-springbone 1.0.0-beta.9 → 1.0.0
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.
- package/lib/three-vrm-springbone.js +1033 -1037
- package/lib/three-vrm-springbone.min.js +2 -2
- package/lib/three-vrm-springbone.module.js +1033 -1037
- package/lib/three-vrm-springbone.module.min.js +2 -2
- package/package.json +9 -8
- package/ts3.4/types/VRMSpringBoneJoint.d.ts +10 -23
- package/ts3.4/types/VRMSpringBoneManager.d.ts +17 -3
- package/types/VRMSpringBoneCollider.d.ts +12 -12
- package/types/VRMSpringBoneColliderGroup.d.ts +14 -14
- package/types/VRMSpringBoneColliderShape.d.ts +20 -20
- package/types/VRMSpringBoneColliderShapeCapsule.d.ts +23 -23
- package/types/VRMSpringBoneColliderShapeSphere.d.ts +18 -18
- package/types/VRMSpringBoneJoint.d.ts +110 -123
- package/types/VRMSpringBoneJointSettings.d.ts +10 -10
- package/types/VRMSpringBoneLoaderPlugin.d.ts +34 -34
- package/types/VRMSpringBoneLoaderPluginOptions.d.ts +14 -14
- package/types/VRMSpringBoneManager.d.ts +47 -33
- package/types/helpers/VRMSpringBoneColliderHelper.d.ts +10 -10
- package/types/helpers/VRMSpringBoneJointHelper.d.ts +10 -10
- package/types/helpers/index.d.ts +2 -2
- package/types/helpers/utils/ColliderShapeBufferGeometry.d.ts +4 -4
- package/types/helpers/utils/ColliderShapeCapsuleBufferGeometry.d.ts +15 -15
- package/types/helpers/utils/ColliderShapeSphereBufferGeometry.d.ts +14 -14
- package/types/helpers/utils/SpringBoneBufferGeometry.d.ts +13 -13
- package/types/index.d.ts +10 -10
- package/types/tests/VRMSpringBoneColliderShapeCapsule.test.d.ts +1 -1
- package/types/tests/VRMSpringBoneColliderShapeSphere.test.d.ts +1 -1
- package/types/tests/matchers/toBeCloseToArray.d.ts +9 -9
- package/types/tests/matchers/toBeCloseToVector3.d.ts +10 -10
- package/types/utils/Matrix4InverseCache.d.ts +28 -28
- package/types/utils/getWorldQuaternionLite.d.ts +8 -8
- package/types/utils/mat4InvertCompat.d.ts +8 -8
- package/types/utils/traverseAncestorsFromRoot.d.ts +2 -2
- package/types/utils/traverseChildrenUntilConditionMet.d.ts +8 -8
|
@@ -1,123 +1,110 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import type { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
|
|
3
|
-
import type { 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
|
|
28
|
-
*/
|
|
29
|
-
private _currentTail;
|
|
30
|
-
/**
|
|
31
|
-
* Previous position of child tail, in
|
|
32
|
-
*/
|
|
33
|
-
private _prevTail;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
private
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
private
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
*/
|
|
67
|
-
private
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
* @param target Target matrix
|
|
112
|
-
*/
|
|
113
|
-
private _getMatrixCenterToWorld;
|
|
114
|
-
/**
|
|
115
|
-
* Create a matrix that converts world space into center space.
|
|
116
|
-
* @param target Target matrix
|
|
117
|
-
*/
|
|
118
|
-
private _getMatrixWorldToCenter;
|
|
119
|
-
/**
|
|
120
|
-
* Returns the world matrix of its parent object.
|
|
121
|
-
*/
|
|
122
|
-
private _getParentMatrixWorld;
|
|
123
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
|
|
3
|
+
import type { 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. Will be used for normalization in update loop.
|
|
40
|
+
* It's same as local unit length unless there are scale transformations in the world space.
|
|
41
|
+
*/
|
|
42
|
+
private _worldSpaceBoneLength;
|
|
43
|
+
/**
|
|
44
|
+
* This springbone will be calculated based on the space relative from this object.
|
|
45
|
+
* If this is `null`, springbone will be calculated in world space.
|
|
46
|
+
*/
|
|
47
|
+
private _center;
|
|
48
|
+
get center(): THREE.Object3D | null;
|
|
49
|
+
set center(center: THREE.Object3D | null);
|
|
50
|
+
/**
|
|
51
|
+
* Initial state of the local matrix of the bone.
|
|
52
|
+
*/
|
|
53
|
+
private _initialLocalMatrix;
|
|
54
|
+
/**
|
|
55
|
+
* Initial state of the rotation of the bone.
|
|
56
|
+
*/
|
|
57
|
+
private _initialLocalRotation;
|
|
58
|
+
/**
|
|
59
|
+
* Initial state of the position of its child.
|
|
60
|
+
*/
|
|
61
|
+
private _initialLocalChildPosition;
|
|
62
|
+
get initialLocalChildPosition(): THREE.Vector3;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the world matrix of its parent object.
|
|
65
|
+
* Note that it returns a reference to the matrix. Don't mutate this directly!
|
|
66
|
+
*/
|
|
67
|
+
private get _parentMatrixWorld();
|
|
68
|
+
/**
|
|
69
|
+
* Create a new VRMSpringBone.
|
|
70
|
+
*
|
|
71
|
+
* @param bone An Object3D that will be attached to this bone
|
|
72
|
+
* @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
|
|
73
|
+
* @param settings Several parameters related to behavior of the spring bone
|
|
74
|
+
* @param colliderGroups Collider groups that will be collided with this spring bone
|
|
75
|
+
*/
|
|
76
|
+
constructor(bone: THREE.Object3D, child: THREE.Object3D | null, settings?: Partial<VRMSpringBoneJointSettings>, colliderGroups?: VRMSpringBoneColliderGroup[]);
|
|
77
|
+
/**
|
|
78
|
+
* Set the initial state of this spring bone.
|
|
79
|
+
* You might want to call {@link VRMSpringBoneManager.setInitState} instead.
|
|
80
|
+
*/
|
|
81
|
+
setInitState(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Reset the state of this bone.
|
|
84
|
+
* You might want to call [[VRMSpringBoneManager.reset]] instead.
|
|
85
|
+
*/
|
|
86
|
+
reset(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Update the state of this bone.
|
|
89
|
+
* You might want to call [[VRMSpringBoneManager.update]] instead.
|
|
90
|
+
*
|
|
91
|
+
* @param delta deltaTime
|
|
92
|
+
*/
|
|
93
|
+
update(delta: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* Do collision math against every colliders attached to this bone.
|
|
96
|
+
*
|
|
97
|
+
* @param tail The tail you want to process
|
|
98
|
+
*/
|
|
99
|
+
private _collision;
|
|
100
|
+
/**
|
|
101
|
+
* Create a matrix that converts center space into world space.
|
|
102
|
+
* @param target Target matrix
|
|
103
|
+
*/
|
|
104
|
+
private _getMatrixCenterToWorld;
|
|
105
|
+
/**
|
|
106
|
+
* Create a matrix that converts world space into center space.
|
|
107
|
+
* @param target Target matrix
|
|
108
|
+
*/
|
|
109
|
+
private _getMatrixWorldToCenter;
|
|
110
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
+
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 +1,34 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import type { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
-
import type { 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
|
-
get 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
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
+
import type { 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
|
+
get 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 +1,14 @@
|
|
|
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
|
+
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,33 +1,47 @@
|
|
|
1
|
-
import type { VRMSpringBoneJoint } from './VRMSpringBoneJoint';
|
|
2
|
-
import type { VRMSpringBoneCollider } from './VRMSpringBoneCollider';
|
|
3
|
-
import type { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
|
|
4
|
-
export declare class VRMSpringBoneManager {
|
|
5
|
-
private
|
|
6
|
-
get
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
1
|
+
import type { VRMSpringBoneJoint } from './VRMSpringBoneJoint';
|
|
2
|
+
import type { VRMSpringBoneCollider } from './VRMSpringBoneCollider';
|
|
3
|
+
import type { VRMSpringBoneColliderGroup } from './VRMSpringBoneColliderGroup';
|
|
4
|
+
export declare class VRMSpringBoneManager {
|
|
5
|
+
private _joints;
|
|
6
|
+
get joints(): Set<VRMSpringBoneJoint>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use {@link joints} instead.
|
|
9
|
+
*/
|
|
10
|
+
get springBones(): Set<VRMSpringBoneJoint>;
|
|
11
|
+
get colliderGroups(): VRMSpringBoneColliderGroup[];
|
|
12
|
+
get 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 +1,10 @@
|
|
|
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
|
+
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 +1,10 @@
|
|
|
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
|
+
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
|
+
}
|
package/types/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { VRMSpringBoneColliderHelper } from './VRMSpringBoneColliderHelper';
|
|
2
|
-
export { VRMSpringBoneJointHelper } from './VRMSpringBoneJointHelper';
|
|
1
|
+
export { VRMSpringBoneColliderHelper } from './VRMSpringBoneColliderHelper';
|
|
2
|
+
export { VRMSpringBoneJointHelper } from './VRMSpringBoneJointHelper';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
export interface ColliderShapeBufferGeometry extends THREE.BufferGeometry {
|
|
3
|
-
update: () => void;
|
|
4
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export interface ColliderShapeBufferGeometry extends THREE.BufferGeometry {
|
|
3
|
+
update: () => void;
|
|
4
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
private readonly _attrPos;
|
|
6
|
-
private readonly _attrIndex;
|
|
7
|
-
private readonly _shape;
|
|
8
|
-
private _currentRadius;
|
|
9
|
-
private readonly _currentOffset;
|
|
10
|
-
private readonly _currentTail;
|
|
11
|
-
constructor(shape: VRMSpringBoneColliderShapeCapsule);
|
|
12
|
-
update(): void;
|
|
13
|
-
private _buildPosition;
|
|
14
|
-
private _buildIndex;
|
|
15
|
-
}
|
|
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
|
+
private readonly _attrPos;
|
|
6
|
+
private readonly _attrIndex;
|
|
7
|
+
private readonly _shape;
|
|
8
|
+
private _currentRadius;
|
|
9
|
+
private readonly _currentOffset;
|
|
10
|
+
private readonly _currentTail;
|
|
11
|
+
constructor(shape: VRMSpringBoneColliderShapeCapsule);
|
|
12
|
+
update(): void;
|
|
13
|
+
private _buildPosition;
|
|
14
|
+
private _buildIndex;
|
|
15
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
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
|
-
private readonly _attrPos;
|
|
6
|
-
private readonly _attrIndex;
|
|
7
|
-
private readonly _shape;
|
|
8
|
-
private _currentRadius;
|
|
9
|
-
private readonly _currentOffset;
|
|
10
|
-
constructor(shape: VRMSpringBoneColliderShapeSphere);
|
|
11
|
-
update(): void;
|
|
12
|
-
private _buildPosition;
|
|
13
|
-
private _buildIndex;
|
|
14
|
-
}
|
|
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
|
+
private readonly _attrPos;
|
|
6
|
+
private readonly _attrIndex;
|
|
7
|
+
private readonly _shape;
|
|
8
|
+
private _currentRadius;
|
|
9
|
+
private readonly _currentOffset;
|
|
10
|
+
constructor(shape: VRMSpringBoneColliderShapeSphere);
|
|
11
|
+
update(): void;
|
|
12
|
+
private _buildPosition;
|
|
13
|
+
private _buildIndex;
|
|
14
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { VRMSpringBoneJoint } from '../../VRMSpringBoneJoint';
|
|
3
|
-
export declare class SpringBoneBufferGeometry extends THREE.BufferGeometry {
|
|
4
|
-
private readonly _attrPos;
|
|
5
|
-
private readonly _attrIndex;
|
|
6
|
-
private readonly _springBone;
|
|
7
|
-
private _currentRadius;
|
|
8
|
-
private readonly _currentTail;
|
|
9
|
-
constructor(springBone: VRMSpringBoneJoint);
|
|
10
|
-
update(): void;
|
|
11
|
-
private _buildPosition;
|
|
12
|
-
private _buildIndex;
|
|
13
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { VRMSpringBoneJoint } from '../../VRMSpringBoneJoint';
|
|
3
|
+
export declare class SpringBoneBufferGeometry extends THREE.BufferGeometry {
|
|
4
|
+
private readonly _attrPos;
|
|
5
|
+
private readonly _attrIndex;
|
|
6
|
+
private readonly _springBone;
|
|
7
|
+
private _currentRadius;
|
|
8
|
+
private readonly _currentTail;
|
|
9
|
+
constructor(springBone: VRMSpringBoneJoint);
|
|
10
|
+
update(): void;
|
|
11
|
+
private _buildPosition;
|
|
12
|
+
private _buildIndex;
|
|
13
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
|
+
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 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
+
/// <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
|
+
}
|