@pixiv/types-vrm-0.0 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.
Files changed (40) hide show
  1. package/package.json +8 -16
  2. package/types/BlendShape.d.ts +2 -1
  3. package/types/BlendShapeBind.d.ts +8 -6
  4. package/types/BlendShapeGroup.d.ts +25 -20
  5. package/types/BlendShapeMaterialBind.d.ts +3 -3
  6. package/types/BlendShapePresetName.d.ts +19 -1
  7. package/types/FirstPerson.d.ts +27 -22
  8. package/types/FirstPersonDegreeMap.d.ts +14 -12
  9. package/types/FirstPersonMeshAnnotation.d.ts +2 -2
  10. package/types/Humanoid.d.ts +42 -33
  11. package/types/HumanoidBone.d.ts +35 -28
  12. package/types/HumanoidBoneName.d.ts +56 -1
  13. package/types/Material.d.ts +8 -18
  14. package/types/Meta.d.ts +74 -53
  15. package/types/SecondaryAnimation.d.ts +3 -2
  16. package/types/SecondaryAnimationCollider.d.ts +10 -8
  17. package/types/SecondaryAnimationColliderGroup.d.ts +7 -5
  18. package/types/SecondaryAnimationSpring.d.ts +48 -39
  19. package/types/VRM.d.ts +22 -14
  20. package/types/Vector3.d.ts +3 -3
  21. package/ts3.4/types/BlendShape.d.ts +0 -7
  22. package/ts3.4/types/BlendShapeBind.d.ts +0 -8
  23. package/ts3.4/types/BlendShapeGroup.d.ts +0 -25
  24. package/ts3.4/types/BlendShapeMaterialBind.d.ts +0 -5
  25. package/ts3.4/types/BlendShapePresetName.d.ts +0 -4
  26. package/ts3.4/types/FirstPerson.d.ts +0 -27
  27. package/ts3.4/types/FirstPersonDegreeMap.d.ts +0 -17
  28. package/ts3.4/types/FirstPersonMeshAnnotation.d.ts +0 -4
  29. package/ts3.4/types/Humanoid.d.ts +0 -36
  30. package/ts3.4/types/HumanoidBone.d.ts +0 -32
  31. package/ts3.4/types/HumanoidBoneName.d.ts +0 -4
  32. package/ts3.4/types/Material.d.ts +0 -20
  33. package/ts3.4/types/Meta.d.ts +0 -55
  34. package/ts3.4/types/SecondaryAnimation.d.ts +0 -9
  35. package/ts3.4/types/SecondaryAnimationCollider.d.ts +0 -11
  36. package/ts3.4/types/SecondaryAnimationColliderGroup.d.ts +0 -8
  37. package/ts3.4/types/SecondaryAnimationSpring.d.ts +0 -42
  38. package/ts3.4/types/VRM.d.ts +0 -25
  39. package/ts3.4/types/Vector3.d.ts +0 -5
  40. package/ts3.4/types/index.d.ts +0 -19
