@types/three 0.184.0 → 0.185.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 +2 -0
- three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +32 -1
- three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
- three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
- three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
- three/examples/jsm/generators/CityGenerator.d.ts +75 -0
- three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
- three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
- three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
- three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
- three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
- three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
- three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
- three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
- three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
- three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
- three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
- three/examples/jsm/loaders/TGALoader.d.ts +2 -2
- three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
- three/examples/jsm/loaders/USDLoader.d.ts +6 -1
- three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
- three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
- three/examples/jsm/objects/Reflector.d.ts +38 -5
- three/examples/jsm/objects/SkyMesh.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
- three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
- three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
- three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
- three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
- three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
- three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
- three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
- three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
- three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
- three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
- three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
- three/package.json +3 -3
- three/src/Three.TSL.d.ts +10 -3
- three/src/Three.WebGPU.Nodes.d.ts +2 -2
- three/src/Three.WebGPU.d.ts +5 -3
- three/src/animation/AnimationClip.d.ts +0 -10
- three/src/cameras/Camera.d.ts +1 -1
- three/src/core/InterleavedBuffer.d.ts +1 -1
- three/src/core/Object3D.d.ts +8 -4
- three/src/core/RenderTarget.d.ts +11 -0
- three/src/core/Timer.d.ts +1 -1
- three/src/core/UniformsGroup.d.ts +1 -1
- three/src/extras/Controls.d.ts +6 -5
- three/src/extras/core/ShapePath.d.ts +61 -65
- three/src/loaders/DataTextureLoader.d.ts +37 -3
- three/src/loaders/MaterialLoader.d.ts +8 -0
- three/src/materials/LineBasicMaterial.d.ts +5 -0
- three/src/materials/Material.d.ts +9 -1
- three/src/materials/MeshBasicMaterial.d.ts +30 -0
- three/src/materials/MeshDepthMaterial.d.ts +13 -0
- three/src/materials/MeshDistanceMaterial.d.ts +13 -0
- three/src/materials/MeshLambertMaterial.d.ts +50 -1
- three/src/materials/MeshMatcapMaterial.d.ts +31 -1
- three/src/materials/MeshNormalMaterial.d.ts +11 -1
- three/src/materials/MeshPhongMaterial.d.ts +50 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
- three/src/materials/MeshStandardMaterial.d.ts +53 -1
- three/src/materials/MeshToonMaterial.d.ts +43 -1
- three/src/materials/PointsMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +2 -0
- three/src/materials/SpriteMaterial.d.ts +9 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
- three/src/materials/nodes/NodeMaterial.d.ts +33 -13
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
- three/src/math/Box2.d.ts +3 -3
- three/src/math/Box3.d.ts +255 -19
- three/src/math/Color.d.ts +10 -10
- three/src/math/FrustumArray.d.ts +75 -16
- three/src/math/Interpolant.d.ts +111 -8
- three/src/math/Matrix2.d.ts +1 -1
- three/src/math/Matrix3.d.ts +10 -1
- three/src/math/Matrix4.d.ts +329 -105
- three/src/math/Vector2.d.ts +1 -2
- three/src/math/Vector3.d.ts +3 -4
- three/src/math/Vector4.d.ts +1 -2
- three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
- three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
- three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
- three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
- three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
- three/src/nodes/Nodes.d.ts +4 -13
- three/src/nodes/TSL.d.ts +7 -5
- three/src/nodes/accessors/Batch.d.ts +19 -0
- three/src/nodes/accessors/Instance.d.ts +34 -0
- three/src/nodes/accessors/MaterialNode.d.ts +86 -79
- three/src/nodes/accessors/Morph.d.ts +11 -0
- three/src/nodes/accessors/Skinning.d.ts +23 -0
- three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
- three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
- three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
- three/src/nodes/accessors/TextureNode.d.ts +15 -10
- three/src/nodes/core/ArrayNode.d.ts +16 -8
- three/src/nodes/core/ContextNode.d.ts +5 -6
- three/src/nodes/core/LightingModel.d.ts +2 -0
- three/src/nodes/core/Node.d.ts +50 -51
- three/src/nodes/core/NodeBuilder.d.ts +1 -133
- three/src/nodes/core/OverrideContextNode.d.ts +92 -0
- three/src/nodes/core/PropertyNode.d.ts +13 -2
- three/src/nodes/core/StructNode.d.ts +0 -2
- three/src/nodes/core/StructTypeNode.d.ts +5 -4
- three/src/nodes/core/UniformNode.d.ts +48 -9
- three/src/nodes/display/BlendModes.d.ts +72 -11
- three/src/nodes/display/FrontFacingNode.d.ts +62 -3
- three/src/nodes/display/PassNode.d.ts +0 -2
- three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
- three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
- three/src/nodes/lighting/LightsNode.d.ts +4 -4
- three/src/nodes/math/MathNode.d.ts +358 -304
- three/src/nodes/math/OperatorNode.d.ts +253 -82
- three/src/nodes/tsl/TSLCore.d.ts +16 -9
- three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
- three/src/nodes/utils/EquirectUV.d.ts +31 -1
- three/src/nodes/utils/Packing.d.ts +50 -3
- three/src/nodes/utils/RTTNode.d.ts +7 -12
- three/src/nodes/utils/Remap.d.ts +216 -29
- three/src/nodes/utils/SampleNode.d.ts +18 -8
- three/src/objects/BatchedMesh.d.ts +1 -1
- three/src/objects/InstancedMesh.d.ts +0 -8
- three/src/objects/Skeleton.d.ts +0 -2
- three/src/renderers/common/Backend.d.ts +0 -3
- three/src/renderers/common/CanvasTarget.d.ts +0 -49
- three/src/renderers/common/ClippingContext.d.ts +6 -1
- three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
- three/src/renderers/common/Info.d.ts +26 -66
- three/src/renderers/common/InspectorBase.d.ts +0 -7
- three/src/renderers/common/Lighting.d.ts +49 -5
- three/src/renderers/common/Renderer.d.ts +34 -458
- three/src/renderers/common/RendererUtils.d.ts +1 -2
- three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
- three/src/renderers/common/XRManager.d.ts +32 -299
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
- three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
- three/src/renderers/webgl/WebGLState.d.ts +2 -0
- three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
- three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
- three/src/textures/CubeDepthTexture.d.ts +2 -3
- three/src/textures/DataTexture.d.ts +2 -1
- three/src/textures/DepthTexture.d.ts +5 -5
- three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
- three/src/nodes/accessors/BatchNode.d.ts +0 -12
- three/src/nodes/accessors/InstanceNode.d.ts +0 -30
- three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
- three/src/nodes/accessors/MorphNode.d.ts +0 -14
- three/src/nodes/accessors/SkinningNode.d.ts +0 -32
- three/src/renderers/common/Animation.d.ts +0 -102
- three/src/renderers/common/Attributes.d.ts +0 -59
- three/src/renderers/common/Background.d.ts +0 -47
- three/src/renderers/common/BindGroup.d.ts +0 -39
- three/src/renderers/common/Binding.d.ts +0 -50
- three/src/renderers/common/Bindings.d.ts +0 -132
- three/src/renderers/common/Buffer.d.ts +0 -90
- three/src/renderers/common/ChainMap.d.ts +0 -49
- three/src/renderers/common/Color4.d.ts +0 -55
- three/src/renderers/common/ComputePipeline.d.ts +0 -34
- three/src/renderers/common/DataMap.d.ts +0 -42
- three/src/renderers/common/Geometries.d.ts +0 -111
- three/src/renderers/common/Pipeline.d.ts +0 -29
- three/src/renderers/common/Pipelines.d.ts +0 -186
- three/src/renderers/common/ProgrammableStage.d.ts +0 -73
- three/src/renderers/common/RenderBundle.d.ts +0 -25
- three/src/renderers/common/RenderBundles.d.ts +0 -34
- three/src/renderers/common/RenderContext.d.ts +0 -235
- three/src/renderers/common/RenderContexts.d.ts +0 -47
- three/src/renderers/common/RenderList.d.ts +0 -226
- three/src/renderers/common/RenderLists.d.ts +0 -46
- three/src/renderers/common/RenderObject.d.ts +0 -448
- three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
- three/src/renderers/common/RenderObjects.d.ts +0 -151
- three/src/renderers/common/SampledTexture.d.ts +0 -28
- three/src/renderers/common/Sampler.d.ts +0 -19
- three/src/renderers/common/Textures.d.ts +0 -125
- three/src/renderers/common/Uniform.d.ts +0 -262
- three/src/renderers/common/UniformBuffer.d.ts +0 -20
- three/src/renderers/common/UniformsGroup.d.ts +0 -152
- three/src/renderers/common/XRRenderTarget.d.ts +0 -67
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
- three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
- three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
- three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
- three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
- three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Color, Material, Mesh, MeshStandardNodeMaterial, Node } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface SkyscraperGeneratorDefaultParameters {
|
|
4
|
+
seed: number;
|
|
5
|
+
totalHeight: number;
|
|
6
|
+
floorHeight: number;
|
|
7
|
+
bayWidth: number;
|
|
8
|
+
stringCourseEvery: number;
|
|
9
|
+
chamferWidth: number;
|
|
10
|
+
chamferCornerX: number;
|
|
11
|
+
chamferCornerZ: number;
|
|
12
|
+
setbackDepth: number;
|
|
13
|
+
acChance: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SkyscraperGeneratorParameters extends SkyscraperGeneratorDefaultParameters {
|
|
17
|
+
footprint: { width: number; depth: number };
|
|
18
|
+
tierFractions: { base: number; crown: number };
|
|
19
|
+
pierWidth: number;
|
|
20
|
+
pierDepth: number;
|
|
21
|
+
windowReveal: number;
|
|
22
|
+
stringCourseHeight: number;
|
|
23
|
+
archBayWidthRatio: number;
|
|
24
|
+
archRise: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Generates intricate, tripartite "Beaux-Arts / Neo-Gothic" terracotta
|
|
29
|
+
* skyscrapers from a small set of parameters.
|
|
30
|
+
*
|
|
31
|
+
* The mass is read as a footprint polygon (a rectangle with one chamfered
|
|
32
|
+
* corner) split into vertical faces, each split into three tiers — a tall
|
|
33
|
+
* arcaded base, a repeating shaft and an ornate crown — then into floors and
|
|
34
|
+
* bays. A handful of authored pieces (a pier, a window, a cornice profile, a
|
|
35
|
+
* gothic arch) are instanced across the whole tower, then baked — together with
|
|
36
|
+
* the bespoke base arcade — into a single non-indexed BufferGeometry tagged with
|
|
37
|
+
* a per-vertex `partId` ({@link PartId}) so one material can shade every zone.
|
|
38
|
+
*
|
|
39
|
+
* The generator is material agnostic — it only produces geometry. Pass a single
|
|
40
|
+
* material (e.g. a TSL node material that branches on `partId`) to dress it.
|
|
41
|
+
*
|
|
42
|
+
* ```js
|
|
43
|
+
* const generator = new SkyscraperGenerator( { seed: 35, totalHeight: 140 }, material );
|
|
44
|
+
* scene.add( generator.build() ); // a single Mesh
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export class SkyscraperGenerator {
|
|
48
|
+
constructor(parameters?: Partial<SkyscraperGeneratorParameters>, material?: Material);
|
|
49
|
+
|
|
50
|
+
parameters: Partial<SkyscraperGeneratorParameters>;
|
|
51
|
+
material: Material;
|
|
52
|
+
|
|
53
|
+
mesh: Mesh | null;
|
|
54
|
+
|
|
55
|
+
setParameters(parameters: Partial<SkyscraperGeneratorParameters>): this;
|
|
56
|
+
build(): Mesh;
|
|
57
|
+
rebuild(): Mesh;
|
|
58
|
+
dispose(): void;
|
|
59
|
+
|
|
60
|
+
static defaults: SkyscraperGeneratorDefaultParameters;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The facade material: a single MeshStandardNodeMaterial that reads the baked
|
|
65
|
+
* per-vertex `partId` and reproduces every zone — procedural terracotta brickwork
|
|
66
|
+
* on the walls and piers, smooth dressed stone on the window frames and ornament,
|
|
67
|
+
* dark glazing, and grey AC units — all dressed with world-space
|
|
68
|
+
* weathering. One material covers the whole building ( and a whole city ), which is
|
|
69
|
+
* what makes it compute-rasterizer friendly. `buildingBase` is the tower's flat
|
|
70
|
+
* masonry colour as a TSL node: pass a `uniform( Color )` for a single tower, or a
|
|
71
|
+
* per-fragment palette pick for a city, so the same material dresses both.
|
|
72
|
+
*/
|
|
73
|
+
export function createSkyscraperMaterial(buildingBase?: Node<"color"> | Color): MeshStandardNodeMaterial;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The NYC masonry palette every tower is dressed from ( hex colours ): limestone-dominant
|
|
77
|
+
* with terracotta accents. Shared by the single-tower example and {@link CityGenerator}'s
|
|
78
|
+
* building material so both stay in sync.
|
|
79
|
+
*/
|
|
80
|
+
export const buildingPalette: number[];
|
|
81
|
+
|
|
82
|
+
/** Picks one {@link buildingPalette} colour ( a hex number ) for a tower from its seed. */
|
|
83
|
+
export function pickBuildingColor(seed: number): number;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { BufferGeometry, Vector3 } from "three";
|
|
2
|
+
|
|
3
|
+
export interface LoftGeometryOptions {
|
|
4
|
+
closed?: boolean | undefined;
|
|
5
|
+
capStart?: boolean | undefined;
|
|
6
|
+
capEnd?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface LoftGeometryParameters {
|
|
10
|
+
sections: Vector3[][];
|
|
11
|
+
closed: boolean;
|
|
12
|
+
capStart: boolean;
|
|
13
|
+
capEnd: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This class can be used to generate a geometry by lofting (skinning) a surface
|
|
18
|
+
* through a series of cross sections. Each section is an array of points in 3D
|
|
19
|
+
* space and all sections must have the same number of points.
|
|
20
|
+
*
|
|
21
|
+
* `LoftGeometry` is the general case of geometries like {@link LatheGeometry}
|
|
22
|
+
* (which revolves a fixed profile around an axis) or {@link TubeGeometry}
|
|
23
|
+
* (which sweeps a circular section along a path): the sections can have any
|
|
24
|
+
* shape, and can change shape, size, position and orientation from one
|
|
25
|
+
* section to the next.
|
|
26
|
+
*
|
|
27
|
+
* Sections wind around the loft so the resulting face normals point outwards
|
|
28
|
+
* when each section is ordered counterclockwise as seen from the end of the
|
|
29
|
+
* loft, looking back towards the start. If the surface appears inside out,
|
|
30
|
+
* reverse the point order of each section.
|
|
31
|
+
*
|
|
32
|
+
* ```js
|
|
33
|
+
* const sections = [];
|
|
34
|
+
*
|
|
35
|
+
* for ( let i = 0; i <= 10; i ++ ) {
|
|
36
|
+
*
|
|
37
|
+
* const points = [];
|
|
38
|
+
* const radius = 2 + Math.sin( i * 0.8 );
|
|
39
|
+
*
|
|
40
|
+
* for ( let j = 0; j < 32; j ++ ) {
|
|
41
|
+
*
|
|
42
|
+
* const angle = j / 32 * Math.PI * 2;
|
|
43
|
+
* points.push( new THREE.Vector3( Math.sin( angle ) * radius, i, Math.cos( angle ) * radius ) );
|
|
44
|
+
*
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* sections.push( points );
|
|
48
|
+
*
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* const geometry = new LoftGeometry( sections, { capStart: true, capEnd: true } );
|
|
52
|
+
* const material = new THREE.MeshStandardMaterial( { color: 0x00ff00 } );
|
|
53
|
+
* const mesh = new THREE.Mesh( geometry, material );
|
|
54
|
+
* scene.add( mesh );
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @augments BufferGeometry
|
|
58
|
+
* @three_import import { LoftGeometry } from 'three/addons/geometries/LoftGeometry.js';
|
|
59
|
+
*/
|
|
60
|
+
export class LoftGeometry extends BufferGeometry {
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a new loft geometry.
|
|
63
|
+
*
|
|
64
|
+
* @param {Array<Array<Vector3>>} sections - The cross sections to skin. At least
|
|
65
|
+
* two sections are required and all sections must have the same number of points.
|
|
66
|
+
* @param {Object} [options={}] - The loft options.
|
|
67
|
+
* @param {boolean} [options.closed=true] - Whether each section is treated as a
|
|
68
|
+
* closed ring (e.g. a fuselage) or an open strip (e.g. a ribbon).
|
|
69
|
+
* @param {boolean} [options.capStart=false] - Whether the first section is closed
|
|
70
|
+
* with a cap or not.
|
|
71
|
+
* @param {boolean} [options.capEnd=false] - Whether the last section is closed
|
|
72
|
+
* with a cap or not.
|
|
73
|
+
*/
|
|
74
|
+
constructor(sections?: Vector3[][], options?: LoftGeometryOptions);
|
|
75
|
+
/**
|
|
76
|
+
* Holds the constructor parameters that have been
|
|
77
|
+
* used to generate the geometry. Any modification
|
|
78
|
+
* after instantiation does not change the geometry.
|
|
79
|
+
*
|
|
80
|
+
* @type {Object}
|
|
81
|
+
*/
|
|
82
|
+
parameters: LoftGeometryParameters;
|
|
83
|
+
}
|
|
@@ -67,12 +67,15 @@ interface ValueColorWithParameters<
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
declare class ParametersGroup {
|
|
70
|
-
name: string;
|
|
71
|
-
|
|
72
70
|
paramList: Item;
|
|
73
71
|
|
|
74
72
|
constructor(parameters: never, name: string);
|
|
75
73
|
|
|
74
|
+
close(): this;
|
|
75
|
+
name(name: string): this;
|
|
76
|
+
show(): this;
|
|
77
|
+
hide(): this;
|
|
78
|
+
|
|
76
79
|
add<T, K extends keyof T>(
|
|
77
80
|
object: T,
|
|
78
81
|
property: K,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Light, Lighting } from "three/webgpu";
|
|
2
|
+
import ClusteredLightsNode from "../tsl/lighting/ClusteredLightsNode.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A custom lighting implementation based on Forward+ Clustered Shading that
|
|
6
|
+
* overwrites the default lighting system in {@link WebGPURenderer}. Suitable
|
|
7
|
+
* for 3D scenes with many point lights and real depth complexity — the view
|
|
8
|
+
* frustum is partitioned into a 3D cluster grid so only the lights actually
|
|
9
|
+
* reaching each fragment are evaluated.
|
|
10
|
+
*
|
|
11
|
+
* ```js
|
|
12
|
+
* const lighting = new ClusteredLighting();
|
|
13
|
+
* renderer.lighting = lighting; // set lighting system
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @augments Lighting
|
|
17
|
+
* @three_import import { ClusteredLighting } from 'three/addons/lighting/ClusteredLighting.js';
|
|
18
|
+
*/
|
|
19
|
+
export class ClusteredLighting extends Lighting {
|
|
20
|
+
maxLights: number;
|
|
21
|
+
tileSize: number;
|
|
22
|
+
zSlices: number;
|
|
23
|
+
maxLightsPerCluster: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new clustered lighting system.
|
|
27
|
+
*
|
|
28
|
+
* @param {number} [maxLights=1024] - Maximum number of point lights.
|
|
29
|
+
* @param {number} [tileSize=32] - Screen tile size in pixels (cluster XY size).
|
|
30
|
+
* @param {number} [zSlices=24] - Number of exponential depth slices.
|
|
31
|
+
* @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity.
|
|
32
|
+
*/
|
|
33
|
+
constructor(maxLights?: number, tileSize?: number, zSlices?: number, maxLightsPerCluster?: number);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new clustered lights node for the given array of lights.
|
|
37
|
+
*
|
|
38
|
+
* This method is called internally by the renderer and must be overwritten by
|
|
39
|
+
* all custom lighting implementations.
|
|
40
|
+
*
|
|
41
|
+
* @param {Array<Light>} lights - The lights.
|
|
42
|
+
* @return {ClusteredLightsNode} The clustered lights node.
|
|
43
|
+
*/
|
|
44
|
+
createNode(lights?: Light[]): ClusteredLightsNode;
|
|
45
|
+
}
|
|
@@ -1,21 +1,66 @@
|
|
|
1
1
|
import { Box3, Data3DTexture, Object3D, Scene, Vector3, WebGLRenderer } from "three";
|
|
2
2
|
|
|
3
3
|
export interface LightProbeGridBakeOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Resolution of each cubemap face.
|
|
6
|
+
*/
|
|
4
7
|
cubemapSize?: number | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Near plane for the cube camera.
|
|
10
|
+
*/
|
|
5
11
|
near?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Far plane for the cube camera.
|
|
14
|
+
*/
|
|
6
15
|
far?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Additional bounce passes after the initial direct pass.
|
|
18
|
+
*/
|
|
19
|
+
bounces?: number | undefined;
|
|
7
20
|
}
|
|
8
21
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
/**
|
|
23
|
+
* A 3D grid of L2 Spherical Harmonic irradiance probes that provides
|
|
24
|
+
* position-dependent diffuse global illumination.
|
|
25
|
+
*
|
|
26
|
+
* Note that this class can only be used with {@link WebGLRenderer}.
|
|
27
|
+
* A version for {@link WebGPURenderer} will be added at a later point.
|
|
28
|
+
*
|
|
29
|
+
* All seven packed SH sub-volumes are stored in a **single** RGBA
|
|
30
|
+
* `WebGL3DRenderTarget` using a texture-atlas layout along the Z axis.
|
|
31
|
+
* Each sub-volume occupies `( nz + 2 )` atlas slices: one padding slice at
|
|
32
|
+
* each end (a copy of the nearest edge data slice) to prevent color bleeding
|
|
33
|
+
* when the hardware trilinear filter reads across a sub-volume boundary.
|
|
34
|
+
*
|
|
35
|
+
* Atlas layout (nz = resolution.z, PADDING = 1):
|
|
36
|
+
* ```
|
|
37
|
+
* slice 0 : padding (copy of sub-volume 0, data slice 0)
|
|
38
|
+
* slices 1 … nz : sub-volume 0 data
|
|
39
|
+
* slice nz + 1 : padding (copy of sub-volume 0, data slice nz-1)
|
|
40
|
+
* slice nz + 2 : padding (copy of sub-volume 1, data slice 0)
|
|
41
|
+
* slices nz+3 … 2*nz+2 : sub-volume 1 data
|
|
42
|
+
* …
|
|
43
|
+
* ```
|
|
44
|
+
* Total atlas depth = `7 * ( nz + 2 )`.
|
|
45
|
+
*
|
|
46
|
+
* Baking is fully GPU-resident: cubemap rendering, SH projection, and
|
|
47
|
+
* texture packing all happen on the GPU with zero CPU readback.
|
|
48
|
+
*
|
|
49
|
+
* @three_import import { LightProbeGrid } from 'three/addons/lighting/LightProbeGrid.js';
|
|
50
|
+
*/
|
|
51
|
+
export class LightProbeGrid extends Object3D {
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a new irradiance probe grid.
|
|
54
|
+
*
|
|
55
|
+
* The volume is centered at the object's position.
|
|
56
|
+
*
|
|
57
|
+
* @param {number} [width=1] - Full width of the volume along X.
|
|
58
|
+
* @param {number} [height=1] - Full height of the volume along Y.
|
|
59
|
+
* @param {number} [depth=1] - Full depth of the volume along Z.
|
|
60
|
+
* @param {number} [widthProbes] - Number of probes along X. Defaults to `Math.max( 2, Math.round( width ) + 1 )`.
|
|
61
|
+
* @param {number} [heightProbes] - Number of probes along Y. Defaults to `Math.max( 2, Math.round( height ) + 1 )`.
|
|
62
|
+
* @param {number} [depthProbes] - Number of probes along Z. Defaults to `Math.max( 2, Math.round( depth ) + 1 )`.
|
|
63
|
+
*/
|
|
19
64
|
constructor(
|
|
20
65
|
width?: number,
|
|
21
66
|
height?: number,
|
|
@@ -24,11 +69,84 @@ declare class LightProbeGrid extends Object3D {
|
|
|
24
69
|
heightProbes?: number,
|
|
25
70
|
depthProbes?: number,
|
|
26
71
|
);
|
|
27
|
-
|
|
72
|
+
/**
|
|
73
|
+
* This flag can be used for type testing.
|
|
74
|
+
*
|
|
75
|
+
* @type {boolean}
|
|
76
|
+
* @readonly
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
readonly isLightProbeGrid: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The full width of the volume along X.
|
|
82
|
+
*
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
width: number;
|
|
86
|
+
/**
|
|
87
|
+
* The full height of the volume along Y.
|
|
88
|
+
*
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
height: number;
|
|
92
|
+
/**
|
|
93
|
+
* The full depth of the volume along Z.
|
|
94
|
+
*
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
depth: number;
|
|
98
|
+
/**
|
|
99
|
+
* The number of probes along each axis.
|
|
100
|
+
*
|
|
101
|
+
* @type {Vector3}
|
|
102
|
+
*/
|
|
103
|
+
resolution: Vector3;
|
|
104
|
+
/**
|
|
105
|
+
* The world-space bounding box for the grid. Updated automatically
|
|
106
|
+
* by {@link LightProbeGrid#bake}.
|
|
107
|
+
*
|
|
108
|
+
* @type {Box3}
|
|
109
|
+
*/
|
|
110
|
+
boundingBox: Box3;
|
|
111
|
+
/**
|
|
112
|
+
* The single RGBA atlas 3D texture storing all seven packed SH sub-volumes.
|
|
113
|
+
*
|
|
114
|
+
* @type {?Data3DTexture}
|
|
115
|
+
* @default null
|
|
116
|
+
*/
|
|
117
|
+
texture: Data3DTexture | null;
|
|
118
|
+
/**
|
|
119
|
+
* Returns the world-space position of the probe at grid indices (ix, iy, iz).
|
|
120
|
+
*
|
|
121
|
+
* @param {number} ix - X index.
|
|
122
|
+
* @param {number} iy - Y index.
|
|
123
|
+
* @param {number} iz - Z index.
|
|
124
|
+
* @param {Vector3} target - The target vector.
|
|
125
|
+
* @return {Vector3} The world-space position.
|
|
126
|
+
*/
|
|
28
127
|
getProbePosition(ix: number, iy: number, iz: number, target: Vector3): Vector3;
|
|
128
|
+
/**
|
|
129
|
+
* Updates the world-space bounding box from the current position and size.
|
|
130
|
+
*/
|
|
29
131
|
updateBoundingBox(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Bakes all probes by rendering cubemaps at each probe position
|
|
134
|
+
* and projecting to L2 SH. Optionally iterates additional passes to
|
|
135
|
+
* capture indirect bounces — each extra pass samples the previous pass's
|
|
136
|
+
* atlas as indirect light, so a grid added to the scene before baking
|
|
137
|
+
* accumulates one bounce per extra pass.
|
|
138
|
+
*
|
|
139
|
+
* @param {WebGLRenderer} renderer - The renderer.
|
|
140
|
+
* @param {Scene} scene - The scene to render.
|
|
141
|
+
* @param {Object} [options] - Bake options.
|
|
142
|
+
* @param {number} [options.cubemapSize=8] - Resolution of each cubemap face.
|
|
143
|
+
* @param {number} [options.near=0.1] - Near plane for the cube camera.
|
|
144
|
+
* @param {number} [options.far=100] - Far plane for the cube camera.
|
|
145
|
+
* @param {number} [options.bounces=0] - Additional bounce passes after the initial direct pass.
|
|
146
|
+
*/
|
|
30
147
|
bake(renderer: WebGLRenderer, scene: Scene, options?: LightProbeGridBakeOptions): void;
|
|
148
|
+
/**
|
|
149
|
+
* Frees GPU resources.
|
|
150
|
+
*/
|
|
31
151
|
dispose(): void;
|
|
32
152
|
}
|
|
33
|
-
|
|
34
|
-
export { LightProbeGrid };
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { BufferGeometry, Loader, LoadingManager } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface DecoderPaths {
|
|
4
|
+
js: string;
|
|
5
|
+
wasm: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare const DRACO_GLTF_CONFIG: DecoderPaths;
|
|
9
|
+
|
|
10
|
+
declare class DRACOLoader extends Loader<BufferGeometry> {
|
|
4
11
|
constructor(manager?: LoadingManager);
|
|
5
12
|
|
|
6
|
-
setDecoderPath(path: string):
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
setDecoderPath(path: string | DecoderPaths): this;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated setDecoderConfig to has been deprecated and will be removed in r194.
|
|
17
|
+
*/
|
|
18
|
+
setDecoderConfig(config: object): this;
|
|
19
|
+
|
|
20
|
+
setWorkerLimit(workerLimit: number): this;
|
|
9
21
|
|
|
10
22
|
load(
|
|
11
23
|
url: string,
|
|
@@ -20,6 +32,8 @@ export class DRACOLoader extends Loader<BufferGeometry> {
|
|
|
20
32
|
onError?: (err: unknown) => void,
|
|
21
33
|
): void;
|
|
22
34
|
|
|
23
|
-
preload():
|
|
24
|
-
dispose():
|
|
35
|
+
preload(): this;
|
|
36
|
+
dispose(): this;
|
|
25
37
|
}
|
|
38
|
+
|
|
39
|
+
export { DRACO_GLTF_CONFIG, DRACOLoader };
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTextureLoader,
|
|
3
|
+
DataTextureLoaderTexData,
|
|
3
4
|
FloatType,
|
|
4
5
|
HalfFloatType,
|
|
5
6
|
LoadingManager,
|
|
6
|
-
PixelFormat,
|
|
7
7
|
RedFormat,
|
|
8
8
|
RGBAFormat,
|
|
9
9
|
RGFormat,
|
|
10
10
|
TextureDataType,
|
|
11
11
|
} from "three";
|
|
12
12
|
|
|
13
|
-
export interface EXR {
|
|
14
|
-
header: object;
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
data: Float32Array | Uint16Array;
|
|
18
|
-
format: PixelFormat;
|
|
19
|
-
colorSpace: string;
|
|
20
|
-
type: typeof HalfFloatType | typeof FloatType;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
13
|
declare class EXRLoader extends DataTextureLoader {
|
|
24
14
|
type: TextureDataType;
|
|
25
15
|
outputFormat: typeof RGBAFormat | typeof RGFormat | typeof RedFormat;
|
|
@@ -27,7 +17,7 @@ declare class EXRLoader extends DataTextureLoader {
|
|
|
27
17
|
|
|
28
18
|
constructor(manager?: LoadingManager);
|
|
29
19
|
|
|
30
|
-
parse(buffer: ArrayBuffer):
|
|
20
|
+
parse(buffer: ArrayBuffer): DataTextureLoaderTexData;
|
|
31
21
|
setDataType(type: typeof HalfFloatType | typeof FloatType): this;
|
|
32
22
|
setOutputFormat(value: typeof RGBAFormat | typeof RGFormat | typeof RedFormat): this;
|
|
33
23
|
setPart(value: number): this;
|
|
@@ -47,7 +47,7 @@ export class GLTFLoader extends Loader<GLTF> {
|
|
|
47
47
|
|
|
48
48
|
constructor(manager?: LoadingManager);
|
|
49
49
|
|
|
50
|
-
setDRACOLoader(dracoLoader: DRACOLoader): this;
|
|
50
|
+
setDRACOLoader(dracoLoader: DRACOLoader | null): this;
|
|
51
51
|
setKTX2Loader(ktx2Loader: KTX2Loader | null): this;
|
|
52
52
|
setMeshoptDecoder(meshoptDecoder: typeof MeshoptDecoder | null): this;
|
|
53
53
|
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import { DataTextureLoader, LoadingManager, TextureDataType } from "three";
|
|
2
|
-
|
|
3
|
-
export interface HDR {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
data: Float32Array | Uint8Array;
|
|
7
|
-
header: string;
|
|
8
|
-
gamma: number;
|
|
9
|
-
exposure: number;
|
|
10
|
-
type: TextureDataType;
|
|
11
|
-
}
|
|
1
|
+
import { DataTextureLoader, DataTextureLoaderTexData, LoadingManager, TextureDataType } from "three";
|
|
12
2
|
|
|
13
3
|
declare class HDRLoader extends DataTextureLoader {
|
|
14
4
|
type: TextureDataType;
|
|
15
5
|
|
|
16
6
|
constructor(manager?: LoadingManager);
|
|
17
7
|
|
|
18
|
-
parse(buffer: ArrayBuffer):
|
|
8
|
+
parse(buffer: ArrayBuffer): DataTextureLoaderTexData;
|
|
19
9
|
setDataType(type: TextureDataType): this;
|
|
20
10
|
}
|
|
21
11
|
|
|
@@ -12,7 +12,13 @@ export interface LWOLoaderParameters {
|
|
|
12
12
|
resourcePath?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated The loader has been deprecated and will be removed with r195. Export your LWO files to glTF before using them on the web.
|
|
17
|
+
*/
|
|
15
18
|
export class LWOLoader extends Loader<LWO> {
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated The loader has been deprecated and will be removed with r195. Export your LWO files to glTF before using them on the web.
|
|
21
|
+
*/
|
|
16
22
|
constructor(manager?: LoadingManager, parameters?: LWOLoaderParameters);
|
|
17
23
|
|
|
18
24
|
parse(data: ArrayBuffer, path: string, modelName: string): LWO;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
|
|
5
|
-
*/
|
|
6
|
-
export interface RGBE extends HDR {
|
|
7
|
-
}
|
|
1
|
+
import { HDRLoader } from "./HDRLoader.js";
|
|
8
2
|
|
|
9
3
|
/**
|
|
10
4
|
* @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { BufferGeometry, Loader, LoadingManager, Shape, ShapePath, Vector2
|
|
2
|
-
|
|
3
|
-
export interface SVGResultPaths extends ShapePath {
|
|
4
|
-
userData?: Record<string, any> | undefined;
|
|
5
|
-
}
|
|
1
|
+
import { BufferGeometry, Loader, LoadingManager, MeshBasicMaterial, Shape, ShapePath, Vector2 } from "three";
|
|
6
2
|
|
|
7
3
|
export interface SVGResult {
|
|
8
|
-
paths:
|
|
4
|
+
paths: ShapePath[];
|
|
9
5
|
xml: XMLDocument;
|
|
10
6
|
}
|
|
11
7
|
|
|
@@ -60,5 +56,12 @@ export class SVGLoader extends Loader<SVGResult> {
|
|
|
60
56
|
vertexOffset?: number,
|
|
61
57
|
): number;
|
|
62
58
|
|
|
59
|
+
static createFillMaterial(shapePath: ShapePath): MeshBasicMaterial | null;
|
|
60
|
+
|
|
61
|
+
static createStrokeMaterial(shapePath: ShapePath): MeshBasicMaterial | null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Use shapePath.toShapes() instead.
|
|
65
|
+
*/
|
|
63
66
|
static createShapes(shapePath: ShapePath): Shape[];
|
|
64
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataTextureLoader, DataTextureLoaderTexData, LoadingManager } from "three";
|
|
2
2
|
|
|
3
3
|
export class TGALoader extends DataTextureLoader {
|
|
4
4
|
constructor(manager?: LoadingManager);
|
|
5
5
|
|
|
6
|
-
parse(data: ArrayBuffer):
|
|
6
|
+
parse(data: ArrayBuffer): DataTextureLoaderTexData;
|
|
7
7
|
}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import { DataTextureLoader, LoadingManager, TextureFilter } from "three";
|
|
2
|
-
|
|
3
|
-
export interface TIFFResult {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
data: Uint8Array;
|
|
7
|
-
flipY: true;
|
|
8
|
-
magFilter: TextureFilter;
|
|
9
|
-
minFilter: TextureFilter;
|
|
10
|
-
}
|
|
1
|
+
import { DataTextureLoader, DataTextureLoaderTexData, LoadingManager, TextureFilter } from "three";
|
|
11
2
|
|
|
12
3
|
export class TIFFLoader extends DataTextureLoader {
|
|
13
4
|
constructor(manager?: LoadingManager);
|
|
14
5
|
|
|
15
|
-
parse(buffer:
|
|
6
|
+
parse(buffer: ArrayBuffer): DataTextureLoaderTexData;
|
|
16
7
|
}
|
|
@@ -3,7 +3,12 @@ import { Group, Loader, LoadingManager } from "three";
|
|
|
3
3
|
declare class USDLoader extends Loader<Group> {
|
|
4
4
|
constructor(manager?: LoadingManager);
|
|
5
5
|
|
|
6
|
-
parse(
|
|
6
|
+
parse(
|
|
7
|
+
buffer: ArrayBuffer | string,
|
|
8
|
+
path?: string,
|
|
9
|
+
onLoad?: (group: Group) => void,
|
|
10
|
+
onError?: (err: unknown) => void,
|
|
11
|
+
): Group;
|
|
7
12
|
}
|
|
8
13
|
|
|
9
14
|
export { USDLoader };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Object3D } from "../../../src/core/Object3D.js";
|
|
2
|
+
|
|
3
|
+
export interface TileCreasedNormalsPluginOptions {
|
|
4
|
+
creaseAngle?: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A plugin for `3d-tiles-renderer` that computes creased vertex normals for the
|
|
9
|
+
* geometry of each loaded tile: smooth normals everywhere except where faces meet
|
|
10
|
+
* at an angle greater than the crease angle. Useful for photogrammetry tile sets
|
|
11
|
+
* like Google Photorealistic 3D Tiles which come without vertex normals.
|
|
12
|
+
*
|
|
13
|
+
* The normals are computed in a Web Worker so tile processing doesn't block the
|
|
14
|
+
* main thread. Tiles are displayed once their normals are ready.
|
|
15
|
+
*
|
|
16
|
+
* ```js
|
|
17
|
+
* tiles.registerPlugin( new TileCreasedNormalsPlugin( { creaseAngle: Math.PI / 6 } ) );
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @three_import import { TileCreasedNormalsPlugin } from 'three/addons/misc/TileCreasedNormalsPlugin.js';
|
|
21
|
+
*/
|
|
22
|
+
export class TileCreasedNormalsPlugin {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new plugin.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} [options] - The configuration options.
|
|
27
|
+
* @param {number} [options.creaseAngle=Math.PI/3] - The crease angle in radians.
|
|
28
|
+
*/
|
|
29
|
+
constructor({ creaseAngle }?: TileCreasedNormalsPluginOptions);
|
|
30
|
+
/**
|
|
31
|
+
* The crease angle in radians.
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
*/
|
|
35
|
+
creaseAngle: number;
|
|
36
|
+
/**
|
|
37
|
+
* Called by the tiles renderer for each loaded tile model. The tile is
|
|
38
|
+
* displayed once the returned promise resolves.
|
|
39
|
+
*
|
|
40
|
+
* @param {Object3D} scene - The tile model.
|
|
41
|
+
* @return {Promise} A promise that resolves when all geometries have creased normals.
|
|
42
|
+
*/
|
|
43
|
+
processTileModel(scene: Object3D): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Called by the tiles renderer when the plugin is unregistered or the
|
|
46
|
+
* tiles renderer is disposed.
|
|
47
|
+
*/
|
|
48
|
+
dispose(): void;
|
|
49
|
+
}
|