@types/three 0.168.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/build/three.webgpu.nodes.d.ts +1 -0
- three/build/three.webgpu.nodes.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +3 -10
- 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/DragControls.d.ts +0 -15
- three/examples/jsm/controls/TransformControls.d.ts +195 -24
- 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/EXRExporter.d.ts +7 -2
- three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
- three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
- 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/LightProbeHelper.d.ts +5 -3
- three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
- three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
- three/examples/jsm/lines/Line2.d.ts +15 -1
- three/examples/jsm/lines/LineGeometry.d.ts +18 -1
- three/examples/jsm/lines/LineMaterial.d.ts +65 -12
- three/examples/jsm/lines/LineSegments2.d.ts +25 -2
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
- 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/DRACOLoader.d.ts +6 -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/modifiers/CurveModifier.d.ts +7 -3
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- three/examples/jsm/objects/Lensflare.d.ts +13 -9
- three/examples/jsm/objects/LensflareMesh.d.ts +21 -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/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
- three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
- three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
- three/examples/jsm/utils/WebGPUTextureUtils.d.ts +3 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.Nodes.d.ts +205 -0
- three/src/Three.WebGPU.d.ts +7 -2
- three/src/Three.d.ts +2 -7
- three/src/audio/Audio.d.ts +4 -1
- three/src/constants.d.ts +1 -9
- three/src/core/BufferAttribute.d.ts +0 -15
- three/src/core/BufferGeometry.d.ts +13 -2
- three/src/core/InterleavedBuffer.d.ts +0 -12
- three/src/core/Object3D.d.ts +1 -1
- three/src/core/Raycaster.d.ts +2 -1
- three/src/core/RenderTarget.d.ts +1 -2
- three/src/extras/Controls.d.ts +3 -3
- three/src/loaders/FileLoader.d.ts +3 -3
- three/src/loaders/MaterialLoader.d.ts +2 -0
- three/src/loaders/nodes/NodeLoader.d.ts +5 -0
- three/src/loaders/nodes/NodeMaterialLoader.d.ts +3 -0
- three/src/loaders/nodes/NodeObjectLoader.d.ts +12 -0
- 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 +4 -4
- three/src/materials/nodes/NodeMaterials.d.ts +19 -16
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +96 -0
- three/src/math/Color.d.ts +39 -22
- three/src/math/ColorManagement.d.ts +24 -24
- three/src/math/Quaternion.d.ts +4 -3
- three/src/math/Triangle.d.ts +24 -0
- three/src/math/Vector4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +3 -23
- three/src/nodes/TSL.d.ts +75 -187
- three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -0
- three/src/nodes/accessors/Camera.d.ts +0 -1
- three/src/nodes/accessors/MaterialNode.d.ts +0 -1
- three/src/nodes/accessors/ModelNode.d.ts +7 -3
- three/src/nodes/accessors/Normal.d.ts +6 -0
- three/src/nodes/accessors/Object3DNode.d.ts +1 -5
- 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 +6 -1
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/core/Node.d.ts +3 -12
- three/src/nodes/core/NodeUtils.d.ts +5 -1
- three/src/nodes/core/StackNode.d.ts +4 -4
- three/src/nodes/core/StructTypeNode.d.ts +1 -0
- three/src/nodes/core/UniformNode.d.ts +1 -0
- 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 +33 -8
- three/src/nodes/display/RenderOutputNode.d.ts +4 -4
- three/src/nodes/display/ScreenNode.d.ts +48 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -6
- three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
- 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/functions/material/getShIrradianceAt.d.ts +6 -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 +78 -0
- three/src/objects/Group.d.ts +0 -6
- three/src/objects/LOD.d.ts +7 -0
- three/src/renderers/WebGLRenderer.d.ts +24 -23
- three/src/renderers/common/BundleGroup.d.ts +10 -0
- three/src/renderers/common/ClippingContext.d.ts +1 -1
- 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/RenderBundles.d.ts +3 -3
- three/src/renderers/common/RenderContext.d.ts +2 -2
- three/src/renderers/common/RenderList.d.ts +7 -3
- three/src/renderers/common/RenderLists.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +20 -1
- three/src/renderers/common/Renderer.d.ts +43 -10
- three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
- three/src/renderers/common/nodes/Nodes.d.ts +8 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +4 -10
- three/src/renderers/webgl/WebGLState.d.ts +13 -10
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- three/src/renderers/webgpu/WebGPURenderer.d.ts +7 -3
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
- 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/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
- three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
- three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
- three/src/nodes/display/BleachBypass.d.ts +0 -4
- three/src/nodes/display/Sepia.d.ts +0 -4
- three/src/nodes/display/ViewportNode.d.ts +0 -38
- three/src/nodes/utils/OscNode.d.ts +0 -25
- three/src/nodes/utils/TimerNode.d.ts +0 -25
- three/src/renderers/common/StandardRenderer.d.ts +0 -12
- /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { LightProbe, Mesh } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
constructor(lightProbe: LightProbe, size: number);
|
|
5
|
-
|
|
3
|
+
declare class LightProbeHelper extends Mesh {
|
|
6
4
|
lightProbe: LightProbe;
|
|
7
5
|
size: number;
|
|
8
6
|
|
|
7
|
+
constructor(lightProbe: LightProbe, size?: number);
|
|
8
|
+
|
|
9
9
|
dispose(): void;
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export { LightProbeHelper };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Lighting } from "three/webgpu";
|
|
3
|
+
import { Light } from "../../../src/lights/Light.js";
|
|
4
|
+
import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
|
|
5
|
+
|
|
6
|
+
export class TiledLighting extends Lighting {
|
|
7
|
+
constructor();
|
|
8
|
+
|
|
9
|
+
createNode(lights?: Light[]): ShaderNodeObject<TiledLightsNode>;
|
|
10
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CubeTexture, LightProbe, WebGLCubeRenderTarget, WebGLRenderer } from "three";
|
|
2
|
+
import { WebGPURenderer } from "three/webgpu";
|
|
2
3
|
|
|
3
4
|
export namespace LightProbeGenerator {
|
|
4
5
|
function fromCubeTexture(cubeTexture: CubeTexture): LightProbe;
|
|
5
|
-
function fromCubeRenderTarget(
|
|
6
|
+
function fromCubeRenderTarget(
|
|
7
|
+
renderer: WebGLRenderer | WebGPURenderer,
|
|
8
|
+
cubeRenderTarget: WebGLCubeRenderTarget,
|
|
9
|
+
): Promise<LightProbe>;
|
|
6
10
|
}
|
|
@@ -2,10 +2,24 @@ import { LineGeometry } from "./LineGeometry.js";
|
|
|
2
2
|
import { LineMaterial } from "./LineMaterial.js";
|
|
3
3
|
import { LineSegments2 } from "./LineSegments2.js";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A polyline drawn between vertices.
|
|
7
|
+
*
|
|
8
|
+
* This adds functionality beyond {@link Line}, like arbitrary line width and changing width to be in world units. It
|
|
9
|
+
* extends {@link LineSegments2}, simplifying constructing segments from a chain of points.
|
|
10
|
+
*/
|
|
5
11
|
export class Line2 extends LineSegments2 {
|
|
6
12
|
geometry: LineGeometry;
|
|
7
13
|
material: LineMaterial;
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Read-only flag to check if a given object is of type Line2.
|
|
17
|
+
*/
|
|
10
18
|
readonly isLine2: true;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param geometry (optional) Pair(s) of vertices representing each line segment
|
|
22
|
+
* @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
|
|
23
|
+
*/
|
|
24
|
+
constructor(geometry?: LineGeometry, material?: LineMaterial);
|
|
11
25
|
}
|
|
@@ -2,9 +2,26 @@ import { Line } from "three";
|
|
|
2
2
|
|
|
3
3
|
import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A chain of vertices, forming a polyline.
|
|
7
|
+
*
|
|
8
|
+
* This is used in {@link Line2} to describe the shape.
|
|
9
|
+
*/
|
|
5
10
|
export class LineGeometry extends LineSegmentsGeometry {
|
|
6
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Read-only flag to check if a given object is of type LineGeometry.
|
|
13
|
+
*/
|
|
7
14
|
readonly isLineGeometry: true;
|
|
8
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new geometry.
|
|
18
|
+
* Call [setPositions]{@link LineGeometry.setPositions} to add segments.
|
|
19
|
+
*/
|
|
20
|
+
constructor();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Copy the vertex positions of a {@link Line} object into this geometry.
|
|
24
|
+
* Assumes the source geometry is not using indices.
|
|
25
|
+
*/
|
|
9
26
|
fromLine(line: Line): this;
|
|
10
27
|
}
|
|
@@ -12,18 +12,71 @@ export interface LineMaterialParameters extends ShaderMaterialParameters {
|
|
|
12
12
|
worldUnits?: boolean | undefined;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* A material for drawing wireframe-style geometries.
|
|
17
|
+
* Unlike {@link LineBasicMaterial}, it supports arbitrary line widths and allows using world units instead of screen
|
|
18
|
+
* space units. This material is used with {@link LineSegments2} and {@link Line2}.
|
|
19
|
+
*
|
|
20
|
+
* Lines are always rendered with round caps and round joints.
|
|
21
|
+
*/
|
|
15
22
|
export class LineMaterial extends ShaderMaterial {
|
|
16
|
-
constructor(parameters?: LineMaterialParameters);
|
|
17
|
-
color: Color;
|
|
18
|
-
dashed: boolean;
|
|
19
|
-
dashScale: number;
|
|
20
|
-
dashSize: number;
|
|
21
|
-
dashOffset: number;
|
|
22
|
-
gapSize: number;
|
|
23
|
-
opacity: number;
|
|
24
23
|
readonly isLineMaterial: true;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param parameters (optional) an object with one or more properties defining the material's appearance. Any
|
|
27
|
+
* property of the material (including any property inherited from {@link ShaderMaterial}) can be passed in here.
|
|
28
|
+
*
|
|
29
|
+
* The exception is the property color, which can be passed in as a number or hexadecimal string and is `0xffffff`
|
|
30
|
+
* (white) by default. Color.set( color ) is called internally.
|
|
31
|
+
*/
|
|
32
|
+
constructor(parameters?: LineMaterialParameters);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* {@link Color} of the material, by default set to white (0xffffff).
|
|
36
|
+
*/
|
|
37
|
+
get color(): Color;
|
|
38
|
+
set color(value: Color);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Whether the material's sizes (width, dash gaps) are in world units. Default is `false` (screen space units.)
|
|
42
|
+
*/
|
|
43
|
+
get worldUnits(): boolean;
|
|
44
|
+
set worldUnits(value: boolean);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Whether the line is dashed, or solid. Default is `false`.
|
|
48
|
+
*/
|
|
49
|
+
get dashed(): boolean;
|
|
50
|
+
set dashed(value: boolean);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The scale of the dashes and gaps. Default is `1`.
|
|
54
|
+
*/
|
|
55
|
+
get dashScale(): number;
|
|
56
|
+
set dashScale(value: number);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The size of the dash. Default is `1`.
|
|
60
|
+
*/
|
|
61
|
+
get dashSize(): number;
|
|
62
|
+
set dashSize(value: number);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Where in the dash cycle the dash starts. Default is `0`.
|
|
66
|
+
*/
|
|
67
|
+
get dashOffset(): number;
|
|
68
|
+
set dashOffset(value: number);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The size of the gap. Default is `1`.
|
|
72
|
+
*/
|
|
73
|
+
get gapSize(): number;
|
|
74
|
+
set gapSize(value: number);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The size of the viewport, in screen pixels. This must be kept updated to make screen-space rendering accurate.
|
|
78
|
+
* The {@link LineSegments2.onBeforeRender} callback performs the update for visible objects. Default is `[1, 1]`.
|
|
79
|
+
*/
|
|
80
|
+
get resolution(): Vector2;
|
|
81
|
+
set resolution(value: Vector2);
|
|
29
82
|
}
|
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
import { Mesh } from "three";
|
|
1
|
+
import { Mesh, WebGLRenderer } from "three";
|
|
2
2
|
|
|
3
3
|
import { LineMaterial } from "./LineMaterial.js";
|
|
4
4
|
import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A series of lines drawn between pairs of vertices.
|
|
8
|
+
*
|
|
9
|
+
* This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width to be in world
|
|
10
|
+
* units. The {@link Line2} extends this object, forming a polyline instead of individual segments.
|
|
11
|
+
*/
|
|
6
12
|
export class LineSegments2 extends Mesh {
|
|
7
13
|
geometry: LineSegmentsGeometry;
|
|
8
14
|
material: LineMaterial;
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Read-only flag to check if a given object is of type LineSegments2.
|
|
18
|
+
*/
|
|
11
19
|
readonly isLineSegments2: true;
|
|
12
20
|
|
|
21
|
+
/**
|
|
22
|
+
* @param geometry (optional) Pair(s) of vertices representing each line segment.
|
|
23
|
+
* @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
|
|
24
|
+
*/
|
|
25
|
+
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
26
|
+
|
|
13
27
|
computeLineDistances(): this;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Called by the framework to update the material's resolution property, needed for screen-scaled widths.
|
|
31
|
+
*
|
|
32
|
+
* If your object is not visible to a camera (e.g. by [layers]{@link Object3D.layers} or
|
|
33
|
+
* [visible]{@link Object3D.visible}), you must call this manually whenever the viewport changes.
|
|
34
|
+
* @param renderer
|
|
35
|
+
*/
|
|
36
|
+
onBeforeRender(renderer: WebGLRenderer): void;
|
|
14
37
|
}
|
|
@@ -1,16 +1,53 @@
|
|
|
1
|
-
import { EdgesGeometry, InstancedBufferGeometry, LineSegments,
|
|
1
|
+
import { EdgesGeometry, InstancedBufferGeometry, LineSegments, Mesh, WireframeGeometry } from "three";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A series of vertex pairs, forming line segments.
|
|
5
|
+
*
|
|
6
|
+
* This is used in {@link LineSegments2} to describe the shape.
|
|
7
|
+
*/
|
|
3
8
|
export class LineSegmentsGeometry extends InstancedBufferGeometry {
|
|
4
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Read-only flag to check if a given object is of type LineSegmentsGeometry.
|
|
11
|
+
*/
|
|
5
12
|
readonly isLineSegmentsGeometry: true;
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new geometry. Call [setPositions]{@link LineSegmentsGeometry.setPositions} to add segments.
|
|
16
|
+
*/
|
|
17
|
+
constructor();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Replace the vertex positions with a new set. The array can be an `Array` or `Float32Array`. The length must be a
|
|
21
|
+
* multiple of six.
|
|
22
|
+
* @param array
|
|
23
|
+
*/
|
|
24
|
+
setPositions(array: number[] | Float32Array): this;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Replace the per-vertex colors. Every sixtuple describes a segment: `[r1, g1, b1, r2, g2, b2]`. The array can be
|
|
28
|
+
* an `Array` or `Float32Array`.
|
|
29
|
+
* @param array
|
|
30
|
+
*/
|
|
31
|
+
setColors(array: number[] | Float32Array): this;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Copy the vertex positions of a wireframe geometry into this geometry.
|
|
35
|
+
*/
|
|
36
|
+
fromWireframeGeometry(geometry: WireframeGeometry): this;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Copy the vertex positions of an edge geometry into this geometry.
|
|
40
|
+
*/
|
|
10
41
|
fromEdgesGeometry(geometry: EdgesGeometry): this;
|
|
11
|
-
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Copy the vertex positions of a mesh object into this geometry.
|
|
45
|
+
*/
|
|
12
46
|
fromMesh(mesh: Mesh): this;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Copy the vertex positions of a {@link LineSegments} object into this geometry. Assumes the source geometry is not
|
|
50
|
+
* using indices.
|
|
51
|
+
*/
|
|
52
|
+
fromLineSegments(lineSegments: LineSegments): this;
|
|
16
53
|
}
|
|
@@ -3,9 +3,12 @@ import { Mesh } from "three";
|
|
|
3
3
|
import { LineMaterial } from "./LineMaterial.js";
|
|
4
4
|
import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
6
|
+
declare class Wireframe extends Mesh {
|
|
8
7
|
readonly isWireframe: true;
|
|
9
8
|
|
|
9
|
+
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
10
|
+
|
|
10
11
|
computeLineDistances(): this;
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export { Wireframe };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Line2NodeMaterial, Mesh } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
import { WireframeGeometry2 } from "../WireframeGeometry2.js";
|
|
4
|
+
|
|
5
|
+
declare class Wireframe extends Mesh {
|
|
6
|
+
readonly isWireframe: true;
|
|
7
|
+
|
|
8
|
+
constructor(geometry?: WireframeGeometry2, material?: Line2NodeMaterial);
|
|
9
|
+
|
|
10
|
+
computeLineDistances(): this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Wireframe };
|
|
@@ -14,6 +14,12 @@ export class DRACOLoader extends Loader<BufferGeometry> {
|
|
|
14
14
|
onError?: (err: unknown) => void,
|
|
15
15
|
): void;
|
|
16
16
|
|
|
17
|
+
parse(
|
|
18
|
+
buffer: ArrayBuffer,
|
|
19
|
+
onLoad?: (geometry: BufferGeometry) => void,
|
|
20
|
+
onError?: (err: unknown) => void,
|
|
21
|
+
): void;
|
|
22
|
+
|
|
17
23
|
preload(): DRACOLoader;
|
|
18
24
|
dispose(): DRACOLoader;
|
|
19
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
|
|
2
2
|
|
|
3
3
|
export interface EXR {
|
|
4
4
|
header: object;
|
|
@@ -6,7 +6,7 @@ export interface EXR {
|
|
|
6
6
|
height: number;
|
|
7
7
|
data: Float32Array | Uint16Array;
|
|
8
8
|
format: PixelFormat;
|
|
9
|
-
colorSpace:
|
|
9
|
+
colorSpace: string;
|
|
10
10
|
type: TextureDataType;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
BufferAttribute,
|
|
4
4
|
BufferGeometry,
|
|
5
5
|
Camera,
|
|
6
|
-
ColorSpace,
|
|
7
6
|
FileLoader,
|
|
8
7
|
Group,
|
|
9
8
|
ImageBitmapLoader,
|
|
@@ -113,7 +112,7 @@ export class GLTFParser {
|
|
|
113
112
|
texCoord?: number | undefined;
|
|
114
113
|
extensions?: any;
|
|
115
114
|
},
|
|
116
|
-
colorSpace?:
|
|
115
|
+
colorSpace?: string | undefined,
|
|
117
116
|
) => Promise<Texture | null>;
|
|
118
117
|
assignFinalMaterial: (object: Mesh) => void;
|
|
119
118
|
getMaterialType: () => typeof MeshStandardMaterial;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { Group, Loader, LoadingManager, Material } from "three";
|
|
2
|
+
import { LDrawConditionalLineMaterial } from "../materials/LDrawConditionalLineMaterial.js";
|
|
3
|
+
import { LDrawConditionalLineMaterial as LDrawConditionalLineNodeMaterial } from "../materials/LDrawConditionalLineNodeMaterial.js";
|
|
2
4
|
|
|
3
5
|
export class LDrawLoader extends Loader<Group> {
|
|
4
6
|
materials: Material[];
|
|
5
7
|
materialsLibrary: Record<string, Material>;
|
|
8
|
+
|
|
6
9
|
fileMap: Record<string, string>;
|
|
10
|
+
|
|
7
11
|
smoothNormals: boolean;
|
|
8
12
|
|
|
13
|
+
ConditionalLineMaterial: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial | null;
|
|
14
|
+
|
|
9
15
|
constructor(manager?: LoadingManager);
|
|
10
16
|
|
|
17
|
+
setConditionalLineMaterial(
|
|
18
|
+
type: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial,
|
|
19
|
+
): this;
|
|
20
|
+
|
|
11
21
|
preloadMaterials(url: string): Promise<void>;
|
|
12
22
|
setFileMap(fileMap: Record<string, string>): void;
|
|
13
23
|
setMaterials(materials: Material[]): void;
|
|
@@ -5,6 +5,10 @@ export interface MMDLoaderAnimationObject {
|
|
|
5
5
|
mesh: SkinnedMesh;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated The module has been deprecated and will be removed with r172. Please migrate to
|
|
10
|
+
* https://github.com/takahirox/three-mmd-loader instead.
|
|
11
|
+
*/
|
|
8
12
|
export class MMDLoader extends Loader<SkinnedMesh> {
|
|
9
13
|
constructor(manager?: LoadingManager);
|
|
10
14
|
animationBuilder: object;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShaderMaterial, ShaderMaterialParameters } from "three";
|
|
2
|
+
|
|
3
|
+
declare class LDrawConditionalLineMaterial extends ShaderMaterial {
|
|
4
|
+
readonly isLDrawConditionalLineMaterial: true;
|
|
5
|
+
|
|
6
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { LDrawConditionalLineMaterial };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NodeMaterial, NodeMaterialParameters } from "three/tsl";
|
|
2
|
+
|
|
3
|
+
declare class LDrawConditionalLineMaterial extends NodeMaterial {
|
|
4
|
+
readonly isLDrawConditionalLineMaterial: true;
|
|
5
|
+
|
|
6
|
+
constructor(parameters?: NodeMaterialParameters);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { LDrawConditionalLineMaterial };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColorSpaceDefinition } from "three";
|
|
2
|
+
|
|
3
|
+
export const DisplayP3ColorSpace: "display-p3";
|
|
4
|
+
export const LinearDisplayP3ColorSpace: "display-p3-linear";
|
|
5
|
+
|
|
6
|
+
export const DisplayP3ColorSpaceImpl: ColorSpaceDefinition;
|
|
7
|
+
export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition;
|
|
8
|
+
|
|
9
|
+
export const LinearRec2020ColorSpace: "rec2020-linear";
|
|
10
|
+
|
|
11
|
+
export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition;
|
|
@@ -24,29 +24,23 @@ export interface LightMapContainers {
|
|
|
24
24
|
object: Object3D;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
declare class ProgressiveLightMap {
|
|
28
28
|
renderer: WebGLRenderer;
|
|
29
29
|
res: number;
|
|
30
30
|
lightMapContainers: LightMapContainers[];
|
|
31
|
-
compiled: boolean;
|
|
32
31
|
scene: Scene;
|
|
33
|
-
tinyTarget: WebGLRenderTarget;
|
|
34
32
|
buffer1Active: boolean;
|
|
35
33
|
firstUpdate: boolean;
|
|
36
34
|
warned: boolean;
|
|
35
|
+
labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
|
|
36
|
+
blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
|
|
37
37
|
|
|
38
38
|
progressiveLightMap1: WebGLRenderTarget;
|
|
39
39
|
progressiveLightMap2: WebGLRenderTarget;
|
|
40
40
|
|
|
41
41
|
uvMat: MeshPhongMaterial;
|
|
42
42
|
|
|
43
|
-
uv_boxes
|
|
44
|
-
|
|
45
|
-
blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial>;
|
|
46
|
-
|
|
47
|
-
labelMaterial: MeshBasicMaterial;
|
|
48
|
-
labelPlane: PlaneGeometry;
|
|
49
|
-
labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial>;
|
|
43
|
+
uv_boxes?: UVBoxes[];
|
|
50
44
|
|
|
51
45
|
constructor(renderer: WebGLRenderer, res?: number);
|
|
52
46
|
|
|
@@ -57,4 +51,8 @@ export class ProgressiveLightMap {
|
|
|
57
51
|
showDebugLightmap(visible: boolean, position?: Vector3): void;
|
|
58
52
|
|
|
59
53
|
private _initializeBlurPlane(res: number, lightMap?: Texture | null): void;
|
|
54
|
+
|
|
55
|
+
dispose(): void;
|
|
60
56
|
}
|
|
57
|
+
|
|
58
|
+
export { ProgressiveLightMap };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Camera, Material, Object3D, Vector3, WebGPURenderer } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface UVBoxes {
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface LightMapContainers {
|
|
10
|
+
basicMat: Material | Material[];
|
|
11
|
+
object: Object3D;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class ProgressiveLightMap {
|
|
15
|
+
renderer: WebGPURenderer;
|
|
16
|
+
resolution: number;
|
|
17
|
+
|
|
18
|
+
constructor(renderer: WebGPURenderer, resolution?: number);
|
|
19
|
+
|
|
20
|
+
addObjectsToLightMap(objects: Object3D[]): void;
|
|
21
|
+
|
|
22
|
+
update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void;
|
|
23
|
+
|
|
24
|
+
showDebugLightmap(visible: boolean, position?: Vector3 | null): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { ProgressiveLightMap };
|
|
@@ -7,7 +7,7 @@ export interface SplineUniform {
|
|
|
7
7
|
spineOffset: IUniform;
|
|
8
8
|
flow: IUniform;
|
|
9
9
|
}
|
|
10
|
-
export function initSplineTexture(
|
|
10
|
+
export function initSplineTexture(numberOfCurves?: number): DataTexture;
|
|
11
11
|
|
|
12
12
|
export function updateSplineTexture(texture: DataTexture, splineCurve: Curve<Vector3>, offset?: number): void;
|
|
13
13
|
|
|
@@ -16,22 +16,26 @@ export function getUniforms(splineTexture: DataTexture): SplineUniform;
|
|
|
16
16
|
export function modifyShader(material: Material, uniforms: SplineUniform, numberOfCurves?: number): void;
|
|
17
17
|
|
|
18
18
|
export class Flow {
|
|
19
|
-
constructor(mesh: Mesh, numberOfCurves?: number);
|
|
20
19
|
curveArray: number[];
|
|
21
20
|
curveLengthArray: number[];
|
|
21
|
+
|
|
22
22
|
object3D: Mesh;
|
|
23
23
|
splineTexure: DataTexture;
|
|
24
24
|
uniforms: SplineUniform;
|
|
25
|
+
|
|
26
|
+
constructor(mesh: Mesh, numberOfCurves?: number);
|
|
25
27
|
updateCurve(index: number, curve: Curve<Vector3>): void;
|
|
26
28
|
moveAlongCurve(amount: number): void;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export class InstancedFlow extends Flow {
|
|
30
|
-
constructor(count: number, curveCount: number, geometry: BufferGeometry, material: Material);
|
|
31
32
|
object3D: InstancedMesh;
|
|
33
|
+
|
|
32
34
|
offsets: number[];
|
|
33
35
|
whichCurve: number[];
|
|
34
36
|
|
|
37
|
+
constructor(count: number, curveCount: number, geometry: BufferGeometry, material: Material);
|
|
38
|
+
|
|
35
39
|
moveIndividualAlongCurve(index: number, offset: number): void;
|
|
36
40
|
setCurve(index: number, curveNo: number): void;
|
|
37
41
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BufferGeometry, Curve, DataTexture, InstancedMesh, IUniform, Material, Mesh, Vector3 } from "three";
|
|
2
|
+
|
|
3
|
+
export interface SplineUniform {
|
|
4
|
+
spineTexture: DataTexture;
|
|
5
|
+
pathOffset: number;
|
|
6
|
+
pathSegment: number;
|
|
7
|
+
spineOffset: number;
|
|
8
|
+
spineLength: number;
|
|
9
|
+
flow: number;
|
|
10
|
+
}
|
|
11
|
+
export function initSplineTexture(numberOfCurves?: number): DataTexture;
|
|
12
|
+
|
|
13
|
+
export function updateSplineTexture(texture: DataTexture, splineCurve: Curve<Vector3>, offset?: number): void;
|
|
14
|
+
|
|
15
|
+
export function getUniforms(splineTexture: DataTexture): SplineUniform;
|
|
16
|
+
|
|
17
|
+
export function modifyShader(material: Material, uniforms: SplineUniform, numberOfCurves: number): void;
|
|
18
|
+
|
|
19
|
+
export class Flow {
|
|
20
|
+
curveArray: number[];
|
|
21
|
+
curveLengthArray: number[];
|
|
22
|
+
|
|
23
|
+
object3D: Mesh;
|
|
24
|
+
splineTexure: DataTexture;
|
|
25
|
+
uniforms: SplineUniform;
|
|
26
|
+
|
|
27
|
+
constructor(mesh: Mesh, numberOfCurves?: number);
|
|
28
|
+
|
|
29
|
+
updateCurve(index: number, curve: Curve<Vector3>): void;
|
|
30
|
+
moveAlongCurve(amount: number): void;
|
|
31
|
+
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Color, Mesh, Texture } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare class Lensflare extends Mesh {
|
|
4
|
+
readonly isLensflare: true;
|
|
5
|
+
|
|
6
|
+
constructor();
|
|
7
|
+
|
|
8
|
+
addElement: (element: LensflareElement) => void;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class LensflareElement {
|
|
5
13
|
texture: Texture;
|
|
6
14
|
size: number;
|
|
7
15
|
distance: number;
|
|
8
16
|
color: Color;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class Lensflare extends Mesh {
|
|
12
|
-
constructor();
|
|
13
|
-
readonly isLensflare: true;
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
dispose(): void;
|
|
18
|
+
constructor(texture: Texture, size?: number, distance?: number, color?: Color);
|
|
17
19
|
}
|
|
20
|
+
|
|
21
|
+
export { Lensflare, LensflareElement };
|