@pixiv/three-vrm-core 1.0.0-beta.9 → 1.0.1

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 (108) hide show
  1. package/lib/three-vrm-core.js +3367 -2551
  2. package/lib/three-vrm-core.min.js +2 -2
  3. package/lib/three-vrm-core.module.js +3365 -2552
  4. package/lib/three-vrm-core.module.min.js +2 -2
  5. package/package.json +12 -12
  6. package/ts3.4/types/VRMCore.d.ts +7 -7
  7. package/ts3.4/types/VRMCoreLoaderPluginOptions.d.ts +1 -0
  8. package/ts3.4/types/VRMCoreParameters.d.ts +2 -2
  9. package/ts3.4/types/expressions/VRMExpression.d.ts +1 -1
  10. package/ts3.4/types/expressions/VRMExpressionMaterialColorBind.d.ts +3 -0
  11. package/ts3.4/types/expressions/VRMExpressionMaterialColorType.d.ts +4 -0
  12. package/ts3.4/types/humanoid/VRMHumanBoneList.d.ts +5 -0
  13. package/ts3.4/types/humanoid/VRMHumanBoneName.d.ts +7 -2
  14. package/ts3.4/types/humanoid/VRMHumanBoneParentMap.d.ts +9 -0
  15. package/ts3.4/types/humanoid/VRMHumanoid.d.ts +130 -21
  16. package/ts3.4/types/humanoid/VRMHumanoidLoaderPlugin.d.ts +9 -1
  17. package/ts3.4/types/humanoid/VRMHumanoidLoaderPluginOptions.d.ts +15 -0
  18. package/ts3.4/types/humanoid/VRMHumanoidRig.d.ts +31 -0
  19. package/ts3.4/types/humanoid/VRMRig.d.ts +62 -0
  20. package/ts3.4/types/humanoid/helpers/VRMHumanoidHelper.d.ts +9 -0
  21. package/ts3.4/types/humanoid/helpers/index.d.ts +1 -0
  22. package/ts3.4/types/humanoid/index.d.ts +4 -0
  23. package/ts3.4/types/lookAt/VRMLookAt.d.ts +48 -6
  24. package/ts3.4/types/lookAt/VRMLookAtApplier.d.ts +8 -2
  25. package/ts3.4/types/lookAt/VRMLookAtBoneApplier.d.ts +35 -2
  26. package/ts3.4/types/lookAt/VRMLookAtExpressionApplier.d.ts +7 -2
  27. package/ts3.4/types/lookAt/tests/VRMLookAt.test.d.ts +1 -0
  28. package/ts3.4/types/lookAt/tests/VRMLookAtBoneApplier.test.d.ts +1 -0
  29. package/ts3.4/types/lookAt/utils/calcAzimuthAltitude.d.ts +16 -0
  30. package/ts3.4/types/lookAt/utils/sanitizeAngle.d.ts +11 -0
  31. package/ts3.4/types/lookAt/utils/tests/calcAzimuthAltitude.test.d.ts +1 -0
  32. package/ts3.4/types/lookAt/utils/tests/sanitizeAngle.test.d.ts +1 -0
  33. package/ts3.4/types/meta/VRMMetaLoaderPlugin.d.ts +1 -1
  34. package/ts3.4/types/meta/VRMMetaLoaderPluginOptions.d.ts +1 -1
  35. package/ts3.4/types/tests/matchers/toBeCloseToQuaternion.d.ts +10 -0
  36. package/ts3.4/types/tests/matchers/toBeCloseToVector3.d.ts +10 -0
  37. package/ts3.4/types/utils/renameMaterialProperty.d.ts +1 -0
  38. package/types/VRMCore.d.ts +58 -58
  39. package/types/VRMCoreLoaderPlugin.d.ts +18 -18
  40. package/types/VRMCoreLoaderPluginOptions.d.ts +19 -18
  41. package/types/VRMCoreParameters.d.ts +16 -16
  42. package/types/expressions/VRMExpression.d.ts +64 -64
  43. package/types/expressions/VRMExpressionBind.d.ts +11 -11
  44. package/types/expressions/VRMExpressionLoaderPlugin.d.ts +23 -23
  45. package/types/expressions/VRMExpressionManager.d.ts +124 -124
  46. package/types/expressions/VRMExpressionMaterialColorBind.d.ts +45 -42
  47. package/types/expressions/VRMExpressionMaterialColorType.d.ts +12 -8
  48. package/types/expressions/VRMExpressionMorphTargetBind.d.ts +35 -35
  49. package/types/expressions/VRMExpressionOverrideType.d.ts +6 -6
  50. package/types/expressions/VRMExpressionPresetName.d.ts +21 -21
  51. package/types/expressions/VRMExpressionTextureTransformBind.d.ts +40 -40
  52. package/types/expressions/index.d.ts +10 -10
  53. package/types/firstPerson/VRMFirstPerson.d.ts +84 -84
  54. package/types/firstPerson/VRMFirstPersonLoaderPlugin.d.ts +20 -20
  55. package/types/firstPerson/VRMFirstPersonMeshAnnotation.d.ts +5 -5
  56. package/types/firstPerson/VRMFirstPersonMeshAnnotationType.d.ts +7 -7
  57. package/types/firstPerson/index.d.ts +4 -4
  58. package/types/humanoid/VRMHumanBone.d.ts +10 -10
  59. package/types/humanoid/VRMHumanBoneList.d.ts +5 -0
  60. package/types/humanoid/VRMHumanBoneName.d.ts +63 -58
  61. package/types/humanoid/VRMHumanBoneParentMap.d.ts +9 -0
  62. package/types/humanoid/VRMHumanBones.d.ts +11 -11
  63. package/types/humanoid/VRMHumanoid.d.ts +182 -73
  64. package/types/humanoid/VRMHumanoidLoaderPlugin.d.ts +32 -24
  65. package/types/humanoid/VRMHumanoidLoaderPluginOptions.d.ts +15 -0
  66. package/types/humanoid/VRMHumanoidRig.d.ts +31 -0
  67. package/types/humanoid/VRMPose.d.ts +24 -24
  68. package/types/humanoid/VRMPoseTransform.d.ts +15 -15
  69. package/types/humanoid/VRMRequiredHumanBoneName.d.ts +18 -18
  70. package/types/humanoid/VRMRig.d.ts +62 -0
  71. package/types/humanoid/helpers/VRMHumanoidHelper.d.ts +9 -0
  72. package/types/humanoid/helpers/index.d.ts +1 -0
  73. package/types/humanoid/index.d.ts +12 -8
  74. package/types/index.d.ts +9 -9
  75. package/types/lookAt/VRMLookAt.d.ts +148 -104
  76. package/types/lookAt/VRMLookAtApplier.d.ts +18 -12
  77. package/types/lookAt/VRMLookAtBoneApplier.d.ts +83 -50
  78. package/types/lookAt/VRMLookAtExpressionApplier.d.ts +56 -51
  79. package/types/lookAt/VRMLookAtLoaderPlugin.d.ts +30 -30
  80. package/types/lookAt/VRMLookAtLoaderPluginOptions.d.ts +8 -8
  81. package/types/lookAt/VRMLookAtRangeMap.d.ts +23 -23
  82. package/types/lookAt/VRMLookAtTypeName.d.ts +8 -8
  83. package/types/lookAt/helpers/VRMLookAtHelper.d.ts +11 -11
  84. package/types/lookAt/helpers/index.d.ts +1 -1
  85. package/types/lookAt/helpers/utils/FanBufferGeometry.d.ts +13 -13
  86. package/types/lookAt/helpers/utils/LineAndSphereBufferGeometry.d.ts +13 -13
  87. package/types/lookAt/index.d.ts +8 -8
  88. package/types/lookAt/tests/VRMLookAt.test.d.ts +1 -0
  89. package/types/lookAt/tests/VRMLookAtBoneApplier.test.d.ts +1 -0
  90. package/types/lookAt/utils/calcAzimuthAltitude.d.ts +13 -0
  91. package/types/lookAt/utils/sanitizeAngle.d.ts +11 -0
  92. package/types/lookAt/utils/tests/calcAzimuthAltitude.test.d.ts +1 -0
  93. package/types/lookAt/utils/tests/sanitizeAngle.test.d.ts +1 -0
  94. package/types/meta/VRM0Meta.d.ts +62 -62
  95. package/types/meta/VRM1Meta.d.ts +86 -86
  96. package/types/meta/VRMMeta.d.ts +6 -6
  97. package/types/meta/VRMMetaLoaderPlugin.d.ts +32 -32
  98. package/types/meta/VRMMetaLoaderPluginOptions.d.ts +22 -22
  99. package/types/meta/index.d.ts +5 -5
  100. package/types/tests/matchers/toBeCloseToQuaternion.d.ts +10 -0
  101. package/types/tests/matchers/toBeCloseToVector3.d.ts +10 -0
  102. package/types/utils/getWorldQuaternionLite.d.ts +8 -8
  103. package/types/utils/gltfExtractPrimitivesFromNode.d.ts +21 -21
  104. package/types/utils/gltfGetAssociatedMaterialIndex.d.ts +10 -10
  105. package/types/utils/quatInvertCompat.d.ts +8 -8
  106. package/types/utils/renameMaterialProperty.d.ts +1 -0
  107. package/types/utils/resolveURL.d.ts +4 -4
  108. package/types/utils/saturate.d.ts +6 -6
