@pixiv/three-vrm-core 1.0.5 → 1.0.7-alpha.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-core.js +15 -10
- package/lib/three-vrm-core.module.js +15 -10
- package/package.json +6 -6
- package/ts3.4/types/lookAt/VRMLookAt.d.ts +9 -6
- package/ts3.4/types/utils/getWorldQuaternionLite.d.ts +4 -2
- package/types/lookAt/VRMLookAt.d.ts +9 -6
- package/types/utils/getWorldQuaternionLite.d.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixiv/three-vrm-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7-alpha.0",
|
|
4
4
|
"description": "The implementation of core features of VRM, for @pixiv/three-vrm",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pixiv",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"@pixiv/types-vrmc-vrm-1.0": "1.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@types/three": "^0.
|
|
53
|
+
"@types/three": "^0.146.0",
|
|
54
54
|
"lint-staged": "13.0.3",
|
|
55
|
-
"three": "^0.
|
|
55
|
+
"three": "^0.146.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@types/three": "^0.
|
|
59
|
-
"three": "^0.
|
|
58
|
+
"@types/three": "^0.146.0",
|
|
59
|
+
"three": "^0.146.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "5f6f321c1138715aa099cdde40e6a21584151202"
|
|
62
62
|
}
|
|
@@ -81,7 +81,7 @@ export declare class VRMLookAt {
|
|
|
81
81
|
constructor(humanoid: VRMHumanoid, applier: VRMLookAtApplier);
|
|
82
82
|
/**
|
|
83
83
|
* Get its yaw-pitch angles as an `Euler`.
|
|
84
|
-
* Does NOT consider {@link faceFront}.
|
|
84
|
+
* Does NOT consider {@link faceFront}; it returns `Euler(0, 0, 0; "YXZ")` by default regardless of the faceFront value.
|
|
85
85
|
*
|
|
86
86
|
* @param target The target euler
|
|
87
87
|
*/
|
|
@@ -101,17 +101,17 @@ export declare class VRMLookAt {
|
|
|
101
101
|
*/
|
|
102
102
|
clone(): VRMLookAt;
|
|
103
103
|
/**
|
|
104
|
-
* Reset the lookAt direction to initial direction.
|
|
104
|
+
* Reset the lookAt direction (yaw and pitch) to the initial direction.
|
|
105
105
|
*/
|
|
106
106
|
reset(): void;
|
|
107
107
|
/**
|
|
108
|
-
* Get its
|
|
108
|
+
* Get its lookAt position in world coordinate.
|
|
109
109
|
*
|
|
110
110
|
* @param target A target `THREE.Vector3`
|
|
111
111
|
*/
|
|
112
112
|
getLookAtWorldPosition(target: THREE.Vector3): THREE.Vector3;
|
|
113
113
|
/**
|
|
114
|
-
* Get its
|
|
114
|
+
* Get its lookAt rotation in world coordinate.
|
|
115
115
|
* Does NOT consider {@link faceFront}.
|
|
116
116
|
*
|
|
117
117
|
* @param target A target `THREE.Quaternion`
|
|
@@ -130,15 +130,18 @@ export declare class VRMLookAt {
|
|
|
130
130
|
*/
|
|
131
131
|
getLookAtWorldDirection(target: THREE.Vector3): THREE.Vector3;
|
|
132
132
|
/**
|
|
133
|
-
* Set its
|
|
133
|
+
* Set its lookAt target position.
|
|
134
|
+
*
|
|
134
135
|
* Note that its result will be instantly overwritten if {@link VRMLookAtHead.autoUpdate} is enabled.
|
|
135
136
|
*
|
|
137
|
+
* If you want to track an object continuously, you might want to use {@link target} instead.
|
|
138
|
+
*
|
|
136
139
|
* @param position A target position, in world space
|
|
137
140
|
*/
|
|
138
141
|
lookAt(position: THREE.Vector3): void;
|
|
139
142
|
/**
|
|
140
143
|
* Update the VRMLookAtHead.
|
|
141
|
-
* If {@link
|
|
144
|
+
* If {@link autoUpdate} is enabled, this will make it look at the {@link target}.
|
|
142
145
|
*
|
|
143
146
|
* @param delta deltaTime, it isn't used though. You can use the parameter if you want to use this in your own extended {@link VRMLookAt}.
|
|
144
147
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
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.
|
|
4
6
|
*
|
|
5
7
|
* @param object The object
|
|
6
|
-
* @param out
|
|
8
|
+
* @param out A target quaternion
|
|
7
9
|
*/
|
|
8
10
|
export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
|
|
@@ -83,7 +83,7 @@ export declare class VRMLookAt {
|
|
|
83
83
|
constructor(humanoid: VRMHumanoid, applier: VRMLookAtApplier);
|
|
84
84
|
/**
|
|
85
85
|
* Get its yaw-pitch angles as an `Euler`.
|
|
86
|
-
* Does NOT consider {@link faceFront}.
|
|
86
|
+
* Does NOT consider {@link faceFront}; it returns `Euler(0, 0, 0; "YXZ")` by default regardless of the faceFront value.
|
|
87
87
|
*
|
|
88
88
|
* @param target The target euler
|
|
89
89
|
*/
|
|
@@ -103,17 +103,17 @@ export declare class VRMLookAt {
|
|
|
103
103
|
*/
|
|
104
104
|
clone(): VRMLookAt;
|
|
105
105
|
/**
|
|
106
|
-
* Reset the lookAt direction to initial direction.
|
|
106
|
+
* Reset the lookAt direction (yaw and pitch) to the initial direction.
|
|
107
107
|
*/
|
|
108
108
|
reset(): void;
|
|
109
109
|
/**
|
|
110
|
-
* Get its
|
|
110
|
+
* Get its lookAt position in world coordinate.
|
|
111
111
|
*
|
|
112
112
|
* @param target A target `THREE.Vector3`
|
|
113
113
|
*/
|
|
114
114
|
getLookAtWorldPosition(target: THREE.Vector3): THREE.Vector3;
|
|
115
115
|
/**
|
|
116
|
-
* Get its
|
|
116
|
+
* Get its lookAt rotation in world coordinate.
|
|
117
117
|
* Does NOT consider {@link faceFront}.
|
|
118
118
|
*
|
|
119
119
|
* @param target A target `THREE.Quaternion`
|
|
@@ -132,15 +132,18 @@ export declare class VRMLookAt {
|
|
|
132
132
|
*/
|
|
133
133
|
getLookAtWorldDirection(target: THREE.Vector3): THREE.Vector3;
|
|
134
134
|
/**
|
|
135
|
-
* Set its
|
|
135
|
+
* Set its lookAt target position.
|
|
136
|
+
*
|
|
136
137
|
* Note that its result will be instantly overwritten if {@link VRMLookAtHead.autoUpdate} is enabled.
|
|
137
138
|
*
|
|
139
|
+
* If you want to track an object continuously, you might want to use {@link target} instead.
|
|
140
|
+
*
|
|
138
141
|
* @param position A target position, in world space
|
|
139
142
|
*/
|
|
140
143
|
lookAt(position: THREE.Vector3): void;
|
|
141
144
|
/**
|
|
142
145
|
* Update the VRMLookAtHead.
|
|
143
|
-
* If {@link
|
|
146
|
+
* If {@link autoUpdate} is enabled, this will make it look at the {@link target}.
|
|
144
147
|
*
|
|
145
148
|
* @param delta deltaTime, it isn't used though. You can use the parameter if you want to use this in your own extended {@link VRMLookAt}.
|
|
146
149
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
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.
|
|
4
6
|
*
|
|
5
7
|
* @param object The object
|
|
6
|
-
* @param out
|
|
8
|
+
* @param out A target quaternion
|
|
7
9
|
*/
|
|
8
10
|
export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
|