package/package.json CHANGED
@@ -1,23 +1,15 @@
1
1
  {
2
2
  "name": "@pixiv/types-vrm-0.0",
3
- "version": "2.1.2",
3
+ "version": "3.0.0-beta.0",
4
4
  "description": "Type definitions of VRM 0.0 schema",
5
5
  "license": "MIT",
6
6
  "author": "pixiv",
7
7
  "files": [
8
- "/ts*/",
9
8
  "/types/",
10
9
  "LICENSE"
11
10
  ],
12
11
  "main": "",
13
12
  "types": "types/index.d.ts",
14
- "typesVersions": {
15
- "<3.9": {
16
- "*": [
17
- "ts3.4/*"
18
- ]
19
- }
20
- },
21
13
  "repository": {
22
14
  "type": "git",
23
15
  "url": "https://github.com/pixiv/three-vrm.git",
@@ -26,17 +18,17 @@
26
18
  "scripts": {
27
19
  "version": "yarn all",
28
20
  "all": "yarn lint && yarn clean && yarn build && yarn docs",
29
- "clean": "rimraf docs/ ts*/ types/",
30
- "build": "tsc --declaration --declarationDir ./types --emitDeclarationOnly && downlevel-dts types ts3.4/types",
31
- "docs": "typedoc --entryPoints ./src/index.ts --out docs",
32
- "lint": "eslint \"src/**/*.{ts,tsx}\" && prettier \"src/**/*.{ts,tsx}\" --check",
33
- "lint-fix": "eslint \"src/**/*.{ts,tsx}\" --fix && prettier \"src/**/*.{ts,tsx}\" --write"
21
+ "clean": "rimraf docs/",
22
+ "build": "tsc --declaration --declarationDir ./types --emitDeclarationOnly",
23
+ "docs": "typedoc --entryPoints ./types/index.d.ts --out docs",
24
+ "lint": "eslint \"types/**/*.{ts,tsx}\" && prettier \"types/**/*.{ts,tsx}\" --check",
25
+ "lint-fix": "eslint \"types/**/*.{ts,tsx}\" --fix && prettier \"types/**/*.{ts,tsx}\" --write"
34
26
  },
35
27
  "lint-staged": {
36
- "./src/**/*.{ts,tsx}": [
28
+ "./types/**/*.{ts,tsx}": [
37
29
  "eslint --fix",
38
30
  "prettier --write"
39
31
  ]
40
32
  },
41
- "gitHead": "2ea1a8f0d12a421c572514b86a84fef8ddfe752f"
33
+ "gitHead": "a8ac23ec2e534dcae60de7cce71542a03537fcea"
42
34
  }
@@ -1,7 +1,8 @@
1
1
  import type { BlendShapeGroup } from './BlendShapeGroup';
2
+
2
3
  /**
3
4
  * BlendShapeAvatar of UniVRM
4
5
  */
5
6
  export interface BlendShape {
6
- blendShapeGroups?: BlendShapeGroup[];
7
+ blendShapeGroups?: BlendShapeGroup[];
7
8
  }
@@ -1,8 +1,10 @@
1
1
  export interface BlendShapeBind {
2
- mesh?: number;
3
- index?: number;
4
- /**
5
- * SkinnedMeshRenderer.SetBlendShapeWeight
6
- */
7
- weight?: number;
2
+ mesh?: number;
3
+
4
+ index?: number;
5
+
6
+ /**
7
+ * SkinnedMeshRenderer.SetBlendShapeWeight
8
+ */
9
+ weight?: number;
8
10
  }
@@ -1,25 +1,30 @@
1
1
  import type { BlendShapeBind } from './BlendShapeBind';
2
2
  import type { BlendShapeMaterialbind } from './BlendShapeMaterialBind';
3
3
  import type { BlendShapePresetName } from './BlendShapePresetName';
4
+
4
5
  export interface BlendShapeGroup {
5
- /**
6
- * Expression name
7
- */
8
- name?: string;
9
- /**
10
- * Predefined Expression name
11
- */
12
- presetName?: BlendShapePresetName;
13
- /**
14
- * Low level blendshape references.
15
- */
16
- binds?: BlendShapeBind[];
17
- /**
18
- * Material animation references.
19
- */
20
- materialValues?: BlendShapeMaterialbind[];
21
- /**
22
- * 0 or 1. Do not allow an intermediate value. Value should rounded
23
- */
24
- isBinary?: boolean;
6
+ /**
7
+ * Expression name
8
+ */
9
+ name?: string;
10
+
11
+ /**
12
+ * Predefined Expression name
13
+ */
14
+ presetName?: BlendShapePresetName;
15
+
16
+ /**
17
+ * Low level blendshape references.
18
+ */
19
+ binds?: BlendShapeBind[];
20
+
21
+ /**
22
+ * Material animation references.
23
+ */
24
+ materialValues?: BlendShapeMaterialbind[];
25
+
26
+ /**
27
+ * 0 or 1. Do not allow an intermediate value. Value should rounded
28
+ */
29
+ isBinary?: boolean;
25
30
  }
@@ -1,5 +1,5 @@
1
1
  export interface BlendShapeMaterialbind {
2
- materialName?: string;
3
- propertyName?: string;
4
- targetValue?: number[];
2
+ materialName?: string;
3
+ propertyName?: string;
4
+ targetValue?: number[];
5
5
  }
@@ -1,4 +1,22 @@
1
1
  /**
2
2
  * Predefined Expression name
3
3
  */
4
- export type BlendShapePresetName = 'a' | 'angry' | 'blink' | 'blink_l' | 'blink_r' | 'e' | 'fun' | 'i' | 'joy' | 'lookdown' | 'lookleft' | 'lookright' | 'lookup' | 'neutral' | 'o' | 'sorrow' | 'u' | 'unknown';
4
+ export type BlendShapePresetName =
5
+ | 'a'
6
+ | 'angry'
7
+ | 'blink'
8
+ | 'blink_l'
9
+ | 'blink_r'
10
+ | 'e'
11
+ | 'fun'
12
+ | 'i'
13
+ | 'joy'
14
+ | 'lookdown'
15
+ | 'lookleft'
16
+ | 'lookright'
17
+ | 'lookup'
18
+ | 'neutral'
19
+ | 'o'
20
+ | 'sorrow'
21
+ | 'u'
22
+ | 'unknown';
@@ -1,27 +1,32 @@
1
1
  import type { FirstPersonDegreeMap } from './FirstPersonDegreeMap';
2
2
  import type { FirstPersonMeshAnnotation } from './FirstPersonMeshAnnotation';
3
3
  import type { Vector3 } from './Vector3';
4
+
4
5
  export interface FirstPerson {
5
- /**
6
- * The bone whose rendering should be turned off in first-person view. Usually Head is
7
- * specified.
8
- */
9
- firstPersonBone?: number;
10
- /**
11
- * The target position of the VR headset in first-person view. It is assumed that an offset
12
- * from the head bone to the VR headset is added.
13
- */
14
- firstPersonBoneOffset?: Vector3;
15
- /**
16
- * Switch display / undisplay for each mesh in first-person view or the others.
17
- */
18
- meshAnnotations?: FirstPersonMeshAnnotation[];
19
- /**
20
- * Eye controller mode.
21
- */
22
- lookAtTypeName?: 'Bone' | 'BlendShape';
23
- lookAtHorizontalInner?: FirstPersonDegreeMap;
24
- lookAtHorizontalOuter?: FirstPersonDegreeMap;
25
- lookAtVerticalDown?: FirstPersonDegreeMap;
26
- lookAtVerticalUp?: FirstPersonDegreeMap;
6
+ /**
7
+ * The bone whose rendering should be turned off in first-person view. Usually Head is
8
+ * specified.
9
+ */
10
+ firstPersonBone?: number;
11
+
12
+ /**
13
+ * The target position of the VR headset in first-person view. It is assumed that an offset
14
+ * from the head bone to the VR headset is added.
15
+ */
16
+ firstPersonBoneOffset?: Vector3;
17
+
18
+ /**
19
+ * Switch display / undisplay for each mesh in first-person view or the others.
20
+ */
21
+ meshAnnotations?: FirstPersonMeshAnnotation[];
22
+
23
+ /**
24
+ * Eye controller mode.
25
+ */
26
+ lookAtTypeName?: 'Bone' | 'BlendShape';
27
+
28
+ lookAtHorizontalInner?: FirstPersonDegreeMap;
29
+ lookAtHorizontalOuter?: FirstPersonDegreeMap;
30
+ lookAtVerticalDown?: FirstPersonDegreeMap;
31
+ lookAtVerticalUp?: FirstPersonDegreeMap;
27
32
  }
@@ -2,16 +2,18 @@
2
2
  * Eye controller setting.
3
3
  */
4
4
  export interface FirstPersonDegreeMap {
5
- /**
6
- * None linear mapping params. time, value, inTangent, outTangent
7
- */
8
- curve?: number[];
9
- /**
10
- * Look at input clamp range degree.
11
- */
12
- xRange?: number;
13
- /**
14
- * Look at map range degree from xRange.
15
- */
16
- yRange?: number;
5
+ /**
6
+ * None linear mapping params. time, value, inTangent, outTangent
7
+ */
8
+ curve?: number[];
9
+
10
+ /**
11
+ * Look at input clamp range degree.
12
+ */
13
+ xRange?: number;
14
+
15
+ /**
16
+ * Look at map range degree from xRange.
17
+ */
18
+ yRange?: number;
17
19
  }
@@ -1,4 +1,4 @@
1
1
  export interface FirstPersonMeshAnnotation {
2
- firstPersonFlag?: string;
3
- mesh?: number;
2
+ firstPersonFlag?: string;
3
+ mesh?: number;
4
4
  }
@@ -1,36 +1,45 @@
1
1
  import type { HumanoidBone } from './HumanoidBone';
2
+
2
3
  export interface Humanoid {
3
- humanBones?: HumanoidBone[];
4
- /**
5
- * Unity's HumanDescription.armStretch
6
- */
7
- armStretch?: number;
8
- /**
9
- * Unity's HumanDescription.legStretch
10
- */
11
- legStretch?: number;
12
- /**
13
- * Unity's HumanDescription.upperArmTwist
14
- */
15
- upperArmTwist?: number;
16
- /**
17
- * Unity's HumanDescription.lowerArmTwist
18
- */
19
- lowerArmTwist?: number;
20
- /**
21
- * Unity's HumanDescription.upperLegTwist
22
- */
23
- upperLegTwist?: number;
24
- /**
25
- * Unity's HumanDescription.lowerLegTwist
26
- */
27
- lowerLegTwist?: number;
28
- /**
29
- * Unity's HumanDescription.feetSpacing
30
- */
31
- feetSpacing?: number;
32
- /**
33
- * Unity's HumanDescription.hasTranslationDoF
34
- */
35
- hasTranslationDoF?: boolean;
4
+ humanBones?: HumanoidBone[];
5
+
6
+ /**
7
+ * Unity's HumanDescription.armStretch
8
+ */
9
+ armStretch?: number;
10
+
11
+ /**
12
+ * Unity's HumanDescription.legStretch
13
+ */
14
+ legStretch?: number;
15
+
16
+ /**
17
+ * Unity's HumanDescription.upperArmTwist
18
+ */
19
+ upperArmTwist?: number;
20
+
21
+ /**
22
+ * Unity's HumanDescription.lowerArmTwist
23
+ */
24
+ lowerArmTwist?: number;
25
+
26
+ /**
27
+ * Unity's HumanDescription.upperLegTwist
28
+ */
29
+ upperLegTwist?: number;
30
+
31
+ /**
32
+ * Unity's HumanDescription.lowerLegTwist
33
+ */
34
+ lowerLegTwist?: number;
35
+
36
+ /**
37
+ * Unity's HumanDescription.feetSpacing
38
+ */
39
+ feetSpacing?: number;
40
+
41
+ /**
42
+ * Unity's HumanDescription.hasTranslationDoF
43
+ */
44
+ hasTranslationDoF?: boolean;
36
45
  }
@@ -1,32 +1,39 @@
1
1
  import type { HumanoidBoneName } from './HumanoidBoneName';
2
2
  import type { Vector3 } from './Vector3';
3
+
3
4
  export interface HumanoidBone {
4
- /**
5
- * Human bone name.
6
- */
7
- bone?: HumanoidBoneName;
8
- /**
9
- * Reference node index
10
- */
11
- node?: number;
12
- /**
13
- * Unity's HumanLimit.useDefaultValues
14
- */
15
- useDefaultValues?: boolean;
16
- /**
17
- * Unity's HumanLimit.min
18
- */
19
- min?: Vector3;
20
- /**
21
- * Unity's HumanLimit.max
22
- */
23
- max?: Vector3;
24
- /**
25
- * Unity's HumanLimit.center
26
- */
27
- center?: Vector3;
28
- /**
29
- * Unity's HumanLimit.axisLength
30
- */
31
- axisLength?: number;
5
+ /**
6
+ * Human bone name.
7
+ */
8
+ bone?: HumanoidBoneName;
9
+
10
+ /**
11
+ * Reference node index
12
+ */
13
+ node?: number;
14
+
15
+ /**
16
+ * Unity's HumanLimit.useDefaultValues
17
+ */
18
+ useDefaultValues?: boolean;
19
+
20
+ /**
21
+ * Unity's HumanLimit.min
22
+ */
23
+ min?: Vector3;
24
+
25
+ /**
26
+ * Unity's HumanLimit.max
27
+ */
28
+ max?: Vector3;
29
+
30
+ /**
31
+ * Unity's HumanLimit.center
32
+ */
33
+ center?: Vector3;
34
+
35
+ /**
36
+ * Unity's HumanLimit.axisLength
37
+ */
38
+ axisLength?: number;
32
39
  }
@@ -1,4 +1,59 @@
1
1
  /**
2
2
  * Human bone name.
3
3
  */
4
- export type HumanoidBoneName = 'chest' | 'head' | 'hips' | 'jaw' | 'leftEye' | 'leftFoot' | 'leftHand' | 'leftIndexDistal' | 'leftIndexIntermediate' | 'leftIndexProximal' | 'leftLittleDistal' | 'leftLittleIntermediate' | 'leftLittleProximal' | 'leftLowerArm' | 'leftLowerLeg' | 'leftMiddleDistal' | 'leftMiddleIntermediate' | 'leftMiddleProximal' | 'leftRingDistal' | 'leftRingIntermediate' | 'leftRingProximal' | 'leftShoulder' | 'leftThumbDistal' | 'leftThumbIntermediate' | 'leftThumbProximal' | 'leftToes' | 'leftUpperArm' | 'leftUpperLeg' | 'neck' | 'rightEye' | 'rightFoot' | 'rightHand' | 'rightIndexDistal' | 'rightIndexIntermediate' | 'rightIndexProximal' | 'rightLittleDistal' | 'rightLittleIntermediate' | 'rightLittleProximal' | 'rightLowerArm' | 'rightLowerLeg' | 'rightMiddleDistal' | 'rightMiddleIntermediate' | 'rightMiddleProximal' | 'rightRingDistal' | 'rightRingIntermediate' | 'rightRingProximal' | 'rightShoulder' | 'rightThumbDistal' | 'rightThumbIntermediate' | 'rightThumbProximal' | 'rightToes' | 'rightUpperArm' | 'rightUpperLeg' | 'spine' | 'upperChest';
4
+ export type HumanoidBoneName =
5
+ | 'chest'
6
+ | 'head'
7
+ | 'hips'
8
+ | 'jaw'
9
+ | 'leftEye'
10
+ | 'leftFoot'
11
+ | 'leftHand'
12
+ | 'leftIndexDistal'
13
+ | 'leftIndexIntermediate'
14
+ | 'leftIndexProximal'
15
+ | 'leftLittleDistal'
16
+ | 'leftLittleIntermediate'
17
+ | 'leftLittleProximal'
18
+ | 'leftLowerArm'
19
+ | 'leftLowerLeg'
20
+ | 'leftMiddleDistal'
21
+ | 'leftMiddleIntermediate'
22
+ | 'leftMiddleProximal'
23
+ | 'leftRingDistal'
24
+ | 'leftRingIntermediate'
25
+ | 'leftRingProximal'
26
+ | 'leftShoulder'
27
+ | 'leftThumbDistal'
28
+ | 'leftThumbIntermediate'
29
+ | 'leftThumbProximal'
30
+ | 'leftToes'
31
+ | 'leftUpperArm'
32
+ | 'leftUpperLeg'
33
+ | 'neck'
34
+ | 'rightEye'
35
+ | 'rightFoot'
36
+ | 'rightHand'
37
+ | 'rightIndexDistal'
38
+ | 'rightIndexIntermediate'
39
+ | 'rightIndexProximal'
40
+ | 'rightLittleDistal'
41
+ | 'rightLittleIntermediate'
42
+ | 'rightLittleProximal'
43
+ | 'rightLowerArm'
44
+ | 'rightLowerLeg'
45
+ | 'rightMiddleDistal'
46
+ | 'rightMiddleIntermediate'
47
+ | 'rightMiddleProximal'
48
+ | 'rightRingDistal'
49
+ | 'rightRingIntermediate'
50
+ | 'rightRingProximal'
51
+ | 'rightShoulder'
52
+ | 'rightThumbDistal'
53
+ | 'rightThumbIntermediate'
54
+ | 'rightThumbProximal'
55
+ | 'rightToes'
56
+ | 'rightUpperArm'
57
+ | 'rightUpperLeg'
58
+ | 'spine'
59
+ | 'upperChest';
@@ -1,20 +1,10 @@
1
1
  export interface Material {
2
- floatProperties?: {
3
- [key: string]: any;
4
- };
5
- keywordMap?: {
6
- [key: string]: any;
7
- };
8
- name?: string;
9
- renderQueue?: number;
10
- shader?: string;
11
- tagMap?: {
12
- [key: string]: any;
13
- };
14
- textureProperties?: {
15
- [key: string]: any;
16
- };
17
- vectorProperties?: {
18
- [key: string]: any;
19
- };
2
+ floatProperties?: { [key: string]: any };
3
+ keywordMap?: { [key: string]: any };
4
+ name?: string;
5
+ renderQueue?: number;
6
+ shader?: string;
7
+ tagMap?: { [key: string]: any };
8
+ textureProperties?: { [key: string]: any };
9
+ vectorProperties?: { [key: string]: any };
20
10
  }
package/types/Meta.d.ts CHANGED
@@ -1,55 +1,76 @@
1
1
  export interface Meta {
2
- /**
3
- * A person who can perform with this avatar
4
- */
5
- allowedUserName?: 'OnlyAuthor' | 'ExplicitlyLicensedPerson' | 'Everyone';
6
- /**
7
- * Author of VRM model
8
- */
9
- author?: string;
10
- /**
11
- * For commercial use
12
- */
13
- commercialUssageName?: 'Disallow' | 'Allow';
14
- /**
15
- * Contact Information of VRM model author
16
- */
17
- contactInformation?: string;
18
- /**
19
- * License type
20
- */
21
- licenseName?: 'Redistribution_Prohibited' | 'CC0' | 'CC_BY' | 'CC_BY_NC' | 'CC_BY_SA' | 'CC_BY_NC_SA' | 'CC_BY_ND' | 'CC_BY_NC_ND' | 'Other';
22
- /**
23
- * If “Other” is selected, put the URL link of the license document here.
24
- */
25
- otherLicenseUrl?: string;
26
- /**
27
- * If there are any conditions not mentioned above, put the URL link of the license document
28
- * here.
29
- */
30
- otherPermissionUrl?: string;
31
- /**
32
- * Reference of VRM model
33
- */
34
- reference?: string;
35
- /**
36
- * Permission to perform sexual acts with this avatar
37
- */
38
- sexualUssageName?: 'Disallow' | 'Allow';
39
- /**
40
- * Thumbnail of VRM model
41
- */
42
- texture?: number;
43
- /**
44
- * Title of VRM model
45
- */
46
- title?: string;
47
- /**
48
- * Version of VRM model
49
- */
50
- version?: string;
51
- /**
52
- * Permission to perform violent acts with this avatar
53
- */
54
- violentUssageName?: 'Disallow' | 'Allow';
2
+ /**
3
+ * A person who can perform with this avatar
4
+ */
5
+ allowedUserName?: 'OnlyAuthor' | 'ExplicitlyLicensedPerson' | 'Everyone';
6
+
7
+ /**
8
+ * Author of VRM model
9
+ */
10
+ author?: string;
11
+
12
+ /**
13
+ * For commercial use
14
+ */
15
+ commercialUssageName?: 'Disallow' | 'Allow';
16
+
17
+ /**
18
+ * Contact Information of VRM model author
19
+ */
20
+ contactInformation?: string;
21
+
22
+ /**
23
+ * License type
24
+ */
25
+ licenseName?:
26
+ | 'Redistribution_Prohibited'
27
+ | 'CC0'
28
+ | 'CC_BY'
29
+ | 'CC_BY_NC'
30
+ | 'CC_BY_SA'
31
+ | 'CC_BY_NC_SA'
32
+ | 'CC_BY_ND'
33
+ | 'CC_BY_NC_ND'
34
+ | 'Other';
35
+
36
+ /**
37
+ * If “Other” is selected, put the URL link of the license document here.
38
+ */
39
+ otherLicenseUrl?: string;
40
+
41
+ /**
42
+ * If there are any conditions not mentioned above, put the URL link of the license document
43
+ * here.
44
+ */
45
+ otherPermissionUrl?: string;
46
+
47
+ /**
48
+ * Reference of VRM model
49
+ */
50
+ reference?: string;
51
+
52
+ /**
53
+ * Permission to perform sexual acts with this avatar
54
+ */
55
+ sexualUssageName?: 'Disallow' | 'Allow';
56
+
57
+ /**
58
+ * Thumbnail of VRM model
59
+ */
60
+ texture?: number;
61
+
62
+ /**
63
+ * Title of VRM model
64
+ */
65
+ title?: string;
66
+
67
+ /**
68
+ * Version of VRM model
69
+ */
70
+ version?: string;
71
+
72
+ /**
73
+ * Permission to perform violent acts with this avatar
74
+ */
75
+ violentUssageName?: 'Disallow' | 'Allow';
55
76
  }
@@ -1,9 +1,10 @@
1
1
  import type { SecondaryAnimationColliderGroup } from './SecondaryAnimationColliderGroup';
2
2
  import type { SecondaryAnimationSpring } from './SecondaryAnimationSpring';
3
+
3
4
  /**
4
5
  * The setting of automatic animation of string-like objects such as tails and hairs.
5
6
  */
6
7
  export interface SecondaryAnimation {
7
- boneGroups?: SecondaryAnimationSpring[];
8
- colliderGroups?: SecondaryAnimationColliderGroup[];
8
+ boneGroups?: SecondaryAnimationSpring[];
9
+ colliderGroups?: SecondaryAnimationColliderGroup[];
9
10
  }
@@ -1,11 +1,13 @@
1
1
  import type { Vector3 } from './Vector3';
2
+
2
3
  export interface SecondaryAnimationCollider {
3
- /**
4
- * The local coordinate from the node of the collider group.
5
- */
6
- offset?: Vector3;
7
- /**
8
- * The radius of the collider.
9
- */
10
- radius?: number;
4
+ /**
5
+ * The local coordinate from the node of the collider group.
6
+ */
7
+ offset?: Vector3;
8
+
9
+ /**
10
+ * The radius of the collider.
11
+ */
12
+ radius?: number;
11
13
  }
@@ -1,8 +1,10 @@
1
1
  import type { SecondaryAnimationCollider } from './SecondaryAnimationCollider';
2
+
2
3
  export interface SecondaryAnimationColliderGroup {
3
- /**
4
- * The node of the collider group for setting up collision detections.
5
- */
6
- node?: number;
7
- colliders?: SecondaryAnimationCollider[];
4
+ /**
5
+ * The node of the collider group for setting up collision detections.
6
+ */
7
+ node?: number;
8
+
9
+ colliders?: SecondaryAnimationCollider[];
8
10
  }
@@ -1,42 +1,51 @@
1
1
  import type { Vector3 } from './Vector3';
2
+
2
3
  export interface SecondaryAnimationSpring {
3
- /**
4
- * Annotation comment
5
- */
6
- comment?: string;
7
- /**
8
- * The resilience of the swaying object (the power of returning to the initial pose).
9
- */
10
- stiffiness?: number;
11
- /**
12
- * The strength of gravity.
13
- */
14
- gravityPower?: number;
15
- /**
16
- * The direction of gravity. Set (0, -1, 0) for simulating the gravity. Set (1, 0, 0) for
17
- * simulating the wind.
18
- */
19
- gravityDir?: Vector3;
20
- /**
21
- * The resistance (deceleration) of automatic animation.
22
- */
23
- dragForce?: number;
24
- /**
25
- * The reference point of a swaying object can be set at any location except the origin.
26
- * When implementing UI moving with warp, the parent node to move with warp can be specified
27
- * if you don't want to make the object swaying with warp movement.
28
- */
29
- center?: number;
30
- /**
31
- * The radius of the sphere used for the collision detection with colliders.
32
- */
33
- hitRadius?: number;
34
- /**
35
- * Specify the node index of the root bone of the swaying object.
36
- */
37
- bones?: number[];
38
- /**
39
- * Specify the index of the collider group for collisions with swaying objects.
40
- */
41
- colliderGroups?: number[];
4
+ /**
5
+ * Annotation comment
6
+ */
7
+ comment?: string;
8
+
9
+ /**
10
+ * The resilience of the swaying object (the power of returning to the initial pose).
11
+ */
12
+ stiffiness?: number;
13
+
14
+ /**
15
+ * The strength of gravity.
16
+ */
17
+ gravityPower?: number;
18
+
19
+ /**
20
+ * The direction of gravity. Set (0, -1, 0) for simulating the gravity. Set (1, 0, 0) for
21
+ * simulating the wind.
22
+ */
23
+ gravityDir?: Vector3;
24
+
25
+ /**
26
+ * The resistance (deceleration) of automatic animation.
27
+ */
28
+ dragForce?: number;
29
+
30
+ /**
31
+ * The reference point of a swaying object can be set at any location except the origin.
32
+ * When implementing UI moving with warp, the parent node to move with warp can be specified
33
+ * if you don't want to make the object swaying with warp movement.
34
+ */
35
+ center?: number;
36
+
37
+ /**
38
+ * The radius of the sphere used for the collision detection with colliders.
39
+ */
40
+ hitRadius?: number;
41
+
42
+ /**
43
+ * Specify the node index of the root bone of the swaying object.
44
+ */
45
+ bones?: number[];
46
+
47
+ /**
48
+ * Specify the index of the collider group for collisions with swaying objects.
49
+ */
50
+ colliderGroups?: number[];
42
51
  }
package/types/VRM.d.ts CHANGED
@@ -4,22 +4,30 @@ import type { Humanoid } from './Humanoid';
4
4
  import type { Material } from './Material';
5
5
  import type { Meta } from './Meta';
6
6
  import type { SecondaryAnimation } from './SecondaryAnimation';
7
+
7
8
  /**
8
9
  * VRM extension is for 3d humanoid avatars (and models) in VR applications.
9
10
  */
10
11
  export interface VRM {
11
- /**
12
- * Version of exporter that vrm created. UniVRM-0.46
13
- */
14
- exporterVersion?: string;
15
- /**
16
- * Version of VRM specification. 0.0
17
- */
18
- specVersion?: '0.0';
19
- meta?: Meta;
20
- humanoid?: Humanoid;
21
- firstPerson?: FirstPerson;
22
- blendShapeMaster?: BlendShape;
23
- secondaryAnimation?: SecondaryAnimation;
24
- materialProperties?: Material[];
12
+ /**
13
+ * Version of exporter that vrm created. UniVRM-0.46
14
+ */
15
+ exporterVersion?: string;
16
+
17
+ /**
18
+ * Version of VRM specification. 0.0
19
+ */
20
+ specVersion?: '0.0';
21
+
22
+ meta?: Meta;
23
+
24
+ humanoid?: Humanoid;
25
+
26
+ firstPerson?: FirstPerson;
27
+
28
+ blendShapeMaster?: BlendShape;
29
+
30
+ secondaryAnimation?: SecondaryAnimation;
31
+
32
+ materialProperties?: Material[];
25
33
  }
@@ -1,5 +1,5 @@
1
1
  export interface Vector3 {
2
- x?: number;
3
- y?: number;
4
- z?: number;
2
+ x?: number;
3
+ y?: number;
4
+ z?: number;
5
5
  }
@@ -1,7 +0,0 @@
1
- import { BlendShapeGroup } from './BlendShapeGroup';
2
- /**
3
- * BlendShapeAvatar of UniVRM
4
- */
5
- export interface BlendShape {
6
- blendShapeGroups?: BlendShapeGroup[];
7
- }
@@ -1,8 +0,0 @@
1
- export interface BlendShapeBind {
2
- mesh?: number;
3
- index?: number;
4
- /**
5
- * SkinnedMeshRenderer.SetBlendShapeWeight
6
- */
7
- weight?: number;
8
- }
@@ -1,25 +0,0 @@
1
- import { BlendShapeBind } from './BlendShapeBind';
2
- import { BlendShapeMaterialbind } from './BlendShapeMaterialBind';
3
- import { BlendShapePresetName } from './BlendShapePresetName';
4
- export interface BlendShapeGroup {
5
- /**
6
- * Expression name
7
- */
8
- name?: string;
9
- /**
10
- * Predefined Expression name
11
- */
12
- presetName?: BlendShapePresetName;
13
- /**
14
- * Low level blendshape references.
15
- */
16
- binds?: BlendShapeBind[];
17
- /**
18
- * Material animation references.
19
- */
20
- materialValues?: BlendShapeMaterialbind[];
21
- /**
22
- * 0 or 1. Do not allow an intermediate value. Value should rounded
23
- */
24
- isBinary?: boolean;
25
- }
@@ -1,5 +0,0 @@
1
- export interface BlendShapeMaterialbind {
2
- materialName?: string;
3
- propertyName?: string;
4
- targetValue?: number[];
5
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Predefined Expression name
3
- */
4
- export type BlendShapePresetName = 'a' | 'angry' | 'blink' | 'blink_l' | 'blink_r' | 'e' | 'fun' | 'i' | 'joy' | 'lookdown' | 'lookleft' | 'lookright' | 'lookup' | 'neutral' | 'o' | 'sorrow' | 'u' | 'unknown';
@@ -1,27 +0,0 @@
1
- import { FirstPersonDegreeMap } from './FirstPersonDegreeMap';
2
- import { FirstPersonMeshAnnotation } from './FirstPersonMeshAnnotation';
3
- import { Vector3 } from './Vector3';
4
- export interface FirstPerson {
5
- /**
6
- * The bone whose rendering should be turned off in first-person view. Usually Head is
7
- * specified.
8
- */
9
- firstPersonBone?: number;
10
- /**
11
- * The target position of the VR headset in first-person view. It is assumed that an offset
12
- * from the head bone to the VR headset is added.
13
- */
14
- firstPersonBoneOffset?: Vector3;
15
- /**
16
- * Switch display / undisplay for each mesh in first-person view or the others.
17
- */
18
- meshAnnotations?: FirstPersonMeshAnnotation[];
19
- /**
20
- * Eye controller mode.
21
- */
22
- lookAtTypeName?: 'Bone' | 'BlendShape';
23
- lookAtHorizontalInner?: FirstPersonDegreeMap;
24
- lookAtHorizontalOuter?: FirstPersonDegreeMap;
25
- lookAtVerticalDown?: FirstPersonDegreeMap;
26
- lookAtVerticalUp?: FirstPersonDegreeMap;
27
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Eye controller setting.
3
- */
4
- export interface FirstPersonDegreeMap {
5
- /**
6
- * None linear mapping params. time, value, inTangent, outTangent
7
- */
8
- curve?: number[];
9
- /**
10
- * Look at input clamp range degree.
11
- */
12
- xRange?: number;
13
- /**
14
- * Look at map range degree from xRange.
15
- */
16
- yRange?: number;
17
- }
@@ -1,4 +0,0 @@
1
- export interface FirstPersonMeshAnnotation {
2
- firstPersonFlag?: string;
3
- mesh?: number;
4
- }
@@ -1,36 +0,0 @@
1
- import { HumanoidBone } from './HumanoidBone';
2
- export interface Humanoid {
3
- humanBones?: HumanoidBone[];
4
- /**
5
- * Unity's HumanDescription.armStretch
6
- */
7
- armStretch?: number;
8
- /**
9
- * Unity's HumanDescription.legStretch
10
- */
11
- legStretch?: number;
12
- /**
13
- * Unity's HumanDescription.upperArmTwist
14
- */
15
- upperArmTwist?: number;
16
- /**
17
- * Unity's HumanDescription.lowerArmTwist
18
- */
19
- lowerArmTwist?: number;
20
- /**
21
- * Unity's HumanDescription.upperLegTwist
22
- */
23
- upperLegTwist?: number;
24
- /**
25
- * Unity's HumanDescription.lowerLegTwist
26
- */
27
- lowerLegTwist?: number;
28
- /**
29
- * Unity's HumanDescription.feetSpacing
30
- */
31
- feetSpacing?: number;
32
- /**
33
- * Unity's HumanDescription.hasTranslationDoF
34
- */
35
- hasTranslationDoF?: boolean;
36
- }
@@ -1,32 +0,0 @@
1
- import { HumanoidBoneName } from './HumanoidBoneName';
2
- import { Vector3 } from './Vector3';
3
- export interface HumanoidBone {
4
- /**
5
- * Human bone name.
6
- */
7
- bone?: HumanoidBoneName;
8
- /**
9
- * Reference node index
10
- */
11
- node?: number;
12
- /**
13
- * Unity's HumanLimit.useDefaultValues
14
- */
15
- useDefaultValues?: boolean;
16
- /**
17
- * Unity's HumanLimit.min
18
- */
19
- min?: Vector3;
20
- /**
21
- * Unity's HumanLimit.max
22
- */
23
- max?: Vector3;
24
- /**
25
- * Unity's HumanLimit.center
26
- */
27
- center?: Vector3;
28
- /**
29
- * Unity's HumanLimit.axisLength
30
- */
31
- axisLength?: number;
32
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Human bone name.
3
- */
4
- export type HumanoidBoneName = 'chest' | 'head' | 'hips' | 'jaw' | 'leftEye' | 'leftFoot' | 'leftHand' | 'leftIndexDistal' | 'leftIndexIntermediate' | 'leftIndexProximal' | 'leftLittleDistal' | 'leftLittleIntermediate' | 'leftLittleProximal' | 'leftLowerArm' | 'leftLowerLeg' | 'leftMiddleDistal' | 'leftMiddleIntermediate' | 'leftMiddleProximal' | 'leftRingDistal' | 'leftRingIntermediate' | 'leftRingProximal' | 'leftShoulder' | 'leftThumbDistal' | 'leftThumbIntermediate' | 'leftThumbProximal' | 'leftToes' | 'leftUpperArm' | 'leftUpperLeg' | 'neck' | 'rightEye' | 'rightFoot' | 'rightHand' | 'rightIndexDistal' | 'rightIndexIntermediate' | 'rightIndexProximal' | 'rightLittleDistal' | 'rightLittleIntermediate' | 'rightLittleProximal' | 'rightLowerArm' | 'rightLowerLeg' | 'rightMiddleDistal' | 'rightMiddleIntermediate' | 'rightMiddleProximal' | 'rightRingDistal' | 'rightRingIntermediate' | 'rightRingProximal' | 'rightShoulder' | 'rightThumbDistal' | 'rightThumbIntermediate' | 'rightThumbProximal' | 'rightToes' | 'rightUpperArm' | 'rightUpperLeg' | 'spine' | 'upperChest';
@@ -1,20 +0,0 @@
1
- export interface Material {
2
- floatProperties?: {
3
- [key: string]: any;
4
- };
5
- keywordMap?: {
6
- [key: string]: any;
7
- };
8
- name?: string;
9
- renderQueue?: number;
10
- shader?: string;
11
- tagMap?: {
12
- [key: string]: any;
13
- };
14
- textureProperties?: {
15
- [key: string]: any;
16
- };
17
- vectorProperties?: {
18
- [key: string]: any;
19
- };
20
- }
@@ -1,55 +0,0 @@
1
- export interface Meta {
2
- /**
3
- * A person who can perform with this avatar
4
- */
5
- allowedUserName?: 'OnlyAuthor' | 'ExplicitlyLicensedPerson' | 'Everyone';
6
- /**
7
- * Author of VRM model
8
- */
9
- author?: string;
10
- /**
11
- * For commercial use
12
- */
13
- commercialUssageName?: 'Disallow' | 'Allow';
14
- /**
15
- * Contact Information of VRM model author
16
- */
17
- contactInformation?: string;
18
- /**
19
- * License type
20
- */
21
- licenseName?: 'Redistribution_Prohibited' | 'CC0' | 'CC_BY' | 'CC_BY_NC' | 'CC_BY_SA' | 'CC_BY_NC_SA' | 'CC_BY_ND' | 'CC_BY_NC_ND' | 'Other';
22
- /**
23
- * If “Other” is selected, put the URL link of the license document here.
24
- */
25
- otherLicenseUrl?: string;
26
- /**
27
- * If there are any conditions not mentioned above, put the URL link of the license document
28
- * here.
29
- */
30
- otherPermissionUrl?: string;
31
- /**
32
- * Reference of VRM model
33
- */
34
- reference?: string;
35
- /**
36
- * Permission to perform sexual acts with this avatar
37
- */
38
- sexualUssageName?: 'Disallow' | 'Allow';
39
- /**
40
- * Thumbnail of VRM model
41
- */
42
- texture?: number;
43
- /**
44
- * Title of VRM model
45
- */
46
- title?: string;
47
- /**
48
- * Version of VRM model
49
- */
50
- version?: string;
51
- /**
52
- * Permission to perform violent acts with this avatar
53
- */
54
- violentUssageName?: 'Disallow' | 'Allow';
55
- }
@@ -1,9 +0,0 @@
1
- import { SecondaryAnimationColliderGroup } from './SecondaryAnimationColliderGroup';
2
- import { SecondaryAnimationSpring } from './SecondaryAnimationSpring';
3
- /**
4
- * The setting of automatic animation of string-like objects such as tails and hairs.
5
- */
6
- export interface SecondaryAnimation {
7
- boneGroups?: SecondaryAnimationSpring[];
8
- colliderGroups?: SecondaryAnimationColliderGroup[];
9
- }
@@ -1,11 +0,0 @@
1
- import { Vector3 } from './Vector3';
2
- export interface SecondaryAnimationCollider {
3
- /**
4
- * The local coordinate from the node of the collider group.
5
- */
6
- offset?: Vector3;
7
- /**
8
- * The radius of the collider.
9
- */
10
- radius?: number;
11
- }
@@ -1,8 +0,0 @@
1
- import { SecondaryAnimationCollider } from './SecondaryAnimationCollider';
2
- export interface SecondaryAnimationColliderGroup {
3
- /**
4
- * The node of the collider group for setting up collision detections.
5
- */
6
- node?: number;
7
- colliders?: SecondaryAnimationCollider[];
8
- }
@@ -1,42 +0,0 @@
1
- import { Vector3 } from './Vector3';
2
- export interface SecondaryAnimationSpring {
3
- /**
4
- * Annotation comment
5
- */
6
- comment?: string;
7
- /**
8
- * The resilience of the swaying object (the power of returning to the initial pose).
9
- */
10
- stiffiness?: number;
11
- /**
12
- * The strength of gravity.
13
- */
14
- gravityPower?: number;
15
- /**
16
- * The direction of gravity. Set (0, -1, 0) for simulating the gravity. Set (1, 0, 0) for
17
- * simulating the wind.
18
- */
19
- gravityDir?: Vector3;
20
- /**
21
- * The resistance (deceleration) of automatic animation.
22
- */
23
- dragForce?: number;
24
- /**
25
- * The reference point of a swaying object can be set at any location except the origin.
26
- * When implementing UI moving with warp, the parent node to move with warp can be specified
27
- * if you don't want to make the object swaying with warp movement.
28
- */
29
- center?: number;
30
- /**
31
- * The radius of the sphere used for the collision detection with colliders.
32
- */
33
- hitRadius?: number;
34
- /**
35
- * Specify the node index of the root bone of the swaying object.
36
- */
37
- bones?: number[];
38
- /**
39
- * Specify the index of the collider group for collisions with swaying objects.
40
- */
41
- colliderGroups?: number[];
42
- }
@@ -1,25 +0,0 @@
1
- import { BlendShape } from './BlendShape';
2
- import { FirstPerson } from './FirstPerson';
3
- import { Humanoid } from './Humanoid';
4
- import { Material } from './Material';
5
- import { Meta } from './Meta';
6
- import { SecondaryAnimation } from './SecondaryAnimation';
7
- /**
8
- * VRM extension is for 3d humanoid avatars (and models) in VR applications.
9
- */
10
- export interface VRM {
11
- /**
12
- * Version of exporter that vrm created. UniVRM-0.46
13
- */
14
- exporterVersion?: string;
15
- /**
16
- * Version of VRM specification. 0.0
17
- */
18
- specVersion?: '0.0';
19
- meta?: Meta;
20
- humanoid?: Humanoid;
21
- firstPerson?: FirstPerson;
22
- blendShapeMaster?: BlendShape;
23
- secondaryAnimation?: SecondaryAnimation;
24
- materialProperties?: Material[];
25
- }
@@ -1,5 +0,0 @@
1
- export interface Vector3 {
2
- x?: number;
3
- y?: number;
4
- z?: number;
5
- }
@@ -1,19 +0,0 @@
1
- export { BlendShape } from './BlendShape';
2
- export { BlendShapeBind } from './BlendShapeBind';
3
- export { BlendShapeGroup } from './BlendShapeGroup';
4
- export { BlendShapeMaterialbind } from './BlendShapeMaterialBind';
5
- export { BlendShapePresetName } from './BlendShapePresetName';
6
- export { FirstPerson } from './FirstPerson';
7
- export { FirstPersonDegreeMap } from './FirstPersonDegreeMap';
8
- export { FirstPersonMeshAnnotation } from './FirstPersonMeshAnnotation';
9
- export { Humanoid } from './Humanoid';
10
- export { HumanoidBone } from './HumanoidBone';
11
- export { HumanoidBoneName } from './HumanoidBoneName';
12
- export { Material } from './Material';
13
- export { Meta } from './Meta';
14
- export { SecondaryAnimation } from './SecondaryAnimation';
15
- export { SecondaryAnimationCollider } from './SecondaryAnimationCollider';
16
- export { SecondaryAnimationColliderGroup } from './SecondaryAnimationColliderGroup';
17
- export { SecondaryAnimationSpring } from './SecondaryAnimationSpring';
18
- export { Vector3 } from './Vector3';
19
- export { VRM } from './VRM';