@types/three 0.157.1 → 0.158.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 +290 -0
- three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
- three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
- three/examples/jsm/capabilities/WebGL.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +304 -0
- three/examples/jsm/controls/TrackballControls.d.ts +58 -0
- three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
- three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
- three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
- three/examples/jsm/exporters/STLExporter.d.ts +21 -0
- three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
- three/examples/jsm/libs/fflate.module.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
- three/examples/jsm/libs/tween.module.d.ts +219 -0
- three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
- three/examples/jsm/lines/Line2.d.ts +11 -0
- three/examples/jsm/lines/LineGeometry.d.ts +10 -0
- three/examples/jsm/lines/LineMaterial.d.ts +31 -0
- three/examples/jsm/lines/LineSegments2.d.ts +14 -0
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
- three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
- three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +17 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
- three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
- three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
- three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
- three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
- three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
- three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
- three/examples/jsm/loaders/TGALoader.d.ts +7 -0
- three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
- three/examples/jsm/math/Capsule.d.ts +0 -1
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
- three/examples/jsm/nodes/Nodes.d.ts +149 -0
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
- three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
- three/examples/jsm/nodes/core/Node.d.ts +31 -0
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
- three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
- three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
- three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
- three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
- three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
- three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
- three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +78 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
- three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
- three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
- three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
- three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
- three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
- three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/objects/Reflector.d.ts +29 -0
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
- three/examples/jsm/objects/Refractor.d.ts +2 -1
- three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
- three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
- three/examples/jsm/postprocessing/Pass.d.ts +31 -0
- three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
- three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
- three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
- three/examples/jsm/renderers/common/Backend.d.ts +15 -0
- three/examples/jsm/renderers/common/Info.d.ts +15 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
- three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
- three/examples/jsm/shaders/BasicShader.d.ts +1 -0
- three/examples/jsm/shaders/BlendShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader2.d.ts +44 -0
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
- three/examples/jsm/shaders/FocusShader.d.ts +1 -0
- three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
- three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
- three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
- three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
- three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
- three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
- three/examples/jsm/shaders/OutputShader.d.ts +1 -0
- three/examples/jsm/shaders/SAOShader.d.ts +1 -0
- three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
- three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
- three/examples/jsm/shaders/SSRShader.d.ts +3 -0
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
- three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +14 -0
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
- three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
- three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
- three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- three/examples/jsm/webxr/VRButton.d.ts +5 -0
- three/examples/jsm/webxr/XRButton.d.ts +6 -0
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
- three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
- three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
- three/package.json +3 -2
- three/src/cameras/CubeCamera.d.ts +1 -2
- three/src/constants.d.ts +21 -10
- three/src/core/Object3D.d.ts +4 -4
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/Earcut.d.ts +15 -0
- three/src/extras/core/Curve.d.ts +1 -1
- three/src/geometries/CapsuleGeometry.d.ts +1 -1
- three/src/helpers/AxesHelper.d.ts +2 -2
- three/src/helpers/Box3Helper.d.ts +2 -2
- three/src/lights/Light.d.ts +1 -2
- three/src/materials/Material.d.ts +20 -2
- three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Matrix4.d.ts +2 -1
- three/src/objects/SkinnedMesh.d.ts +9 -8
- three/src/renderers/WebGLRenderer.d.ts +12 -2
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/DepthTexture.d.ts +3 -3
- three/src/textures/Texture.d.ts +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Mesh,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
ColorRepresentation,
|
|
5
|
+
TextureEncoding,
|
|
6
|
+
WebGLRenderTarget,
|
|
7
|
+
PerspectiveCamera,
|
|
8
|
+
} from '../../../src/Three.js';
|
|
9
|
+
|
|
10
|
+
export interface ReflectorOptions {
|
|
11
|
+
color?: ColorRepresentation;
|
|
12
|
+
textureWidth?: number;
|
|
13
|
+
textureHeight?: number;
|
|
14
|
+
clipBias?: number;
|
|
15
|
+
shader?: object;
|
|
16
|
+
encoding?: TextureEncoding;
|
|
17
|
+
multisample?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class Reflector extends Mesh {
|
|
21
|
+
type: 'Reflector';
|
|
22
|
+
camera: PerspectiveCamera;
|
|
23
|
+
|
|
24
|
+
constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
|
|
25
|
+
|
|
26
|
+
getRenderTarget(): WebGLRenderTarget;
|
|
27
|
+
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
TextureEncoding,
|
|
6
6
|
WebGLRenderTarget,
|
|
7
7
|
PerspectiveCamera,
|
|
8
|
+
ShaderMaterial,
|
|
8
9
|
} from '../../../src/Three.js';
|
|
9
10
|
|
|
10
11
|
export interface RefractorOptions {
|
|
@@ -17,7 +18,7 @@ export interface RefractorOptions {
|
|
|
17
18
|
multisample?: number;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export class Refractor extends Mesh {
|
|
21
|
+
export class Refractor extends Mesh<BufferGeometry, ShaderMaterial> {
|
|
21
22
|
type: 'Refractor';
|
|
22
23
|
camera: PerspectiveCamera;
|
|
23
24
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Mesh, Vector3 } from '../../../src/Three.js';
|
|
1
|
+
import { Mesh, Object3D, Vector3 } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export interface AmmoPhysicsObject {
|
|
4
|
+
addScene: (scene: Object3D) => void;
|
|
4
5
|
addMesh: (mesh: Mesh, mass?: number) => void;
|
|
5
6
|
setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;
|
|
6
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Mesh } from '../../../src/Three.js';
|
|
1
|
+
import { Mesh, Object3D } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
type Vector = { x: number; y: number; z: number };
|
|
4
4
|
|
|
5
5
|
export interface RapierPhysicsObject {
|
|
6
|
+
addScene: (scene: Object3D) => void;
|
|
6
7
|
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
|
|
7
8
|
setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;
|
|
8
9
|
setMeshVelocity: (mesh: Mesh, velocity: Vector, index?: number) => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Clock, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { Pass, FullScreenQuad } from './Pass.js';
|
|
4
|
+
import { ShaderPass } from './ShaderPass.js';
|
|
5
|
+
|
|
6
|
+
export { FullScreenQuad } from './Pass.js';
|
|
7
|
+
export { Pass };
|
|
8
|
+
|
|
9
|
+
export class EffectComposer {
|
|
10
|
+
constructor(renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget);
|
|
11
|
+
renderer: WebGLRenderer;
|
|
12
|
+
renderTarget1: WebGLRenderTarget;
|
|
13
|
+
renderTarget2: WebGLRenderTarget;
|
|
14
|
+
writeBuffer: WebGLRenderTarget;
|
|
15
|
+
readBuffer: WebGLRenderTarget;
|
|
16
|
+
passes: Pass[];
|
|
17
|
+
copyPass: ShaderPass;
|
|
18
|
+
clock: Clock;
|
|
19
|
+
renderToScreen: boolean;
|
|
20
|
+
|
|
21
|
+
swapBuffers(): void;
|
|
22
|
+
addPass(pass: Pass): void;
|
|
23
|
+
insertPass(pass: Pass, index: number): void;
|
|
24
|
+
removePass(pass: Pass): void;
|
|
25
|
+
isLastEnabledPass(passIndex: number): boolean;
|
|
26
|
+
render(deltaTime?: number): void;
|
|
27
|
+
reset(renderTarget?: WebGLRenderTarget): void;
|
|
28
|
+
setSize(width: number, height: number): void;
|
|
29
|
+
setPixelRatio(pixelRatio: number): void;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Material, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class Pass {
|
|
4
|
+
constructor();
|
|
5
|
+
|
|
6
|
+
isPass: boolean;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
needsSwap: boolean;
|
|
9
|
+
clear: boolean;
|
|
10
|
+
renderToScreen: boolean;
|
|
11
|
+
|
|
12
|
+
setSize(width: number, height: number): void;
|
|
13
|
+
render(
|
|
14
|
+
renderer: WebGLRenderer,
|
|
15
|
+
writeBuffer: WebGLRenderTarget,
|
|
16
|
+
readBuffer: WebGLRenderTarget,
|
|
17
|
+
deltaTime: number,
|
|
18
|
+
maskActive: boolean,
|
|
19
|
+
): void;
|
|
20
|
+
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class FullScreenQuad {
|
|
25
|
+
constructor(material?: Material);
|
|
26
|
+
|
|
27
|
+
render(renderer: WebGLRenderer): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
|
|
30
|
+
material: Material;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { Pass, FullScreenQuad } from './Pass.js';
|
|
4
|
+
|
|
5
|
+
export class SavePass extends Pass {
|
|
6
|
+
constructor(renderTarget?: WebGLRenderTarget);
|
|
7
|
+
textureID: string;
|
|
8
|
+
renderTarget: WebGLRenderTarget;
|
|
9
|
+
uniforms: object;
|
|
10
|
+
material: ShaderMaterial;
|
|
11
|
+
fsQuad: FullScreenQuad;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShaderMaterial } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { Pass, FullScreenQuad } from './Pass.js';
|
|
4
|
+
|
|
5
|
+
export class ShaderPass extends Pass {
|
|
6
|
+
constructor(shader: object, textureID?: string);
|
|
7
|
+
textureID: string;
|
|
8
|
+
uniforms: { [name: string]: { value: any } };
|
|
9
|
+
material: ShaderMaterial;
|
|
10
|
+
fsQuad: FullScreenQuad;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Object3D, Scene, Camera } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class CSS3DObject extends Object3D {
|
|
4
|
+
constructor(element: HTMLElement);
|
|
5
|
+
element: HTMLElement;
|
|
6
|
+
|
|
7
|
+
onBeforeRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
|
|
8
|
+
onAfterRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CSS3DSprite extends CSS3DObject {
|
|
12
|
+
constructor(element: HTMLElement);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CSS3DParameters {
|
|
16
|
+
element?: HTMLElement;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class CSS3DRenderer {
|
|
20
|
+
constructor(parameters?: CSS3DParameters);
|
|
21
|
+
domElement: HTMLElement;
|
|
22
|
+
|
|
23
|
+
getSize(): { width: number; height: number };
|
|
24
|
+
setSize(width: number, height: number): void;
|
|
25
|
+
render(scene: Scene, camera: Camera): void;
|
|
26
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D, Color, Scene, Camera } from '../../../src/Three.js';
|
|
1
|
+
import { Object3D, Color, Scene, Camera, ColorSpace } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export class SVGObject extends Object3D {
|
|
4
4
|
constructor(node: SVGElement);
|
|
@@ -12,6 +12,7 @@ export class SVGRenderer {
|
|
|
12
12
|
sortObjects: boolean;
|
|
13
13
|
sortElements: boolean;
|
|
14
14
|
overdraw: number;
|
|
15
|
+
outputColorSpace: ColorSpace;
|
|
15
16
|
info: { render: { vertices: number; faces: number } };
|
|
16
17
|
|
|
17
18
|
getSize(): { width: number; height: number };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CoordinateSystem } from '../../../../src/Three.js';
|
|
2
|
+
import Renderer from './Renderer.js';
|
|
3
|
+
|
|
4
|
+
export default abstract class Backend {
|
|
5
|
+
renderer: Renderer | null;
|
|
6
|
+
domElement: HTMLCanvasElement | null;
|
|
7
|
+
|
|
8
|
+
constructor(parameters?: { canvas?: HTMLCanvasElement | undefined });
|
|
9
|
+
|
|
10
|
+
init(renderer: Renderer): Promise<void>;
|
|
11
|
+
|
|
12
|
+
abstract get coordinateSystem(): CoordinateSystem;
|
|
13
|
+
|
|
14
|
+
getDomElement(): HTMLCanvasElement;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Object3D } from '../../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export default class Info {
|
|
4
|
+
autoRest: boolean;
|
|
5
|
+
|
|
6
|
+
render: { frame: number; drawCalls: number; triangles: number; points: number; lines: number };
|
|
7
|
+
|
|
8
|
+
memory: { geometries: number; textures: number };
|
|
9
|
+
|
|
10
|
+
update(object: Object3D, count: number, instanceCount: number): void;
|
|
11
|
+
|
|
12
|
+
reset(): void;
|
|
13
|
+
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Camera, ColorSpace, CoordinateSystem, Scene, ToneMapping } from '../../../../src/Three.js';
|
|
2
|
+
import Backend from './Backend.js';
|
|
3
|
+
import Info from './Info.js';
|
|
4
|
+
|
|
5
|
+
export default class Renderer {
|
|
6
|
+
isRenderer: true;
|
|
7
|
+
|
|
8
|
+
domElement: HTMLCanvasElement;
|
|
9
|
+
|
|
10
|
+
backend: Backend;
|
|
11
|
+
|
|
12
|
+
autoClear: boolean;
|
|
13
|
+
autoClearColor: boolean;
|
|
14
|
+
autoClearDepth: boolean;
|
|
15
|
+
autoClearStencil: boolean;
|
|
16
|
+
|
|
17
|
+
outputColorSpace: ColorSpace;
|
|
18
|
+
|
|
19
|
+
toneMapping: ToneMapping;
|
|
20
|
+
toneMappingExposure: number;
|
|
21
|
+
|
|
22
|
+
sortObjects: boolean;
|
|
23
|
+
|
|
24
|
+
depth: boolean;
|
|
25
|
+
stencil: boolean;
|
|
26
|
+
|
|
27
|
+
info: Info;
|
|
28
|
+
|
|
29
|
+
constructor(backend: Backend);
|
|
30
|
+
|
|
31
|
+
init(): Promise<void>;
|
|
32
|
+
|
|
33
|
+
get coordinateSystem(): CoordinateSystem;
|
|
34
|
+
|
|
35
|
+
render(scene: Scene, camera: Camera): Promise<void>;
|
|
36
|
+
|
|
37
|
+
setAnimationLoop(callback: ((time: DOMHighResTimeStamp) => void) | null): void;
|
|
38
|
+
|
|
39
|
+
setPixelRatio(value?: number): void;
|
|
40
|
+
|
|
41
|
+
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Node from '../../../nodes/core/Node.js';
|
|
2
|
+
|
|
3
|
+
export interface SlotNodeParameters<TNode extends Node = Node> {
|
|
4
|
+
node?: TNode;
|
|
5
|
+
nodeType?: string;
|
|
6
|
+
source?: string | null;
|
|
7
|
+
target?: string | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default class SlotNode<TNode extends Node = Node> extends Node {
|
|
11
|
+
inclusionType: 'replace';
|
|
12
|
+
node: TNode | null;
|
|
13
|
+
source: null;
|
|
14
|
+
target: null;
|
|
15
|
+
|
|
16
|
+
constructor(params: SlotNodeParameters<TNode>);
|
|
17
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import NodeBuilder from '../../../nodes/core/NodeBuilder.js';
|
|
2
|
+
import { Renderer, Object3D } from '../../../../../src/Three.js';
|
|
3
|
+
import Node from '../../../nodes/core/Node.js';
|
|
4
|
+
import SlotNode from './SlotNode.js';
|
|
5
|
+
import { NodeShaderStageOption } from '../../../nodes/core/constants.js';
|
|
6
|
+
|
|
7
|
+
export class WebGLNodeBuilder extends NodeBuilder {
|
|
8
|
+
constructor(
|
|
9
|
+
object: Object3D,
|
|
10
|
+
renderer: Renderer,
|
|
11
|
+
shader: { uniforms: any; vertexShader: any; fragmentShader: any },
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
addSlot(shaderStage: NodeShaderStageOption, slotNode: SlotNode): Node;
|
|
15
|
+
|
|
16
|
+
getUniforms(shaderStage: string): string;
|
|
17
|
+
|
|
18
|
+
getAttributes(shaderStage: string): string;
|
|
19
|
+
|
|
20
|
+
getVarys(shaderStage: string): string;
|
|
21
|
+
|
|
22
|
+
addCode(shaderStage: string, source: string, code: string, scope?: this): string;
|
|
23
|
+
addCodeAfterInclude(shaderStage: string, snippet: string, code: string): string;
|
|
24
|
+
|
|
25
|
+
replaceCode(shaderStage: string, source: string, target: string, scope?: this): void;
|
|
26
|
+
parseInclude(shaderStage: string, ...includes: string[]): void;
|
|
27
|
+
|
|
28
|
+
getInstanceIndex(): string;
|
|
29
|
+
getFrontFacing(): string;
|
|
30
|
+
getFragCoord(): 'gl_FragCoord';
|
|
31
|
+
isFlipY(): true;
|
|
32
|
+
|
|
33
|
+
buildCode(): void;
|
|
34
|
+
build(): this;
|
|
35
|
+
|
|
36
|
+
getSlot(shaderStage: string, name: string): Node;
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUniform, Texture } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export const ACESFilmicToneMappingShader: {
|
|
4
|
+
name: string;
|
|
5
|
+
uniforms: {
|
|
6
|
+
tDiffuse: IUniform<Texture>;
|
|
7
|
+
exposure: IUniform<number>;
|
|
8
|
+
};
|
|
9
|
+
vertexShader: string;
|
|
10
|
+
fragmentShader: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IUniform } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface BokehShaderUniforms {
|
|
4
|
+
textureWidth: IUniform;
|
|
5
|
+
textureHeight: IUniform;
|
|
6
|
+
focalDepth: IUniform;
|
|
7
|
+
focalLength: IUniform;
|
|
8
|
+
fstop: IUniform;
|
|
9
|
+
tColor: IUniform;
|
|
10
|
+
tDepth: IUniform;
|
|
11
|
+
maxblur: IUniform;
|
|
12
|
+
showFocus: IUniform;
|
|
13
|
+
manualdof: IUniform;
|
|
14
|
+
vignetting: IUniform;
|
|
15
|
+
depthblur: IUniform;
|
|
16
|
+
threshold: IUniform;
|
|
17
|
+
gain: IUniform;
|
|
18
|
+
bias: IUniform;
|
|
19
|
+
fringe: IUniform;
|
|
20
|
+
znear: IUniform;
|
|
21
|
+
zfar: IUniform;
|
|
22
|
+
noise: IUniform;
|
|
23
|
+
dithering: IUniform;
|
|
24
|
+
pentagon: IUniform;
|
|
25
|
+
shaderFocus: IUniform;
|
|
26
|
+
focusCoords: IUniform;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const BokehShader: {
|
|
30
|
+
name: string;
|
|
31
|
+
uniforms: BokehShaderUniforms;
|
|
32
|
+
vertexShader: string;
|
|
33
|
+
fragmentShader: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const BokehDepthShader: {
|
|
37
|
+
name: string;
|
|
38
|
+
uniforms: {
|
|
39
|
+
mNear: IUniform;
|
|
40
|
+
mFar: IUniform;
|
|
41
|
+
};
|
|
42
|
+
vertexShader: string;
|
|
43
|
+
fragmentShader: string;
|
|
44
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUniform } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export const GodRaysDepthMaskShader: {
|
|
4
|
+
name: string;
|
|
4
5
|
uniforms: {
|
|
5
6
|
tInput: IUniform;
|
|
6
7
|
};
|
|
@@ -9,6 +10,7 @@ export const GodRaysDepthMaskShader: {
|
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export const GodRaysGenerateShader: {
|
|
13
|
+
name: string;
|
|
12
14
|
uniforms: {
|
|
13
15
|
tInput: IUniform;
|
|
14
16
|
fStepSize: IUniform;
|
|
@@ -19,6 +21,7 @@ export const GodRaysGenerateShader: {
|
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const GodRaysCombineShader: {
|
|
24
|
+
name: string;
|
|
22
25
|
uniforms: {
|
|
23
26
|
tColors: IUniform;
|
|
24
27
|
tGodRays: IUniform;
|
|
@@ -29,6 +32,7 @@ export const GodRaysCombineShader: {
|
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export const GodRaysFakeSunShader: {
|
|
35
|
+
name: string;
|
|
32
36
|
uniforms: {
|
|
33
37
|
vSunPositionScreenSpace: IUniform;
|
|
34
38
|
fAspect: IUniform;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUniform } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export const SMAAEdgesShader: {
|
|
4
|
+
name: string;
|
|
4
5
|
defines: {
|
|
5
6
|
SMAA_THRESHOLD: string;
|
|
6
7
|
};
|
|
@@ -13,6 +14,7 @@ export const SMAAEdgesShader: {
|
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export const SMAAWeightsShader: {
|
|
17
|
+
name: string;
|
|
16
18
|
defines: {
|
|
17
19
|
SMAA_MAX_SEARCH_STEPS: string;
|
|
18
20
|
SMAA_AREATEX_MAX_DISTANCE: string;
|
|
@@ -30,6 +32,7 @@ export const SMAAWeightsShader: {
|
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export const SMAABlendShader: {
|
|
35
|
+
name: string;
|
|
33
36
|
uniforms: {
|
|
34
37
|
tDiffuse: IUniform;
|
|
35
38
|
tColor: IUniform;
|