@plastic-software/three 0.178.0 → 0.180.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.
- package/README.md +1 -1
- package/build/three.cjs +950 -230
- package/build/three.core.js +754 -138
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +197 -96
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +99 -25
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +4586 -1499
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +4544 -1499
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/jsm/Addons.js +2 -3
- package/examples/jsm/capabilities/WebGPU.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +7 -7
- package/examples/jsm/controls/DragControls.js +6 -56
- package/examples/jsm/controls/FirstPersonControls.js +2 -2
- package/examples/jsm/controls/PointerLockControls.js +0 -8
- package/examples/jsm/csm/CSMShadowNode.js +4 -4
- package/examples/jsm/environments/RoomEnvironment.js +8 -3
- package/examples/jsm/exporters/GLTFExporter.js +30 -22
- package/examples/jsm/exporters/KTX2Exporter.js +4 -2
- package/examples/jsm/exporters/PLYExporter.js +1 -1
- package/examples/jsm/exporters/USDZExporter.js +676 -299
- package/examples/jsm/geometries/RoundedBoxGeometry.js +47 -8
- package/examples/jsm/interactive/HTMLMesh.js +5 -3
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/libs/meshopt_decoder.module.js +75 -58
- package/examples/jsm/lights/LightProbeGenerator.js +14 -3
- package/examples/jsm/lines/Line2.js +3 -3
- package/examples/jsm/lines/LineGeometry.js +1 -1
- package/examples/jsm/lines/LineSegments2.js +2 -2
- package/examples/jsm/lines/Wireframe.js +2 -2
- package/examples/jsm/lines/WireframeGeometry2.js +1 -1
- package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
- package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
- package/examples/jsm/loaders/ColladaLoader.js +1 -1
- package/examples/jsm/loaders/EXRLoader.js +210 -22
- package/examples/jsm/loaders/FBXLoader.js +1 -1
- package/examples/jsm/loaders/GLTFLoader.js +9 -5
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
- package/examples/jsm/loaders/HDRLoader.js +486 -0
- package/examples/jsm/loaders/KTX2Loader.js +112 -32
- package/examples/jsm/loaders/MaterialXLoader.js +212 -30
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/TTFLoader.js +13 -1
- package/examples/jsm/loaders/USDLoader.js +219 -0
- package/examples/jsm/loaders/USDZLoader.js +4 -892
- package/examples/jsm/loaders/UltraHDRLoader.js +1 -1
- package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
- package/examples/jsm/loaders/usd/USDAParser.js +741 -0
- package/examples/jsm/loaders/usd/USDCParser.js +17 -0
- package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
- package/examples/jsm/math/ColorSpaces.js +19 -1
- package/examples/jsm/math/ConvexHull.js +2 -2
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
- package/examples/jsm/misc/ProgressiveLightMap.js +1 -1
- package/examples/jsm/misc/Volume.js +1 -1
- package/examples/jsm/objects/LensflareMesh.js +3 -3
- package/examples/jsm/objects/SkyMesh.js +2 -2
- package/examples/jsm/physics/RapierPhysics.js +14 -5
- package/examples/jsm/postprocessing/GTAOPass.js +10 -9
- package/examples/jsm/postprocessing/OutlinePass.js +17 -17
- package/examples/jsm/postprocessing/SSAOPass.js +10 -9
- package/examples/jsm/postprocessing/SSRPass.js +37 -8
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +11 -2
- package/examples/jsm/transpiler/GLSLDecoder.js +23 -20
- package/examples/jsm/transpiler/TSLEncoder.js +2 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
- package/examples/jsm/tsl/display/AnamorphicNode.js +27 -4
- package/examples/jsm/tsl/display/BloomNode.js +7 -6
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +439 -90
- package/examples/jsm/tsl/display/GTAONode.js +8 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.js +51 -41
- package/examples/jsm/tsl/display/OutlineNode.js +2 -2
- package/examples/jsm/tsl/display/SSRNode.js +180 -65
- package/examples/jsm/tsl/display/{TRAAPassNode.js → TRAANode.js} +181 -172
- package/examples/jsm/tsl/display/boxBlur.js +64 -0
- package/examples/jsm/tsl/display/hashBlur.js +15 -18
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +1 -1
- package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
- package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
- package/examples/jsm/webxr/OculusHandModel.js +1 -1
- package/package.json +1 -1
- package/src/Three.Core.js +2 -0
- package/src/Three.TSL.js +98 -24
- package/src/animation/AnimationClip.js +17 -2
- package/src/animation/KeyframeTrack.js +1 -1
- package/src/animation/tracks/BooleanKeyframeTrack.js +1 -1
- package/src/animation/tracks/StringKeyframeTrack.js +1 -1
- package/src/cameras/Camera.js +14 -0
- package/src/cameras/OrthographicCamera.js +1 -1
- package/src/cameras/PerspectiveCamera.js +1 -1
- package/src/constants.js +11 -3
- package/src/core/BufferGeometry.js +2 -2
- package/{examples/jsm/misc → src/core}/Timer.js +4 -42
- package/src/extras/PMREMGenerator.js +11 -0
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/lib/earcut.js +1 -1
- package/src/helpers/CameraHelper.js +41 -11
- package/src/helpers/SkeletonHelper.js +35 -6
- package/src/lights/LightShadow.js +21 -8
- package/src/lights/PointLightShadow.js +1 -1
- package/src/lights/webgpu/ProjectorLight.js +1 -1
- package/src/loaders/FileLoader.js +25 -2
- package/src/loaders/ImageBitmapLoader.js +23 -0
- package/src/loaders/Loader.js +14 -0
- package/src/loaders/LoadingManager.js +23 -0
- package/src/materials/Material.js +12 -0
- package/src/materials/MeshBasicMaterial.js +1 -1
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/nodes/Line2NodeMaterial.js +0 -8
- package/src/materials/nodes/NodeMaterial.js +1 -1
- package/src/materials/nodes/PointsNodeMaterial.js +86 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +87 -2
- package/src/math/ColorManagement.js +7 -1
- package/src/math/Frustum.js +19 -8
- package/src/math/FrustumArray.js +10 -5
- package/src/math/Line3.js +129 -2
- package/src/math/Matrix4.js +48 -27
- package/src/math/Spherical.js +2 -2
- package/src/nodes/Nodes.js +4 -0
- package/src/nodes/TSL.js +4 -0
- package/src/nodes/accessors/BufferNode.js +1 -1
- package/src/nodes/accessors/Camera.js +142 -16
- package/src/nodes/accessors/ClippingNode.js +6 -5
- package/src/nodes/accessors/CubeTextureNode.js +2 -2
- package/src/nodes/accessors/InstanceNode.js +3 -1
- package/src/nodes/accessors/Normal.js +11 -11
- package/src/nodes/accessors/Object3DNode.js +1 -1
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +19 -4
- package/src/nodes/accessors/SceneNode.js +1 -1
- package/src/nodes/accessors/StorageTextureNode.js +1 -1
- package/src/nodes/accessors/Texture3DNode.js +13 -0
- package/src/nodes/accessors/TextureNode.js +83 -19
- package/src/nodes/code/FunctionCallNode.js +19 -0
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/ArrayNode.js +12 -0
- package/src/nodes/core/AssignNode.js +6 -2
- package/src/nodes/core/ContextNode.js +44 -1
- package/src/nodes/core/Node.js +30 -22
- package/src/nodes/core/NodeBuilder.js +71 -32
- package/src/nodes/core/NodeFrame.js +1 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +5 -3
- package/src/nodes/core/StackNode.js +71 -4
- package/src/nodes/core/StructNode.js +5 -5
- package/src/nodes/core/StructTypeNode.js +1 -0
- package/src/nodes/core/SubBuildNode.js +2 -2
- package/src/nodes/core/UniformNode.js +79 -14
- package/src/nodes/core/VarNode.js +83 -15
- package/src/nodes/display/FrontFacingNode.js +4 -8
- package/src/nodes/display/PassNode.js +148 -2
- package/src/nodes/display/ScreenNode.js +42 -13
- package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
- package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
- package/src/nodes/display/ViewportTextureNode.js +94 -4
- package/src/nodes/functions/PhysicalLightingModel.js +2 -2
- package/src/nodes/gpgpu/AtomicFunctionNode.js +1 -1
- package/src/nodes/gpgpu/ComputeNode.js +67 -23
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +430 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +28 -3
- package/src/nodes/lighting/LightsNode.js +1 -1
- package/src/nodes/lighting/ProjectorLightNode.js +19 -6
- package/src/nodes/lighting/ShadowFilterNode.js +1 -1
- package/src/nodes/materialx/MaterialXNodes.js +131 -2
- package/src/nodes/materialx/lib/mx_noise.js +165 -1
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/ConditionalNode.js +19 -3
- package/src/nodes/math/MathNode.js +72 -60
- package/src/nodes/math/OperatorNode.js +26 -25
- package/src/nodes/tsl/TSLCore.js +477 -142
- package/src/nodes/utils/DebugNode.js +1 -1
- package/src/nodes/utils/EventNode.js +83 -0
- package/src/nodes/utils/JoinNode.js +3 -1
- package/src/nodes/utils/MemberNode.js +58 -7
- package/src/nodes/utils/RTTNode.js +10 -1
- package/src/nodes/utils/ReflectorNode.js +51 -7
- package/src/nodes/utils/SampleNode.js +12 -2
- package/src/nodes/utils/SplitNode.js +11 -0
- package/src/nodes/utils/Timer.js +0 -47
- package/src/objects/BatchedMesh.js +6 -4
- package/src/objects/LOD.js +1 -1
- package/src/objects/Sprite.js +2 -2
- package/src/renderers/WebGLRenderer.js +21 -31
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +19 -1
- package/src/renderers/common/Bindings.js +21 -18
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/Color4.js +2 -2
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/PostProcessing.js +60 -5
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderObject.js +14 -2
- package/src/renderers/common/Renderer.js +55 -32
- package/src/renderers/common/SampledTexture.js +4 -72
- package/src/renderers/common/Sampler.js +91 -0
- package/src/renderers/common/Storage3DTexture.js +21 -0
- package/src/renderers/common/StorageArrayTexture.js +21 -0
- package/src/renderers/common/StorageTexture.js +19 -0
- package/src/renderers/common/Textures.js +52 -14
- package/src/renderers/common/TimestampQueryPool.js +3 -3
- package/src/renderers/common/XRManager.js +51 -17
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +5 -5
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +21 -11
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +11 -2
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLMaterials.js +6 -6
- package/src/renderers/webgl/WebGLProgram.js +24 -18
- package/src/renderers/webgl/WebGLPrograms.js +4 -4
- package/src/renderers/webgl/WebGLShadowMap.js +11 -1
- package/src/renderers/webgl/WebGLTextures.js +20 -7
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +207 -146
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +112 -19
- package/src/renderers/webgl-fallback/utils/WebGLState.js +1 -1
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +52 -3
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +9 -10
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
- package/src/renderers/webgpu/WebGPUBackend.js +87 -44
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +169 -99
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +35 -31
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +10 -19
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +120 -84
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +3 -3
- package/src/renderers/webgpu/utils/WebGPUUtils.js +2 -17
- package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
- package/src/renderers/webxr/WebXRManager.js +86 -11
- package/src/textures/ExternalTexture.js +56 -0
- package/src/textures/FramebufferTexture.js +2 -2
- package/src/textures/Source.js +12 -2
- package/src/textures/VideoTexture.js +27 -2
- package/examples/jsm/loaders/RGBMLoader.js +0 -1148
|
@@ -446,7 +446,7 @@ function deepCloneAttribute( attribute ) {
|
|
|
446
446
|
* single {@link InterleavedBuffer} instance. All attributes must have compatible types.
|
|
447
447
|
*
|
|
448
448
|
* @param {Array<BufferAttribute>} attributes - The attributes to interleave.
|
|
449
|
-
* @return {Array<InterleavedBufferAttribute>} An array of interleaved attributes. If interleave does not succeed, the method returns `null`.
|
|
449
|
+
* @return {?Array<InterleavedBufferAttribute>} An array of interleaved attributes. If interleave does not succeed, the method returns `null`.
|
|
450
450
|
*/
|
|
451
451
|
function interleaveAttributes( attributes ) {
|
|
452
452
|
|
|
@@ -7,9 +7,10 @@ import {
|
|
|
7
7
|
OrthographicCamera,
|
|
8
8
|
PlaneGeometry,
|
|
9
9
|
Scene,
|
|
10
|
-
|
|
10
|
+
DepthTexture,
|
|
11
|
+
Vector2
|
|
11
12
|
} from 'three';
|
|
12
|
-
import {
|
|
13
|
+
import { uv, uniform, textureLoad } from 'three/tsl';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* This is a helper for visualising a given light's shadow map.
|
|
@@ -60,8 +61,10 @@ class ShadowMapViewer {
|
|
|
60
61
|
|
|
61
62
|
const material = new NodeMaterial();
|
|
62
63
|
|
|
63
|
-
const
|
|
64
|
-
|
|
64
|
+
const textureDimension = uniform( new Vector2() );
|
|
65
|
+
|
|
66
|
+
const shadowMapUniform = textureLoad( new DepthTexture(), uv().flipY().mul( textureDimension ) );
|
|
67
|
+
material.fragmentNode = shadowMapUniform.x.oneMinus();
|
|
65
68
|
|
|
66
69
|
const plane = new PlaneGeometry( frame.width, frame.height );
|
|
67
70
|
const mesh = new Mesh( plane, material );
|
|
@@ -173,7 +176,11 @@ class ShadowMapViewer {
|
|
|
173
176
|
//always end up with the scene's first added shadow casting light's shadowMap
|
|
174
177
|
//in the shader
|
|
175
178
|
//See: https://github.com/mrdoob/three.js/issues/5932
|
|
176
|
-
|
|
179
|
+
|
|
180
|
+
const depthTexture = light.shadow.map.depthTexture;
|
|
181
|
+
|
|
182
|
+
shadowMapUniform.value = depthTexture;
|
|
183
|
+
textureDimension.value.set( depthTexture.width, depthTexture.height );
|
|
177
184
|
|
|
178
185
|
currentAutoClear = renderer.autoClear;
|
|
179
186
|
renderer.autoClear = false; // To allow render overlay
|
|
@@ -122,7 +122,7 @@ class OculusHandModel extends Object3D {
|
|
|
122
122
|
/**
|
|
123
123
|
* Returns the pointer position which is the position of the index finger tip.
|
|
124
124
|
*
|
|
125
|
-
* @return {Vector3
|
|
125
|
+
* @return {?Vector3} The pointer position. Returns `null` if not index finger tip joint was found.
|
|
126
126
|
*/
|
|
127
127
|
getPointerPosition() {
|
|
128
128
|
|
package/package.json
CHANGED
package/src/Three.Core.js
CHANGED
|
@@ -34,6 +34,7 @@ export { CompressedCubeTexture } from './textures/CompressedCubeTexture.js';
|
|
|
34
34
|
export { CubeTexture } from './textures/CubeTexture.js';
|
|
35
35
|
export { CanvasTexture } from './textures/CanvasTexture.js';
|
|
36
36
|
export { DepthTexture } from './textures/DepthTexture.js';
|
|
37
|
+
export { ExternalTexture } from './textures/ExternalTexture.js';
|
|
37
38
|
export { Texture } from './textures/Texture.js';
|
|
38
39
|
export * from './geometries/Geometries.js';
|
|
39
40
|
export * from './materials/Materials.js';
|
|
@@ -103,6 +104,7 @@ export { Raycaster } from './core/Raycaster.js';
|
|
|
103
104
|
export { Layers } from './core/Layers.js';
|
|
104
105
|
export { EventDispatcher } from './core/EventDispatcher.js';
|
|
105
106
|
export { Clock } from './core/Clock.js';
|
|
107
|
+
export { Timer } from './core/Timer.js';
|
|
106
108
|
export { QuaternionLinearInterpolant } from './math/interpolants/QuaternionLinearInterpolant.js';
|
|
107
109
|
export { LinearInterpolant } from './math/interpolants/LinearInterpolant.js';
|
|
108
110
|
export { DiscreteInterpolant } from './math/interpolants/DiscreteInterpolant.js';
|
package/src/Three.TSL.js
CHANGED
|
@@ -2,8 +2,10 @@ import { TSL } from 'three/webgpu';
|
|
|
2
2
|
|
|
3
3
|
export const BRDF_GGX = TSL.BRDF_GGX;
|
|
4
4
|
export const BRDF_Lambert = TSL.BRDF_Lambert;
|
|
5
|
+
export const BasicPointShadowFilter = TSL.BasicPointShadowFilter;
|
|
5
6
|
export const BasicShadowFilter = TSL.BasicShadowFilter;
|
|
6
7
|
export const Break = TSL.Break;
|
|
8
|
+
export const Const = TSL.Const;
|
|
7
9
|
export const Continue = TSL.Continue;
|
|
8
10
|
export const DFGApprox = TSL.DFGApprox;
|
|
9
11
|
export const D_GGX = TSL.D_GGX;
|
|
@@ -13,27 +15,32 @@ export const F_Schlick = TSL.F_Schlick;
|
|
|
13
15
|
export const Fn = TSL.Fn;
|
|
14
16
|
export const INFINITY = TSL.INFINITY;
|
|
15
17
|
export const If = TSL.If;
|
|
16
|
-
export const Switch = TSL.Switch;
|
|
17
18
|
export const Loop = TSL.Loop;
|
|
19
|
+
export const NodeAccess = TSL.NodeAccess;
|
|
18
20
|
export const NodeShaderStage = TSL.NodeShaderStage;
|
|
19
21
|
export const NodeType = TSL.NodeType;
|
|
20
22
|
export const NodeUpdateType = TSL.NodeUpdateType;
|
|
21
|
-
export const NodeAccess = TSL.NodeAccess;
|
|
22
23
|
export const PCFShadowFilter = TSL.PCFShadowFilter;
|
|
23
24
|
export const PCFSoftShadowFilter = TSL.PCFSoftShadowFilter;
|
|
24
25
|
export const PI = TSL.PI;
|
|
25
26
|
export const PI2 = TSL.PI2;
|
|
27
|
+
export const PointShadowFilter = TSL.PointShadowFilter;
|
|
26
28
|
export const Return = TSL.Return;
|
|
27
29
|
export const Schlick_to_F0 = TSL.Schlick_to_F0;
|
|
28
30
|
export const ScriptableNodeResources = TSL.ScriptableNodeResources;
|
|
29
31
|
export const ShaderNode = TSL.ShaderNode;
|
|
32
|
+
export const Stack = TSL.Stack;
|
|
33
|
+
export const Switch = TSL.Switch;
|
|
30
34
|
export const TBNViewMatrix = TSL.TBNViewMatrix;
|
|
31
35
|
export const VSMShadowFilter = TSL.VSMShadowFilter;
|
|
32
36
|
export const V_GGX_SmithCorrelated = TSL.V_GGX_SmithCorrelated;
|
|
37
|
+
export const Var = TSL.Var;
|
|
38
|
+
export const VarIntent = TSL.VarIntent;
|
|
33
39
|
export const abs = TSL.abs;
|
|
34
40
|
export const acesFilmicToneMapping = TSL.acesFilmicToneMapping;
|
|
35
41
|
export const acos = TSL.acos;
|
|
36
42
|
export const add = TSL.add;
|
|
43
|
+
export const addMethodChaining = TSL.addMethodChaining;
|
|
37
44
|
export const addNodeElement = TSL.addNodeElement;
|
|
38
45
|
export const agxToneMapping = TSL.agxToneMapping;
|
|
39
46
|
export const all = TSL.all;
|
|
@@ -53,13 +60,13 @@ export const atan2 = TSL.atan2;
|
|
|
53
60
|
export const atomicAdd = TSL.atomicAdd;
|
|
54
61
|
export const atomicAnd = TSL.atomicAnd;
|
|
55
62
|
export const atomicFunc = TSL.atomicFunc;
|
|
63
|
+
export const atomicLoad = TSL.atomicLoad;
|
|
56
64
|
export const atomicMax = TSL.atomicMax;
|
|
57
65
|
export const atomicMin = TSL.atomicMin;
|
|
58
66
|
export const atomicOr = TSL.atomicOr;
|
|
59
67
|
export const atomicStore = TSL.atomicStore;
|
|
60
68
|
export const atomicSub = TSL.atomicSub;
|
|
61
69
|
export const atomicXor = TSL.atomicXor;
|
|
62
|
-
export const atomicLoad = TSL.atomicLoad;
|
|
63
70
|
export const attenuationColor = TSL.attenuationColor;
|
|
64
71
|
export const attenuationDistance = TSL.attenuationDistance;
|
|
65
72
|
export const attribute = TSL.attribute;
|
|
@@ -90,6 +97,7 @@ export const buffer = TSL.buffer;
|
|
|
90
97
|
export const bufferAttribute = TSL.bufferAttribute;
|
|
91
98
|
export const bumpMap = TSL.bumpMap;
|
|
92
99
|
export const burn = TSL.burn;
|
|
100
|
+
export const builtin = TSL.builtin;
|
|
93
101
|
export const bvec2 = TSL.bvec2;
|
|
94
102
|
export const bvec3 = TSL.bvec3;
|
|
95
103
|
export const bvec4 = TSL.bvec4;
|
|
@@ -104,6 +112,7 @@ export const cameraPosition = TSL.cameraPosition;
|
|
|
104
112
|
export const cameraProjectionMatrix = TSL.cameraProjectionMatrix;
|
|
105
113
|
export const cameraProjectionMatrixInverse = TSL.cameraProjectionMatrixInverse;
|
|
106
114
|
export const cameraViewMatrix = TSL.cameraViewMatrix;
|
|
115
|
+
export const cameraViewport = TSL.cameraViewport;
|
|
107
116
|
export const cameraWorldMatrix = TSL.cameraWorldMatrix;
|
|
108
117
|
export const cbrt = TSL.cbrt;
|
|
109
118
|
export const cdl = TSL.cdl;
|
|
@@ -112,15 +121,15 @@ export const checker = TSL.checker;
|
|
|
112
121
|
export const cineonToneMapping = TSL.cineonToneMapping;
|
|
113
122
|
export const clamp = TSL.clamp;
|
|
114
123
|
export const clearcoat = TSL.clearcoat;
|
|
124
|
+
export const clearcoatNormalView = TSL.clearcoatNormalView;
|
|
115
125
|
export const clearcoatRoughness = TSL.clearcoatRoughness;
|
|
116
126
|
export const code = TSL.code;
|
|
117
127
|
export const color = TSL.color;
|
|
118
128
|
export const colorSpaceToWorking = TSL.colorSpaceToWorking;
|
|
119
129
|
export const colorToDirection = TSL.colorToDirection;
|
|
120
130
|
export const compute = TSL.compute;
|
|
131
|
+
export const computeKernel = TSL.computeKernel;
|
|
121
132
|
export const computeSkinning = TSL.computeSkinning;
|
|
122
|
-
export const cond = TSL.cond;
|
|
123
|
-
export const Const = TSL.Const;
|
|
124
133
|
export const context = TSL.context;
|
|
125
134
|
export const convert = TSL.convert;
|
|
126
135
|
export const convertColorSpace = TSL.convertColorSpace;
|
|
@@ -128,6 +137,8 @@ export const convertToTexture = TSL.convertToTexture;
|
|
|
128
137
|
export const cos = TSL.cos;
|
|
129
138
|
export const cross = TSL.cross;
|
|
130
139
|
export const cubeTexture = TSL.cubeTexture;
|
|
140
|
+
export const cubeTextureBase = TSL.cubeTextureBase;
|
|
141
|
+
export const cubeToUV = TSL.cubeToUV;
|
|
131
142
|
export const dFdx = TSL.dFdx;
|
|
132
143
|
export const dFdy = TSL.dFdy;
|
|
133
144
|
export const dashSize = TSL.dashSize;
|
|
@@ -143,10 +154,12 @@ export const densityFog = TSL.densityFog;
|
|
|
143
154
|
export const densityFogFactor = TSL.densityFogFactor;
|
|
144
155
|
export const depth = TSL.depth;
|
|
145
156
|
export const depthPass = TSL.depthPass;
|
|
157
|
+
export const determinant = TSL.determinant;
|
|
146
158
|
export const difference = TSL.difference;
|
|
147
159
|
export const diffuseColor = TSL.diffuseColor;
|
|
148
160
|
export const directPointLight = TSL.directPointLight;
|
|
149
161
|
export const directionToColor = TSL.directionToColor;
|
|
162
|
+
export const directionToFaceDirection = TSL.directionToFaceDirection;
|
|
150
163
|
export const dispersion = TSL.dispersion;
|
|
151
164
|
export const distance = TSL.distance;
|
|
152
165
|
export const div = TSL.div;
|
|
@@ -166,6 +179,8 @@ export const faceDirection = TSL.faceDirection;
|
|
|
166
179
|
export const faceForward = TSL.faceForward;
|
|
167
180
|
export const faceforward = TSL.faceforward;
|
|
168
181
|
export const float = TSL.float;
|
|
182
|
+
export const floatBitsToInt = TSL.floatBitsToInt;
|
|
183
|
+
export const floatBitsToUint = TSL.floatBitsToUint;
|
|
169
184
|
export const floor = TSL.floor;
|
|
170
185
|
export const fog = TSL.fog;
|
|
171
186
|
export const fract = TSL.fract;
|
|
@@ -185,10 +200,11 @@ export const getParallaxCorrectNormal = TSL.getParallaxCorrectNormal;
|
|
|
185
200
|
export const getRoughness = TSL.getRoughness;
|
|
186
201
|
export const getScreenPosition = TSL.getScreenPosition;
|
|
187
202
|
export const getShIrradianceAt = TSL.getShIrradianceAt;
|
|
188
|
-
export const getTextureIndex = TSL.getTextureIndex;
|
|
189
|
-
export const getViewPosition = TSL.getViewPosition;
|
|
190
203
|
export const getShadowMaterial = TSL.getShadowMaterial;
|
|
191
204
|
export const getShadowRenderObjectFunction = TSL.getShadowRenderObjectFunction;
|
|
205
|
+
export const getTextureIndex = TSL.getTextureIndex;
|
|
206
|
+
export const getViewPosition = TSL.getViewPosition;
|
|
207
|
+
export const globalId = TSL.globalId;
|
|
192
208
|
export const glsl = TSL.glsl;
|
|
193
209
|
export const glslFn = TSL.glslFn;
|
|
194
210
|
export const grayscale = TSL.grayscale;
|
|
@@ -207,6 +223,8 @@ export const instancedBufferAttribute = TSL.instancedBufferAttribute;
|
|
|
207
223
|
export const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribute;
|
|
208
224
|
export const instancedMesh = TSL.instancedMesh;
|
|
209
225
|
export const int = TSL.int;
|
|
226
|
+
export const intBitsToFloat = TSL.intBitsToFloat;
|
|
227
|
+
export const inverse = TSL.inverse;
|
|
210
228
|
export const inverseSqrt = TSL.inverseSqrt;
|
|
211
229
|
export const inversesqrt = TSL.inversesqrt;
|
|
212
230
|
export const invocationLocalIndex = TSL.invocationLocalIndex;
|
|
@@ -225,6 +243,7 @@ export const lengthSq = TSL.lengthSq;
|
|
|
225
243
|
export const lessThan = TSL.lessThan;
|
|
226
244
|
export const lessThanEqual = TSL.lessThanEqual;
|
|
227
245
|
export const lightPosition = TSL.lightPosition;
|
|
246
|
+
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
228
247
|
export const lightShadowMatrix = TSL.lightShadowMatrix;
|
|
229
248
|
export const lightTargetDirection = TSL.lightTargetDirection;
|
|
230
249
|
export const lightTargetPosition = TSL.lightTargetPosition;
|
|
@@ -234,13 +253,10 @@ export const lights = TSL.lights;
|
|
|
234
253
|
export const linearDepth = TSL.linearDepth;
|
|
235
254
|
export const linearToneMapping = TSL.linearToneMapping;
|
|
236
255
|
export const localId = TSL.localId;
|
|
237
|
-
export const globalId = TSL.globalId;
|
|
238
256
|
export const log = TSL.log;
|
|
239
257
|
export const log2 = TSL.log2;
|
|
240
258
|
export const logarithmicDepthToViewZ = TSL.logarithmicDepthToViewZ;
|
|
241
|
-
export const loop = TSL.loop;
|
|
242
259
|
export const luminance = TSL.luminance;
|
|
243
|
-
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
244
260
|
export const mat2 = TSL.mat2;
|
|
245
261
|
export const mat3 = TSL.mat3;
|
|
246
262
|
export const mat4 = TSL.mat4;
|
|
@@ -257,6 +273,8 @@ export const materialClearcoatRoughness = TSL.materialClearcoatRoughness;
|
|
|
257
273
|
export const materialColor = TSL.materialColor;
|
|
258
274
|
export const materialDispersion = TSL.materialDispersion;
|
|
259
275
|
export const materialEmissive = TSL.materialEmissive;
|
|
276
|
+
export const materialEnvIntensity = TSL.materialEnvIntensity;
|
|
277
|
+
export const materialEnvRotation = TSL.materialEnvRotation;
|
|
260
278
|
export const materialIOR = TSL.materialIOR;
|
|
261
279
|
export const materialIridescence = TSL.materialIridescence;
|
|
262
280
|
export const materialIridescenceIOR = TSL.materialIridescenceIOR;
|
|
@@ -287,6 +305,7 @@ export const materialThickness = TSL.materialThickness;
|
|
|
287
305
|
export const materialTransmission = TSL.materialTransmission;
|
|
288
306
|
export const max = TSL.max;
|
|
289
307
|
export const maxMipLevel = TSL.maxMipLevel;
|
|
308
|
+
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
290
309
|
export const metalness = TSL.metalness;
|
|
291
310
|
export const min = TSL.min;
|
|
292
311
|
export const mix = TSL.mix;
|
|
@@ -307,24 +326,45 @@ export const morphReference = TSL.morphReference;
|
|
|
307
326
|
export const mrt = TSL.mrt;
|
|
308
327
|
export const mul = TSL.mul;
|
|
309
328
|
export const mx_aastep = TSL.mx_aastep;
|
|
329
|
+
export const mx_add = TSL.mx_add;
|
|
330
|
+
export const mx_atan2 = TSL.mx_atan2;
|
|
310
331
|
export const mx_cell_noise_float = TSL.mx_cell_noise_float;
|
|
311
332
|
export const mx_contrast = TSL.mx_contrast;
|
|
333
|
+
export const mx_divide = TSL.mx_divide;
|
|
312
334
|
export const mx_fractal_noise_float = TSL.mx_fractal_noise_float;
|
|
313
335
|
export const mx_fractal_noise_vec2 = TSL.mx_fractal_noise_vec2;
|
|
314
336
|
export const mx_fractal_noise_vec3 = TSL.mx_fractal_noise_vec3;
|
|
315
337
|
export const mx_fractal_noise_vec4 = TSL.mx_fractal_noise_vec4;
|
|
338
|
+
export const mx_frame = TSL.mx_frame;
|
|
339
|
+
export const mx_heighttonormal = TSL.mx_heighttonormal;
|
|
316
340
|
export const mx_hsvtorgb = TSL.mx_hsvtorgb;
|
|
341
|
+
export const mx_ifequal = TSL.mx_ifequal;
|
|
342
|
+
export const mx_ifgreater = TSL.mx_ifgreater;
|
|
343
|
+
export const mx_ifgreatereq = TSL.mx_ifgreatereq;
|
|
344
|
+
export const mx_invert = TSL.mx_invert;
|
|
345
|
+
export const mx_modulo = TSL.mx_modulo;
|
|
346
|
+
export const mx_multiply = TSL.mx_multiply;
|
|
317
347
|
export const mx_noise_float = TSL.mx_noise_float;
|
|
318
348
|
export const mx_noise_vec3 = TSL.mx_noise_vec3;
|
|
319
349
|
export const mx_noise_vec4 = TSL.mx_noise_vec4;
|
|
350
|
+
export const mx_place2d = TSL.mx_place2d;
|
|
351
|
+
export const mx_power = TSL.mx_power;
|
|
352
|
+
export const mx_ramp4 = TSL.mx_ramp4;
|
|
320
353
|
export const mx_ramplr = TSL.mx_ramplr;
|
|
321
354
|
export const mx_ramptb = TSL.mx_ramptb;
|
|
322
355
|
export const mx_rgbtohsv = TSL.mx_rgbtohsv;
|
|
356
|
+
export const mx_rotate2d = TSL.mx_rotate2d;
|
|
357
|
+
export const mx_rotate3d = TSL.mx_rotate3d;
|
|
323
358
|
export const mx_safepower = TSL.mx_safepower;
|
|
359
|
+
export const mx_separate = TSL.mx_separate;
|
|
324
360
|
export const mx_splitlr = TSL.mx_splitlr;
|
|
325
361
|
export const mx_splittb = TSL.mx_splittb;
|
|
326
362
|
export const mx_srgb_texture_to_lin_rec709 = TSL.mx_srgb_texture_to_lin_rec709;
|
|
363
|
+
export const mx_subtract = TSL.mx_subtract;
|
|
364
|
+
export const mx_timer = TSL.mx_timer;
|
|
327
365
|
export const mx_transform_uv = TSL.mx_transform_uv;
|
|
366
|
+
export const mx_unifiednoise2d = TSL.mx_unifiednoise2d;
|
|
367
|
+
export const mx_unifiednoise3d = TSL.mx_unifiednoise3d;
|
|
328
368
|
export const mx_worley_noise_float = TSL.mx_worley_noise_float;
|
|
329
369
|
export const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
|
|
330
370
|
export const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
|
|
@@ -333,8 +373,10 @@ export const neutralToneMapping = TSL.neutralToneMapping;
|
|
|
333
373
|
export const nodeArray = TSL.nodeArray;
|
|
334
374
|
export const nodeImmutable = TSL.nodeImmutable;
|
|
335
375
|
export const nodeObject = TSL.nodeObject;
|
|
376
|
+
export const nodeObjectIntent = TSL.nodeObjectIntent;
|
|
336
377
|
export const nodeObjects = TSL.nodeObjects;
|
|
337
378
|
export const nodeProxy = TSL.nodeProxy;
|
|
379
|
+
export const nodeProxyIntent = TSL.nodeProxyIntent;
|
|
338
380
|
export const normalFlat = TSL.normalFlat;
|
|
339
381
|
export const normalGeometry = TSL.normalGeometry;
|
|
340
382
|
export const normalLocal = TSL.normalLocal;
|
|
@@ -354,6 +396,8 @@ export const objectRadius = TSL.objectRadius;
|
|
|
354
396
|
export const objectScale = TSL.objectScale;
|
|
355
397
|
export const objectViewPosition = TSL.objectViewPosition;
|
|
356
398
|
export const objectWorldMatrix = TSL.objectWorldMatrix;
|
|
399
|
+
export const OnObjectUpdate = TSL.OnObjectUpdate;
|
|
400
|
+
export const OnMaterialUpdate = TSL.OnMaterialUpdate;
|
|
357
401
|
export const oneMinus = TSL.oneMinus;
|
|
358
402
|
export const or = TSL.or;
|
|
359
403
|
export const orthographicDepthToViewZ = TSL.orthographicDepthToViewZ;
|
|
@@ -374,6 +418,7 @@ export const passTexture = TSL.passTexture;
|
|
|
374
418
|
export const pcurve = TSL.pcurve;
|
|
375
419
|
export const perspectiveDepthToViewZ = TSL.perspectiveDepthToViewZ;
|
|
376
420
|
export const pmremTexture = TSL.pmremTexture;
|
|
421
|
+
export const pointShadow = TSL.pointShadow;
|
|
377
422
|
export const pointUV = TSL.pointUV;
|
|
378
423
|
export const pointWidth = TSL.pointWidth;
|
|
379
424
|
export const positionGeometry = TSL.positionGeometry;
|
|
@@ -396,7 +441,6 @@ export const range = TSL.range;
|
|
|
396
441
|
export const rangeFog = TSL.rangeFog;
|
|
397
442
|
export const rangeFogFactor = TSL.rangeFogFactor;
|
|
398
443
|
export const reciprocal = TSL.reciprocal;
|
|
399
|
-
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
400
444
|
export const reference = TSL.reference;
|
|
401
445
|
export const referenceBuffer = TSL.referenceBuffer;
|
|
402
446
|
export const reflect = TSL.reflect;
|
|
@@ -407,7 +451,6 @@ export const refract = TSL.refract;
|
|
|
407
451
|
export const refractVector = TSL.refractVector;
|
|
408
452
|
export const refractView = TSL.refractView;
|
|
409
453
|
export const reinhardToneMapping = TSL.reinhardToneMapping;
|
|
410
|
-
export const remainder = TSL.remainder;
|
|
411
454
|
export const remap = TSL.remap;
|
|
412
455
|
export const remapClamp = TSL.remapClamp;
|
|
413
456
|
export const renderGroup = TSL.renderGroup;
|
|
@@ -427,18 +470,19 @@ export const saturate = TSL.saturate;
|
|
|
427
470
|
export const saturation = TSL.saturation;
|
|
428
471
|
export const screen = TSL.screen;
|
|
429
472
|
export const screenCoordinate = TSL.screenCoordinate;
|
|
473
|
+
export const screenDPR = TSL.screenDPR;
|
|
430
474
|
export const screenSize = TSL.screenSize;
|
|
431
475
|
export const screenUV = TSL.screenUV;
|
|
432
476
|
export const scriptable = TSL.scriptable;
|
|
433
477
|
export const scriptableValue = TSL.scriptableValue;
|
|
434
478
|
export const select = TSL.select;
|
|
435
479
|
export const setCurrentStack = TSL.setCurrentStack;
|
|
480
|
+
export const setName = TSL.setName;
|
|
436
481
|
export const shaderStages = TSL.shaderStages;
|
|
437
482
|
export const shadow = TSL.shadow;
|
|
438
|
-
export const pointShadow = TSL.pointShadow;
|
|
439
483
|
export const shadowPositionWorld = TSL.shadowPositionWorld;
|
|
440
|
-
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
441
484
|
export const shapeCircle = TSL.shapeCircle;
|
|
485
|
+
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
442
486
|
export const sheen = TSL.sheen;
|
|
443
487
|
export const sheenRoughness = TSL.sheenRoughness;
|
|
444
488
|
export const shiftLeft = TSL.shiftLeft;
|
|
@@ -458,6 +502,7 @@ export const spritesheetUV = TSL.spritesheetUV;
|
|
|
458
502
|
export const sqrt = TSL.sqrt;
|
|
459
503
|
export const stack = TSL.stack;
|
|
460
504
|
export const step = TSL.step;
|
|
505
|
+
export const stepElement = TSL.stepElement;
|
|
461
506
|
export const storage = TSL.storage;
|
|
462
507
|
export const storageBarrier = TSL.storageBarrier;
|
|
463
508
|
export const storageObject = TSL.storageObject;
|
|
@@ -465,15 +510,35 @@ export const storageTexture = TSL.storageTexture;
|
|
|
465
510
|
export const string = TSL.string;
|
|
466
511
|
export const struct = TSL.struct;
|
|
467
512
|
export const sub = TSL.sub;
|
|
513
|
+
export const subgroupAdd = TSL.subgroupAdd;
|
|
514
|
+
export const subgroupAll = TSL.subgroupAll;
|
|
515
|
+
export const subgroupAnd = TSL.subgroupAnd;
|
|
516
|
+
export const subgroupAny = TSL.subgroupAny;
|
|
517
|
+
export const subgroupBallot = TSL.subgroupBallot;
|
|
518
|
+
export const subgroupBroadcast = TSL.subgroupBroadcast;
|
|
519
|
+
export const subgroupBroadcastFirst = TSL.subgroupBroadcastFirst;
|
|
468
520
|
export const subBuild = TSL.subBuild;
|
|
521
|
+
export const subgroupElect = TSL.subgroupElect;
|
|
522
|
+
export const subgroupExclusiveAdd = TSL.subgroupExclusiveAdd;
|
|
523
|
+
export const subgroupExclusiveMul = TSL.subgroupExclusiveMul;
|
|
524
|
+
export const subgroupInclusiveAdd = TSL.subgroupInclusiveAdd;
|
|
525
|
+
export const subgroupInclusiveMul = TSL.subgroupInclusiveMul;
|
|
469
526
|
export const subgroupIndex = TSL.subgroupIndex;
|
|
527
|
+
export const subgroupMax = TSL.subgroupMax;
|
|
528
|
+
export const subgroupMin = TSL.subgroupMin;
|
|
529
|
+
export const subgroupMul = TSL.subgroupMul;
|
|
530
|
+
export const subgroupOr = TSL.subgroupOr;
|
|
531
|
+
export const subgroupShuffle = TSL.subgroupShuffle;
|
|
532
|
+
export const subgroupShuffleDown = TSL.subgroupShuffleDown;
|
|
533
|
+
export const subgroupShuffleUp = TSL.subgroupShuffleUp;
|
|
534
|
+
export const subgroupShuffleXor = TSL.subgroupShuffleXor;
|
|
470
535
|
export const subgroupSize = TSL.subgroupSize;
|
|
536
|
+
export const subgroupXor = TSL.subgroupXor;
|
|
471
537
|
export const tan = TSL.tan;
|
|
472
538
|
export const tangentGeometry = TSL.tangentGeometry;
|
|
473
539
|
export const tangentLocal = TSL.tangentLocal;
|
|
474
540
|
export const tangentView = TSL.tangentView;
|
|
475
541
|
export const tangentWorld = TSL.tangentWorld;
|
|
476
|
-
export const temp = TSL.temp;
|
|
477
542
|
export const texture = TSL.texture;
|
|
478
543
|
export const texture3D = TSL.texture3D;
|
|
479
544
|
export const textureBarrier = TSL.textureBarrier;
|
|
@@ -485,9 +550,6 @@ export const textureSize = TSL.textureSize;
|
|
|
485
550
|
export const textureStore = TSL.textureStore;
|
|
486
551
|
export const thickness = TSL.thickness;
|
|
487
552
|
export const time = TSL.time;
|
|
488
|
-
export const timerDelta = TSL.timerDelta;
|
|
489
|
-
export const timerGlobal = TSL.timerGlobal;
|
|
490
|
-
export const timerLocal = TSL.timerLocal;
|
|
491
553
|
export const toneMapping = TSL.toneMapping;
|
|
492
554
|
export const toneMappingExposure = TSL.toneMappingExposure;
|
|
493
555
|
export const toonOutlinePass = TSL.toonOutlinePass;
|
|
@@ -503,21 +565,20 @@ export const triNoise3D = TSL.triNoise3D;
|
|
|
503
565
|
export const triplanarTexture = TSL.triplanarTexture;
|
|
504
566
|
export const triplanarTextures = TSL.triplanarTextures;
|
|
505
567
|
export const trunc = TSL.trunc;
|
|
506
|
-
export const tslFn = TSL.tslFn;
|
|
507
568
|
export const uint = TSL.uint;
|
|
569
|
+
export const uintBitsToFloat = TSL.uintBitsToFloat;
|
|
508
570
|
export const uniform = TSL.uniform;
|
|
509
|
-
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
510
571
|
export const uniformArray = TSL.uniformArray;
|
|
572
|
+
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
511
573
|
export const uniformGroup = TSL.uniformGroup;
|
|
574
|
+
export const uniformFlow = TSL.uniformFlow;
|
|
512
575
|
export const uniformTexture = TSL.uniformTexture;
|
|
513
|
-
export const uniforms = TSL.uniforms;
|
|
514
576
|
export const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
|
|
515
577
|
export const userData = TSL.userData;
|
|
516
578
|
export const uv = TSL.uv;
|
|
517
579
|
export const uvec2 = TSL.uvec2;
|
|
518
580
|
export const uvec3 = TSL.uvec3;
|
|
519
581
|
export const uvec4 = TSL.uvec4;
|
|
520
|
-
export const Var = TSL.Var;
|
|
521
582
|
export const varying = TSL.varying;
|
|
522
583
|
export const varyingProperty = TSL.varyingProperty;
|
|
523
584
|
export const vec2 = TSL.vec2;
|
|
@@ -527,12 +588,12 @@ export const vectorComponents = TSL.vectorComponents;
|
|
|
527
588
|
export const velocity = TSL.velocity;
|
|
528
589
|
export const vertexColor = TSL.vertexColor;
|
|
529
590
|
export const vertexIndex = TSL.vertexIndex;
|
|
591
|
+
export const vertexStage = TSL.vertexStage;
|
|
530
592
|
export const vibrance = TSL.vibrance;
|
|
531
593
|
export const viewZToLogarithmicDepth = TSL.viewZToLogarithmicDepth;
|
|
532
594
|
export const viewZToOrthographicDepth = TSL.viewZToOrthographicDepth;
|
|
533
595
|
export const viewZToPerspectiveDepth = TSL.viewZToPerspectiveDepth;
|
|
534
596
|
export const viewport = TSL.viewport;
|
|
535
|
-
export const viewportBottomLeft = TSL.viewportBottomLeft;
|
|
536
597
|
export const viewportCoordinate = TSL.viewportCoordinate;
|
|
537
598
|
export const viewportDepthTexture = TSL.viewportDepthTexture;
|
|
538
599
|
export const viewportLinearDepth = TSL.viewportLinearDepth;
|
|
@@ -542,7 +603,6 @@ export const viewportSafeUV = TSL.viewportSafeUV;
|
|
|
542
603
|
export const viewportSharedTexture = TSL.viewportSharedTexture;
|
|
543
604
|
export const viewportSize = TSL.viewportSize;
|
|
544
605
|
export const viewportTexture = TSL.viewportTexture;
|
|
545
|
-
export const viewportTopLeft = TSL.viewportTopLeft;
|
|
546
606
|
export const viewportUV = TSL.viewportUV;
|
|
547
607
|
export const wgsl = TSL.wgsl;
|
|
548
608
|
export const wgslFn = TSL.wgslFn;
|
|
@@ -551,3 +611,17 @@ export const workgroupBarrier = TSL.workgroupBarrier;
|
|
|
551
611
|
export const workgroupId = TSL.workgroupId;
|
|
552
612
|
export const workingToColorSpace = TSL.workingToColorSpace;
|
|
553
613
|
export const xor = TSL.xor;
|
|
614
|
+
|
|
615
|
+
/*
|
|
616
|
+
// Use this code to generate the export statements dynamically
|
|
617
|
+
|
|
618
|
+
let code = '';
|
|
619
|
+
|
|
620
|
+
for ( const key of Object.keys( THREE.TSL ) ) {
|
|
621
|
+
|
|
622
|
+
code += `export const ${ key } = TSL.${ key };\n`;
|
|
623
|
+
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
console.log( code );
|
|
627
|
+
//*/
|
|
@@ -67,6 +67,14 @@ class AnimationClip {
|
|
|
67
67
|
*/
|
|
68
68
|
this.uuid = generateUUID();
|
|
69
69
|
|
|
70
|
+
/**
|
|
71
|
+
* An object that can be used to store custom data about the animation clip.
|
|
72
|
+
* It should not hold references to functions as these will not be cloned.
|
|
73
|
+
*
|
|
74
|
+
* @type {Object}
|
|
75
|
+
*/
|
|
76
|
+
this.userData = {};
|
|
77
|
+
|
|
70
78
|
// this means it should figure out its duration by scanning the tracks
|
|
71
79
|
if ( this.duration < 0 ) {
|
|
72
80
|
|
|
@@ -98,6 +106,8 @@ class AnimationClip {
|
|
|
98
106
|
const clip = new this( json.name, json.duration, tracks, json.blendMode );
|
|
99
107
|
clip.uuid = json.uuid;
|
|
100
108
|
|
|
109
|
+
clip.userData = JSON.parse( json.userData || '{}' );
|
|
110
|
+
|
|
101
111
|
return clip;
|
|
102
112
|
|
|
103
113
|
}
|
|
@@ -120,7 +130,8 @@ class AnimationClip {
|
|
|
120
130
|
'duration': clip.duration,
|
|
121
131
|
'tracks': tracks,
|
|
122
132
|
'uuid': clip.uuid,
|
|
123
|
-
'blendMode': clip.blendMode
|
|
133
|
+
'blendMode': clip.blendMode,
|
|
134
|
+
'userData': JSON.stringify( clip.userData ),
|
|
124
135
|
|
|
125
136
|
};
|
|
126
137
|
|
|
@@ -515,7 +526,11 @@ class AnimationClip {
|
|
|
515
526
|
|
|
516
527
|
}
|
|
517
528
|
|
|
518
|
-
|
|
529
|
+
const clip = new this.constructor( this.name, this.duration, tracks, this.blendMode );
|
|
530
|
+
|
|
531
|
+
clip.userData = JSON.parse( JSON.stringify( this.userData ) );
|
|
532
|
+
|
|
533
|
+
return clip;
|
|
519
534
|
|
|
520
535
|
}
|
|
521
536
|
|
|
@@ -20,7 +20,7 @@ class KeyframeTrack {
|
|
|
20
20
|
*
|
|
21
21
|
* @param {string} name - The keyframe track's name.
|
|
22
22
|
* @param {Array<number>} times - A list of keyframe times.
|
|
23
|
-
* @param {Array<number>} values - A list of keyframe values.
|
|
23
|
+
* @param {Array<number|string|boolean>} values - A list of keyframe values.
|
|
24
24
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
25
25
|
*/
|
|
26
26
|
constructor( name, times, values, interpolation ) {
|
|
@@ -16,7 +16,7 @@ class BooleanKeyframeTrack extends KeyframeTrack {
|
|
|
16
16
|
*
|
|
17
17
|
* @param {string} name - The keyframe track's name.
|
|
18
18
|
* @param {Array<number>} times - A list of keyframe times.
|
|
19
|
-
* @param {Array<
|
|
19
|
+
* @param {Array<boolean>} values - A list of keyframe values.
|
|
20
20
|
*/
|
|
21
21
|
constructor( name, times, values ) {
|
|
22
22
|
|
|
@@ -16,7 +16,7 @@ class StringKeyframeTrack extends KeyframeTrack {
|
|
|
16
16
|
*
|
|
17
17
|
* @param {string} name - The keyframe track's name.
|
|
18
18
|
* @param {Array<number>} times - A list of keyframe times.
|
|
19
|
-
* @param {Array<
|
|
19
|
+
* @param {Array<string>} values - A list of keyframe values.
|
|
20
20
|
*/
|
|
21
21
|
constructor( name, times, values ) {
|
|
22
22
|
|
package/src/cameras/Camera.js
CHANGED
|
@@ -57,6 +57,20 @@ class Camera extends Object3D {
|
|
|
57
57
|
*/
|
|
58
58
|
this.coordinateSystem = WebGLCoordinateSystem;
|
|
59
59
|
|
|
60
|
+
this._reversedDepth = false;
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The flag that indicates whether the camera uses a reversed depth buffer.
|
|
66
|
+
*
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
get reversedDepth() {
|
|
71
|
+
|
|
72
|
+
return this._reversedDepth;
|
|
73
|
+
|
|
60
74
|
}
|
|
61
75
|
|
|
62
76
|
copy( source, recursive ) {
|
|
@@ -216,7 +216,7 @@ class OrthographicCamera extends Camera {
|
|
|
216
216
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem );
|
|
219
|
+
this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem, this.reversedDepth );
|
|
220
220
|
|
|
221
221
|
this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
|
|
222
222
|
|
|
@@ -374,7 +374,7 @@ class PerspectiveCamera extends Camera {
|
|
|
374
374
|
const skew = this.filmOffset;
|
|
375
375
|
if ( skew !== 0 ) left += near * skew / this.getFilmWidth();
|
|
376
376
|
|
|
377
|
-
this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem );
|
|
377
|
+
this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem, this.reversedDepth );
|
|
378
378
|
|
|
379
379
|
this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
|
|
380
380
|
|
package/src/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const REVISION = '
|
|
1
|
+
export const REVISION = '180';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents mouse buttons and interaction types in context of controls.
|
|
@@ -724,6 +724,14 @@ export const UnsignedInt248Type = 1020;
|
|
|
724
724
|
*/
|
|
725
725
|
export const UnsignedInt5999Type = 35902;
|
|
726
726
|
|
|
727
|
+
/**
|
|
728
|
+
* An unsigned int 10_11_11 (packed) data type for textures.
|
|
729
|
+
*
|
|
730
|
+
* @type {number}
|
|
731
|
+
* @constant
|
|
732
|
+
*/
|
|
733
|
+
export const UnsignedInt101111Type = 35899;
|
|
734
|
+
|
|
727
735
|
/**
|
|
728
736
|
* Discards the red, green and blue components and reads just the alpha component.
|
|
729
737
|
*
|
|
@@ -1665,6 +1673,6 @@ export const InterpolationSamplingMode = {
|
|
|
1665
1673
|
* @property {string} NORMAL - Normal sampling mode.
|
|
1666
1674
|
* @property {string} CENTROID - Centroid sampling mode.
|
|
1667
1675
|
* @property {string} SAMPLE - Sample-specific sampling mode.
|
|
1668
|
-
* @property {string}
|
|
1669
|
-
* @property {string}
|
|
1676
|
+
* @property {string} FIRST - Flat interpolation using the first vertex.
|
|
1677
|
+
* @property {string} EITHER - Flat interpolation using either vertex.
|
|
1670
1678
|
*/
|
|
@@ -156,7 +156,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
156
156
|
/**
|
|
157
157
|
* Bounding box for the geometry which can be calculated with `computeBoundingBox()`.
|
|
158
158
|
*
|
|
159
|
-
* @type {Box3}
|
|
159
|
+
* @type {?Box3}
|
|
160
160
|
* @default null
|
|
161
161
|
*/
|
|
162
162
|
this.boundingBox = null;
|
|
@@ -164,7 +164,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
164
164
|
/**
|
|
165
165
|
* Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`.
|
|
166
166
|
*
|
|
167
|
-
* @type {Sphere}
|
|
167
|
+
* @type {?Sphere}
|
|
168
168
|
* @default null
|
|
169
169
|
*/
|
|
170
170
|
this.boundingSphere = null;
|