@@ -1,8 +1,8 @@
1
- /**
2
- * Represents a type of applier.
3
- */
4
- export declare const VRMLookAtTypeName: {
5
- Bone: string;
6
- Expression: string;
7
- };
8
- export declare type VRMLookAtTypeName = typeof VRMLookAtTypeName[keyof typeof VRMLookAtTypeName];
1
+ /**
2
+ * Represents a type of applier.
3
+ */
4
+ export declare const VRMLookAtTypeName: {
5
+ Bone: string;
6
+ Expression: string;
7
+ };
8
+ export declare type VRMLookAtTypeName = typeof VRMLookAtTypeName[keyof typeof VRMLookAtTypeName];
@@ -1,11 +1,11 @@
1
- import * as THREE from 'three';
2
- import { VRMLookAt } from '../VRMLookAt';
3
- export declare class VRMLookAtHelper extends THREE.Group {
4
- readonly vrmLookAt: VRMLookAt;
5
- private readonly _meshYaw;
6
- private readonly _meshPitch;
7
- private readonly _lineTarget;
8
- constructor(lookAt: VRMLookAt);
9
- dispose(): void;
10
- updateMatrixWorld(force: boolean): void;
11
- }
1
+ import * as THREE from 'three';
2
+ import { VRMLookAt } from '../VRMLookAt';
3
+ export declare class VRMLookAtHelper extends THREE.Group {
4
+ readonly vrmLookAt: VRMLookAt;
5
+ private readonly _meshYaw;
6
+ private readonly _meshPitch;
7
+ private readonly _lineTarget;
8
+ constructor(lookAt: VRMLookAt);
9
+ dispose(): void;
10
+ updateMatrixWorld(force: boolean): void;
11
+ }
@@ -1 +1 @@
1
- export { VRMLookAtHelper } from './VRMLookAtHelper';
1
+ export { VRMLookAtHelper } from './VRMLookAtHelper';
@@ -1,13 +1,13 @@
1
- import * as THREE from 'three';
2
- export declare class FanBufferGeometry extends THREE.BufferGeometry {
3
- theta: number;
4
- radius: number;
5
- private _currentTheta;
6
- private _currentRadius;
7
- private readonly _attrPos;
8
- private readonly _attrIndex;
9
- constructor();
10
- update(): void;
11
- private _buildPosition;
12
- private _buildIndex;
13
- }
1
+ import * as THREE from 'three';
2
+ export declare class FanBufferGeometry extends THREE.BufferGeometry {
3
+ theta: number;
4
+ radius: number;
5
+ private _currentTheta;
6
+ private _currentRadius;
7
+ private readonly _attrPos;
8
+ private readonly _attrIndex;
9
+ constructor();
10
+ update(): void;
11
+ private _buildPosition;
12
+ private _buildIndex;
13
+ }
@@ -1,13 +1,13 @@
1
- import * as THREE from 'three';
2
- export declare class LineAndSphereBufferGeometry extends THREE.BufferGeometry {
3
- radius: number;
4
- tail: THREE.Vector3;
5
- private _currentRadius;
6
- private _currentTail;
7
- private readonly _attrPos;
8
- private readonly _attrIndex;
9
- constructor();
10
- update(): void;
11
- private _buildPosition;
12
- private _buildIndex;
13
- }
1
+ import * as THREE from 'three';
2
+ export declare class LineAndSphereBufferGeometry extends THREE.BufferGeometry {
3
+ radius: number;
4
+ tail: THREE.Vector3;
5
+ private _currentRadius;
6
+ private _currentTail;
7
+ private readonly _attrPos;
8
+ private readonly _attrIndex;
9
+ constructor();
10
+ update(): void;
11
+ private _buildPosition;
12
+ private _buildIndex;
13
+ }
@@ -1,8 +1,8 @@
1
- export * from './helpers';
2
- export { VRMLookAt } from './VRMLookAt';
3
- export type { VRMLookAtApplier } from './VRMLookAtApplier';
4
- export { VRMLookAtBoneApplier } from './VRMLookAtBoneApplier';
5
- export { VRMLookAtExpressionApplier } from './VRMLookAtExpressionApplier';
6
- export { VRMLookAtLoaderPlugin } from './VRMLookAtLoaderPlugin';
7
- export { VRMLookAtRangeMap } from './VRMLookAtRangeMap';
8
- export { VRMLookAtTypeName } from './VRMLookAtTypeName';
1
+ export * from './helpers';
2
+ export { VRMLookAt } from './VRMLookAt';
3
+ export type { VRMLookAtApplier } from './VRMLookAtApplier';
4
+ export { VRMLookAtBoneApplier } from './VRMLookAtBoneApplier';
5
+ export { VRMLookAtExpressionApplier } from './VRMLookAtExpressionApplier';
6
+ export { VRMLookAtLoaderPlugin } from './VRMLookAtLoaderPlugin';
7
+ export { VRMLookAtRangeMap } from './VRMLookAtRangeMap';
8
+ export { VRMLookAtTypeName } from './VRMLookAtTypeName';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as THREE from 'three';
2
+ /**
3
+ * Calculate azimuth / altitude angles from a vector.
4
+ *
5
+ * This returns a difference of angles from (1, 0, 0).
6
+ * Azimuth represents an angle around Y axis.
7
+ * Altitude represents an angle around Z axis.
8
+ * It is rotated in intrinsic Y-Z order.
9
+ *
10
+ * @param vector The vector
11
+ * @returns A tuple contains two angles, `[ azimuth, altitude ]`
12
+ */
13
+ export declare function calcAzimuthAltitude(vector: THREE.Vector3): [azimuth: number, altitude: number];
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Make sure the angle is within -PI to PI.
3
+ *
4
+ * @example
5
+ * ```js
6
+ * sanitizeAngle(1.5 * Math.PI) // -0.5 * PI
7
+ * ```
8
+ *
9
+ * @param angle An input angle
10
+ */
11
+ export declare function sanitizeAngle(angle: number): number;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,62 +1,62 @@
1
- import * as THREE from 'three';
2
- /**
3
- * Interface represents metadata of a VRM 0.0 model.
4
- */
5
- export interface VRM0Meta {
6
- /**
7
- * The version of meta.
8
- */
9
- metaVersion: '0';
10
- /**
11
- * Enum indicates a condition who can perform with this avatar.
12
- */
13
- allowedUserName?: 'Everyone' | 'ExplicitlyLicensedPerson' | 'OnlyAuthor';
14
- /**
15
- * Author of the model.
16
- */
17
- author?: string;
18
- /**
19
- * Enum indicates allow or disallow commercial use.
20
- */
21
- commercialUssageName?: 'Allow' | 'Disallow';
22
- /**
23
- * Contact Information of its author.
24
- */
25
- contactInformation?: string;
26
- /**
27
- * Enum indicates a license type.
28
- */
29
- licenseName?: 'CC0' | 'CC_BY' | 'CC_BY_NC' | 'CC_BY_NC_ND' | 'CC_BY_NC_SA' | 'CC_BY_ND' | 'CC_BY_SA' | 'Other' | 'Redistribution_Prohibited';
30
- /**
31
- * If `Other` is selected for {@link licenseName}, put the URL link of the license document here.
32
- */
33
- otherLicenseUrl?: string;
34
- /**
35
- * If there are any conditions not mentioned in {@link licenseName} or {@link otherLicenseUrl}, put the URL link of the license document here.
36
- */
37
- otherPermissionUrl?: string;
38
- /**
39
- * Reference of the model.
40
- */
41
- reference?: string;
42
- /**
43
- * Enum indicates allow or disallow sexual expressions.
44
- */
45
- sexualUssageName?: 'Allow' | 'Disallow';
46
- /**
47
- * Thumbnail of the model.
48
- */
49
- texture?: THREE.Texture;
50
- /**
51
- * Title of the model.
52
- */
53
- title?: string;
54
- /**
55
- * Version of the model.
56
- */
57
- version?: string;
58
- /**
59
- * Enum indicates allow or disallow violent expressions.
60
- */
61
- violentUssageName?: 'Allow' | 'Disallow';
62
- }
1
+ import * as THREE from 'three';
2
+ /**
3
+ * Interface represents metadata of a VRM 0.0 model.
4
+ */
5
+ export interface VRM0Meta {
6
+ /**
7
+ * The version of meta.
8
+ */
9
+ metaVersion: '0';
10
+ /**
11
+ * Enum indicates a condition who can perform with this avatar.
12
+ */
13
+ allowedUserName?: 'Everyone' | 'ExplicitlyLicensedPerson' | 'OnlyAuthor';
14
+ /**
15
+ * Author of the model.
16
+ */
17
+ author?: string;
18
+ /**
19
+ * Enum indicates allow or disallow commercial use.
20
+ */
21
+ commercialUssageName?: 'Allow' | 'Disallow';
22
+ /**
23
+ * Contact Information of its author.
24
+ */
25
+ contactInformation?: string;
26
+ /**
27
+ * Enum indicates a license type.
28
+ */
29
+ licenseName?: 'CC0' | 'CC_BY' | 'CC_BY_NC' | 'CC_BY_NC_ND' | 'CC_BY_NC_SA' | 'CC_BY_ND' | 'CC_BY_SA' | 'Other' | 'Redistribution_Prohibited';
30
+ /**
31
+ * If `Other` is selected for {@link licenseName}, put the URL link of the license document here.
32
+ */
33
+ otherLicenseUrl?: string;
34
+ /**
35
+ * If there are any conditions not mentioned in {@link licenseName} or {@link otherLicenseUrl}, put the URL link of the license document here.
36
+ */
37
+ otherPermissionUrl?: string;
38
+ /**
39
+ * Reference of the model.
40
+ */
41
+ reference?: string;
42
+ /**
43
+ * Enum indicates allow or disallow sexual expressions.
44
+ */
45
+ sexualUssageName?: 'Allow' | 'Disallow';
46
+ /**
47
+ * Thumbnail of the model.
48
+ */
49
+ texture?: THREE.Texture;
50
+ /**
51
+ * Title of the model.
52
+ */
53
+ title?: string;
54
+ /**
55
+ * Version of the model.
56
+ */
57
+ version?: string;
58
+ /**
59
+ * Enum indicates allow or disallow violent expressions.
60
+ */
61
+ violentUssageName?: 'Allow' | 'Disallow';
62
+ }
@@ -1,86 +1,86 @@
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
+ /**
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,6 +1,6 @@
1
- import type { VRM0Meta } from './VRM0Meta';
2
- import type { VRM1Meta } from './VRM1Meta';
3
- /**
4
- * VRMMeta can be either {@link VRM0Meta} or {@link VRM1Meta}.
5
- */
6
- export declare type VRMMeta = VRM0Meta | VRM1Meta;
1
+ import type { VRM0Meta } from './VRM0Meta';
2
+ import type { VRM1Meta } from './VRM1Meta';
3
+ /**
4
+ * VRMMeta can be either {@link VRM0Meta} or {@link VRM1Meta}.
5
+ */
6
+ export declare type VRMMeta = VRM0Meta | VRM1Meta;
@@ -1,32 +1,32 @@
1
- import type { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
- import type { 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.X 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
- get 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
+ import type { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
+ import type { 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
+ get 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 +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.X 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
+ /**
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 +1,5 @@
1
- export type { VRM0Meta } from './VRM0Meta';
2
- export type { VRM1Meta } from './VRM1Meta';
3
- export type { VRMMeta } from './VRMMeta';
4
- export type { VRMMetaLoaderPluginOptions as VRMMetaImporterOptions } from './VRMMetaLoaderPluginOptions';
5
- export { VRMMetaLoaderPlugin } from './VRMMetaLoaderPlugin';
1
+ export type { VRM0Meta } from './VRM0Meta';
2
+ export type { VRM1Meta } from './VRM1Meta';
3
+ export type { VRMMeta } from './VRMMeta';
4
+ export type { 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
+ }
@@ -1,8 +1,8 @@
1
- import * as THREE from 'three';
2
- /**
3
- * Extract world rotation of an object from its world space matrix, in cheaper way.
4
- *
5
- * @param object The object
6
- * @param out Target vector
7
- */
8
- export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
1
+ import * as THREE from 'three';
2
+ /**
3
+ * Extract world rotation of an object from its world space matrix, in cheaper way.
4
+ *
5
+ * @param object The object
6
+ * @param out Target vector
7
+ */
8
+ export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;