@pixiv/three-vrm 0.6.8 → 0.6.9

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 (84) hide show
  1. package/lib/three-vrm.js +3654 -3640
  2. package/lib/three-vrm.min.js +1 -1
  3. package/lib/three-vrm.module.js +3654 -3640
  4. package/lib/three-vrm.module.min.js +1 -1
  5. package/package.json +6 -6
  6. package/ts3.4/types/VRM.d.ts +1 -1
  7. package/ts3.4/types/VRMImporter.d.ts +1 -1
  8. package/ts3.4/types/blendshape/VRMBlendShapeImporter.d.ts +1 -1
  9. package/ts3.4/types/debug/VRMDebug.d.ts +1 -1
  10. package/ts3.4/types/debug/VRMImporterDebug.d.ts +1 -1
  11. package/ts3.4/types/debug/VRMLookAtImporterDebug.d.ts +1 -1
  12. package/ts3.4/types/debug/VRMSpringBoneImporterDebug.d.ts +1 -1
  13. package/ts3.4/types/firstperson/VRMFirstPersonImporter.d.ts +1 -1
  14. package/ts3.4/types/humanoid/VRMHumanoidImporter.d.ts +1 -1
  15. package/ts3.4/types/lookat/VRMLookAtImporter.d.ts +1 -1
  16. package/ts3.4/types/material/VRMMaterialImporter.d.ts +1 -1
  17. package/ts3.4/types/material/getTexelDecodingFunction.d.ts +4 -0
  18. package/ts3.4/types/meta/VRMMetaImporter.d.ts +1 -1
  19. package/ts3.4/types/springbone/VRMSpringBoneImporter.d.ts +1 -1
  20. package/ts3.4/types/utils/gltfExtractPrimitivesFromNode.d.ts +1 -1
  21. package/types/VRM.d.ts +110 -110
  22. package/types/VRMImporter.d.ts +42 -42
  23. package/types/VRMUtils/extractThumbnailBlob.d.ts +10 -10
  24. package/types/VRMUtils/index.d.ts +9 -9
  25. package/types/VRMUtils/removeUnnecessaryJoints.d.ts +9 -9
  26. package/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -12
  27. package/types/blendshape/VRMBlendShapeGroup.d.ts +50 -50
  28. package/types/blendshape/VRMBlendShapeImporter.d.ts +13 -13
  29. package/types/blendshape/VRMBlendShapeProxy.d.ts +91 -91
  30. package/types/blendshape/index.d.ts +3 -3
  31. package/types/debug/VRMDebug.d.ts +28 -28
  32. package/types/debug/VRMDebugOptions.d.ts +10 -10
  33. package/types/debug/VRMImporterDebug.d.ts +11 -11
  34. package/types/debug/VRMLookAtHeadDebug.d.ts +8 -8
  35. package/types/debug/VRMLookAtImporterDebug.d.ts +9 -9
  36. package/types/debug/VRMSpringBoneDebug.d.ts +14 -14
  37. package/types/debug/VRMSpringBoneImporterDebug.d.ts +10 -10
  38. package/types/debug/VRMSpringBoneManagerDebug.d.ts +11 -11
  39. package/types/debug/index.d.ts +4 -4
  40. package/types/firstperson/VRMFirstPerson.d.ts +116 -116
  41. package/types/firstperson/VRMFirstPersonImporter.d.ts +15 -15
  42. package/types/firstperson/index.d.ts +2 -2
  43. package/types/humanoid/VRMHumanBone.d.ts +22 -22
  44. package/types/humanoid/VRMHumanBoneArray.d.ts +9 -9
  45. package/types/humanoid/VRMHumanBones.d.ts +8 -8
  46. package/types/humanoid/VRMHumanDescription.d.ts +14 -14
  47. package/types/humanoid/VRMHumanLimit.d.ts +12 -12
  48. package/types/humanoid/VRMHumanoid.d.ts +87 -87
  49. package/types/humanoid/VRMHumanoidImporter.d.ts +13 -13
  50. package/types/humanoid/index.d.ts +6 -6
  51. package/types/index.d.ts +12 -12
  52. package/types/lookat/VRMCurveMapper.d.ts +36 -36
  53. package/types/lookat/VRMLookAtApplyer.d.ts +18 -18
  54. package/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +26 -26
  55. package/types/lookat/VRMLookAtBoneApplyer.d.ts +28 -28
  56. package/types/lookat/VRMLookAtHead.d.ts +57 -57
  57. package/types/lookat/VRMLookAtImporter.d.ts +23 -23
  58. package/types/lookat/index.d.ts +6 -6
  59. package/types/material/MToonMaterial.d.ts +206 -206
  60. package/types/material/VRMMaterialImporter.d.ts +50 -50
  61. package/types/material/VRMUnlitMaterial.d.ts +46 -46
  62. package/types/material/getTexelDecodingFunction.d.ts +13 -9
  63. package/types/material/index.d.ts +3 -3
  64. package/types/meta/VRMMeta.d.ts +59 -59
  65. package/types/meta/VRMMetaImporter.d.ts +14 -14
  66. package/types/meta/VRMMetaImporterOptions.d.ts +9 -9
  67. package/types/meta/index.d.ts +3 -3
  68. package/types/springbone/VRMSpringBone.d.ts +130 -130
  69. package/types/springbone/VRMSpringBoneColliderGroup.d.ts +15 -15
  70. package/types/springbone/VRMSpringBoneImporter.d.ts +34 -34
  71. package/types/springbone/VRMSpringBoneManager.d.ts +35 -35
  72. package/types/springbone/VRMSpringBoneParameters.d.ts +9 -9
  73. package/types/springbone/index.d.ts +5 -5
  74. package/types/types/GLTFSchema.d.ts +887 -887
  75. package/types/types/VRMSchema.d.ts +440 -440
  76. package/types/types/index.d.ts +3 -3
  77. package/types/types/types.d.ts +64 -64
  78. package/types/utils/Matrix4InverseCache.d.ts +28 -28
  79. package/types/utils/disposer.d.ts +2 -2
  80. package/types/utils/gltfExtractPrimitivesFromNode.d.ts +22 -22
  81. package/types/utils/mat4InvertCompat.d.ts +8 -8
  82. package/types/utils/math.d.ts +40 -40
  83. package/types/utils/quatInvertCompat.d.ts +8 -8
  84. package/types/utils/renameMaterialProperty.d.ts +1 -1
