@types/three 0.157.1 → 0.157.2
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/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/FirstPersonControls.d.ts +31 -0
- three/examples/jsm/controls/OrbitControls.d.ts +286 -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/geometries/TextGeometry.d.ts +115 -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/FontLoader.d.ts +27 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +18 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +16 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
- 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/RGBMLoader.d.ts +32 -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/modifiers/TessellateModifier.d.ts +9 -0
- 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/GroundProjectedSkybox.d.ts +13 -0
- three/examples/jsm/objects/MarchingCubes.d.ts +76 -0
- three/examples/jsm/objects/Reflector.d.ts +29 -0
- 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/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/shaders/ACESFilmicToneMappingShader.d.ts +10 -0
- three/examples/jsm/shaders/BokehShader2.d.ts +42 -0
- three/examples/jsm/shaders/ToonShader.d.ts +54 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
- three/examples/jsm/textures/FlakesTexture.d.ts +3 -0
- three/examples/jsm/utils/CameraUtils.d.ts +9 -0
- three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
- three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- three/examples/jsm/utils/ShadowMapViewer.d.ts +24 -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/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 +2 -2
- three/src/extras/Earcut.d.ts +15 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BufferGeometry, Material, Mesh, Color } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class MarchingCubes extends Mesh {
|
|
4
|
+
constructor(
|
|
5
|
+
resolution: number,
|
|
6
|
+
material: Material,
|
|
7
|
+
enableUvs?: boolean,
|
|
8
|
+
enableColors?: boolean,
|
|
9
|
+
maxPolyCount?: number,
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
enableUvs: boolean;
|
|
13
|
+
enableColors: boolean;
|
|
14
|
+
|
|
15
|
+
resolution: number;
|
|
16
|
+
|
|
17
|
+
// parameters
|
|
18
|
+
|
|
19
|
+
isolation: number;
|
|
20
|
+
|
|
21
|
+
// size of field, 32 is pushing it in Javascript :)
|
|
22
|
+
|
|
23
|
+
size: number;
|
|
24
|
+
size2: number;
|
|
25
|
+
size3: number;
|
|
26
|
+
halfsize: number;
|
|
27
|
+
|
|
28
|
+
// deltas
|
|
29
|
+
|
|
30
|
+
delta: number;
|
|
31
|
+
yd: number;
|
|
32
|
+
zd: number;
|
|
33
|
+
|
|
34
|
+
field: Float32Array;
|
|
35
|
+
normal_cache: Float32Array;
|
|
36
|
+
palette: Float32Array;
|
|
37
|
+
|
|
38
|
+
maxCount: number;
|
|
39
|
+
count: number;
|
|
40
|
+
|
|
41
|
+
hasPositions: boolean;
|
|
42
|
+
hasNormals: boolean;
|
|
43
|
+
hasColors: boolean;
|
|
44
|
+
hasUvs: boolean;
|
|
45
|
+
|
|
46
|
+
positionArray: Float32Array;
|
|
47
|
+
normalArray: Float32Array;
|
|
48
|
+
|
|
49
|
+
uvArray: Float32Array;
|
|
50
|
+
colorArray: Float32Array;
|
|
51
|
+
|
|
52
|
+
begin(): void;
|
|
53
|
+
end(): void;
|
|
54
|
+
|
|
55
|
+
init(resolution: number): void;
|
|
56
|
+
|
|
57
|
+
addBall(ballx: number, bally: number, ballz: number, strength: number, subtract: number, colors?: Color): void;
|
|
58
|
+
|
|
59
|
+
addPlaneX(strength: number, subtract: number): void;
|
|
60
|
+
addPlaneY(strength: number, subtract: number): void;
|
|
61
|
+
addPlaneZ(strength: number, subtract: number): void;
|
|
62
|
+
|
|
63
|
+
setCell(x: number, y: number, z: number, value: number): void;
|
|
64
|
+
getCell(x: number, y: number, z: number): number;
|
|
65
|
+
|
|
66
|
+
blur(intensity: number): void;
|
|
67
|
+
|
|
68
|
+
reset(): void;
|
|
69
|
+
update(): void;
|
|
70
|
+
render(renderCallback: any): void;
|
|
71
|
+
generateGeometry(): BufferGeometry;
|
|
72
|
+
generateBufferGeometry(): BufferGeometry;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const edgeTable: Int32Array[];
|
|
76
|
+
export const triTable: Int32Array[];
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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,42 @@
|
|
|
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
|
+
uniforms: BokehShaderUniforms;
|
|
31
|
+
vertexShader: string;
|
|
32
|
+
fragmentShader: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const BokehDepthShader: {
|
|
36
|
+
uniforms: {
|
|
37
|
+
mNear: IUniform;
|
|
38
|
+
mFar: IUniform;
|
|
39
|
+
};
|
|
40
|
+
vertexShader: string;
|
|
41
|
+
fragmentShader: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IUniform } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export const ToonShader1: {
|
|
4
|
+
uniforms: {
|
|
5
|
+
uDirLightPos: IUniform;
|
|
6
|
+
uDirLightColor: IUniform;
|
|
7
|
+
uAmbientLightColor: IUniform;
|
|
8
|
+
uBaseColor: IUniform;
|
|
9
|
+
};
|
|
10
|
+
vertexShader: string;
|
|
11
|
+
fragmentShader: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const ToonShader2: {
|
|
15
|
+
uniforms: {
|
|
16
|
+
uDirLightPos: IUniform;
|
|
17
|
+
uDirLightColor: IUniform;
|
|
18
|
+
uAmbientLightColor: IUniform;
|
|
19
|
+
uBaseColor: IUniform;
|
|
20
|
+
uLineColor1: IUniform;
|
|
21
|
+
uLineColor2: IUniform;
|
|
22
|
+
uLineColor3: IUniform;
|
|
23
|
+
uLineColor4: IUniform;
|
|
24
|
+
};
|
|
25
|
+
vertexShader: string;
|
|
26
|
+
fragmentShader: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const ToonShaderHatching: {
|
|
30
|
+
uniforms: {
|
|
31
|
+
uDirLightPos: IUniform;
|
|
32
|
+
uDirLightColor: IUniform;
|
|
33
|
+
uAmbientLightColor: IUniform;
|
|
34
|
+
uBaseColor: IUniform;
|
|
35
|
+
uLineColor1: IUniform;
|
|
36
|
+
uLineColor2: IUniform;
|
|
37
|
+
uLineColor3: IUniform;
|
|
38
|
+
uLineColor4: IUniform;
|
|
39
|
+
};
|
|
40
|
+
vertexShader: string;
|
|
41
|
+
fragmentShader: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const ToonShaderDotted: {
|
|
45
|
+
uniforms: {
|
|
46
|
+
uDirLightPos: IUniform;
|
|
47
|
+
uDirLightColor: IUniform;
|
|
48
|
+
uAmbientLightColor: IUniform;
|
|
49
|
+
uBaseColor: IUniform;
|
|
50
|
+
uLineColor1: IUniform;
|
|
51
|
+
};
|
|
52
|
+
vertexShader: string;
|
|
53
|
+
fragmentShader: string;
|
|
54
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IUniform, UniformsLib } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export const VelocityShader: {
|
|
4
|
+
uniforms: (typeof UniformsLib)['common'] &
|
|
5
|
+
(typeof UniformsLib)['displacementmap'] & {
|
|
6
|
+
modelMatrixPrev: IUniform;
|
|
7
|
+
currentProjectionViewMatrix: IUniform;
|
|
8
|
+
previousProjectionViewMatrix: IUniform;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
fragmentShader: string;
|
|
12
|
+
vertexShader: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Vector3 } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export function hilbert2D(
|
|
4
|
+
center?: Vector3,
|
|
5
|
+
size?: number,
|
|
6
|
+
iterations?: number,
|
|
7
|
+
v0?: number,
|
|
8
|
+
v1?: number,
|
|
9
|
+
v2?: number,
|
|
10
|
+
v3?: number,
|
|
11
|
+
): Vector3[];
|
|
12
|
+
export function hilbert3D(
|
|
13
|
+
center?: Vector3,
|
|
14
|
+
size?: number,
|
|
15
|
+
iterations?: number,
|
|
16
|
+
v0?: number,
|
|
17
|
+
v1?: number,
|
|
18
|
+
v2?: number,
|
|
19
|
+
v3?: number,
|
|
20
|
+
v4?: number,
|
|
21
|
+
v5?: number,
|
|
22
|
+
v6?: number,
|
|
23
|
+
v7?: number,
|
|
24
|
+
): Vector3[];
|
|
25
|
+
export function gosper(size?: number): number[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Light, Renderer } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface Size {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
set: (width: number, height: number) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Position {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
set: (x: number, y: number) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ShadowMapViewer {
|
|
16
|
+
constructor(light: Light);
|
|
17
|
+
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
size: Size;
|
|
20
|
+
position: Position;
|
|
21
|
+
render(renderer: Renderer): void;
|
|
22
|
+
updateForWindowResize(): void;
|
|
23
|
+
update(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Group, Object3D, Texture } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { GLTFLoader } from '../loaders/GLTFLoader.js';
|
|
4
|
+
|
|
5
|
+
export class XRControllerModel extends Object3D {
|
|
6
|
+
constructor();
|
|
7
|
+
|
|
8
|
+
motionController: any;
|
|
9
|
+
|
|
10
|
+
envMap: Texture;
|
|
11
|
+
|
|
12
|
+
setEnvironmentMap(envMap: Texture): XRControllerModel;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class XRControllerModelFactory {
|
|
16
|
+
constructor(gltfLoader?: GLTFLoader);
|
|
17
|
+
gltfLoader: GLTFLoader | null;
|
|
18
|
+
path: string;
|
|
19
|
+
|
|
20
|
+
createControllerModel(controller: Group): XRControllerModel;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Object3D } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class XRHandMeshModel {
|
|
4
|
+
controller: Object3D;
|
|
5
|
+
handModel: Object3D;
|
|
6
|
+
bones: Object3D[];
|
|
7
|
+
|
|
8
|
+
constructor(handModel: Object3D, controller: Object3D, path: string, handedness: string);
|
|
9
|
+
|
|
10
|
+
updateMesh(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Group, Object3D } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { XRHandPrimitiveModel, XRHandPrimitiveModelOptions } from './XRHandPrimitiveModel.js';
|
|
4
|
+
import { XRHandMeshModel } from './XRHandMeshModel.js';
|
|
5
|
+
|
|
6
|
+
export type XRHandModelHandedness = 'left' | 'right';
|
|
7
|
+
|
|
8
|
+
export class XRHandModel extends Object3D {
|
|
9
|
+
constructor();
|
|
10
|
+
|
|
11
|
+
motionController: XRHandPrimitiveModel | XRHandMeshModel;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class XRHandModelFactory {
|
|
15
|
+
constructor();
|
|
16
|
+
path: string;
|
|
17
|
+
|
|
18
|
+
setPath(path: string): XRHandModelFactory;
|
|
19
|
+
|
|
20
|
+
createHandModel(
|
|
21
|
+
controller: Group,
|
|
22
|
+
profile?: 'spheres' | 'boxes' | 'mesh',
|
|
23
|
+
options?: XRHandPrimitiveModelOptions,
|
|
24
|
+
): XRHandModel;
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Group, Texture } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { XRHandModel, XRHandModelHandedness } from './XRHandModelFactory.js';
|
|
4
|
+
|
|
5
|
+
export interface XRHandPrimitiveModelOptions {
|
|
6
|
+
primitive?: 'sphere' | 'box' | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class XRHandPrimitiveModel {
|
|
10
|
+
controller: Group;
|
|
11
|
+
handModel: XRHandModel;
|
|
12
|
+
envMap: Texture | null;
|
|
13
|
+
handMesh: Group;
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
handModel: XRHandModel,
|
|
17
|
+
controller: Group,
|
|
18
|
+
path: string,
|
|
19
|
+
handedness: XRHandModelHandedness,
|
|
20
|
+
options: XRHandPrimitiveModelOptions,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
updateMesh: () => void;
|
|
24
|
+
}
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.157.
|
|
3
|
+
"version": "0.157.2",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"fflate": "~0.6.10",
|
|
44
44
|
"meshoptimizer": "~0.18.1"
|
|
45
45
|
},
|
|
46
|
-
"typesPublisherContentHash": "
|
|
46
|
+
"typesPublisherContentHash": "793c51304c26c918dd5ee5b103fbcbcf8155af7cb9cceb2837b49309565f40d6",
|
|
47
47
|
"typeScriptVersion": "4.5"
|
|
48
48
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An implementation of the {@link Earcut} polygon triangulation algorithm
|
|
3
|
+
* @remarks
|
|
4
|
+
* The code is a port of {@link https://github.com/mapbox/earcut | mapbox/earcut}.
|
|
5
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/extras/Earcut | Official Documentation}
|
|
6
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/Earcut.js | Source}
|
|
7
|
+
*/
|
|
8
|
+
export const Earcut: {
|
|
9
|
+
/**
|
|
10
|
+
* Triangulates the given shape definition by returning an array of triangles
|
|
11
|
+
* @remarks
|
|
12
|
+
* A triangle is defined by three consecutive integers representing vertex indices.
|
|
13
|
+
*/
|
|
14
|
+
triangulate(data: number[], holeIndices?: number[], dim?: number): number[];
|
|
15
|
+
};
|