@types/three 0.158.3 → 0.160.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 -1
- three/examples/jsm/cameras/CinematicCamera.d.ts +1 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +10 -0
- three/examples/jsm/lines/LineMaterial.d.ts +2 -2
- three/examples/jsm/loaders/ColladaLoader.d.ts +1 -3
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/KTX2Loader.d.ts +2 -8
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -5
- three/examples/jsm/math/Octree.d.ts +7 -3
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -1
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +238 -60
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +9 -2
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +7 -1
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +10 -2
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +7 -1
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +3 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +3 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +3 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +6 -3
- three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
- three/examples/jsm/nodes/core/PropertyNode.d.ts +9 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +4 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +3 -0
- three/examples/jsm/nodes/core/constants.d.ts +10 -8
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +7 -2
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +18 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +4 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +7 -1
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +6 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +3 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +7 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +6 -1
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +18 -5
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -3
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +25 -2
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
- three/examples/jsm/nodes/math/CondNode.d.ts +7 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +134 -1
- three/examples/jsm/nodes/math/OperatorNode.d.ts +51 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +3 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +75 -33
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +4 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -7
- three/examples/jsm/objects/QuadMesh.d.ts +13 -0
- three/examples/jsm/postprocessing/GTAOPass.d.ts +118 -0
- three/examples/jsm/renderers/common/Info.d.ts +7 -2
- three/examples/jsm/renderers/common/Renderer.d.ts +2 -2
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +1 -0
- three/examples/jsm/shaders/GTAOShader.d.ts +59 -0
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
- three/examples/jsm/utils/SortUtils.d.ts +7 -0
- three/package.json +3 -3
- three/src/Three.d.ts +2 -0
- three/src/animation/AnimationClip.d.ts +2 -2
- three/src/animation/AnimationMixer.d.ts +1 -1
- three/src/animation/KeyframeTrack.d.ts +3 -3
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/ColorKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
- three/src/audio/Audio.d.ts +1 -1
- three/src/audio/AudioListener.d.ts +1 -1
- three/src/constants.d.ts +3 -1
- three/src/core/BufferAttribute.d.ts +27 -0
- three/src/core/BufferGeometry.d.ts +1 -1
- three/src/core/InterleavedBuffer.d.ts +27 -0
- three/src/core/InterleavedBufferAttribute.d.ts +2 -2
- three/src/core/Object3D.d.ts +48 -14
- three/src/core/Raycaster.d.ts +1 -0
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/extras/core/Curve.d.ts +2 -2
- three/src/extras/core/Path.d.ts +1 -1
- three/src/extras/core/Shape.d.ts +1 -1
- three/src/extras/core/ShapePath.d.ts +1 -1
- three/src/extras/curves/CatmullRomCurve3.d.ts +2 -2
- three/src/extras/curves/CubicBezierCurve.d.ts +2 -2
- three/src/extras/curves/CubicBezierCurve3.d.ts +2 -2
- three/src/extras/curves/EllipseCurve.d.ts +1 -1
- three/src/extras/curves/LineCurve.d.ts +2 -2
- three/src/extras/curves/LineCurve3.d.ts +2 -2
- three/src/extras/curves/QuadraticBezierCurve.d.ts +2 -2
- three/src/extras/curves/QuadraticBezierCurve3.d.ts +2 -2
- three/src/extras/curves/SplineCurve.d.ts +2 -2
- three/src/geometries/ExtrudeGeometry.d.ts +5 -5
- three/src/geometries/LatheGeometry.d.ts +2 -2
- three/src/geometries/PlaneGeometry.d.ts +1 -1
- three/src/geometries/PolyhedronGeometry.d.ts +1 -1
- three/src/geometries/RingGeometry.d.ts +1 -1
- three/src/geometries/ShapeGeometry.d.ts +2 -2
- three/src/geometries/SphereGeometry.d.ts +1 -1
- three/src/geometries/TorusGeometry.d.ts +1 -1
- three/src/geometries/TorusKnotGeometry.d.ts +1 -1
- three/src/geometries/TubeGeometry.d.ts +3 -3
- three/src/geometries/WireframeGeometry.d.ts +1 -1
- three/src/helpers/ArrowHelper.d.ts +4 -4
- three/src/helpers/AxesHelper.d.ts +1 -1
- three/src/helpers/Box3Helper.d.ts +3 -3
- three/src/helpers/CameraHelper.d.ts +2 -2
- three/src/helpers/DirectionalLightHelper.d.ts +6 -4
- three/src/helpers/GridHelper.d.ts +1 -1
- three/src/helpers/HemisphereLightHelper.d.ts +4 -4
- three/src/helpers/PlaneHelper.d.ts +2 -2
- three/src/helpers/PointLightHelper.d.ts +3 -3
- three/src/helpers/SkeletonHelper.d.ts +4 -4
- three/src/helpers/SpotLightHelper.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +1 -1
- three/src/lights/DirectionalLightShadow.d.ts +1 -1
- three/src/lights/HemisphereLight.d.ts +1 -1
- three/src/lights/LightProbe.d.ts +1 -1
- three/src/lights/LightShadow.d.ts +5 -5
- three/src/lights/PointLight.d.ts +7 -0
- three/src/lights/PointLightShadow.d.ts +1 -1
- three/src/lights/SpotLight.d.ts +1 -1
- three/src/lights/SpotLightShadow.d.ts +1 -1
- three/src/loaders/MaterialLoader.d.ts +6 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/LineDashedMaterial.d.ts +7 -1
- three/src/materials/Material.d.ts +16 -16
- three/src/materials/MeshBasicMaterial.d.ts +9 -2
- three/src/materials/MeshDepthMaterial.d.ts +7 -1
- three/src/materials/MeshDistanceMaterial.d.ts +9 -2
- three/src/materials/MeshLambertMaterial.d.ts +9 -2
- three/src/materials/MeshMatcapMaterial.d.ts +10 -3
- three/src/materials/MeshNormalMaterial.d.ts +9 -2
- three/src/materials/MeshPhongMaterial.d.ts +10 -3
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +10 -5
- three/src/materials/MeshToonMaterial.d.ts +10 -3
- three/src/materials/PointsMaterial.d.ts +9 -2
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +9 -3
- three/src/materials/ShadowMaterial.d.ts +8 -1
- three/src/materials/SpriteMaterial.d.ts +9 -4
- three/src/math/Box3.d.ts +2 -2
- three/src/math/Frustum.d.ts +2 -2
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -8
- three/src/math/Vector2.d.ts +1 -1
- three/src/math/Vector4.d.ts +1 -1
- three/src/objects/BatchedMesh.d.ts +169 -0
- three/src/objects/Bone.d.ts +1 -1
- three/src/objects/LOD.d.ts +2 -4
- three/src/objects/Line.d.ts +2 -4
- three/src/objects/LineLoop.d.ts +1 -1
- three/src/objects/LineSegments.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +2 -8
- three/src/objects/SkinnedMesh.d.ts +1 -2
- three/src/renderers/WebGL3DRenderTarget.d.ts +7 -5
- three/src/renderers/WebGLArrayRenderTarget.d.ts +7 -5
- three/src/renderers/WebGLCubeRenderTarget.d.ts +2 -2
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLAttributes.d.ts +1 -0
- three/src/renderers/webgl/WebGLBindingStates.d.ts +4 -4
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +4 -3
- three/src/renderers/webgl/WebGLClipping.d.ts +2 -2
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +5 -4
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLPrograms.d.ts +225 -10
- three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -5
- three/src/renderers/webgl/WebGLShadowMap.d.ts +2 -2
- three/src/scenes/Fog.d.ts +1 -1
- three/src/scenes/FogExp2.d.ts +1 -1
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/src/textures/Texture.d.ts +1 -1
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
- three/examples/jsm/objects/BatchedMesh.d.ts +0 -57
- three/examples/jsm/renderers/common/Animation.d.ts +0 -16
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Mesh } from './Mesh.js';
|
|
2
|
+
import { BufferGeometry } from '../core/BufferGeometry.js';
|
|
3
|
+
import { Material } from '../materials/Material.js';
|
|
4
|
+
import { Box3 } from '../math/Box3.js';
|
|
5
|
+
import { Sphere } from '../math/Sphere.js';
|
|
6
|
+
import { Matrix4 } from '../math/Matrix4.js';
|
|
7
|
+
import { Camera } from '../cameras/Camera.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A special version of {@link Mesh} with multi draw batch rendering support. Use {@link BatchedMesh} if you have to
|
|
11
|
+
* render a large number of objects with the same material but with different world transformations and geometry. The
|
|
12
|
+
* usage of {@link BatchedMesh} will help you to reduce the number of draw calls and thus improve the overall rendering
|
|
13
|
+
* performance in your application.
|
|
14
|
+
*
|
|
15
|
+
* If the {@link https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_multi_draw WEBGL_multi_draw extension} is not
|
|
16
|
+
* supported then a less performant callback is used.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const box = new THREE.BoxGeometry( 1, 1, 1 );
|
|
20
|
+
* const sphere = new THREE.BoxGeometry( 1, 1, 1 );
|
|
21
|
+
* const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
|
|
22
|
+
*
|
|
23
|
+
* // initialize and add geometries into the batched mesh
|
|
24
|
+
* const batchedMesh = new BatchedMesh( 10, 5000, 10000, material );
|
|
25
|
+
* const boxId = batchedMesh.addGeometry( box );
|
|
26
|
+
* const sphereId = batchedMesh.addGeometry( sphere );
|
|
27
|
+
*
|
|
28
|
+
* // position the geometries
|
|
29
|
+
* batchedMesh.setMatrixAt( boxId, boxMatrix );
|
|
30
|
+
* batchedMesh.setMatrixAt( sphereId, sphereMatrix );
|
|
31
|
+
*
|
|
32
|
+
* scene.add( batchedMesh );
|
|
33
|
+
*
|
|
34
|
+
* @also Example: {@link https://threejs.org/examples/#webgl_mesh_batch WebGL / mesh / batch}
|
|
35
|
+
*/
|
|
36
|
+
declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
|
|
37
|
+
/**
|
|
38
|
+
* This bounding box encloses all instances of the {@link BatchedMesh}. Can be calculated with
|
|
39
|
+
* {@link .computeBoundingBox()}.
|
|
40
|
+
* @default null
|
|
41
|
+
*/
|
|
42
|
+
boundingBox: Box3 | null;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* This bounding sphere encloses all instances of the {@link BatchedMesh}. Can be calculated with
|
|
46
|
+
* {@link .computeBoundingSphere()}.
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
boundingSphere: Sphere | null;
|
|
50
|
+
|
|
51
|
+
customSort: ((this: this, list: Array<{ start: number; count: number; z: number }>, camera: Camera) => void) | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* If true then the individual objects within the {@link BatchedMesh} are frustum culled.
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
perObjectFrustumCulled: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* If true then the individual objects within the {@link BatchedMesh} are sorted to improve overdraw-related
|
|
61
|
+
* artifacts. If the material is marked as "transparent" objects are rendered back to front and if not then they are
|
|
62
|
+
* rendered front to back.
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
sortObjects: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The maximum number of individual geometries that can be stored in the {@link BatchedMesh}. Read only.
|
|
69
|
+
*/
|
|
70
|
+
get maxGeometryCount(): number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Read-only flag to check if a given object is of type {@link BatchedMesh}.
|
|
74
|
+
*/
|
|
75
|
+
isBatchedMesh: true;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @param maxGeometryCount the max number of individual geometries planned to be added.
|
|
80
|
+
* @param maxVertexCount the max number of vertices to be used by all geometries.
|
|
81
|
+
* @param maxIndexCount the max number of indices to be used by all geometries.
|
|
82
|
+
* @param material an instance of [page:Material]. Default is a new {@link MeshBasicMaterial}.
|
|
83
|
+
*/
|
|
84
|
+
constructor(maxGeometryCount: number, maxVertexCount: number, maxIndexCount?: number, material?: Material);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Computes the bounding box, updating {@link .boundingBox} attribute.
|
|
88
|
+
* Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are `null`.
|
|
89
|
+
*/
|
|
90
|
+
computeBoundingBox(): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Computes the bounding sphere, updating {@link .boundingSphere} attribute.
|
|
94
|
+
* Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are `null`.
|
|
95
|
+
*/
|
|
96
|
+
computeBoundingSphere(): void;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer
|
|
100
|
+
* used in your app.
|
|
101
|
+
*/
|
|
102
|
+
dispose(): this;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Takes a sort a function that is run before render. The function takes a list of items to sort and a camera. The
|
|
106
|
+
* objects in the list include a "z" field to perform a depth-ordered sort with.
|
|
107
|
+
*/
|
|
108
|
+
setCustomSort(
|
|
109
|
+
func: ((this: this, list: Array<{ start: number; count: number; z: number }>, camera: Camera) => void) | null,
|
|
110
|
+
): this;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Get the local transformation matrix of the defined instance.
|
|
114
|
+
* @param index The index of an instance. Values have to be in the range [0, count].
|
|
115
|
+
* @param matrix This 4x4 matrix will be set to the local transformation matrix of the defined instance.
|
|
116
|
+
*/
|
|
117
|
+
getMatrixAt(index: number, matrix: Matrix4): Matrix4;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Get whether the given instance is marked as "visible" or not.
|
|
121
|
+
* @param index The index of an instance. Values have to be in the range [0, count].
|
|
122
|
+
*/
|
|
123
|
+
getVisibleAt(index: number): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Sets the given local transformation matrix to the defined instance. Make sure you set {@link .instanceMatrix}
|
|
127
|
+
* {@link BufferAttribute.needsUpdate} to true after updating all the matrices.
|
|
128
|
+
* @param index The index of an instance. Values have to be in the range [0, count].
|
|
129
|
+
* @param matrix A 4x4 matrix representing the local transformation of a single instance.
|
|
130
|
+
*/
|
|
131
|
+
setMatrixAt(index: number, matrix: Matrix4): this;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sets the visibility of the object at the given index.
|
|
135
|
+
* @param index The index of an instance. Values have to be in the range [0, count].
|
|
136
|
+
* @param visible A boolean value indicating the visibility state.
|
|
137
|
+
*/
|
|
138
|
+
setVisibleAt(index: number, visible: boolean): this;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Adds the given geometry to the {@link BatchedMesh} and returns the associated index referring to it.
|
|
142
|
+
* @param geometry The geometry to add into the {@link BatchedMesh}.
|
|
143
|
+
* @param reservedVertexRange Optional parameter specifying the amount of vertex buffer space to reserve for the
|
|
144
|
+
* added geometry. This is necessary if it is planned to set a new geometry at this index at a later time that is
|
|
145
|
+
* larger than the original geometry. Defaults to the length of the given geometry vertex buffer.
|
|
146
|
+
* @param reservedIndexRange Optional parameter specifying the amount of index buffer space to reserve for the added
|
|
147
|
+
* geometry. This is necessary if it is planned to set a new geometry at this index at a later time that is larger
|
|
148
|
+
* than the original geometry. Defaults to the length of the given geometry index buffer.
|
|
149
|
+
*/
|
|
150
|
+
addGeometry(geometry: BufferGeometry, reservedVertexRange?: number, reservedIndexRange?: number): number;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Replaces the geometry at `index` with the provided geometry. Throws an error if there is not enough space
|
|
154
|
+
* reserved for geometry at the index.
|
|
155
|
+
* @param index Which geometry index to replace with this geometry.
|
|
156
|
+
* @param geometry The geometry to substitute at the given geometry index.
|
|
157
|
+
*/
|
|
158
|
+
setGeometryAt(index: number, geometry: BufferGeometry): number;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Marks the geometry at the given index as deleted and to not be rendered anymore.
|
|
162
|
+
*/
|
|
163
|
+
deleteGeometry(index: number): this;
|
|
164
|
+
|
|
165
|
+
getBoundingBoxAt(index: number, target: Box3): Box3;
|
|
166
|
+
getBoundingSphereAt(index: number, target: Sphere): Sphere;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { BatchedMesh };
|
three/src/objects/Bone.d.ts
CHANGED
three/src/objects/LOD.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Object3D } from '
|
|
2
|
-
import {
|
|
3
|
-
import { Camera } from './../cameras/Camera.js';
|
|
4
|
-
import { Intersection } from '../core/Raycaster.js';
|
|
1
|
+
import { Object3D } from '../core/Object3D.js';
|
|
2
|
+
import { Camera } from '../cameras/Camera.js';
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Every level is associated with an object, and rendering can be switched between them at the distances specified
|
three/src/objects/Line.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Material } from '
|
|
2
|
-
import {
|
|
3
|
-
import { Object3D } from './../core/Object3D.js';
|
|
1
|
+
import { Material } from '../materials/Material.js';
|
|
2
|
+
import { Object3D } from '../core/Object3D.js';
|
|
4
3
|
import { BufferGeometry } from '../core/BufferGeometry.js';
|
|
5
|
-
import { Intersection } from '../core/Raycaster.js';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* A continuous line.
|
three/src/objects/LineLoop.d.ts
CHANGED
three/src/objects/Skeleton.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bone } from './Bone.js';
|
|
2
|
-
import { Matrix4 } from '
|
|
3
|
-
import { DataTexture } from '
|
|
2
|
+
import { Matrix4 } from '../math/Matrix4.js';
|
|
3
|
+
import { DataTexture } from '../textures/DataTexture.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Use an array of {@link Bone | bones} to create a {@link Skeleton} that can be used by a {@link THREE.SkinnedMesh | SkinnedMesh}.
|
|
@@ -61,12 +61,6 @@ export class Skeleton {
|
|
|
61
61
|
*/
|
|
62
62
|
boneTexture: null | DataTexture;
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
|
-
* The size of the {@link boneTexture | .boneTexture}.
|
|
66
|
-
* @remarks Expects a `Integer`
|
|
67
|
-
*/
|
|
68
|
-
boneTextureSize: number;
|
|
69
|
-
|
|
70
64
|
frame: number;
|
|
71
65
|
|
|
72
66
|
init(): void;
|
|
@@ -11,8 +11,7 @@ import { BindMode } from '../constants.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* A mesh that has a {@link THREE.Skeleton | Skeleton} with {@link Bone | bones} that can then be used to animate the vertices of the geometry.
|
|
13
13
|
* @remarks
|
|
14
|
-
* {@link SkinnedMesh} can only be used with WebGL 2
|
|
15
|
-
* With WebGL 1 `OES_texture_float` and vertex textures support is required.
|
|
14
|
+
* {@link SkinnedMesh} can only be used with WebGL 2.
|
|
16
15
|
* @example
|
|
17
16
|
* ```typescript
|
|
18
17
|
* const geometry = new THREE.CylinderGeometry(5, 5, 5, 5, 15, 5, 30);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Data3DTexture } from '../textures/Data3DTexture.js';
|
|
2
|
-
import { WebGLRenderTarget } from './WebGLRenderTarget.js';
|
|
2
|
+
import { WebGLRenderTarget, WebGLRenderTargetOptions } from './WebGLRenderTarget.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents a three-dimensional render target.
|
|
@@ -8,11 +8,13 @@ export class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new WebGL3DRenderTarget.
|
|
10
10
|
*
|
|
11
|
-
* @param width the width of the render target, in pixels.
|
|
12
|
-
* @param height the height of the render target, in pixels.
|
|
13
|
-
* @param depth the depth of the render target.
|
|
11
|
+
* @param width the width of the render target, in pixels. Default is `1`.
|
|
12
|
+
* @param height the height of the render target, in pixels. Default is `1`.
|
|
13
|
+
* @param depth the depth of the render target. Default is `1`.
|
|
14
|
+
* @param options optional object that holds texture parameters for an auto-generated target texture and
|
|
15
|
+
* depthBuffer/stencilBuffer booleans. See {@link WebGLRenderTarget} for details.
|
|
14
16
|
*/
|
|
15
|
-
constructor(width?: number, height?: number, depth?: number);
|
|
17
|
+
constructor(width?: number, height?: number, depth?: number, options?: WebGLRenderTargetOptions);
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* The depth of the render target.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataArrayTexture } from '../textures/DataArrayTexture.js';
|
|
2
|
-
import { WebGLRenderTarget } from './WebGLRenderTarget.js';
|
|
2
|
+
import { WebGLRenderTarget, WebGLRenderTargetOptions } from './WebGLRenderTarget.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This type of render target represents an array of textures.
|
|
@@ -8,11 +8,13 @@ export class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new WebGLArrayRenderTarget.
|
|
10
10
|
*
|
|
11
|
-
* @param width the width of the render target, in pixels.
|
|
12
|
-
* @param height the height of the render target, in pixels.
|
|
13
|
-
* @param depth the depth/layer count of the render target.
|
|
11
|
+
* @param width the width of the render target, in pixels. Default is `1`.
|
|
12
|
+
* @param height the height of the render target, in pixels. Default is `1`.
|
|
13
|
+
* @param depth the depth/layer count of the render target. Default is `1`.
|
|
14
|
+
* @param options optional object that holds texture parameters for an auto-generated target texture and
|
|
15
|
+
* depthBuffer/stencilBuffer booleans. See {@link WebGLRenderTarget} for details.
|
|
14
16
|
*/
|
|
15
|
-
constructor(width?: number, height?: number, depth?: number);
|
|
17
|
+
constructor(width?: number, height?: number, depth?: number, options?: WebGLRenderTargetOptions);
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* The depth of the render target.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WebGLRenderTargetOptions, WebGLRenderTarget } from './WebGLRenderTarget.js';
|
|
2
2
|
import { WebGLRenderer } from './WebGLRenderer.js';
|
|
3
|
-
import { Texture } from '
|
|
4
|
-
import { CubeTexture } from '
|
|
3
|
+
import { Texture } from '../textures/Texture.js';
|
|
4
|
+
import { CubeTexture } from '../textures/CubeTexture.js';
|
|
5
5
|
|
|
6
6
|
export class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
7
7
|
constructor(size?: number, options?: WebGLRenderTargetOptions);
|
|
@@ -5,7 +5,7 @@ import { RenderTarget, RenderTargetOptions } from '../core/RenderTarget.js';
|
|
|
5
5
|
export interface WebGLRenderTargetOptions extends RenderTargetOptions {}
|
|
6
6
|
|
|
7
7
|
export class WebGLRenderTarget<TTexture extends Texture | Texture[] = Texture> extends RenderTarget<TTexture> {
|
|
8
|
-
constructor(width?: number, height?: number, options?:
|
|
8
|
+
constructor(width?: number, height?: number, options?: WebGLRenderTargetOptions);
|
|
9
9
|
|
|
10
10
|
readonly isWebGLRenderTarget: true;
|
|
11
11
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { IUniform } from './UniformsLib.js';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface ShaderLibShader {
|
|
4
4
|
uniforms: { [uniform: string]: IUniform };
|
|
5
5
|
vertexShader: string;
|
|
6
6
|
fragmentShader: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export let ShaderLib: {
|
|
10
|
-
[name: string]:
|
|
11
|
-
basic:
|
|
12
|
-
lambert:
|
|
13
|
-
phong:
|
|
14
|
-
standard:
|
|
15
|
-
matcap:
|
|
16
|
-
points:
|
|
17
|
-
dashed:
|
|
18
|
-
depth:
|
|
19
|
-
normal:
|
|
20
|
-
sprite:
|
|
21
|
-
background:
|
|
22
|
-
cube:
|
|
23
|
-
equirect:
|
|
24
|
-
distanceRGBA:
|
|
25
|
-
shadow:
|
|
26
|
-
physical:
|
|
10
|
+
[name: string]: ShaderLibShader;
|
|
11
|
+
basic: ShaderLibShader;
|
|
12
|
+
lambert: ShaderLibShader;
|
|
13
|
+
phong: ShaderLibShader;
|
|
14
|
+
standard: ShaderLibShader;
|
|
15
|
+
matcap: ShaderLibShader;
|
|
16
|
+
points: ShaderLibShader;
|
|
17
|
+
dashed: ShaderLibShader;
|
|
18
|
+
depth: ShaderLibShader;
|
|
19
|
+
normal: ShaderLibShader;
|
|
20
|
+
sprite: ShaderLibShader;
|
|
21
|
+
background: ShaderLibShader;
|
|
22
|
+
cube: ShaderLibShader;
|
|
23
|
+
equirect: ShaderLibShader;
|
|
24
|
+
distanceRGBA: ShaderLibShader;
|
|
25
|
+
shadow: ShaderLibShader;
|
|
26
|
+
physical: ShaderLibShader;
|
|
27
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { UniformsGroup } from '../../core/UniformsGroup.js';
|
|
2
|
+
import { IUniform } from './UniformsLib.js';
|
|
2
3
|
|
|
3
|
-
export function cloneUniforms(
|
|
4
|
-
export function mergeUniforms(uniforms:
|
|
4
|
+
export function cloneUniforms<T extends { [uniform: string]: IUniform }>(uniformsSrc: T): T;
|
|
5
|
+
export function mergeUniforms(uniforms: Array<{ [uniform: string]: IUniform }>): { [uniform: string]: IUniform };
|
|
5
6
|
|
|
6
7
|
export function cloneUniformsGroups(src: UniformsGroup[]): UniformsGroup[];
|
|
7
8
|
|
|
@@ -2,10 +2,10 @@ import { WebGLExtensions } from './WebGLExtensions.js';
|
|
|
2
2
|
import { WebGLAttributes } from './WebGLAttributes.js';
|
|
3
3
|
import { WebGLProgram } from './WebGLProgram.js';
|
|
4
4
|
import { WebGLCapabilities } from './WebGLCapabilities.js';
|
|
5
|
-
import { Object3D } from '
|
|
6
|
-
import { BufferGeometry } from '
|
|
7
|
-
import { BufferAttribute } from '
|
|
8
|
-
import { Material } from '
|
|
5
|
+
import { Object3D } from '../../core/Object3D.js';
|
|
6
|
+
import { BufferGeometry } from '../../core/BufferGeometry.js';
|
|
7
|
+
import { BufferAttribute } from '../../core/BufferAttribute.js';
|
|
8
|
+
import { Material } from '../../materials/Material.js';
|
|
9
9
|
|
|
10
10
|
export class WebGLBindingStates {
|
|
11
11
|
constructor(
|
|
@@ -11,7 +11,8 @@ export class WebGLBufferRenderer {
|
|
|
11
11
|
capabilities: WebGLCapabilities,
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
setMode(value: any)
|
|
15
|
-
render(start: any, count: number)
|
|
16
|
-
renderInstances(start: any, count: number, primcount: number)
|
|
14
|
+
setMode: (value: any) => void;
|
|
15
|
+
render: (start: any, count: number) => void;
|
|
16
|
+
renderInstances: (start: any, count: number, primcount: number) => void;
|
|
17
|
+
renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
|
|
17
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Camera } from '
|
|
2
|
-
import { Material } from '
|
|
1
|
+
import { Camera } from '../../cameras/Camera.js';
|
|
2
|
+
import { Material } from '../../materials/Material.js';
|
|
3
3
|
import { Plane } from '../../math/Plane.js';
|
|
4
4
|
import { WebGLProperties } from './WebGLProperties.js';
|
|
5
5
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export class WebGLIndexedBufferRenderer {
|
|
2
2
|
constructor(gl: WebGLRenderingContext, extensions: any, info: any, capabilities: any);
|
|
3
3
|
|
|
4
|
-
setMode(value: any)
|
|
5
|
-
setIndex(index: any)
|
|
6
|
-
render(start: any, count: number)
|
|
7
|
-
renderInstances(start: any, count: number, primcount: number)
|
|
4
|
+
setMode: (value: any) => void;
|
|
5
|
+
setIndex: (index: any) => void;
|
|
6
|
+
render: (start: any, count: number) => void;
|
|
7
|
+
renderInstances: (start: any, count: number, primcount: number) => void;
|
|
8
|
+
renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
|
|
8
9
|
}
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import { WebGLExtensions } from './WebGLExtensions.js';
|
|
2
2
|
import { WebGLCapabilities } from './WebGLCapabilities.js';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export interface WebGLLightsState {
|
|
5
|
+
version: number;
|
|
6
|
+
|
|
7
|
+
hash: {
|
|
8
|
+
directionalLength: number;
|
|
9
|
+
pointLength: number;
|
|
10
|
+
spotLength: number;
|
|
11
|
+
rectAreaLength: number;
|
|
12
|
+
hemiLength: number;
|
|
13
|
+
|
|
14
|
+
numDirectionalShadows: number;
|
|
15
|
+
numPointShadows: number;
|
|
16
|
+
numSpotShadows: number;
|
|
17
|
+
numSpotMaps: number;
|
|
6
18
|
|
|
7
|
-
state: {
|
|
8
|
-
version: number;
|
|
9
|
-
|
|
10
|
-
hash: {
|
|
11
|
-
directionalLength: number;
|
|
12
|
-
pointLength: number;
|
|
13
|
-
spotLength: number;
|
|
14
|
-
rectAreaLength: number;
|
|
15
|
-
hemiLength: number;
|
|
16
|
-
|
|
17
|
-
numDirectionalShadows: number;
|
|
18
|
-
numPointShadows: number;
|
|
19
|
-
numSpotShadows: number;
|
|
20
|
-
numSpotMaps: number;
|
|
21
|
-
|
|
22
|
-
numLightProbes: number;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
ambient: number[];
|
|
26
|
-
probe: any[];
|
|
27
|
-
directional: any[];
|
|
28
|
-
directionalShadow: any[];
|
|
29
|
-
directionalShadowMap: any[];
|
|
30
|
-
directionalShadowMatrix: any[];
|
|
31
|
-
spot: any[];
|
|
32
|
-
spotShadow: any[];
|
|
33
|
-
spotShadowMap: any[];
|
|
34
|
-
spotShadowMatrix: any[];
|
|
35
|
-
rectArea: any[];
|
|
36
|
-
point: any[];
|
|
37
|
-
pointShadow: any[];
|
|
38
|
-
pointShadowMap: any[];
|
|
39
|
-
pointShadowMatrix: any[];
|
|
40
|
-
hemi: any[];
|
|
41
|
-
numSpotLightShadowsWithMaps: number;
|
|
42
19
|
numLightProbes: number;
|
|
43
20
|
};
|
|
44
21
|
|
|
22
|
+
ambient: number[];
|
|
23
|
+
probe: any[];
|
|
24
|
+
directional: any[];
|
|
25
|
+
directionalShadow: any[];
|
|
26
|
+
directionalShadowMap: any[];
|
|
27
|
+
directionalShadowMatrix: any[];
|
|
28
|
+
spot: any[];
|
|
29
|
+
spotShadow: any[];
|
|
30
|
+
spotShadowMap: any[];
|
|
31
|
+
spotShadowMatrix: any[];
|
|
32
|
+
rectArea: any[];
|
|
33
|
+
point: any[];
|
|
34
|
+
pointShadow: any[];
|
|
35
|
+
pointShadowMap: any[];
|
|
36
|
+
pointShadowMatrix: any[];
|
|
37
|
+
hemi: any[];
|
|
38
|
+
numSpotLightShadowsWithMaps: number;
|
|
39
|
+
numLightProbes: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class WebGLLights {
|
|
43
|
+
constructor(extensions: WebGLExtensions, capabilities: WebGLCapabilities);
|
|
44
|
+
|
|
45
|
+
state: WebGLLightsState;
|
|
46
|
+
|
|
45
47
|
get(light: any): any;
|
|
46
48
|
setup(lights: any): void;
|
|
47
49
|
setupView(lights: any, camera: any): void;
|