@types/three 0.169.0 → 0.170.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/Addons.d.ts +3 -3
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +44 -0
- three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
- three/examples/jsm/csm/CSMHelper.d.ts +2 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
- three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
- three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
- three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
- three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
- three/examples/jsm/lines/Wireframe.d.ts +5 -2
- three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
- three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
- three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
- three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
- three/examples/jsm/math/ColorSpaces.d.ts +11 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
- three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
- three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
- three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
- three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
- three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
- three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
- three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
- three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
- three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
- three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.Nodes.d.ts +5 -1
- three/src/Three.WebGPU.d.ts +5 -1
- three/src/Three.d.ts +2 -7
- three/src/constants.d.ts +1 -9
- three/src/core/BufferGeometry.d.ts +13 -2
- three/src/core/RenderTarget.d.ts +1 -2
- three/src/loaders/FileLoader.d.ts +3 -3
- three/src/materials/LineBasicMaterial.d.ts +0 -5
- three/src/materials/LineDashedMaterial.d.ts +0 -5
- three/src/materials/Material.d.ts +4 -6
- three/src/materials/MeshBasicMaterial.d.ts +0 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/MeshLambertMaterial.d.ts +0 -5
- three/src/materials/MeshMatcapMaterial.d.ts +0 -5
- three/src/materials/MeshNormalMaterial.d.ts +0 -5
- three/src/materials/MeshPhongMaterial.d.ts +0 -5
- three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
- three/src/materials/MeshStandardMaterial.d.ts +0 -5
- three/src/materials/MeshToonMaterial.d.ts +0 -5
- three/src/materials/PointsMaterial.d.ts +0 -5
- three/src/materials/RawShaderMaterial.d.ts +0 -2
- three/src/materials/ShaderMaterial.d.ts +0 -5
- three/src/materials/ShadowMaterial.d.ts +0 -5
- three/src/materials/SpriteMaterial.d.ts +0 -5
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +2 -0
- three/src/materials/nodes/NodeMaterials.d.ts +19 -16
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
- three/src/math/Color.d.ts +39 -22
- three/src/math/ColorManagement.d.ts +24 -24
- three/src/math/Vector4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +1 -21
- three/src/nodes/TSL.d.ts +6 -24
- three/src/nodes/accessors/Camera.d.ts +0 -1
- three/src/nodes/accessors/SceneNode.d.ts +2 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
- three/src/nodes/accessors/VelocityNode.d.ts +4 -0
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/core/StackNode.d.ts +4 -4
- three/src/nodes/core/VarNode.d.ts +12 -1
- three/src/nodes/display/ColorAdjustment.d.ts +29 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
- three/src/nodes/display/RenderOutputNode.d.ts +4 -4
- three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
- three/src/nodes/lighting/LightsNode.d.ts +7 -2
- three/src/nodes/lighting/PointLightNode.d.ts +11 -1
- three/src/nodes/lighting/ShadowNode.d.ts +12 -0
- three/src/nodes/utils/Discard.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +7 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
- three/src/nodes/utils/ReflectorNode.d.ts +17 -4
- three/src/nodes/utils/Timer.d.ts +21 -0
- three/src/objects/BatchedMesh.d.ts +47 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -11
- three/src/renderers/common/Constants.d.ts +2 -1
- three/src/renderers/common/Geometries.d.ts +1 -0
- three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
- three/src/renderers/common/Lighting.d.ts +15 -0
- three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
- three/src/renderers/common/RenderList.d.ts +5 -2
- three/src/renderers/common/RenderLists.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +1 -0
- three/src/renderers/common/Renderer.d.ts +35 -9
- three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
- three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
- three/src/renderers/webgl/WebGLState.d.ts +13 -10
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/textures/CompressedTexture.d.ts +1 -2
- three/src/textures/CubeTexture.d.ts +1 -2
- three/src/textures/DataTexture.d.ts +1 -2
- three/src/textures/Texture.d.ts +3 -4
- three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
- three/src/nodes/display/BleachBypass.d.ts +0 -4
- three/src/nodes/display/Sepia.d.ts +0 -4
- three/src/nodes/utils/OscNode.d.ts +0 -25
- three/src/nodes/utils/TimerNode.d.ts +0 -25
- /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
- /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
|
@@ -234,6 +234,10 @@ export interface MaterialJSON {
|
|
|
234
234
|
* Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.
|
|
235
235
|
*/
|
|
236
236
|
export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
237
|
+
static get type(): string;
|
|
238
|
+
|
|
239
|
+
get type(): string;
|
|
240
|
+
|
|
237
241
|
constructor();
|
|
238
242
|
|
|
239
243
|
/**
|
|
@@ -509,12 +513,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
509
513
|
*/
|
|
510
514
|
transparent: boolean;
|
|
511
515
|
|
|
512
|
-
/**
|
|
513
|
-
* Value is the string 'Material'. This shouldn't be changed, and can be used to find all objects of this type in a scene.
|
|
514
|
-
* @default 'Material'
|
|
515
|
-
*/
|
|
516
|
-
type: string;
|
|
517
|
-
|
|
518
516
|
/**
|
|
519
517
|
* UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.
|
|
520
518
|
*/
|
|
@@ -4,7 +4,7 @@ import { Texture } from "../../textures/Texture.js";
|
|
|
4
4
|
import { MeshNormalMaterialParameters } from "../MeshNormalMaterial.js";
|
|
5
5
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface MeshNormalNodeMaterialParameters extends NodeMaterialParameters, MeshNormalMaterialParameters {
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default class MeshNormalNodeMaterial extends NodeMaterial {
|
|
@@ -24,5 +24,5 @@ export default class MeshNormalNodeMaterial extends NodeMaterial {
|
|
|
24
24
|
wireframeLinewidth: number;
|
|
25
25
|
flatShading: boolean;
|
|
26
26
|
|
|
27
|
-
constructor(parameters?:
|
|
27
|
+
constructor(parameters?: MeshNormalNodeMaterialParameters);
|
|
28
28
|
}
|
|
@@ -24,6 +24,7 @@ export interface NodeMaterialParameters extends MaterialParameters {
|
|
|
24
24
|
alphaTestNode?: Node | null | undefined;
|
|
25
25
|
|
|
26
26
|
positionNode?: Node | null | undefined;
|
|
27
|
+
geometryNode?: Node | null | undefined;
|
|
27
28
|
|
|
28
29
|
depthNode?: Node | null | undefined;
|
|
29
30
|
shadowNode?: Node | null | undefined;
|
|
@@ -54,6 +55,7 @@ declare class NodeMaterial extends Material {
|
|
|
54
55
|
alphaTestNode: Node | null;
|
|
55
56
|
|
|
56
57
|
positionNode: Node | null;
|
|
58
|
+
geometryNode: Node | null;
|
|
57
59
|
|
|
58
60
|
depthNode: Node | null;
|
|
59
61
|
shadowNode: Node | null;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
1
|
+
export {
|
|
2
|
+
default as InstancedPointsNodeMaterial,
|
|
3
|
+
InstancedPointsNodeMaterialParameters,
|
|
4
|
+
} from "./InstancedPointsNodeMaterial.js";
|
|
5
|
+
export { default as Line2NodeMaterial, Line2NodeMaterialParameters } from "./Line2NodeMaterial.js";
|
|
6
|
+
export { default as LineBasicNodeMaterial, LineBasicNodeMaterialParameters } from "./LineBasicNodeMaterial.js";
|
|
7
|
+
export { default as LineDashedNodeMaterial, LineDashedNodeMaterialParameters } from "./LineDashedNodeMaterial.js";
|
|
8
|
+
export { default as MeshBasicNodeMaterial, MeshBasicNodeMaterialParameters } from "./MeshBasicNodeMaterial.js";
|
|
9
|
+
export { default as MeshLambertNodeMaterial, MeshLambertNodeMaterialParameters } from "./MeshLambertNodeMaterial.js";
|
|
10
|
+
export { default as MeshMatcapNodeMaterial, MeshMatcapNodeMaterialParameters } from "./MeshMatcapNodeMaterial.js";
|
|
11
|
+
export { default as MeshNormalNodeMaterial, MeshNormalNodeMaterialParameters } from "./MeshNormalNodeMaterial.js";
|
|
12
|
+
export { default as MeshPhongNodeMaterial, MeshPhongNodeMaterialParameters } from "./MeshPhongNodeMaterial.js";
|
|
13
|
+
export { default as MeshPhysicalNodeMaterial, MeshPhysicalNodeMaterialParameters } from "./MeshPhysicalNodeMaterial.js";
|
|
11
14
|
export { default as MeshSSSNodeMaterial } from "./MeshSSSNodeMaterial.js";
|
|
12
|
-
export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
|
|
13
|
-
export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js";
|
|
14
|
-
export { default as NodeMaterial } from "./NodeMaterial.js";
|
|
15
|
-
export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
|
|
16
|
-
export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
|
|
17
|
-
export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";
|
|
15
|
+
export { default as MeshStandardNodeMaterial, MeshStandardNodeMaterialParameters } from "./MeshStandardNodeMaterial.js";
|
|
16
|
+
export { default as MeshToonNodeMaterial, MeshToonNodeMaterialParameters } from "./MeshToonNodeMaterial.js";
|
|
17
|
+
export { default as NodeMaterial, NodeMaterialParameters } from "./NodeMaterial.js";
|
|
18
|
+
export { default as PointsNodeMaterial, PointsNodeMaterialParameters } from "./PointsNodeMaterial.js";
|
|
19
|
+
export { default as ShadowNodeMaterial, ShadowNodeMaterialParameters } from "./ShadowNodeMaterial.js";
|
|
20
|
+
export { default as SpriteNodeMaterial, SpriteNodeMaterialParameters } from "./SpriteNodeMaterial.js";
|
|
18
21
|
export { default as VolumeNodeMaterial } from "./VolumeNodeMaterial.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BufferAttribute } from "../../../core/BufferAttribute.js";
|
|
1
2
|
import { Matrix4 } from "../../../math/Matrix4.js";
|
|
2
3
|
import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
|
|
3
4
|
import NodeFrame from "../../../nodes/core/NodeFrame.js";
|
|
@@ -59,8 +60,21 @@ type RefreshUniform = (typeof refreshUniforms)[number];
|
|
|
59
60
|
type MaterialData = {
|
|
60
61
|
[K in RefreshUniform]?: unknown;
|
|
61
62
|
};
|
|
63
|
+
interface AttributesData {
|
|
64
|
+
[name: string]: {
|
|
65
|
+
version: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
62
68
|
interface RenderObjectData {
|
|
63
69
|
material: MaterialData;
|
|
70
|
+
geometry: {
|
|
71
|
+
attributes: AttributesData;
|
|
72
|
+
indexVersion: number | null;
|
|
73
|
+
drawRange: {
|
|
74
|
+
start: number;
|
|
75
|
+
count: number;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
64
78
|
worldMatrix: Matrix4;
|
|
65
79
|
version?: number;
|
|
66
80
|
}
|
|
@@ -73,6 +87,7 @@ declare class NodeMaterialObserver {
|
|
|
73
87
|
constructor(builder: NodeBuilder);
|
|
74
88
|
firstInitialization(renderObject: RenderObject): boolean;
|
|
75
89
|
getRenderObjectData(renderObject: RenderObject): RenderObjectData;
|
|
90
|
+
getAttributesData(attributes: Record<string, BufferAttribute>): AttributesData;
|
|
76
91
|
containsNode(builder: NodeBuilder): boolean;
|
|
77
92
|
getMaterialData(material: Material): MaterialData;
|
|
78
93
|
equals(renderObject: RenderObject): boolean;
|
three/src/math/Color.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ColorSpace } from "../constants.js";
|
|
2
1
|
import { Matrix3 } from "./Matrix3.js";
|
|
3
2
|
import { Vector3 } from "./Vector3.js";
|
|
4
3
|
|
|
@@ -173,12 +172,30 @@ export interface RGB {
|
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
/**
|
|
176
|
-
*
|
|
175
|
+
* Class representing a color.
|
|
177
176
|
*
|
|
178
|
-
*
|
|
177
|
+
* A Color instance is represented by RGB components in the linear <i>working color space</i>, which defaults to
|
|
178
|
+
* `LinearSRGBColorSpace`. Inputs conventionally using `SRGBColorSpace` (such as hexadecimals and CSS strings) are
|
|
179
|
+
* converted to the working color space automatically.
|
|
179
180
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
181
|
+
* ```
|
|
182
|
+
* // converted automatically from SRGBColorSpace to LinearSRGBColorSpace
|
|
183
|
+
* const color = new THREE.Color().setHex( 0x112233 );
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* Source color spaces may be specified explicitly, to ensure correct conversions.
|
|
187
|
+
*
|
|
188
|
+
* ```
|
|
189
|
+
* // assumed already LinearSRGBColorSpace; no conversion
|
|
190
|
+
* const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5 );
|
|
191
|
+
*
|
|
192
|
+
* // converted explicitly from SRGBColorSpace to LinearSRGBColorSpace
|
|
193
|
+
* const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5, SRGBColorSpace );
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* If THREE.ColorManagement is disabled, no conversions occur. For details, see <i>Color management</i>.
|
|
197
|
+
*
|
|
198
|
+
* Iterating through a Color instance will yield its components (r, g, b) in the corresponding order.
|
|
182
199
|
*/
|
|
183
200
|
export class Color {
|
|
184
201
|
constructor(color?: ColorRepresentation);
|
|
@@ -187,19 +204,19 @@ export class Color {
|
|
|
187
204
|
readonly isColor: true;
|
|
188
205
|
|
|
189
206
|
/**
|
|
190
|
-
* Red channel value between 0 and 1. Default is 1
|
|
207
|
+
* Red channel value between `0.0` and `1.0`. Default is `1`.
|
|
191
208
|
* @default 1
|
|
192
209
|
*/
|
|
193
210
|
r: number;
|
|
194
211
|
|
|
195
212
|
/**
|
|
196
|
-
* Green channel value between 0 and 1. Default is 1
|
|
213
|
+
* Green channel value between `0.0` and `1.0`. Default is `1`.
|
|
197
214
|
* @default 1
|
|
198
215
|
*/
|
|
199
216
|
g: number;
|
|
200
217
|
|
|
201
218
|
/**
|
|
202
|
-
* Blue channel value between 0 and 1. Default is 1
|
|
219
|
+
* Blue channel value between `0.0` and `1.0`. Default is `1`.
|
|
203
220
|
* @default 1
|
|
204
221
|
*/
|
|
205
222
|
b: number;
|
|
@@ -213,7 +230,7 @@ export class Color {
|
|
|
213
230
|
setFromVector3(vector: Vector3): this;
|
|
214
231
|
|
|
215
232
|
setScalar(scalar: number): Color;
|
|
216
|
-
setHex(hex: number, colorSpace?:
|
|
233
|
+
setHex(hex: number, colorSpace?: string): Color;
|
|
217
234
|
|
|
218
235
|
/**
|
|
219
236
|
* Sets this color from RGB values.
|
|
@@ -221,7 +238,7 @@ export class Color {
|
|
|
221
238
|
* @param g Green channel value between 0 and 1.
|
|
222
239
|
* @param b Blue channel value between 0 and 1.
|
|
223
240
|
*/
|
|
224
|
-
setRGB(r: number, g: number, b: number, colorSpace?:
|
|
241
|
+
setRGB(r: number, g: number, b: number, colorSpace?: string): Color;
|
|
225
242
|
|
|
226
243
|
/**
|
|
227
244
|
* Sets this color from HSL values.
|
|
@@ -231,20 +248,20 @@ export class Color {
|
|
|
231
248
|
* @param s Saturation value channel between 0 and 1.
|
|
232
249
|
* @param l Value channel value between 0 and 1.
|
|
233
250
|
*/
|
|
234
|
-
setHSL(h: number, s: number, l: number, colorSpace?:
|
|
251
|
+
setHSL(h: number, s: number, l: number, colorSpace?: string): Color;
|
|
235
252
|
|
|
236
253
|
/**
|
|
237
254
|
* Sets this color from a CSS context style string.
|
|
238
255
|
* @param contextStyle Color in CSS context style format.
|
|
239
256
|
*/
|
|
240
|
-
setStyle(style: string, colorSpace?:
|
|
257
|
+
setStyle(style: string, colorSpace?: string): Color;
|
|
241
258
|
|
|
242
259
|
/**
|
|
243
260
|
* Sets this color from a color name.
|
|
244
261
|
* Faster than {@link Color#setStyle .setStyle()} method if you don't need the other CSS-style formats.
|
|
245
262
|
* @param style Color name in X11 format.
|
|
246
263
|
*/
|
|
247
|
-
setColorName(style: string, colorSpace?:
|
|
264
|
+
setColorName(style: string, colorSpace?: string): Color;
|
|
248
265
|
|
|
249
266
|
/**
|
|
250
267
|
* Clones this color.
|
|
@@ -258,46 +275,46 @@ export class Color {
|
|
|
258
275
|
copy(color: Color): this;
|
|
259
276
|
|
|
260
277
|
/**
|
|
261
|
-
* Copies given color making conversion from
|
|
278
|
+
* Copies given color making conversion from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
262
279
|
* @param color Color to copy.
|
|
263
280
|
*/
|
|
264
281
|
copySRGBToLinear(color: Color): Color;
|
|
265
282
|
|
|
266
283
|
/**
|
|
267
|
-
* Copies given color making conversion from
|
|
284
|
+
* Copies given color making conversion from `LinearSRGBColorSpace` to `SRGBColorSpace`.
|
|
268
285
|
* @param color Color to copy.
|
|
269
286
|
*/
|
|
270
287
|
copyLinearToSRGB(color: Color): Color;
|
|
271
288
|
|
|
272
289
|
/**
|
|
273
|
-
* Converts this color from
|
|
290
|
+
* Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
274
291
|
*/
|
|
275
292
|
convertSRGBToLinear(): Color;
|
|
276
293
|
|
|
277
294
|
/**
|
|
278
|
-
* Converts this color from
|
|
295
|
+
* Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`.
|
|
279
296
|
*/
|
|
280
297
|
convertLinearToSRGB(): Color;
|
|
281
298
|
|
|
282
299
|
/**
|
|
283
300
|
* Returns the hexadecimal value of this color.
|
|
284
301
|
*/
|
|
285
|
-
getHex(colorSpace?:
|
|
302
|
+
getHex(colorSpace?: string): number;
|
|
286
303
|
|
|
287
304
|
/**
|
|
288
305
|
* Returns the string formated hexadecimal value of this color.
|
|
289
306
|
*/
|
|
290
|
-
getHexString(colorSpace?:
|
|
307
|
+
getHexString(colorSpace?: string): string;
|
|
291
308
|
|
|
292
|
-
getHSL(target: HSL, colorSpace?:
|
|
309
|
+
getHSL(target: HSL, colorSpace?: string): HSL;
|
|
293
310
|
|
|
294
|
-
getRGB(target: RGB, colorSpace?:
|
|
311
|
+
getRGB(target: RGB, colorSpace?: string): RGB;
|
|
295
312
|
|
|
296
313
|
/**
|
|
297
314
|
* Returns the value of this color in CSS context style.
|
|
298
315
|
* Example: rgb(r, g, b)
|
|
299
316
|
*/
|
|
300
|
-
getStyle(colorSpace?:
|
|
317
|
+
getStyle(colorSpace?: string): string;
|
|
301
318
|
|
|
302
319
|
offsetHSL(h: number, s: number, l: number): this;
|
|
303
320
|
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ColorSpace,
|
|
3
|
-
ColorSpacePrimaries,
|
|
4
|
-
ColorSpaceTransfer,
|
|
5
|
-
DisplayP3ColorSpace,
|
|
6
|
-
LinearDisplayP3ColorSpace,
|
|
7
|
-
LinearSRGBColorSpace,
|
|
8
|
-
SRGBColorSpace,
|
|
9
|
-
} from "../constants.js";
|
|
1
|
+
import { ColorSpaceTransfer } from "../constants.js";
|
|
10
2
|
import { Color } from "./Color.js";
|
|
3
|
+
import { Matrix3 } from "./Matrix3.js";
|
|
11
4
|
import { Vector3 } from "./Vector3.js";
|
|
12
5
|
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
export interface ColorSpaceDefinition {
|
|
7
|
+
primaries: [number, number, number, number, number, number];
|
|
8
|
+
whitePoint: [number, number];
|
|
9
|
+
transfer: ColorSpaceTransfer;
|
|
10
|
+
toXYZ: Matrix3;
|
|
11
|
+
fromXYZ: Matrix3;
|
|
12
|
+
luminanceCoefficients: [number, number, number];
|
|
13
|
+
workingColorSpaceConfig?: { unpackColorSpace: string };
|
|
14
|
+
outputColorSpaceConfig?: { drawingBufferColorSpace: string };
|
|
15
|
+
}
|
|
19
16
|
|
|
20
17
|
export interface ColorManagement {
|
|
21
18
|
/**
|
|
22
|
-
* @default
|
|
19
|
+
* @default true
|
|
23
20
|
*/
|
|
24
21
|
enabled: boolean;
|
|
25
22
|
|
|
26
23
|
/**
|
|
27
24
|
* @default LinearSRGBColorSpace
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
workingColorSpace: string;
|
|
27
|
+
|
|
28
|
+
spaces: Record<string, ColorSpaceDefinition>;
|
|
29
|
+
|
|
30
|
+
convert: (color: Color, sourceColorSpace: string, targetColorSpace: string) => Color;
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
fromWorkingColorSpace: (color: Color, targetColorSpace: string) => Color;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
toWorkingColorSpace: (color: Color, sourceColorSpace: string) => Color;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
getPrimaries: (colorSpace: string) => [number, number, number, number, number, number];
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
getTransfer: (colorSpace: string) => ColorSpaceTransfer;
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
getLuminanceCoefficients: (target: Vector3, colorSpace?: string) => [number, number, number];
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
define: (colorSpaces: Record<string, ColorSpaceDefinition>) => void;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export const ColorManagement: ColorManagement;
|
three/src/math/Vector4.d.ts
CHANGED
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -55,7 +55,6 @@ export { default as JoinNode } from "./utils/JoinNode.js";
|
|
|
55
55
|
export { default as LoopNode } from "./utils/LoopNode.js";
|
|
56
56
|
export { default as MatcapUVNode } from "./utils/MatcapUVNode.js";
|
|
57
57
|
export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
|
|
58
|
-
export { default as OscNode, OscNodeMethod } from "./utils/OscNode.js";
|
|
59
58
|
export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
|
|
60
59
|
export { default as RemapNode } from "./utils/RemapNode.js";
|
|
61
60
|
export { default as RotateNode } from "./utils/RotateNode.js";
|
|
@@ -64,7 +63,6 @@ export { default as SetNode } from "./utils/SetNode.js";
|
|
|
64
63
|
export { default as SplitNode } from "./utils/SplitNode.js";
|
|
65
64
|
export { default as SpriteSheetUVNode } from "./utils/SpriteSheetUVNode.js";
|
|
66
65
|
export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
|
|
67
|
-
export { default as TimerNode, TimerNodeScope } from "./utils/TimerNode.js";
|
|
68
66
|
export { default as TriplanarTexturesNode } from "./utils/TriplanarTexturesNode.js";
|
|
69
67
|
|
|
70
68
|
// accessors
|
|
@@ -94,34 +92,15 @@ export { default as UserDataNode, NodeUserData } from "./accessors/UserDataNode.
|
|
|
94
92
|
export { default as VertexColorNode } from "./accessors/VertexColorNode.js";
|
|
95
93
|
|
|
96
94
|
// display
|
|
97
|
-
export { default as AfterImageNode } from "./display/AfterImageNode.js";
|
|
98
|
-
export { default as AnaglyphPassNode } from "./display/AnaglyphPassNode.js";
|
|
99
|
-
export { default as AnamorphicNode } from "./display/AnamorphicNode.js";
|
|
100
|
-
export { default as BloomNode } from "./display/BloomNode.js";
|
|
101
95
|
export { default as BumpMapNode } from "./display/BumpMapNode.js";
|
|
102
96
|
export { default as ColorSpaceNode } from "./display/ColorSpaceNode.js";
|
|
103
|
-
export { default as DenoiseNode } from "./display/DenoiseNode.js";
|
|
104
|
-
export { default as DepthOfFieldNode } from "./display/DepthOfFieldNode.js";
|
|
105
|
-
export { default as DotScreenNode } from "./display/DotScreenNode.js";
|
|
106
|
-
export { default as FilmNode } from "./display/FilmNode.js";
|
|
107
97
|
export { default as FrontFacingNode } from "./display/FrontFacingNode.js";
|
|
108
|
-
export { default as FXAANode } from "./display/FXAANode.js";
|
|
109
|
-
export { default as GaussianBlurNode } from "./display/GaussianBlurNode.js";
|
|
110
|
-
export { default as GTAONode } from "./display/GTAONode.js";
|
|
111
|
-
export { default as Lut3DNode } from "./display/Lut3DNode.js";
|
|
112
98
|
export { default as NormalMapNode } from "./display/NormalMapNode.js";
|
|
113
|
-
export { default as ParallaxBarrierPassNode } from "./display/ParallaxBarrierPassNode.js";
|
|
114
99
|
export { default as PassNode, PassNodeScope } from "./display/PassNode.js";
|
|
115
|
-
export { default as PixelationPassNode } from "./display/PixelationPassNode.js";
|
|
116
100
|
export { default as PosterizeNode } from "./display/PosterizeNode.js";
|
|
117
101
|
export { default as RenderOutputNode } from "./display/RenderOutputNode.js";
|
|
118
|
-
export { default as RGBShiftNode } from "./display/RGBShiftNode.js";
|
|
119
102
|
export { default as ScreenNode, ScreenNodeScope } from "./display/ScreenNode.js";
|
|
120
|
-
export { default as SobelOperatorNode } from "./display/SobelOperatorNode.js";
|
|
121
|
-
export { default as SSAAPassNode } from "./display/SSAAPassNode.js";
|
|
122
|
-
export { default as StereoPassNode } from "./display/StereoPassNode.js";
|
|
123
103
|
export { default as ToneMappingNode } from "./display/ToneMappingNode.js";
|
|
124
|
-
export { default as TransitionNode } from "./display/TransitionNode.js";
|
|
125
104
|
export { default as ViewportDepthNode, ViewportDepthNodeScope } from "./display/ViewportDepthNode.js";
|
|
126
105
|
export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js";
|
|
127
106
|
export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js";
|
|
@@ -163,6 +142,7 @@ export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
|
|
|
163
142
|
export { default as LightsNode } from "./lighting/LightsNode.js";
|
|
164
143
|
export { default as PointLightNode } from "./lighting/PointLightNode.js";
|
|
165
144
|
export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
|
|
145
|
+
export { default as ShadowNode } from "./lighting/ShadowNode.js";
|
|
166
146
|
export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
|
|
167
147
|
|
|
168
148
|
// pmrem
|