@@ -1,57 +1,57 @@
1
- import * as THREE from 'three';
2
- import { VRMFirstPerson } from '../firstperson/VRMFirstPerson';
3
- import { VRMLookAtApplyer } from './VRMLookAtApplyer';
4
- /**
5
- * A class represents look at of a VRM.
6
- */
7
- export declare class VRMLookAtHead {
8
- static readonly EULER_ORDER = "YXZ";
9
- /**
10
- * Associated [[VRMFirstPerson]], will be used for direction calculation.
11
- */
12
- readonly firstPerson: VRMFirstPerson;
13
- /**
14
- * Associated [[VRMLookAtApplyer]], its look at direction will be applied to the model using this applier.
15
- */
16
- readonly applyer?: VRMLookAtApplyer;
17
- /**
18
- * If this is true, its look at direction will be updated automatically by calling [[VRMLookAtHead.update]] (which is called from [[VRM.update]]).
19
- *
20
- * See also: [[VRMLookAtHead.target]]
21
- */
22
- autoUpdate: boolean;
23
- /**
24
- * The target object of the look at.
25
- * Note that it does not make any sense if [[VRMLookAtHead.autoUpdate]] is disabled.
26
- */
27
- target?: THREE.Object3D;
28
- protected _euler: THREE.Euler;
29
- /**
30
- * Create a new VRMLookAtHead.
31
- *
32
- * @param firstPerson A [[VRMFirstPerson]] that will be associated with this new VRMLookAtHead
33
- * @param applyer A [[VRMLookAtApplyer]] that will be associated with this new VRMLookAtHead
34
- */
35
- constructor(firstPerson: VRMFirstPerson, applyer?: VRMLookAtApplyer);
36
- /**
37
- * Get its look at direction in world coordinate.
38
- *
39
- * @param target A target `THREE.Vector3`
40
- */
41
- getLookAtWorldDirection(target: THREE.Vector3): THREE.Vector3;
42
- /**
43
- * Set its look at position.
44
- * Note that its result will be instantly overwritten if [[VRMLookAtHead.autoUpdate]] is enabled.
45
- *
46
- * @param position A target position
47
- */
48
- lookAt(position: THREE.Vector3): void;
49
- /**
50
- * Update the VRMLookAtHead.
51
- * If [[VRMLookAtHead.autoUpdate]] is disabled, it will do nothing.
52
- *
53
- * @param delta deltaTime
54
- */
55
- update(delta: number): void;
56
- protected _calcEuler(target: THREE.Euler, position: THREE.Vector3): THREE.Euler;
57
- }
1
+ import * as THREE from 'three';
2
+ import { VRMFirstPerson } from '../firstperson/VRMFirstPerson';
3
+ import { VRMLookAtApplyer } from './VRMLookAtApplyer';
4
+ /**
5
+ * A class represents look at of a VRM.
6
+ */
7
+ export declare class VRMLookAtHead {
8
+ static readonly EULER_ORDER = "YXZ";
9
+ /**
10
+ * Associated [[VRMFirstPerson]], will be used for direction calculation.
11
+ */
12
+ readonly firstPerson: VRMFirstPerson;
13
+ /**
14
+ * Associated [[VRMLookAtApplyer]], its look at direction will be applied to the model using this applier.
15
+ */
16
+ readonly applyer?: VRMLookAtApplyer;
17
+ /**
18
+ * If this is true, its look at direction will be updated automatically by calling [[VRMLookAtHead.update]] (which is called from [[VRM.update]]).
19
+ *
20
+ * See also: [[VRMLookAtHead.target]]
21
+ */
22
+ autoUpdate: boolean;
23
+ /**
24
+ * The target object of the look at.
25
+ * Note that it does not make any sense if [[VRMLookAtHead.autoUpdate]] is disabled.
26
+ */
27
+ target?: THREE.Object3D;
28
+ protected _euler: THREE.Euler;
29
+ /**
30
+ * Create a new VRMLookAtHead.
31
+ *
32
+ * @param firstPerson A [[VRMFirstPerson]] that will be associated with this new VRMLookAtHead
33
+ * @param applyer A [[VRMLookAtApplyer]] that will be associated with this new VRMLookAtHead
34
+ */
35
+ constructor(firstPerson: VRMFirstPerson, applyer?: VRMLookAtApplyer);
36
+ /**
37
+ * Get its look at direction in world coordinate.
38
+ *
39
+ * @param target A target `THREE.Vector3`
40
+ */
41
+ getLookAtWorldDirection(target: THREE.Vector3): THREE.Vector3;
42
+ /**
43
+ * Set its look at position.
44
+ * Note that its result will be instantly overwritten if [[VRMLookAtHead.autoUpdate]] is enabled.
45
+ *
46
+ * @param position A target position
47
+ */
48
+ lookAt(position: THREE.Vector3): void;
49
+ /**
50
+ * Update the VRMLookAtHead.
51
+ * If [[VRMLookAtHead.autoUpdate]] is disabled, it will do nothing.
52
+ *
53
+ * @param delta deltaTime
54
+ */
55
+ update(delta: number): void;
56
+ protected _calcEuler(target: THREE.Euler, position: THREE.Vector3): THREE.Euler;
57
+ }
@@ -1,23 +1,23 @@
1
- import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
2
- import { VRMBlendShapeProxy } from '../blendshape';
3
- import { VRMFirstPerson } from '../firstperson';
4
- import { VRMHumanoid } from '../humanoid';
5
- import { VRMSchema } from '../types';
6
- import { VRMLookAtApplyer } from './VRMLookAtApplyer';
7
- import { VRMLookAtHead } from './VRMLookAtHead';
8
- /**
9
- * An importer that imports a [[VRMLookAtHead]] from a VRM extension of a GLTF.
10
- */
11
- export declare class VRMLookAtImporter {
12
- /**
13
- * Import a [[VRMLookAtHead]] from a VRM.
14
- *
15
- * @param gltf A parsed result of GLTF taken from GLTFLoader
16
- * @param blendShapeProxy A [[VRMBlendShapeProxy]] instance that represents the VRM
17
- * @param humanoid A [[VRMHumanoid]] instance that represents the VRM
18
- */
19
- import(gltf: GLTF, firstPerson: VRMFirstPerson, blendShapeProxy: VRMBlendShapeProxy, humanoid: VRMHumanoid): VRMLookAtHead | null;
20
- protected _importApplyer(schemaFirstPerson: VRMSchema.FirstPerson, blendShapeProxy: VRMBlendShapeProxy, humanoid: VRMHumanoid): VRMLookAtApplyer | null;
21
- private _importCurveMapperBone;
22
- private _importCurveMapperBlendShape;
23
- }
1
+ import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
+ import { VRMBlendShapeProxy } from '../blendshape';
3
+ import { VRMFirstPerson } from '../firstperson';
4
+ import { VRMHumanoid } from '../humanoid';
5
+ import { VRMSchema } from '../types';
6
+ import { VRMLookAtApplyer } from './VRMLookAtApplyer';
7
+ import { VRMLookAtHead } from './VRMLookAtHead';
8
+ /**
9
+ * An importer that imports a [[VRMLookAtHead]] from a VRM extension of a GLTF.
10
+ */
11
+ export declare class VRMLookAtImporter {
12
+ /**
13
+ * Import a [[VRMLookAtHead]] from a VRM.
14
+ *
15
+ * @param gltf A parsed result of GLTF taken from GLTFLoader
16
+ * @param blendShapeProxy A [[VRMBlendShapeProxy]] instance that represents the VRM
17
+ * @param humanoid A [[VRMHumanoid]] instance that represents the VRM
18
+ */
19
+ import(gltf: GLTF, firstPerson: VRMFirstPerson, blendShapeProxy: VRMBlendShapeProxy, humanoid: VRMHumanoid): VRMLookAtHead | null;
20
+ protected _importApplyer(schemaFirstPerson: VRMSchema.FirstPerson, blendShapeProxy: VRMBlendShapeProxy, humanoid: VRMHumanoid): VRMLookAtApplyer | null;
21
+ private _importCurveMapperBone;
22
+ private _importCurveMapperBlendShape;
23
+ }
@@ -1,6 +1,6 @@
1
- export * from './VRMCurveMapper';
2
- export * from './VRMLookAtApplyer';
3
- export * from './VRMLookAtBlendShapeApplyer';
4
- export * from './VRMLookAtBoneApplyer';
5
- export * from './VRMLookAtHead';
6
- export * from './VRMLookAtImporter';
1
+ export * from './VRMCurveMapper';
2
+ export * from './VRMLookAtApplyer';
3
+ export * from './VRMLookAtBlendShapeApplyer';
4
+ export * from './VRMLookAtBoneApplyer';
5
+ export * from './VRMLookAtHead';
6
+ export * from './VRMLookAtImporter';
@@ -1,206 +1,206 @@
1
- import * as THREE from 'three';
2
- export interface MToonParameters extends THREE.ShaderMaterialParameters {
3
- mToonVersion?: number;
4
- cutoff?: number;
5
- color?: THREE.Vector4;
6
- shadeColor?: THREE.Vector4;
7
- map?: THREE.Texture;
8
- mainTex?: THREE.Texture;
9
- mainTex_ST?: THREE.Vector4;
10
- shadeTexture?: THREE.Texture;
11
- bumpScale?: number;
12
- normalMap?: THREE.Texture;
13
- normalMapType?: THREE.NormalMapTypes;
14
- normalScale?: THREE.Vector2;
15
- bumpMap?: THREE.Texture;
16
- receiveShadowRate?: number;
17
- receiveShadowTexture?: THREE.Texture;
18
- shadingGradeRate?: number;
19
- shadingGradeTexture?: THREE.Texture;
20
- shadeShift?: number;
21
- shadeToony?: number;
22
- lightColorAttenuation?: number;
23
- indirectLightIntensity?: number;
24
- rimTexture?: THREE.Texture;
25
- rimColor?: THREE.Vector4;
26
- rimLightingMix?: number;
27
- rimFresnelPower?: number;
28
- rimLift?: number;
29
- sphereAdd?: THREE.Texture;
30
- emissionColor?: THREE.Vector4;
31
- emissiveMap?: THREE.Texture;
32
- emissionMap?: THREE.Texture;
33
- outlineWidthTexture?: THREE.Texture;
34
- outlineWidth?: number;
35
- outlineScaledMaxDistance?: number;
36
- outlineColor?: THREE.Vector4;
37
- outlineLightingMix?: number;
38
- uvAnimMaskTexture?: THREE.Texture;
39
- uvAnimScrollX?: number;
40
- uvAnimScrollY?: number;
41
- uvAnimRotation?: number;
42
- debugMode?: MToonMaterialDebugMode | number;
43
- blendMode?: MToonMaterialRenderMode | number;
44
- outlineWidthMode?: MToonMaterialOutlineWidthMode | number;
45
- outlineColorMode?: MToonMaterialOutlineColorMode | number;
46
- cullMode?: MToonMaterialCullMode | number;
47
- outlineCullMode?: MToonMaterialCullMode | number;
48
- srcBlend?: number;
49
- dstBlend?: number;
50
- zWrite?: number;
51
- isOutline?: boolean;
52
- /**
53
- * Specify the encoding of input uniform colors.
54
- *
55
- * When your `renderer.outputEncoding` is `THREE.LinearEncoding`, use `THREE.LinearEncoding`.
56
- * When your `renderer.outputEncoding` is `THREE.sRGBEncoding`, use `THREE.sRGBEncoding`.
57
- *
58
- * Encodings of textures should be set independently on textures.
59
- *
60
- * This will use `THREE.LinearEncoding` if this option isn't specified.
61
- *
62
- * See also: https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputEncoding
63
- */
64
- encoding?: THREE.TextureEncoding;
65
- }
66
- export declare enum MToonMaterialCullMode {
67
- Off = 0,
68
- Front = 1,
69
- Back = 2
70
- }
71
- export declare enum MToonMaterialDebugMode {
72
- None = 0,
73
- Normal = 1,
74
- LitShadeRate = 2,
75
- UV = 3
76
- }
77
- export declare enum MToonMaterialOutlineColorMode {
78
- FixedColor = 0,
79
- MixedLighting = 1
80
- }
81
- export declare enum MToonMaterialOutlineWidthMode {
82
- None = 0,
83
- WorldCoordinates = 1,
84
- ScreenCoordinates = 2
85
- }
86
- export declare enum MToonMaterialRenderMode {
87
- Opaque = 0,
88
- Cutout = 1,
89
- Transparent = 2,
90
- TransparentWithZWrite = 3
91
- }
92
- /**
93
- * MToon is a material specification that has various features.
94
- * The spec and implementation are originally founded for Unity engine and this is a port of the material.
95
- *
96
- * See: https://github.com/Santarh/MToon
97
- */
98
- export declare class MToonMaterial extends THREE.ShaderMaterial {
99
- /**
100
- * Readonly boolean that indicates this is a [[MToonMaterial]].
101
- */
102
- readonly isMToonMaterial: boolean;
103
- cutoff: number;
104
- color: THREE.Vector4;
105
- shadeColor: THREE.Vector4;
106
- map: THREE.Texture | null;
107
- mainTex_ST: THREE.Vector4;
108
- shadeTexture: THREE.Texture | null;
109
- normalMap: THREE.Texture | null;
110
- normalMapType: THREE.NormalMapTypes;
111
- normalScale: THREE.Vector2;
112
- receiveShadowRate: number;
113
- receiveShadowTexture: THREE.Texture | null;
114
- shadingGradeRate: number;
115
- shadingGradeTexture: THREE.Texture | null;
116
- shadeShift: number;
117
- shadeToony: number;
118
- lightColorAttenuation: number;
119
- indirectLightIntensity: number;
120
- rimTexture: THREE.Texture | null;
121
- rimColor: THREE.Vector4;
122
- rimLightingMix: number;
123
- rimFresnelPower: number;
124
- rimLift: number;
125
- sphereAdd: THREE.Texture | null;
126
- emissionColor: THREE.Vector4;
127
- emissiveMap: THREE.Texture | null;
128
- outlineWidthTexture: THREE.Texture | null;
129
- outlineWidth: number;
130
- outlineScaledMaxDistance: number;
131
- outlineColor: THREE.Vector4;
132
- outlineLightingMix: number;
133
- uvAnimMaskTexture: THREE.Texture | null;
134
- uvAnimScrollX: number;
135
- uvAnimScrollY: number;
136
- uvAnimRotation: number;
137
- shouldApplyUniforms: boolean;
138
- /**
139
- * The encoding of input uniform colors.
140
- *
141
- * When your `renderer.outputEncoding` is `THREE.LinearEncoding`, use `THREE.LinearEncoding`.
142
- * When your `renderer.outputEncoding` is `THREE.sRGBEncoding`, use `THREE.sRGBEncoding`.
143
- *
144
- * Encodings of textures are set independently on textures.
145
- *
146
- * This is `THREE.LinearEncoding` by default.
147
- *
148
- * See also: https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputEncoding
149
- */
150
- encoding: THREE.TextureEncoding;
151
- private _debugMode;
152
- private _blendMode;
153
- private _outlineWidthMode;
154
- private _outlineColorMode;
155
- private _cullMode;
156
- private _outlineCullMode;
157
- private _isOutline;
158
- private _uvAnimOffsetX;
159
- private _uvAnimOffsetY;
160
- private _uvAnimPhase;
161
- constructor(parameters?: MToonParameters);
162
- get mainTex(): THREE.Texture | null;
163
- set mainTex(t: THREE.Texture | null);
164
- get bumpMap(): THREE.Texture | null;
165
- set bumpMap(t: THREE.Texture | null);
166
- /**
167
- * Getting the `bumpScale` reutrns its x component of `normalScale` (assuming x and y component of `normalScale` are same).
168
- */
169
- get bumpScale(): number;
170
- /**
171
- * Setting the `bumpScale` will be convert the value into Vector2 `normalScale` .
172
- */
173
- set bumpScale(t: number);
174
- get emissionMap(): THREE.Texture | null;
175
- set emissionMap(t: THREE.Texture | null);
176
- get blendMode(): MToonMaterialRenderMode;
177
- set blendMode(m: MToonMaterialRenderMode);
178
- get debugMode(): MToonMaterialDebugMode;
179
- set debugMode(m: MToonMaterialDebugMode);
180
- get outlineWidthMode(): MToonMaterialOutlineWidthMode;
181
- set outlineWidthMode(m: MToonMaterialOutlineWidthMode);
182
- get outlineColorMode(): MToonMaterialOutlineColorMode;
183
- set outlineColorMode(m: MToonMaterialOutlineColorMode);
184
- get cullMode(): MToonMaterialCullMode;
185
- set cullMode(m: MToonMaterialCullMode);
186
- get outlineCullMode(): MToonMaterialCullMode;
187
- set outlineCullMode(m: MToonMaterialCullMode);
188
- get zWrite(): number;
189
- set zWrite(i: number);
190
- get isOutline(): boolean;
191
- set isOutline(b: boolean);
192
- /**
193
- * Update this material.
194
- * Usually this will be called via [[VRM.update]] so you don't have to call this manually.
195
- *
196
- * @param delta deltaTime since last update
197
- */
198
- updateVRMMaterials(delta: number): void;
199
- copy(source: this): this;
200
- /**
201
- * Apply updated uniform variables.
202
- */
203
- private _applyUniforms;
204
- private _updateShaderCode;
205
- private _updateCullFace;
206
- }
1
+ import * as THREE from 'three';
2
+ export interface MToonParameters extends THREE.ShaderMaterialParameters {
3
+ mToonVersion?: number;
4
+ cutoff?: number;
5
+ color?: THREE.Vector4;
6
+ shadeColor?: THREE.Vector4;
7
+ map?: THREE.Texture;
8
+ mainTex?: THREE.Texture;
9
+ mainTex_ST?: THREE.Vector4;
10
+ shadeTexture?: THREE.Texture;
11
+ bumpScale?: number;
12
+ normalMap?: THREE.Texture;
13
+ normalMapType?: THREE.NormalMapTypes;
14
+ normalScale?: THREE.Vector2;
15
+ bumpMap?: THREE.Texture;
16
+ receiveShadowRate?: number;
17
+ receiveShadowTexture?: THREE.Texture;
18
+ shadingGradeRate?: number;
19
+ shadingGradeTexture?: THREE.Texture;
20
+ shadeShift?: number;
21
+ shadeToony?: number;
22
+ lightColorAttenuation?: number;
23
+ indirectLightIntensity?: number;
24
+ rimTexture?: THREE.Texture;
25
+ rimColor?: THREE.Vector4;
26
+ rimLightingMix?: number;
27
+ rimFresnelPower?: number;
28
+ rimLift?: number;
29
+ sphereAdd?: THREE.Texture;
30
+ emissionColor?: THREE.Vector4;
31
+ emissiveMap?: THREE.Texture;
32
+ emissionMap?: THREE.Texture;
33
+ outlineWidthTexture?: THREE.Texture;
34
+ outlineWidth?: number;
35
+ outlineScaledMaxDistance?: number;
36
+ outlineColor?: THREE.Vector4;
37
+ outlineLightingMix?: number;
38
+ uvAnimMaskTexture?: THREE.Texture;
39
+ uvAnimScrollX?: number;
40
+ uvAnimScrollY?: number;
41
+ uvAnimRotation?: number;
42
+ debugMode?: MToonMaterialDebugMode | number;
43
+ blendMode?: MToonMaterialRenderMode | number;
44
+ outlineWidthMode?: MToonMaterialOutlineWidthMode | number;
45
+ outlineColorMode?: MToonMaterialOutlineColorMode | number;
46
+ cullMode?: MToonMaterialCullMode | number;
47
+ outlineCullMode?: MToonMaterialCullMode | number;
48
+ srcBlend?: number;
49
+ dstBlend?: number;
50
+ zWrite?: number;
51
+ isOutline?: boolean;
52
+ /**
53
+ * Specify the encoding of input uniform colors.
54
+ *
55
+ * When your `renderer.outputEncoding` is `THREE.LinearEncoding`, use `THREE.LinearEncoding`.
56
+ * When your `renderer.outputEncoding` is `THREE.sRGBEncoding`, use `THREE.sRGBEncoding`.
57
+ *
58
+ * Encodings of textures should be set independently on textures.
59
+ *
60
+ * This will use `THREE.LinearEncoding` if this option isn't specified.
61
+ *
62
+ * See also: https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputEncoding
63
+ */
64
+ encoding?: THREE.TextureEncoding;
65
+ }
66
+ export declare enum MToonMaterialCullMode {
67
+ Off = 0,
68
+ Front = 1,
69
+ Back = 2
70
+ }
71
+ export declare enum MToonMaterialDebugMode {
72
+ None = 0,
73
+ Normal = 1,
74
+ LitShadeRate = 2,
75
+ UV = 3
76
+ }
77
+ export declare enum MToonMaterialOutlineColorMode {
78
+ FixedColor = 0,
79
+ MixedLighting = 1
80
+ }
81
+ export declare enum MToonMaterialOutlineWidthMode {
82
+ None = 0,
83
+ WorldCoordinates = 1,
84
+ ScreenCoordinates = 2
85
+ }
86
+ export declare enum MToonMaterialRenderMode {
87
+ Opaque = 0,
88
+ Cutout = 1,
89
+ Transparent = 2,
90
+ TransparentWithZWrite = 3
91
+ }
92
+ /**
93
+ * MToon is a material specification that has various features.
94
+ * The spec and implementation are originally founded for Unity engine and this is a port of the material.
95
+ *
96
+ * See: https://github.com/Santarh/MToon
97
+ */
98
+ export declare class MToonMaterial extends THREE.ShaderMaterial {
99
+ /**
100
+ * Readonly boolean that indicates this is a [[MToonMaterial]].
101
+ */
102
+ readonly isMToonMaterial: boolean;
103
+ cutoff: number;
104
+ color: THREE.Vector4;
105
+ shadeColor: THREE.Vector4;
106
+ map: THREE.Texture | null;
107
+ mainTex_ST: THREE.Vector4;
108
+ shadeTexture: THREE.Texture | null;
109
+ normalMap: THREE.Texture | null;
110
+ normalMapType: THREE.NormalMapTypes;
111
+ normalScale: THREE.Vector2;
112
+ receiveShadowRate: number;
113
+ receiveShadowTexture: THREE.Texture | null;
114
+ shadingGradeRate: number;
115
+ shadingGradeTexture: THREE.Texture | null;
116
+ shadeShift: number;
117
+ shadeToony: number;
118
+ lightColorAttenuation: number;
119
+ indirectLightIntensity: number;
120
+ rimTexture: THREE.Texture | null;
121
+ rimColor: THREE.Vector4;
122
+ rimLightingMix: number;
123
+ rimFresnelPower: number;
124
+ rimLift: number;
125
+ sphereAdd: THREE.Texture | null;
126
+ emissionColor: THREE.Vector4;
127
+ emissiveMap: THREE.Texture | null;
128
+ outlineWidthTexture: THREE.Texture | null;
129
+ outlineWidth: number;
130
+ outlineScaledMaxDistance: number;
131
+ outlineColor: THREE.Vector4;
132
+ outlineLightingMix: number;
133
+ uvAnimMaskTexture: THREE.Texture | null;
134
+ uvAnimScrollX: number;
135
+ uvAnimScrollY: number;
136
+ uvAnimRotation: number;
137
+ shouldApplyUniforms: boolean;
138
+ /**
139
+ * The encoding of input uniform colors.
140
+ *
141
+ * When your `renderer.outputEncoding` is `THREE.LinearEncoding`, use `THREE.LinearEncoding`.
142
+ * When your `renderer.outputEncoding` is `THREE.sRGBEncoding`, use `THREE.sRGBEncoding`.
143
+ *
144
+ * Encodings of textures are set independently on textures.
145
+ *
146
+ * This is `THREE.LinearEncoding` by default.
147
+ *
148
+ * See also: https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputEncoding
149
+ */
150
+ encoding: THREE.TextureEncoding;
151
+ private _debugMode;
152
+ private _blendMode;
153
+ private _outlineWidthMode;
154
+ private _outlineColorMode;
155
+ private _cullMode;
156
+ private _outlineCullMode;
157
+ private _isOutline;
158
+ private _uvAnimOffsetX;
159
+ private _uvAnimOffsetY;
160
+ private _uvAnimPhase;
161
+ constructor(parameters?: MToonParameters);
162
+ get mainTex(): THREE.Texture | null;
163
+ set mainTex(t: THREE.Texture | null);
164
+ get bumpMap(): THREE.Texture | null;
165
+ set bumpMap(t: THREE.Texture | null);
166
+ /**
167
+ * Getting the `bumpScale` reutrns its x component of `normalScale` (assuming x and y component of `normalScale` are same).
168
+ */
169
+ get bumpScale(): number;
170
+ /**
171
+ * Setting the `bumpScale` will be convert the value into Vector2 `normalScale` .
172
+ */
173
+ set bumpScale(t: number);
174
+ get emissionMap(): THREE.Texture | null;
175
+ set emissionMap(t: THREE.Texture | null);
176
+ get blendMode(): MToonMaterialRenderMode;
177
+ set blendMode(m: MToonMaterialRenderMode);
178
+ get debugMode(): MToonMaterialDebugMode;
179
+ set debugMode(m: MToonMaterialDebugMode);
180
+ get outlineWidthMode(): MToonMaterialOutlineWidthMode;
181
+ set outlineWidthMode(m: MToonMaterialOutlineWidthMode);
182
+ get outlineColorMode(): MToonMaterialOutlineColorMode;
183
+ set outlineColorMode(m: MToonMaterialOutlineColorMode);
184
+ get cullMode(): MToonMaterialCullMode;
185
+ set cullMode(m: MToonMaterialCullMode);
186
+ get outlineCullMode(): MToonMaterialCullMode;
187
+ set outlineCullMode(m: MToonMaterialCullMode);
188
+ get zWrite(): number;
189
+ set zWrite(i: number);
190
+ get isOutline(): boolean;
191
+ set isOutline(b: boolean);
192
+ /**
193
+ * Update this material.
194
+ * Usually this will be called via [[VRM.update]] so you don't have to call this manually.
195
+ *
196
+ * @param delta deltaTime since last update
197
+ */
198
+ updateVRMMaterials(delta: number): void;
199
+ copy(source: this): this;
200
+ /**
201
+ * Apply updated uniform variables.
202
+ */
203
+ private _applyUniforms;
204
+ private _updateShaderCode;
205
+ private _updateCullFace;
206
+ }