@pixiv/three-vrm-core 2.1.0-beta.3 → 2.1.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/LICENSE +22 -0
- package/lib/three-vrm-core.js +1 -1
- package/lib/three-vrm-core.module.js +1 -1
- package/package.json +5 -4
- package/ts3.4/types/VRMCore.d.ts +58 -0
- package/ts3.4/types/VRMCoreLoaderPlugin.d.ts +18 -0
- package/ts3.4/types/VRMCoreLoaderPluginOptions.d.ts +19 -0
- package/ts3.4/types/VRMCoreParameters.d.ts +16 -0
- package/ts3.4/types/expressions/VRMExpression.d.ts +65 -0
- package/ts3.4/types/expressions/VRMExpressionBind.d.ts +11 -0
- package/ts3.4/types/expressions/VRMExpressionLoaderPlugin.d.ts +23 -0
- package/ts3.4/types/expressions/VRMExpressionManager.d.ts +124 -0
- package/ts3.4/types/expressions/VRMExpressionMaterialColorBind.d.ts +58 -0
- package/ts3.4/types/expressions/VRMExpressionMaterialColorType.d.ts +12 -0
- package/ts3.4/types/expressions/VRMExpressionMorphTargetBind.d.ts +35 -0
- package/ts3.4/types/expressions/VRMExpressionOverrideType.d.ts +6 -0
- package/ts3.4/types/expressions/VRMExpressionPresetName.d.ts +21 -0
- package/ts3.4/types/expressions/VRMExpressionTextureTransformBind.d.ts +40 -0
- package/ts3.4/types/expressions/index.d.ts +10 -0
- package/ts3.4/types/firstPerson/VRMFirstPerson.d.ts +84 -0
- package/ts3.4/types/firstPerson/VRMFirstPersonLoaderPlugin.d.ts +20 -0
- package/ts3.4/types/firstPerson/VRMFirstPersonMeshAnnotation.d.ts +5 -0
- package/ts3.4/types/firstPerson/VRMFirstPersonMeshAnnotationType.d.ts +7 -0
- package/ts3.4/types/firstPerson/index.d.ts +4 -0
- package/ts3.4/types/humanoid/VRMHumanBone.d.ts +10 -0
- package/ts3.4/types/humanoid/VRMHumanBoneList.d.ts +5 -0
- package/ts3.4/types/humanoid/VRMHumanBoneName.d.ts +63 -0
- package/ts3.4/types/humanoid/VRMHumanBoneParentMap.d.ts +9 -0
- package/ts3.4/types/humanoid/VRMHumanBones.d.ts +11 -0
- package/ts3.4/types/humanoid/VRMHumanoid.d.ts +182 -0
- package/ts3.4/types/humanoid/VRMHumanoidLoaderPlugin.d.ts +32 -0
- package/ts3.4/types/humanoid/VRMHumanoidLoaderPluginOptions.d.ts +15 -0
- package/ts3.4/types/humanoid/VRMHumanoidRig.d.ts +31 -0
- package/ts3.4/types/humanoid/VRMPose.d.ts +24 -0
- package/ts3.4/types/humanoid/VRMPoseTransform.d.ts +24 -0
- package/ts3.4/types/humanoid/VRMRequiredHumanBoneName.d.ts +18 -0
- package/ts3.4/types/humanoid/VRMRig.d.ts +62 -0
- package/ts3.4/types/humanoid/helpers/VRMHumanoidHelper.d.ts +9 -0
- package/ts3.4/types/humanoid/helpers/index.d.ts +1 -0
- package/ts3.4/types/humanoid/index.d.ts +12 -0
- package/ts3.4/types/index.d.ts +9 -0
- package/ts3.4/types/lookAt/VRMLookAt.d.ts +149 -0
- package/ts3.4/types/lookAt/VRMLookAtApplier.d.ts +18 -0
- package/ts3.4/types/lookAt/VRMLookAtBoneApplier.d.ts +83 -0
- package/ts3.4/types/lookAt/VRMLookAtExpressionApplier.d.ts +56 -0
- package/ts3.4/types/lookAt/VRMLookAtLoaderPlugin.d.ts +30 -0
- package/ts3.4/types/lookAt/VRMLookAtLoaderPluginOptions.d.ts +8 -0
- package/ts3.4/types/lookAt/VRMLookAtRangeMap.d.ts +23 -0
- package/ts3.4/types/lookAt/VRMLookAtTypeName.d.ts +8 -0
- package/ts3.4/types/lookAt/helpers/VRMLookAtHelper.d.ts +11 -0
- package/ts3.4/types/lookAt/helpers/index.d.ts +1 -0
- package/ts3.4/types/lookAt/helpers/utils/FanBufferGeometry.d.ts +13 -0
- package/ts3.4/types/lookAt/helpers/utils/LineAndSphereBufferGeometry.d.ts +13 -0
- package/ts3.4/types/lookAt/index.d.ts +8 -0
- package/ts3.4/types/lookAt/tests/VRMLookAt.test.d.ts +1 -0
- package/ts3.4/types/lookAt/tests/VRMLookAtBoneApplier.test.d.ts +1 -0
- package/ts3.4/types/lookAt/utils/calcAzimuthAltitude.d.ts +16 -0
- package/ts3.4/types/lookAt/utils/sanitizeAngle.d.ts +11 -0
- package/ts3.4/types/lookAt/utils/tests/calcAzimuthAltitude.test.d.ts +1 -0
- package/ts3.4/types/lookAt/utils/tests/sanitizeAngle.test.d.ts +1 -0
- package/ts3.4/types/meta/VRM0Meta.d.ts +62 -0
- package/ts3.4/types/meta/VRM1Meta.d.ts +86 -0
- package/ts3.4/types/meta/VRMMeta.d.ts +6 -0
- package/ts3.4/types/meta/VRMMetaLoaderPlugin.d.ts +32 -0
- package/ts3.4/types/meta/VRMMetaLoaderPluginOptions.d.ts +22 -0
- package/ts3.4/types/meta/index.d.ts +5 -0
- package/ts3.4/types/tests/matchers/toBeCloseToQuaternion.d.ts +10 -0
- package/ts3.4/types/tests/matchers/toBeCloseToVector3.d.ts +10 -0
- package/ts3.4/types/utils/getWorldQuaternionLite.d.ts +10 -0
- package/ts3.4/types/utils/gltfExtractPrimitivesFromNode.d.ts +21 -0
- package/ts3.4/types/utils/gltfGetAssociatedMaterialIndex.d.ts +10 -0
- package/ts3.4/types/utils/quatInvertCompat.d.ts +8 -0
- package/ts3.4/types/utils/renameMaterialProperty.d.ts +1 -0
- package/ts3.4/types/utils/resolveURL.d.ts +4 -0
- package/ts3.4/types/utils/saturate.d.ts +6 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A set of options for a {@link VRMMetaLoaderPlugin} instance.
|
|
3
|
+
*/
|
|
4
|
+
export interface VRMMetaLoaderPluginOptions {
|
|
5
|
+
/**
|
|
6
|
+
* If `false`, it won't load its thumbnail image ({@link VRM1Meta.thumbnailImage}).
|
|
7
|
+
* `true` by default.
|
|
8
|
+
*/
|
|
9
|
+
needThumbnailImage?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A list of license urls.
|
|
12
|
+
* This meta loader will accept these `licenseUrl`s.
|
|
13
|
+
* Otherwise it will throw an error.
|
|
14
|
+
*/
|
|
15
|
+
acceptLicenseUrls?: string[];
|
|
16
|
+
/**
|
|
17
|
+
* Whether it should accept VRM0.0 meta or not.
|
|
18
|
+
* Note that it might load {@link VRM0Meta} instead of {@link VRM1Meta} when this is `true`.
|
|
19
|
+
* `true` by default.
|
|
20
|
+
*/
|
|
21
|
+
acceptV0Meta?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { VRM0Meta } from './VRM0Meta';
|
|
2
|
+
export { VRM1Meta } from './VRM1Meta';
|
|
3
|
+
export { VRMMeta } from './VRMMeta';
|
|
4
|
+
export { VRMMetaLoaderPluginOptions as VRMMetaImporterOptions } from './VRMMetaLoaderPluginOptions';
|
|
5
|
+
export { VRMMetaLoaderPlugin } from './VRMMetaLoaderPlugin';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
export declare function toBeCloseToQuaternion(received: THREE.Quaternion, expected: THREE.Quaternion, precision?: number): jest.CustomMatcherResult;
|
|
4
|
+
declare global {
|
|
5
|
+
namespace jest {
|
|
6
|
+
interface Matchers<R> {
|
|
7
|
+
toBeCloseToQuaternion(expected: THREE.Quaternion, precision?: number): R;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extract primitives ( `THREE.Mesh[]` ) of a node from a loaded GLTF.
|
|
4
|
+
* The main purpose of this function is to distinguish primitives and children from a node that has both meshes and children.
|
|
5
|
+
*
|
|
6
|
+
* It utilizes the behavior that GLTFLoader adds mesh primitives to the node object ( `THREE.Group` ) first then adds its children.
|
|
7
|
+
*
|
|
8
|
+
* @param gltf A GLTF object taken from GLTFLoader
|
|
9
|
+
* @param nodeIndex The index of the node
|
|
10
|
+
*/
|
|
11
|
+
export declare function gltfExtractPrimitivesFromNode(gltf: GLTF, nodeIndex: number): Promise<THREE.Mesh[] | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Extract primitives ( `THREE.Mesh[]` ) of nodes from a loaded GLTF.
|
|
14
|
+
* See {@link gltfExtractPrimitivesFromNode} for more details.
|
|
15
|
+
*
|
|
16
|
+
* It returns a map from node index to extraction result.
|
|
17
|
+
* If a node does not have a mesh, the entry for the node will not be put in the returning map.
|
|
18
|
+
*
|
|
19
|
+
* @param gltf A GLTF object taken from GLTFLoader
|
|
20
|
+
*/
|
|
21
|
+
export declare function gltfExtractPrimitivesFromNodes(gltf: GLTF): Promise<Map<number, THREE.Mesh[]>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get a material definition index of glTF from associated material.
|
|
5
|
+
* It's basically a comat code between Three.js r133 or above and previous versions.
|
|
6
|
+
* @param parser GLTFParser
|
|
7
|
+
* @param material A material of gltf
|
|
8
|
+
* @returns Material definition index of glTF
|
|
9
|
+
*/
|
|
10
|
+
export declare function gltfGetAssociatedMaterialIndex(parser: GLTFParser, material: THREE.Material): number | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* A compat function for `Quaternion.invert()` / `Quaternion.inverse()`.
|
|
4
|
+
* `Quaternion.invert()` is introduced in r123 and `Quaternion.inverse()` emits a warning.
|
|
5
|
+
* We are going to use this compat for a while.
|
|
6
|
+
* @param target A target quaternion
|
|
7
|
+
*/
|
|
8
|
+
export declare function quatInvertCompat<T extends THREE.Quaternion>(target: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function renameMaterialProperty(name: string): string;
|