@types/three 0.150.2 → 0.151.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.
- three/README.md +1 -1
- three/examples/jsm/controls/MapControls.d.ts +21 -0
- three/examples/jsm/controls/OrbitControls.d.ts +1 -5
- three/examples/jsm/controls/PointerLockControls.d.ts +3 -0
- three/examples/jsm/controls/TrackballControls.d.ts +2 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +3 -4
- three/examples/jsm/loaders/GLTFLoader.d.ts +2 -4
- three/examples/jsm/loaders/SVGLoader.d.ts +15 -3
- three/examples/jsm/nodes/Nodes.d.ts +130 -226
- three/examples/jsm/nodes/{core → code}/CodeNode.d.ts +2 -3
- three/examples/jsm/nodes/{core → code}/ExpressionNode.d.ts +2 -2
- three/examples/jsm/nodes/{core → code}/FunctionCallNode.d.ts +2 -2
- three/examples/jsm/nodes/{core → code}/FunctionNode.d.ts +4 -4
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -3
- three/examples/jsm/nodes/core/NodeUtils.d.ts +8 -2
- three/examples/jsm/nodes/core/{VaryNode.d.ts → VaryingNode.d.ts} +1 -1
- three/examples/jsm/nodes/fog/FogNode.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +2 -1
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +2 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +2 -2
- three/examples/jsm/objects/{GroundProjectedEnv.d.ts → GroundProjectedSkybox.d.ts} +1 -1
- three/examples/jsm/postprocessing/Pass.d.ts +2 -0
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +2 -1
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +0 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +12 -2
- three/index.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/DataUtils.d.ts +13 -0
- three/src/extras/Earcut.d.ts +12 -0
- three/src/extras/ImageUtils.d.ts +20 -20
- three/src/extras/PMREMGenerator.d.ts +66 -0
- three/src/extras/ShapeUtils.d.ts +19 -1
- three/src/extras/core/Curve.d.ts +86 -31
- three/src/extras/core/CurvePath.d.ts +46 -4
- three/src/extras/core/Interpolations.d.ts +36 -0
- three/src/extras/core/Path.d.ts +122 -15
- three/src/extras/core/Shape.d.ts +56 -6
- three/src/extras/core/ShapePath.d.ts +73 -8
- three/src/extras/curves/ArcCurve.d.ts +35 -3
- three/src/extras/curves/CatmullRomCurve3.d.ts +62 -15
- three/src/extras/curves/CubicBezierCurve.d.ts +48 -7
- three/src/extras/curves/CubicBezierCurve3.d.ts +48 -7
- three/src/extras/curves/EllipseCurve.d.ts +73 -18
- three/src/extras/curves/LineCurve.d.ts +26 -5
- three/src/extras/curves/LineCurve3.d.ts +26 -5
- three/src/extras/curves/QuadraticBezierCurve.d.ts +44 -6
- three/src/extras/curves/QuadraticBezierCurve3.d.ts +44 -6
- three/src/extras/curves/SplineCurve.d.ts +39 -3
- three/src/helpers/ArrowHelper.d.ts +47 -16
- three/src/helpers/AxesHelper.d.ts +35 -3
- three/src/helpers/Box3Helper.d.ts +28 -4
- three/src/helpers/BoxHelper.d.ts +44 -4
- three/src/helpers/CameraHelper.d.ts +38 -19
- three/src/helpers/DirectionalLightHelper.d.ts +57 -10
- three/src/helpers/GridHelper.d.ts +32 -6
- three/src/helpers/HemisphereLightHelper.d.ts +56 -3
- three/src/helpers/PlaneHelper.d.ts +31 -8
- three/src/helpers/PointLightHelper.d.ts +54 -6
- three/src/helpers/PolarGridHelper.d.ts +35 -8
- three/src/helpers/SkeletonHelper.d.ts +56 -8
- three/src/helpers/SpotLightHelper.d.ts +59 -4
- three/src/lights/AmbientLight.d.ts +23 -10
- three/src/lights/AmbientLightProbe.d.ts +18 -0
- three/src/lights/DirectionalLight.d.ts +75 -20
- three/src/lights/DirectionalLightShadow.d.ts +68 -2
- three/src/lights/HemisphereLight.d.ts +45 -12
- three/src/lights/HemisphereLightProbe.d.ts +19 -0
- three/src/lights/Light.d.ts +40 -43
- three/src/lights/LightProbe.d.ts +32 -5
- three/src/lights/LightShadow.d.ts +100 -18
- three/src/lights/PointLight.d.ts +57 -12
- three/src/lights/PointLightShadow.d.ts +18 -2
- three/src/lights/RectAreaLight.d.ts +60 -8
- three/src/lights/SpotLight.d.ts +105 -20
- three/src/lights/SpotLightShadow.d.ts +63 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -1
- three/src/materials/MeshDistanceMaterial.d.ts +0 -15
- three/src/math/Color.d.ts +23 -2
- three/src/math/Quaternion.d.ts +6 -0
- three/src/math/Triangle.d.ts +40 -0
- three/src/math/Vector2.d.ts +5 -0
- three/src/math/Vector3.d.ts +10 -3
- three/src/objects/InstancedMesh.d.ts +22 -30
- three/src/objects/LineSegments.d.ts +2 -0
- three/src/objects/Skeleton.d.ts +5 -1
- three/src/objects/SkinnedMesh.d.ts +37 -25
- three/src/renderers/WebGLRenderer.d.ts +16 -0
- three/src/renderers/shaders/ShaderChunk.d.ts +58 -37
- three/src/renderers/shaders/UniformsLib.d.ts +88 -57
- three/src/textures/Texture.d.ts +5 -22
- three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +0 -12
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Renderers / Shaders /////////////////////////////////////////////////////////////////////
|
|
2
|
-
export
|
|
3
|
-
[name: string]: string;
|
|
4
|
-
|
|
2
|
+
export const ShaderChunk: {
|
|
5
3
|
alphamap_fragment: string;
|
|
6
4
|
alphamap_pars_fragment: string;
|
|
7
5
|
alphatest_fragment: string;
|
|
6
|
+
alphatest_pars_fragment: string;
|
|
8
7
|
aomap_fragment: string;
|
|
9
8
|
aomap_pars_fragment: string;
|
|
10
9
|
begin_vertex: string;
|
|
11
10
|
beginnormal_vertex: string;
|
|
12
11
|
bsdfs: string;
|
|
12
|
+
iridescence_fragment: string;
|
|
13
13
|
bumpmap_pars_fragment: string;
|
|
14
14
|
clipping_planes_fragment: string;
|
|
15
15
|
clipping_planes_pars_fragment: string;
|
|
@@ -20,37 +20,32 @@ export let ShaderChunk: {
|
|
|
20
20
|
color_pars_vertex: string;
|
|
21
21
|
color_vertex: string;
|
|
22
22
|
common: string;
|
|
23
|
-
cube_frag: string;
|
|
24
|
-
cube_vert: string;
|
|
25
23
|
cube_uv_reflection_fragment: string;
|
|
26
24
|
defaultnormal_vertex: string;
|
|
27
|
-
depth_frag: string;
|
|
28
|
-
depth_vert: string;
|
|
29
|
-
distanceRGBA_frag: string;
|
|
30
|
-
distanceRGBA_vert: string;
|
|
31
|
-
displacementmap_vertex: string;
|
|
32
25
|
displacementmap_pars_vertex: string;
|
|
26
|
+
displacementmap_vertex: string;
|
|
33
27
|
emissivemap_fragment: string;
|
|
34
28
|
emissivemap_pars_fragment: string;
|
|
35
|
-
encodings_pars_fragment: string;
|
|
36
29
|
encodings_fragment: string;
|
|
30
|
+
encodings_pars_fragment: string;
|
|
37
31
|
envmap_fragment: string;
|
|
38
32
|
envmap_common_pars_fragment: string;
|
|
39
33
|
envmap_pars_fragment: string;
|
|
40
34
|
envmap_pars_vertex: string;
|
|
35
|
+
envmap_physical_pars_fragment: string;
|
|
41
36
|
envmap_vertex: string;
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
fog_vertex: string;
|
|
38
|
+
fog_pars_vertex: string;
|
|
44
39
|
fog_fragment: string;
|
|
45
40
|
fog_pars_fragment: string;
|
|
46
|
-
|
|
47
|
-
linedashed_vert: string;
|
|
41
|
+
gradientmap_pars_fragment: string;
|
|
48
42
|
lightmap_fragment: string;
|
|
49
43
|
lightmap_pars_fragment: string;
|
|
50
|
-
|
|
44
|
+
lights_lambert_fragment: string;
|
|
45
|
+
lights_lambert_pars_fragment: string;
|
|
51
46
|
lights_pars_begin: string;
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
lights_toon_fragment: string;
|
|
48
|
+
lights_toon_pars_fragment: string;
|
|
54
49
|
lights_phong_fragment: string;
|
|
55
50
|
lights_phong_pars_fragment: string;
|
|
56
51
|
lights_physical_fragment: string;
|
|
@@ -66,36 +61,28 @@ export let ShaderChunk: {
|
|
|
66
61
|
map_pars_fragment: string;
|
|
67
62
|
map_particle_fragment: string;
|
|
68
63
|
map_particle_pars_fragment: string;
|
|
69
|
-
meshbasic_frag: string;
|
|
70
|
-
meshbasic_vert: string;
|
|
71
|
-
meshlambert_frag: string;
|
|
72
|
-
meshlambert_vert: string;
|
|
73
|
-
meshphong_frag: string;
|
|
74
|
-
meshphong_vert: string;
|
|
75
|
-
meshphysical_frag: string;
|
|
76
|
-
meshphysical_vert: string;
|
|
77
64
|
metalnessmap_fragment: string;
|
|
78
65
|
metalnessmap_pars_fragment: string;
|
|
66
|
+
morphcolor_vertex: string;
|
|
79
67
|
morphnormal_vertex: string;
|
|
80
68
|
morphtarget_pars_vertex: string;
|
|
81
69
|
morphtarget_vertex: string;
|
|
82
|
-
normal_flip: string;
|
|
83
|
-
normal_frag: string;
|
|
84
70
|
normal_fragment_begin: string;
|
|
85
71
|
normal_fragment_maps: string;
|
|
86
|
-
|
|
72
|
+
normal_pars_fragment: string;
|
|
73
|
+
normal_pars_vertex: string;
|
|
74
|
+
normal_vertex: string;
|
|
87
75
|
normalmap_pars_fragment: string;
|
|
88
76
|
clearcoat_normal_fragment_begin: string;
|
|
89
77
|
clearcoat_normal_fragment_maps: string;
|
|
90
78
|
clearcoat_pars_fragment: string;
|
|
79
|
+
iridescence_pars_fragment: string;
|
|
80
|
+
output_fragment: string;
|
|
91
81
|
packing: string;
|
|
92
|
-
points_frag: string;
|
|
93
|
-
points_vert: string;
|
|
94
|
-
shadow_frag: string;
|
|
95
|
-
shadow_vert: string;
|
|
96
|
-
|
|
97
82
|
premultiplied_alpha_fragment: string;
|
|
98
83
|
project_vertex: string;
|
|
84
|
+
dithering_fragment: string;
|
|
85
|
+
dithering_pars_fragment: string;
|
|
99
86
|
roughnessmap_fragment: string;
|
|
100
87
|
roughnessmap_pars_fragment: string;
|
|
101
88
|
shadowmap_pars_fragment: string;
|
|
@@ -110,11 +97,45 @@ export let ShaderChunk: {
|
|
|
110
97
|
specularmap_pars_fragment: string;
|
|
111
98
|
tonemapping_fragment: string;
|
|
112
99
|
tonemapping_pars_fragment: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
uv2_vertex: string;
|
|
100
|
+
transmission_fragment: string;
|
|
101
|
+
transmission_pars_fragment: string;
|
|
116
102
|
uv_pars_fragment: string;
|
|
117
103
|
uv_pars_vertex: string;
|
|
118
104
|
uv_vertex: string;
|
|
119
105
|
worldpos_vertex: string;
|
|
106
|
+
|
|
107
|
+
background_vert: string;
|
|
108
|
+
background_frag: string;
|
|
109
|
+
backgroundCube_vert: string;
|
|
110
|
+
backgroundCube_frag: string;
|
|
111
|
+
cube_vert: string;
|
|
112
|
+
cube_frag: string;
|
|
113
|
+
depth_vert: string;
|
|
114
|
+
depth_frag: string;
|
|
115
|
+
distanceRGBA_vert: string;
|
|
116
|
+
distanceRGBA_frag: string;
|
|
117
|
+
equirect_vert: string;
|
|
118
|
+
equirect_frag: string;
|
|
119
|
+
linedashed_vert: string;
|
|
120
|
+
linedashed_frag: string;
|
|
121
|
+
meshbasic_vert: string;
|
|
122
|
+
meshbasic_frag: string;
|
|
123
|
+
meshlambert_vert: string;
|
|
124
|
+
meshlambert_frag: string;
|
|
125
|
+
meshmatcap_vert: string;
|
|
126
|
+
meshmatcap_frag: string;
|
|
127
|
+
meshnormal_vert: string;
|
|
128
|
+
meshnormal_frag: string;
|
|
129
|
+
meshphong_vert: string;
|
|
130
|
+
meshphong_frag: string;
|
|
131
|
+
meshphysical_vert: string;
|
|
132
|
+
meshphysical_frag: string;
|
|
133
|
+
meshtoon_vert: string;
|
|
134
|
+
meshtoon_frag: string;
|
|
135
|
+
points_vert: string;
|
|
136
|
+
points_frag: string;
|
|
137
|
+
shadow_vert: string;
|
|
138
|
+
shadow_frag: string;
|
|
139
|
+
sprite_vert: string;
|
|
140
|
+
sprite_frag: string;
|
|
120
141
|
};
|
|
@@ -1,78 +1,92 @@
|
|
|
1
|
+
import { Color } from '../../math/Color';
|
|
2
|
+
import { Vector2 } from '../../math/Vector2';
|
|
3
|
+
import { Matrix3 } from '../../math/Matrix3';
|
|
4
|
+
|
|
1
5
|
// tslint:disable-next-line:interface-name
|
|
2
6
|
export interface IUniform<TValue = any> {
|
|
3
7
|
value: TValue;
|
|
4
8
|
}
|
|
5
9
|
|
|
6
|
-
export
|
|
10
|
+
export const UniformsLib: {
|
|
7
11
|
common: {
|
|
8
|
-
diffuse: IUniform
|
|
9
|
-
opacity: IUniform
|
|
10
|
-
map: IUniform
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
diffuse: IUniform<Color>;
|
|
13
|
+
opacity: IUniform<number>;
|
|
14
|
+
map: IUniform<unknown>;
|
|
15
|
+
mapTransform: IUniform<Matrix3>;
|
|
16
|
+
alphaMap: IUniform<unknown>;
|
|
17
|
+
alphaMapTransform: IUniform<Matrix3>;
|
|
18
|
+
alphaTest: IUniform<number>;
|
|
14
19
|
};
|
|
15
20
|
specularmap: {
|
|
16
|
-
specularMap: IUniform
|
|
21
|
+
specularMap: IUniform<unknown>;
|
|
22
|
+
specularMapTransform: IUniform<Matrix3>;
|
|
17
23
|
};
|
|
18
24
|
envmap: {
|
|
19
|
-
envMap: IUniform
|
|
20
|
-
flipEnvMap: IUniform
|
|
21
|
-
reflectivity: IUniform
|
|
22
|
-
ior: IUniform
|
|
23
|
-
refractRatio: IUniform
|
|
24
|
-
backgroundBlurriness: IUniform;
|
|
25
|
+
envMap: IUniform<unknown>;
|
|
26
|
+
flipEnvMap: IUniform<number>;
|
|
27
|
+
reflectivity: IUniform<number>;
|
|
28
|
+
ior: IUniform<number>;
|
|
29
|
+
refractRatio: IUniform<number>;
|
|
25
30
|
};
|
|
26
31
|
aomap: {
|
|
27
|
-
aoMap: IUniform
|
|
28
|
-
aoMapIntensity: IUniform
|
|
32
|
+
aoMap: IUniform<unknown>;
|
|
33
|
+
aoMapIntensity: IUniform<number>;
|
|
34
|
+
aoMapTransform: IUniform<Matrix3>;
|
|
29
35
|
};
|
|
30
36
|
lightmap: {
|
|
31
|
-
lightMap: IUniform
|
|
32
|
-
lightMapIntensity: IUniform
|
|
33
|
-
|
|
34
|
-
emissivemap: {
|
|
35
|
-
emissiveMap: IUniform;
|
|
37
|
+
lightMap: IUniform<number>;
|
|
38
|
+
lightMapIntensity: IUniform<number>;
|
|
39
|
+
lightMapTransform: IUniform<Matrix3>;
|
|
36
40
|
};
|
|
37
41
|
bumpmap: {
|
|
38
|
-
bumpMap: IUniform
|
|
39
|
-
|
|
42
|
+
bumpMap: IUniform<unknown>;
|
|
43
|
+
bumpMapTransform: IUniform<Matrix3>;
|
|
44
|
+
bumpScale: IUniform<number>;
|
|
40
45
|
};
|
|
41
46
|
normalmap: {
|
|
42
|
-
normalMap: IUniform
|
|
43
|
-
|
|
47
|
+
normalMap: IUniform<unknown>;
|
|
48
|
+
normalMapTransform: IUniform<Matrix3>;
|
|
49
|
+
normalScale: IUniform<Vector2>;
|
|
44
50
|
};
|
|
45
51
|
displacementmap: {
|
|
46
|
-
displacementMap: IUniform
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
displacementMap: IUniform<unknown>;
|
|
53
|
+
displacementMapTransform: IUniform<Matrix3>;
|
|
54
|
+
displacementScale: IUniform<number>;
|
|
55
|
+
displacementBias: IUniform<number>;
|
|
49
56
|
};
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
emissivemap: {
|
|
58
|
+
emissiveMap: IUniform<unknown>;
|
|
59
|
+
emissiveMapTransform: IUniform<Matrix3>;
|
|
52
60
|
};
|
|
53
61
|
metalnessmap: {
|
|
54
|
-
metalnessMap: IUniform
|
|
62
|
+
metalnessMap: IUniform<unknown>;
|
|
63
|
+
metalnessMapTransform: IUniform<Matrix3>;
|
|
64
|
+
};
|
|
65
|
+
roughnessmap: {
|
|
66
|
+
roughnessMap: IUniform<unknown>;
|
|
67
|
+
roughnessMapTransform: IUniform<Matrix3>;
|
|
55
68
|
};
|
|
56
69
|
gradientmap: {
|
|
57
|
-
gradientMap: IUniform
|
|
70
|
+
gradientMap: IUniform<unknown>;
|
|
58
71
|
};
|
|
59
72
|
fog: {
|
|
60
|
-
fogDensity: IUniform
|
|
61
|
-
fogNear: IUniform
|
|
62
|
-
fogFar: IUniform
|
|
63
|
-
fogColor: IUniform
|
|
73
|
+
fogDensity: IUniform<number>;
|
|
74
|
+
fogNear: IUniform<number>;
|
|
75
|
+
fogFar: IUniform<number>;
|
|
76
|
+
fogColor: IUniform<Color>;
|
|
64
77
|
};
|
|
65
78
|
lights: {
|
|
66
|
-
ambientLightColor: IUniform
|
|
79
|
+
ambientLightColor: IUniform<unknown[]>;
|
|
80
|
+
lightProbe: IUniform<unknown[]>;
|
|
67
81
|
directionalLights: {
|
|
68
|
-
value:
|
|
82
|
+
value: unknown[];
|
|
69
83
|
properties: {
|
|
70
84
|
direction: {};
|
|
71
85
|
color: {};
|
|
72
86
|
};
|
|
73
87
|
};
|
|
74
88
|
directionalLightShadows: {
|
|
75
|
-
value:
|
|
89
|
+
value: unknown[];
|
|
76
90
|
properties: {
|
|
77
91
|
shadowBias: {};
|
|
78
92
|
shadowNormalBias: {};
|
|
@@ -80,10 +94,10 @@ export let UniformsLib: {
|
|
|
80
94
|
shadowMapSize: {};
|
|
81
95
|
};
|
|
82
96
|
};
|
|
83
|
-
directionalShadowMap: IUniform
|
|
84
|
-
directionalShadowMatrix: IUniform
|
|
97
|
+
directionalShadowMap: IUniform<unknown[]>;
|
|
98
|
+
directionalShadowMatrix: IUniform<unknown[]>;
|
|
85
99
|
spotLights: {
|
|
86
|
-
value:
|
|
100
|
+
value: unknown[];
|
|
87
101
|
properties: {
|
|
88
102
|
color: {};
|
|
89
103
|
position: {};
|
|
@@ -95,7 +109,7 @@ export let UniformsLib: {
|
|
|
95
109
|
};
|
|
96
110
|
};
|
|
97
111
|
spotLightShadows: {
|
|
98
|
-
value:
|
|
112
|
+
value: unknown[];
|
|
99
113
|
properties: {
|
|
100
114
|
shadowBias: {};
|
|
101
115
|
shadowNormalBias: {};
|
|
@@ -103,10 +117,11 @@ export let UniformsLib: {
|
|
|
103
117
|
shadowMapSize: {};
|
|
104
118
|
};
|
|
105
119
|
};
|
|
106
|
-
|
|
107
|
-
|
|
120
|
+
spotLightMap: IUniform<unknown[]>;
|
|
121
|
+
spotShadowMap: IUniform<unknown[]>;
|
|
122
|
+
spotLightMatrix: IUniform<unknown[]>;
|
|
108
123
|
pointLights: {
|
|
109
|
-
value:
|
|
124
|
+
value: unknown[];
|
|
110
125
|
properties: {
|
|
111
126
|
color: {};
|
|
112
127
|
position: {};
|
|
@@ -115,18 +130,20 @@ export let UniformsLib: {
|
|
|
115
130
|
};
|
|
116
131
|
};
|
|
117
132
|
pointLightShadows: {
|
|
118
|
-
value:
|
|
133
|
+
value: unknown[];
|
|
119
134
|
properties: {
|
|
120
135
|
shadowBias: {};
|
|
121
136
|
shadowNormalBias: {};
|
|
122
137
|
shadowRadius: {};
|
|
123
138
|
shadowMapSize: {};
|
|
139
|
+
shadowCameraNear: {};
|
|
140
|
+
shadowCameraFar: {};
|
|
124
141
|
};
|
|
125
142
|
};
|
|
126
|
-
pointShadowMap: IUniform
|
|
127
|
-
pointShadowMatrix: IUniform
|
|
143
|
+
pointShadowMap: IUniform<unknown[]>;
|
|
144
|
+
pointShadowMatrix: IUniform<unknown[]>;
|
|
128
145
|
hemisphereLights: {
|
|
129
|
-
value:
|
|
146
|
+
value: unknown[];
|
|
130
147
|
properties: {
|
|
131
148
|
direction: {};
|
|
132
149
|
skycolor: {};
|
|
@@ -134,7 +151,7 @@ export let UniformsLib: {
|
|
|
134
151
|
};
|
|
135
152
|
};
|
|
136
153
|
rectAreaLights: {
|
|
137
|
-
value:
|
|
154
|
+
value: unknown[];
|
|
138
155
|
properties: {
|
|
139
156
|
color: {};
|
|
140
157
|
position: {};
|
|
@@ -142,13 +159,27 @@ export let UniformsLib: {
|
|
|
142
159
|
height: {};
|
|
143
160
|
};
|
|
144
161
|
};
|
|
162
|
+
ltc_1: IUniform<unknown>;
|
|
163
|
+
ltc_2: IUniform<unknown>;
|
|
145
164
|
};
|
|
146
165
|
points: {
|
|
147
|
-
diffuse: IUniform
|
|
148
|
-
opacity: IUniform
|
|
149
|
-
size: IUniform
|
|
150
|
-
scale: IUniform
|
|
151
|
-
map: IUniform
|
|
152
|
-
|
|
166
|
+
diffuse: IUniform<Color>;
|
|
167
|
+
opacity: IUniform<number>;
|
|
168
|
+
size: IUniform<number>;
|
|
169
|
+
scale: IUniform<number>;
|
|
170
|
+
map: IUniform<unknown>;
|
|
171
|
+
alphaMap: IUniform<unknown>;
|
|
172
|
+
alphaTest: IUniform<number>;
|
|
173
|
+
uvTransform: IUniform<Matrix3>;
|
|
174
|
+
};
|
|
175
|
+
sprite: {
|
|
176
|
+
diffuse: IUniform<Color>;
|
|
177
|
+
opacity: IUniform<number>;
|
|
178
|
+
center: IUniform<Vector2>;
|
|
179
|
+
rotation: IUniform<number>;
|
|
180
|
+
map: IUniform<unknown>;
|
|
181
|
+
mapTransform: IUniform<Matrix3>;
|
|
182
|
+
alphaMap: IUniform<unknown>;
|
|
183
|
+
alphaTest: IUniform<number>;
|
|
153
184
|
};
|
|
154
185
|
};
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -123,6 +123,11 @@ export class Texture extends EventDispatcher {
|
|
|
123
123
|
*/
|
|
124
124
|
mapping: AnyMapping;
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Lets you select the uv attribute to map the texture to. `0` for `uv` and `1` for `uv2`.
|
|
128
|
+
*/
|
|
129
|
+
channel: number;
|
|
130
|
+
|
|
126
131
|
/**
|
|
127
132
|
* This defines how the {@link Texture} is wrapped *horizontally* and corresponds to **U** in UV mapping.
|
|
128
133
|
* @remarks for **WEBGL1** - tiling of images in textures only functions if image dimensions are powers of two
|
|
@@ -232,26 +237,6 @@ export class Texture extends EventDispatcher {
|
|
|
232
237
|
/**
|
|
233
238
|
* How much a single repetition of the texture is offset from the beginning, in each direction **U** and **V**.
|
|
234
239
|
* @remarks Typical range is `0.0` to `1.0`.
|
|
235
|
-
* @remarks
|
|
236
|
-
* The below texture types share the `first` uv channel in the engine.
|
|
237
|
-
* The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures:
|
|
238
|
-
* - color map
|
|
239
|
-
* - specular map
|
|
240
|
-
* - displacement map
|
|
241
|
-
* - normal map
|
|
242
|
-
* - bump map
|
|
243
|
-
* - roughness map
|
|
244
|
-
* - metalness map
|
|
245
|
-
* - alpha map
|
|
246
|
-
* - emissive map
|
|
247
|
-
* - clearcoat map
|
|
248
|
-
* - clearcoat normal map
|
|
249
|
-
* - clearcoat roughnessMap map
|
|
250
|
-
* @remarks
|
|
251
|
-
* The below {@link Texture} types share the `second` uv channel in the engine.
|
|
252
|
-
* The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures:
|
|
253
|
-
* - ao map
|
|
254
|
-
* - light map
|
|
255
240
|
* @defaultValue `new THREE.Vector2(0, 0)`
|
|
256
241
|
*/
|
|
257
242
|
offset: Vector2;
|
|
@@ -261,8 +246,6 @@ export class Texture extends EventDispatcher {
|
|
|
261
246
|
* @remarks
|
|
262
247
|
* If repeat is set greater than `1` in either direction, the corresponding *Wrap* parameter should
|
|
263
248
|
* also be set to {@link THREE.RepeatWrapping} or {@link THREE.MirroredRepeatWrapping} to achieve the desired tiling effect.
|
|
264
|
-
* @remarks
|
|
265
|
-
* Setting different repeat values for textures is restricted in the same way like {@link .offset | .offset}.
|
|
266
249
|
* @see {@link wrapS}
|
|
267
250
|
* @see {@link wrapT}
|
|
268
251
|
* @defaultValue `new THREE.Vector2( 1, 1 )`
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import AnalyticLightNode from './AnalyticLightNode';
|
|
2
|
-
import Node from '../core/Node';
|
|
3
|
-
import { PointLight, SpotLight } from '../../../../src/Three';
|
|
4
|
-
|
|
5
|
-
export type PunctualLight = PointLight | SpotLight;
|
|
6
|
-
|
|
7
|
-
export default class PunctualLightNode extends AnalyticLightNode<PunctualLight> {
|
|
8
|
-
cutoffDistanceNode: Node;
|
|
9
|
-
decayExponentNode: Node;
|
|
10
|
-
|
|
11
|
-
constructor(light?: PunctualLight | null);
|
|
12
|
-
}
|