@pixiv/three-vrm-core 2.1.2 → 3.0.0-beta.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.cjs +3335 -0
- package/lib/three-vrm-core.min.cjs +2 -0
- package/lib/three-vrm-core.module.js +3203 -3441
- package/lib/three-vrm-core.module.min.js +2 -2
- package/package.json +19 -18
- package/types/meta/VRMMetaLoaderPlugin.d.ts +1 -1
- package/types/meta/VRMMetaLoaderPluginOptions.d.ts +1 -1
- package/lib/three-vrm-core.js +0 -3599
- package/lib/three-vrm-core.min.js +0 -2
- package/ts3.4/types/VRMCore.d.ts +0 -58
- package/ts3.4/types/VRMCoreLoaderPlugin.d.ts +0 -18
- package/ts3.4/types/VRMCoreLoaderPluginOptions.d.ts +0 -20
- package/ts3.4/types/VRMCoreParameters.d.ts +0 -17
- package/ts3.4/types/expressions/VRMExpression.d.ts +0 -65
- package/ts3.4/types/expressions/VRMExpressionBind.d.ts +0 -11
- package/ts3.4/types/expressions/VRMExpressionLoaderPlugin.d.ts +0 -23
- package/ts3.4/types/expressions/VRMExpressionManager.d.ts +0 -124
- package/ts3.4/types/expressions/VRMExpressionMaterialColorBind.d.ts +0 -58
- package/ts3.4/types/expressions/VRMExpressionMaterialColorType.d.ts +0 -12
- package/ts3.4/types/expressions/VRMExpressionMorphTargetBind.d.ts +0 -35
- package/ts3.4/types/expressions/VRMExpressionOverrideType.d.ts +0 -6
- package/ts3.4/types/expressions/VRMExpressionPresetName.d.ts +0 -21
- package/ts3.4/types/expressions/VRMExpressionTextureTransformBind.d.ts +0 -40
- package/ts3.4/types/expressions/index.d.ts +0 -10
- package/ts3.4/types/firstPerson/VRMFirstPerson.d.ts +0 -84
- package/ts3.4/types/firstPerson/VRMFirstPersonLoaderPlugin.d.ts +0 -20
- package/ts3.4/types/firstPerson/VRMFirstPersonMeshAnnotation.d.ts +0 -6
- package/ts3.4/types/firstPerson/VRMFirstPersonMeshAnnotationType.d.ts +0 -7
- package/ts3.4/types/firstPerson/index.d.ts +0 -4
- package/ts3.4/types/humanoid/VRMHumanBone.d.ts +0 -10
- package/ts3.4/types/humanoid/VRMHumanBoneList.d.ts +0 -5
- package/ts3.4/types/humanoid/VRMHumanBoneName.d.ts +0 -63
- package/ts3.4/types/humanoid/VRMHumanBoneParentMap.d.ts +0 -9
- package/ts3.4/types/humanoid/VRMHumanBones.d.ts +0 -11
- package/ts3.4/types/humanoid/VRMHumanoid.d.ts +0 -182
- package/ts3.4/types/humanoid/VRMHumanoidLoaderPlugin.d.ts +0 -33
- package/ts3.4/types/humanoid/VRMHumanoidLoaderPluginOptions.d.ts +0 -16
- package/ts3.4/types/humanoid/VRMHumanoidRig.d.ts +0 -31
- package/ts3.4/types/humanoid/VRMPose.d.ts +0 -24
- package/ts3.4/types/humanoid/VRMPoseTransform.d.ts +0 -24
- package/ts3.4/types/humanoid/VRMRequiredHumanBoneName.d.ts +0 -18
- package/ts3.4/types/humanoid/VRMRig.d.ts +0 -62
- package/ts3.4/types/humanoid/helpers/VRMHumanoidHelper.d.ts +0 -9
- package/ts3.4/types/humanoid/helpers/index.d.ts +0 -1
- package/ts3.4/types/humanoid/index.d.ts +0 -12
- package/ts3.4/types/index.d.ts +0 -9
- package/ts3.4/types/lookAt/VRMLookAt.d.ts +0 -149
- package/ts3.4/types/lookAt/VRMLookAtApplier.d.ts +0 -18
- package/ts3.4/types/lookAt/VRMLookAtBoneApplier.d.ts +0 -83
- package/ts3.4/types/lookAt/VRMLookAtExpressionApplier.d.ts +0 -56
- package/ts3.4/types/lookAt/VRMLookAtLoaderPlugin.d.ts +0 -31
- package/ts3.4/types/lookAt/VRMLookAtLoaderPluginOptions.d.ts +0 -9
- package/ts3.4/types/lookAt/VRMLookAtRangeMap.d.ts +0 -23
- package/ts3.4/types/lookAt/VRMLookAtTypeName.d.ts +0 -8
- package/ts3.4/types/lookAt/helpers/VRMLookAtHelper.d.ts +0 -11
- package/ts3.4/types/lookAt/helpers/index.d.ts +0 -1
- package/ts3.4/types/lookAt/helpers/utils/FanBufferGeometry.d.ts +0 -13
- package/ts3.4/types/lookAt/helpers/utils/LineAndSphereBufferGeometry.d.ts +0 -13
- package/ts3.4/types/lookAt/index.d.ts +0 -8
- package/ts3.4/types/lookAt/tests/VRMLookAt.test.d.ts +0 -1
- package/ts3.4/types/lookAt/tests/VRMLookAtBoneApplier.test.d.ts +0 -1
- package/ts3.4/types/lookAt/utils/calcAzimuthAltitude.d.ts +0 -16
- package/ts3.4/types/lookAt/utils/sanitizeAngle.d.ts +0 -11
- package/ts3.4/types/lookAt/utils/tests/calcAzimuthAltitude.test.d.ts +0 -1
- package/ts3.4/types/lookAt/utils/tests/sanitizeAngle.test.d.ts +0 -1
- package/ts3.4/types/meta/VRM0Meta.d.ts +0 -62
- package/ts3.4/types/meta/VRM1Meta.d.ts +0 -86
- package/ts3.4/types/meta/VRMMeta.d.ts +0 -6
- package/ts3.4/types/meta/VRMMetaLoaderPlugin.d.ts +0 -32
- package/ts3.4/types/meta/VRMMetaLoaderPluginOptions.d.ts +0 -22
- package/ts3.4/types/meta/index.d.ts +0 -5
- package/ts3.4/types/tests/matchers/toBeCloseToQuaternion.d.ts +0 -10
- package/ts3.4/types/tests/matchers/toBeCloseToVector3.d.ts +0 -10
- package/ts3.4/types/utils/getWorldQuaternionLite.d.ts +0 -10
- package/ts3.4/types/utils/gltfExtractPrimitivesFromNode.d.ts +0 -22
- package/ts3.4/types/utils/gltfGetAssociatedMaterialIndex.d.ts +0 -10
- package/ts3.4/types/utils/quatInvertCompat.d.ts +0 -8
- package/ts3.4/types/utils/renameMaterialProperty.d.ts +0 -1
- package/ts3.4/types/utils/resolveURL.d.ts +0 -4
- package/ts3.4/types/utils/saturate.d.ts +0 -6
- package/types/lookAt/tests/VRMLookAt.test.d.ts +0 -1
- package/types/lookAt/tests/VRMLookAtBoneApplier.test.d.ts +0 -1
- package/types/lookAt/utils/tests/calcAzimuthAltitude.test.d.ts +0 -1
- package/types/lookAt/utils/tests/sanitizeAngle.test.d.ts +0 -1
- package/types/tests/matchers/toBeCloseToQuaternion.d.ts +0 -10
- package/types/tests/matchers/toBeCloseToVector3.d.ts +0 -10
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface represents metadata of a VRM 1.0 model.
|
|
3
|
-
*/
|
|
4
|
-
export interface VRM1Meta {
|
|
5
|
-
/**
|
|
6
|
-
* The version of meta.
|
|
7
|
-
*/
|
|
8
|
-
metaVersion: '1';
|
|
9
|
-
/**
|
|
10
|
-
* The name of the model.
|
|
11
|
-
*/
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* The version of the model.
|
|
15
|
-
*/
|
|
16
|
-
version?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Authors of the model.
|
|
19
|
-
*/
|
|
20
|
-
authors: string[];
|
|
21
|
-
/**
|
|
22
|
-
* An information that describes the copyright of the model.
|
|
23
|
-
*/
|
|
24
|
-
copyrightInformation?: string;
|
|
25
|
-
/**
|
|
26
|
-
* An information that describes the contact information of the author.
|
|
27
|
-
*/
|
|
28
|
-
contactInformation?: string;
|
|
29
|
-
/**
|
|
30
|
-
* References / original works of the model.
|
|
31
|
-
*/
|
|
32
|
-
references?: string[];
|
|
33
|
-
/**
|
|
34
|
-
* Third party licenses of the model, if required. You can use line breaks.
|
|
35
|
-
*/
|
|
36
|
-
thirdPartyLicenses?: string;
|
|
37
|
-
/**
|
|
38
|
-
* An image of the thumbnail image of the model.
|
|
39
|
-
* This is for the application to use as an icon.
|
|
40
|
-
*/
|
|
41
|
-
thumbnailImage?: HTMLImageElement;
|
|
42
|
-
/**
|
|
43
|
-
* A URL towards the license document this model refers to
|
|
44
|
-
*/
|
|
45
|
-
licenseUrl: string;
|
|
46
|
-
/**
|
|
47
|
-
* A person who can perform as an avatar with this model.
|
|
48
|
-
*/
|
|
49
|
-
avatarPermission?: 'onlyAuthor' | 'onlySeparatelyLicensedPerson' | 'everyone';
|
|
50
|
-
/**
|
|
51
|
-
* A flag that permits to use this model in excessively violent contents.
|
|
52
|
-
*/
|
|
53
|
-
allowExcessivelyViolentUsage?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* A flag that permits to use this model in excessively sexual contents.
|
|
56
|
-
*/
|
|
57
|
-
allowExcessivelySexualUsage?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* An option that permits to use this model in commercial products.
|
|
60
|
-
*/
|
|
61
|
-
commercialUsage?: 'personalNonProfit' | 'personalProfit' | 'corporation';
|
|
62
|
-
/**
|
|
63
|
-
* A flag that permits to use this model in political or religious contents.
|
|
64
|
-
*/
|
|
65
|
-
allowPoliticalOrReligiousUsage?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* A flag that permits to use this model in contents contain anti-social activities or hate speeches.
|
|
68
|
-
*/
|
|
69
|
-
allowAntisocialOrHateUsage?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* An option that forces or abandons to display the credit of this model.
|
|
72
|
-
*/
|
|
73
|
-
creditNotation?: 'required' | 'unnecessary';
|
|
74
|
-
/**
|
|
75
|
-
* A flag that permits to redistribute this model.
|
|
76
|
-
*/
|
|
77
|
-
allowRedistribution?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* An option that controls the condition to modify this model.
|
|
80
|
-
*/
|
|
81
|
-
modification?: 'prohibited' | 'allowModification' | 'allowModificationRedistribution';
|
|
82
|
-
/**
|
|
83
|
-
* Describe the URL links of other license.
|
|
84
|
-
*/
|
|
85
|
-
otherLicenseUrl?: string;
|
|
86
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2
|
-
import { VRMMetaLoaderPluginOptions } from './VRMMetaLoaderPluginOptions';
|
|
3
|
-
/**
|
|
4
|
-
* A plugin of GLTFLoader that imports a {@link VRM1Meta} from a VRM extension of a GLTF.
|
|
5
|
-
*/
|
|
6
|
-
export declare class VRMMetaLoaderPlugin implements GLTFLoaderPlugin {
|
|
7
|
-
readonly parser: GLTFParser;
|
|
8
|
-
/**
|
|
9
|
-
* If `false`, it won't load its thumbnail image ({@link VRM1Meta.thumbnailImage}).
|
|
10
|
-
* `true` by default.
|
|
11
|
-
*/
|
|
12
|
-
needThumbnailImage: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* A list of license urls.
|
|
15
|
-
* This meta loader will accept these `licenseUrl`s.
|
|
16
|
-
* Otherwise it won't be loaded.
|
|
17
|
-
*/
|
|
18
|
-
acceptLicenseUrls: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Whether it should accept VRM0.0 meta or not.
|
|
21
|
-
* Note that it might load {@link VRM0Meta} instead of {@link VRM1Meta} when this is `true`.
|
|
22
|
-
* `true` by default.
|
|
23
|
-
*/
|
|
24
|
-
acceptV0Meta: boolean;
|
|
25
|
-
readonly name: string;
|
|
26
|
-
constructor(parser: GLTFParser, options?: VRMMetaLoaderPluginOptions);
|
|
27
|
-
afterRoot(gltf: GLTF): Promise<void>;
|
|
28
|
-
private _import;
|
|
29
|
-
private _v1Import;
|
|
30
|
-
private _v0Import;
|
|
31
|
-
private _extractGLTFImage;
|
|
32
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
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';
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -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,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,22 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
-
/**
|
|
4
|
-
* Extract primitives ( `THREE.Mesh[]` ) of a node from a loaded GLTF.
|
|
5
|
-
* The main purpose of this function is to distinguish primitives and children from a node that has both meshes and children.
|
|
6
|
-
*
|
|
7
|
-
* It utilizes the behavior that GLTFLoader adds mesh primitives to the node object ( `THREE.Group` ) first then adds its children.
|
|
8
|
-
*
|
|
9
|
-
* @param gltf A GLTF object taken from GLTFLoader
|
|
10
|
-
* @param nodeIndex The index of the node
|
|
11
|
-
*/
|
|
12
|
-
export declare function gltfExtractPrimitivesFromNode(gltf: GLTF, nodeIndex: number): Promise<THREE.Mesh[] | null>;
|
|
13
|
-
/**
|
|
14
|
-
* Extract primitives ( `THREE.Mesh[]` ) of nodes from a loaded GLTF.
|
|
15
|
-
* See {@link gltfExtractPrimitivesFromNode} for more details.
|
|
16
|
-
*
|
|
17
|
-
* It returns a map from node index to extraction result.
|
|
18
|
-
* If a node does not have a mesh, the entry for the node will not be put in the returning map.
|
|
19
|
-
*
|
|
20
|
-
* @param gltf A GLTF object taken from GLTFLoader
|
|
21
|
-
*/
|
|
22
|
-
export declare function gltfExtractPrimitivesFromNodes(gltf: GLTF): Promise<Map<number, THREE.Mesh[]>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renameMaterialProperty(name: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -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
|
-
}
|