@plastic-software/three 0.175.14 → 0.179.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 +4 -4
- package/build/three.cjs +8402 -6787
- package/build/three.core.js +8007 -6688
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +397 -102
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +84 -27
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +6831 -2838
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +6648 -2838
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/jsm/Addons.js +1 -3
- package/examples/jsm/animation/AnimationClipCreator.js +1 -0
- package/examples/jsm/animation/CCDIKSolver.js +6 -3
- package/examples/jsm/capabilities/WebGL.js +1 -27
- package/examples/jsm/capabilities/WebGPU.js +2 -1
- package/examples/jsm/controls/ArcballControls.js +15 -4
- package/examples/jsm/controls/DragControls.js +1 -0
- package/examples/jsm/controls/FirstPersonControls.js +1 -0
- package/examples/jsm/controls/FlyControls.js +1 -0
- package/examples/jsm/controls/MapControls.js +1 -0
- package/examples/jsm/controls/OrbitControls.js +1 -0
- package/examples/jsm/controls/PointerLockControls.js +5 -3
- package/examples/jsm/controls/TrackballControls.js +1 -0
- package/examples/jsm/controls/TransformControls.js +62 -14
- package/examples/jsm/csm/CSM.js +2 -0
- package/examples/jsm/csm/CSMFrustum.js +2 -0
- package/examples/jsm/csm/CSMHelper.js +1 -0
- package/examples/jsm/csm/CSMShader.js +4 -1
- package/examples/jsm/csm/CSMShadowNode.js +22 -8
- package/examples/jsm/curves/CurveExtras.js +14 -0
- package/examples/jsm/curves/NURBSCurve.js +1 -0
- package/examples/jsm/curves/NURBSSurface.js +2 -0
- package/examples/jsm/curves/NURBSUtils.js +4 -1
- package/examples/jsm/curves/NURBSVolume.js +2 -0
- package/examples/jsm/effects/AnaglyphEffect.js +2 -0
- package/examples/jsm/effects/AsciiEffect.js +2 -0
- package/examples/jsm/effects/OutlineEffect.js +2 -0
- package/examples/jsm/effects/ParallaxBarrierEffect.js +2 -0
- package/examples/jsm/effects/StereoEffect.js +2 -0
- package/examples/jsm/environments/DebugEnvironment.js +1 -0
- package/examples/jsm/environments/RoomEnvironment.js +57 -38
- package/examples/jsm/exporters/DRACOExporter.js +4 -2
- package/examples/jsm/exporters/EXRExporter.js +2 -0
- package/examples/jsm/exporters/GLTFExporter.js +7 -4
- package/examples/jsm/exporters/KTX2Exporter.js +2 -0
- package/examples/jsm/exporters/OBJExporter.js +3 -1
- package/examples/jsm/exporters/PLYExporter.js +4 -2
- package/examples/jsm/exporters/STLExporter.js +2 -0
- package/examples/jsm/exporters/USDZExporter.js +679 -300
- package/examples/jsm/geometries/BoxLineGeometry.js +1 -0
- package/examples/jsm/geometries/ConvexGeometry.js +1 -0
- package/examples/jsm/geometries/DecalGeometry.js +1 -0
- package/examples/jsm/geometries/ParametricFunctions.js +4 -1
- package/examples/jsm/geometries/ParametricGeometry.js +1 -0
- package/examples/jsm/geometries/RoundedBoxGeometry.js +48 -8
- package/examples/jsm/geometries/TeapotGeometry.js +1 -0
- package/examples/jsm/geometries/TextGeometry.js +1 -0
- package/examples/jsm/helpers/LightProbeHelper.js +1 -0
- package/examples/jsm/helpers/LightProbeHelperGPU.js +1 -0
- package/examples/jsm/helpers/OctreeHelper.js +1 -0
- package/examples/jsm/helpers/PositionalAudioHelper.js +1 -0
- package/examples/jsm/helpers/RapierHelper.js +59 -0
- package/examples/jsm/helpers/RectAreaLightHelper.js +1 -0
- package/examples/jsm/helpers/TextureHelper.js +1 -0
- package/examples/jsm/helpers/TextureHelperGPU.js +5 -4
- package/examples/jsm/helpers/VertexNormalsHelper.js +1 -0
- package/examples/jsm/helpers/VertexTangentsHelper.js +1 -0
- package/examples/jsm/helpers/ViewHelper.js +1 -0
- package/examples/jsm/interactive/HTMLMesh.js +11 -2
- package/examples/jsm/interactive/InteractiveGroup.js +1 -0
- package/examples/jsm/interactive/SelectionBox.js +2 -0
- package/examples/jsm/interactive/SelectionHelper.js +2 -0
- package/examples/jsm/libs/meshopt_decoder.module.js +75 -58
- package/examples/jsm/lighting/TiledLighting.js +1 -0
- package/examples/jsm/lights/LightProbeGenerator.js +15 -3
- package/examples/jsm/lights/RectAreaLightTexturesLib.js +1 -0
- package/examples/jsm/lights/RectAreaLightUniformsLib.js +1 -0
- package/examples/jsm/lines/Line2.js +1 -0
- package/examples/jsm/lines/LineGeometry.js +1 -0
- package/examples/jsm/lines/LineMaterial.js +4 -4
- package/examples/jsm/lines/LineSegments2.js +1 -0
- package/examples/jsm/lines/LineSegmentsGeometry.js +1 -0
- package/examples/jsm/lines/Wireframe.js +1 -0
- package/examples/jsm/lines/WireframeGeometry2.js +1 -0
- package/examples/jsm/lines/webgpu/Line2.js +1 -0
- package/examples/jsm/lines/webgpu/LineSegments2.js +3 -1
- package/examples/jsm/lines/webgpu/Wireframe.js +1 -0
- package/examples/jsm/loaders/3DMLoader.js +1 -0
- package/examples/jsm/loaders/3MFLoader.js +1 -0
- package/examples/jsm/loaders/AMFLoader.js +1 -0
- package/examples/jsm/loaders/BVHLoader.js +1 -0
- package/examples/jsm/loaders/ColladaLoader.js +6 -5
- package/examples/jsm/loaders/DDSLoader.js +1 -0
- package/examples/jsm/loaders/DRACOLoader.js +2 -1
- package/examples/jsm/loaders/EXRLoader.js +211 -22
- package/examples/jsm/loaders/FBXLoader.js +25 -23
- package/examples/jsm/loaders/FontLoader.js +1 -0
- package/examples/jsm/loaders/GCodeLoader.js +1 -0
- package/examples/jsm/loaders/GLTFLoader.js +10 -82
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +1 -0
- package/examples/jsm/loaders/IESLoader.js +1 -0
- package/examples/jsm/loaders/KMZLoader.js +1 -0
- package/examples/jsm/loaders/KTX2Loader.js +67 -26
- package/examples/jsm/loaders/KTXLoader.js +1 -0
- package/examples/jsm/loaders/LDrawLoader.js +55 -3
- package/examples/jsm/loaders/LUT3dlLoader.js +1 -0
- package/examples/jsm/loaders/LUTCubeLoader.js +1 -0
- package/examples/jsm/loaders/LUTImageLoader.js +1 -0
- package/examples/jsm/loaders/LWOLoader.js +1 -13
- package/examples/jsm/loaders/LottieLoader.js +15 -0
- package/examples/jsm/loaders/MD2Loader.js +1 -0
- package/examples/jsm/loaders/MDDLoader.js +1 -0
- package/examples/jsm/loaders/MTLLoader.js +4 -3
- package/examples/jsm/loaders/MaterialXLoader.js +213 -30
- package/examples/jsm/loaders/NRRDLoader.js +1 -0
- package/examples/jsm/loaders/OBJLoader.js +1 -0
- package/examples/jsm/loaders/PCDLoader.js +122 -19
- package/examples/jsm/loaders/PDBLoader.js +1 -0
- package/examples/jsm/loaders/PLYLoader.js +1 -0
- package/examples/jsm/loaders/PVRLoader.js +1 -0
- package/examples/jsm/loaders/RGBELoader.js +1 -0
- package/examples/jsm/loaders/RGBMLoader.js +1 -0
- package/examples/jsm/loaders/STLLoader.js +1 -0
- package/examples/jsm/loaders/SVGLoader.js +1 -0
- package/examples/jsm/loaders/TDSLoader.js +1 -0
- package/examples/jsm/loaders/TGALoader.js +1 -0
- package/examples/jsm/loaders/TIFFLoader.js +1 -0
- package/examples/jsm/loaders/TTFLoader.js +14 -1
- package/examples/jsm/loaders/USDLoader.js +219 -0
- package/examples/jsm/loaders/USDZLoader.js +4 -891
- package/examples/jsm/loaders/UltraHDRLoader.js +1 -0
- package/examples/jsm/loaders/VOXLoader.js +1 -0
- package/examples/jsm/loaders/VRMLLoader.js +3 -2
- package/examples/jsm/loaders/VTKLoader.js +1 -0
- package/examples/jsm/loaders/XYZLoader.js +1 -0
- package/examples/jsm/loaders/lwo/IFFParser.js +74 -74
- package/examples/jsm/loaders/usd/USDAParser.js +741 -0
- package/examples/jsm/loaders/usd/USDCParser.js +17 -0
- package/examples/jsm/materials/LDrawConditionalLineMaterial.js +1 -0
- package/examples/jsm/materials/LDrawConditionalLineNodeMaterial.js +1 -0
- package/examples/jsm/materials/MeshPostProcessingMaterial.js +1 -0
- package/examples/jsm/math/Capsule.js +2 -0
- package/examples/jsm/math/ColorConverter.js +1 -0
- package/examples/jsm/math/ConvexHull.js +2 -0
- package/examples/jsm/math/ImprovedNoise.js +19 -14
- package/examples/jsm/math/Lut.js +2 -0
- package/examples/jsm/math/MeshSurfaceSampler.js +2 -0
- package/examples/jsm/math/OBB.js +2 -0
- package/examples/jsm/math/Octree.js +20 -1
- package/examples/jsm/math/SimplexNoise.js +2 -0
- package/examples/jsm/misc/ConvexObjectBreaker.js +3 -1
- package/examples/jsm/misc/GPUComputationRenderer.js +2 -0
- package/examples/jsm/misc/Gyroscope.js +1 -0
- package/examples/jsm/misc/MD2Character.js +2 -0
- package/examples/jsm/misc/MD2CharacterComplex.js +5 -3
- package/examples/jsm/misc/MorphAnimMesh.js +1 -0
- package/examples/jsm/misc/MorphBlendMesh.js +1 -0
- package/examples/jsm/misc/ProgressiveLightMap.js +2 -0
- package/examples/jsm/misc/ProgressiveLightMapGPU.js +2 -0
- package/examples/jsm/misc/RollerCoaster.js +5 -0
- package/examples/jsm/misc/TubePainter.js +1 -0
- package/examples/jsm/misc/Volume.js +2 -0
- package/examples/jsm/misc/VolumeSlice.js +1 -0
- package/examples/jsm/modifiers/CurveModifier.js +3 -0
- package/examples/jsm/modifiers/CurveModifierGPU.js +2 -0
- package/examples/jsm/modifiers/EdgeSplitModifier.js +2 -0
- package/examples/jsm/modifiers/SimplifyModifier.js +2 -0
- package/examples/jsm/modifiers/TessellateModifier.js +2 -0
- package/examples/jsm/objects/GroundedSkybox.js +1 -0
- package/examples/jsm/objects/Lensflare.js +3 -0
- package/examples/jsm/objects/LensflareMesh.js +4 -3
- package/examples/jsm/objects/MarchingCubes.js +2 -0
- package/examples/jsm/objects/Reflector.js +1 -0
- package/examples/jsm/objects/ReflectorForSSRPass.js +1 -0
- package/examples/jsm/objects/Refractor.js +1 -0
- package/examples/jsm/objects/ShadowMesh.js +1 -0
- package/examples/jsm/objects/Sky.js +2 -1
- package/examples/jsm/objects/SkyMesh.js +22 -19
- package/examples/jsm/objects/Water.js +1 -0
- package/examples/jsm/objects/Water2.js +1 -0
- package/examples/jsm/objects/Water2Mesh.js +3 -1
- package/examples/jsm/objects/WaterMesh.js +2 -1
- package/examples/jsm/physics/AmmoPhysics.js +1 -0
- package/examples/jsm/physics/JoltPhysics.js +1 -0
- package/examples/jsm/physics/RapierPhysics.js +149 -13
- package/examples/jsm/postprocessing/AfterimagePass.js +20 -2
- package/examples/jsm/postprocessing/BloomPass.js +2 -1
- package/examples/jsm/postprocessing/BokehPass.js +2 -1
- package/examples/jsm/postprocessing/ClearPass.js +1 -0
- package/examples/jsm/postprocessing/CubeTexturePass.js +1 -0
- package/examples/jsm/postprocessing/DotScreenPass.js +1 -0
- package/examples/jsm/postprocessing/EffectComposer.js +4 -2
- package/examples/jsm/postprocessing/FXAAPass.js +40 -0
- package/examples/jsm/postprocessing/FilmPass.js +1 -0
- package/examples/jsm/postprocessing/GTAOPass.js +14 -12
- package/examples/jsm/postprocessing/GlitchPass.js +2 -1
- package/examples/jsm/postprocessing/HalftonePass.js +2 -1
- package/examples/jsm/postprocessing/LUTPass.js +1 -0
- package/examples/jsm/postprocessing/MaskPass.js +1 -0
- package/examples/jsm/postprocessing/OutlinePass.js +22 -19
- package/examples/jsm/postprocessing/OutputPass.js +1 -0
- package/examples/jsm/postprocessing/Pass.js +3 -1
- package/examples/jsm/postprocessing/RenderPass.js +1 -0
- package/examples/jsm/postprocessing/RenderPixelatedPass.js +2 -1
- package/examples/jsm/postprocessing/RenderTransitionPass.js +4 -3
- package/examples/jsm/postprocessing/SAOPass.js +3 -2
- package/examples/jsm/postprocessing/SMAAPass.js +3 -2
- package/examples/jsm/postprocessing/SSAARenderPass.js +2 -1
- package/examples/jsm/postprocessing/SSAOPass.js +12 -10
- package/examples/jsm/postprocessing/SSRPass.js +4 -3
- package/examples/jsm/postprocessing/SavePass.js +2 -1
- package/examples/jsm/postprocessing/ShaderPass.js +1 -0
- package/examples/jsm/postprocessing/TAARenderPass.js +1 -0
- package/examples/jsm/postprocessing/TexturePass.js +1 -0
- package/examples/jsm/postprocessing/UnrealBloomPass.js +2 -1
- package/examples/jsm/renderers/CSS2DRenderer.js +3 -0
- package/examples/jsm/renderers/CSS3DRenderer.js +4 -0
- package/examples/jsm/renderers/Projector.js +2 -0
- package/examples/jsm/renderers/SVGRenderer.js +3 -0
- package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +4 -1
- package/examples/jsm/shaders/AfterimageShader.js +4 -1
- package/examples/jsm/shaders/BasicShader.js +4 -1
- package/examples/jsm/shaders/BleachBypassShader.js +4 -1
- package/examples/jsm/shaders/BlendShader.js +4 -1
- package/examples/jsm/shaders/BokehShader.js +4 -1
- package/examples/jsm/shaders/BokehShader2.js +4 -1
- package/examples/jsm/shaders/BrightnessContrastShader.js +4 -1
- package/examples/jsm/shaders/ColorCorrectionShader.js +4 -1
- package/examples/jsm/shaders/ColorifyShader.js +4 -1
- package/examples/jsm/shaders/ConvolutionShader.js +4 -1
- package/examples/jsm/shaders/CopyShader.js +4 -1
- package/examples/jsm/shaders/DOFMipMapShader.js +4 -1
- package/examples/jsm/shaders/DepthLimitedBlurShader.js +4 -1
- package/examples/jsm/shaders/DigitalGlitch.js +4 -1
- package/examples/jsm/shaders/DotScreenShader.js +4 -1
- package/examples/jsm/shaders/ExposureShader.js +4 -1
- package/examples/jsm/shaders/FXAAShader.js +4 -1
- package/examples/jsm/shaders/FilmShader.js +4 -1
- package/examples/jsm/shaders/FocusShader.js +4 -1
- package/examples/jsm/shaders/FreiChenShader.js +4 -1
- package/examples/jsm/shaders/GTAOShader.js +4 -1
- package/examples/jsm/shaders/GammaCorrectionShader.js +4 -1
- package/examples/jsm/shaders/GodRaysShader.js +4 -1
- package/examples/jsm/shaders/HalftoneShader.js +4 -1
- package/examples/jsm/shaders/HorizontalBlurShader.js +4 -1
- package/examples/jsm/shaders/HorizontalTiltShiftShader.js +4 -1
- package/examples/jsm/shaders/HueSaturationShader.js +4 -1
- package/examples/jsm/shaders/KaleidoShader.js +4 -1
- package/examples/jsm/shaders/LuminosityHighPassShader.js +4 -1
- package/examples/jsm/shaders/LuminosityShader.js +4 -1
- package/examples/jsm/shaders/MirrorShader.js +4 -1
- package/examples/jsm/shaders/NormalMapShader.js +4 -1
- package/examples/jsm/shaders/OutputShader.js +4 -1
- package/examples/jsm/shaders/PoissonDenoiseShader.js +4 -1
- package/examples/jsm/shaders/RGBShiftShader.js +4 -1
- package/examples/jsm/shaders/SAOShader.js +4 -1
- package/examples/jsm/shaders/SMAAShader.js +1 -0
- package/examples/jsm/shaders/SSAOShader.js +4 -1
- package/examples/jsm/shaders/SSRShader.js +1 -0
- package/examples/jsm/shaders/SepiaShader.js +4 -1
- package/examples/jsm/shaders/SobelOperatorShader.js +4 -1
- package/examples/jsm/shaders/SubsurfaceScatteringShader.js +4 -1
- package/examples/jsm/shaders/TechnicolorShader.js +4 -1
- package/examples/jsm/shaders/ToonShader.js +2 -1
- package/examples/jsm/shaders/TriangleBlurShader.js +4 -1
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +15 -3
- package/examples/jsm/shaders/VelocityShader.js +4 -1
- package/examples/jsm/shaders/VerticalBlurShader.js +4 -1
- package/examples/jsm/shaders/VerticalTiltShiftShader.js +4 -1
- package/examples/jsm/shaders/VignetteShader.js +4 -1
- package/examples/jsm/shaders/VolumeShader.js +5 -2
- package/examples/jsm/shaders/WaterRefractionShader.js +4 -1
- package/examples/jsm/textures/FlakesTexture.js +2 -0
- package/examples/jsm/transpiler/AST.js +381 -30
- package/examples/jsm/transpiler/GLSLDecoder.js +227 -88
- package/examples/jsm/transpiler/Linker.js +327 -0
- package/examples/jsm/transpiler/TSLEncoder.js +234 -85
- package/examples/jsm/transpiler/Transpiler.js +19 -1
- package/examples/jsm/transpiler/TranspilerUtils.js +29 -0
- package/examples/jsm/transpiler/WGSLEncoder.js +788 -0
- package/examples/jsm/tsl/display/AfterImageNode.js +2 -3
- package/examples/jsm/tsl/display/AnaglyphPassNode.js +1 -0
- package/examples/jsm/tsl/display/AnamorphicNode.js +5 -4
- package/examples/jsm/tsl/display/BloomNode.js +9 -7
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +206 -0
- package/examples/jsm/tsl/display/DenoiseNode.js +33 -33
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +1 -0
- package/examples/jsm/tsl/display/DotScreenNode.js +1 -0
- package/examples/jsm/tsl/display/FXAANode.js +3 -2
- package/examples/jsm/tsl/display/FilmNode.js +1 -0
- package/examples/jsm/tsl/display/GTAONode.js +1 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.js +9 -36
- package/examples/jsm/tsl/display/LensflareNode.js +1 -0
- package/examples/jsm/tsl/display/Lut3DNode.js +1 -0
- package/examples/jsm/tsl/display/OutlineNode.js +1 -0
- package/examples/jsm/tsl/display/ParallaxBarrierPassNode.js +1 -0
- package/examples/jsm/tsl/display/PixelationPassNode.js +1 -0
- package/examples/jsm/tsl/display/RGBShiftNode.js +1 -0
- package/examples/jsm/tsl/display/SMAANode.js +9 -8
- package/examples/jsm/tsl/display/SSAAPassNode.js +5 -4
- package/examples/jsm/tsl/display/SSRNode.js +1 -0
- package/examples/jsm/tsl/display/SobelOperatorNode.js +1 -0
- package/examples/jsm/tsl/display/StereoCompositePassNode.js +1 -0
- package/examples/jsm/tsl/display/StereoPassNode.js +1 -0
- package/examples/jsm/tsl/display/{TRAAPassNode.js → TRAANode.js} +184 -174
- package/examples/jsm/tsl/display/TransitionNode.js +1 -0
- package/examples/jsm/tsl/display/hashBlur.js +28 -6
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +5 -4
- package/examples/jsm/tsl/math/Bayer.js +4 -1
- package/examples/jsm/tsl/shadows/TileShadowNode.js +456 -0
- package/examples/jsm/tsl/shadows/TileShadowNodeHelper.js +212 -0
- package/examples/jsm/tsl/utils/Raymarching.js +6 -3
- package/examples/jsm/utils/BufferGeometryUtils.js +4 -1
- package/examples/jsm/utils/CameraUtils.js +4 -1
- package/examples/jsm/utils/GeometryCompressionUtils.js +4 -1
- package/examples/jsm/utils/GeometryUtils.js +4 -1
- package/examples/jsm/utils/LDrawUtils.js +2 -0
- package/examples/jsm/utils/SceneOptimizer.js +2 -0
- package/examples/jsm/utils/SceneUtils.js +4 -1
- package/examples/jsm/utils/ShadowMapViewer.js +2 -0
- package/examples/jsm/utils/ShadowMapViewerGPU.js +2 -0
- package/examples/jsm/utils/SkeletonUtils.js +4 -1
- package/examples/jsm/utils/SortUtils.js +4 -1
- package/examples/jsm/utils/UVsDebug.js +4 -1
- package/examples/jsm/utils/WebGLTextureUtils.js +4 -1
- package/examples/jsm/utils/WebGPUTextureUtils.js +4 -1
- package/examples/jsm/utils/WorkerPool.js +2 -0
- package/examples/jsm/webxr/ARButton.js +1 -0
- package/examples/jsm/webxr/OculusHandModel.js +1 -0
- package/examples/jsm/webxr/OculusHandPointerModel.js +1 -0
- package/examples/jsm/webxr/Text2D.js +4 -1
- package/examples/jsm/webxr/VRButton.js +1 -0
- package/examples/jsm/webxr/XRButton.js +1 -0
- package/examples/jsm/webxr/XRControllerModelFactory.js +2 -0
- package/examples/jsm/webxr/XREstimatedLight.js +1 -0
- package/examples/jsm/webxr/XRHandMeshModel.js +2 -0
- package/examples/jsm/webxr/XRHandModelFactory.js +2 -0
- package/examples/jsm/webxr/XRHandPrimitiveModel.js +2 -0
- package/examples/jsm/webxr/XRPlanes.js +1 -0
- package/package.json +6 -4
- package/src/Three.Core.js +2 -1
- package/src/Three.TSL.js +83 -26
- package/src/Three.WebGPU.Nodes.js +1 -0
- package/src/Three.WebGPU.js +3 -0
- 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/audio/AudioListener.js +13 -10
- package/src/cameras/ArrayCamera.js +9 -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 +47 -20
- package/src/core/BufferAttribute.js +3 -3
- package/src/core/BufferGeometry.js +2 -5
- package/src/core/Clock.js +2 -8
- package/src/core/GLBufferAttribute.js +13 -1
- package/src/core/Object3D.js +23 -22
- package/src/core/RenderTarget.js +65 -21
- package/src/core/RenderTarget3D.js +1 -0
- package/{examples/jsm/misc → src/core}/Timer.js +4 -40
- package/src/extras/PMREMGenerator.js +11 -0
- package/src/extras/TextureUtils.js +1 -5
- package/src/extras/core/Curve.js +1 -1
- package/src/extras/core/Path.js +22 -22
- package/src/geometries/CapsuleGeometry.js +167 -17
- package/src/geometries/ExtrudeGeometry.js +39 -29
- package/src/helpers/ArrowHelper.js +2 -2
- package/src/helpers/CameraHelper.js +41 -11
- package/src/helpers/SkeletonHelper.js +36 -7
- package/src/lights/LightShadow.js +34 -7
- package/src/lights/PointLightShadow.js +1 -1
- package/src/lights/SpotLightShadow.js +9 -1
- package/src/lights/webgpu/ProjectorLight.js +46 -0
- package/src/loaders/BufferGeometryLoader.js +1 -10
- package/src/loaders/FileLoader.js +27 -4
- package/src/loaders/ImageBitmapLoader.js +48 -9
- package/src/loaders/ImageLoader.js +55 -8
- package/src/loaders/Loader.js +14 -0
- package/src/loaders/LoadingManager.js +23 -0
- package/src/loaders/ObjectLoader.js +44 -16
- package/src/loaders/nodes/NodeObjectLoader.js +2 -2
- package/src/materials/Material.js +1 -7
- package/src/materials/MeshBasicMaterial.js +1 -1
- package/src/materials/nodes/Line2NodeMaterial.js +0 -8
- package/src/materials/nodes/MeshBasicNodeMaterial.js +4 -3
- package/src/materials/nodes/MeshMatcapNodeMaterial.js +1 -1
- package/src/materials/nodes/MeshNormalNodeMaterial.js +2 -2
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +2 -1
- package/src/materials/nodes/MeshSSSNodeMaterial.js +2 -2
- package/src/materials/nodes/NodeMaterial.js +106 -20
- package/src/materials/nodes/PointsNodeMaterial.js +5 -0
- package/src/materials/nodes/manager/NodeMaterialObserver.js +107 -4
- package/src/math/Box3.js +28 -0
- package/src/math/Color.js +7 -7
- package/src/math/ColorManagement.js +22 -3
- package/src/math/Frustum.js +25 -9
- package/src/math/FrustumArray.js +258 -0
- package/src/math/Line3.js +129 -2
- package/src/math/Matrix4.js +48 -27
- package/src/math/Quaternion.js +1 -1
- package/src/math/Ray.js +2 -0
- package/src/math/Sphere.js +28 -0
- package/src/math/Spherical.js +2 -2
- package/src/nodes/Nodes.js +3 -3
- package/src/nodes/TSL.js +6 -3
- package/src/nodes/accessors/AccessorsUtils.js +7 -8
- package/src/nodes/accessors/Bitangent.js +54 -26
- package/src/nodes/accessors/Camera.js +40 -13
- package/src/nodes/accessors/CubeTextureNode.js +50 -2
- package/src/nodes/accessors/InstanceNode.js +5 -4
- package/src/nodes/accessors/Lights.js +2 -2
- package/src/nodes/accessors/MaterialNode.js +4 -0
- package/src/nodes/accessors/ModelNode.js +1 -1
- package/src/nodes/accessors/Normal.js +110 -24
- package/src/nodes/accessors/Object3DNode.js +7 -8
- package/src/nodes/accessors/Position.js +14 -4
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +19 -4
- package/src/nodes/accessors/ReflectVector.js +3 -3
- package/src/nodes/accessors/SceneNode.js +1 -1
- package/src/nodes/accessors/SkinningNode.js +3 -2
- package/src/nodes/accessors/StorageBufferNode.js +25 -0
- package/src/nodes/accessors/StorageTextureNode.js +15 -4
- package/src/nodes/accessors/Tangent.js +25 -17
- package/src/nodes/accessors/TangentUtils.js +46 -0
- package/src/nodes/accessors/TextureBicubic.js +21 -3
- package/src/nodes/accessors/TextureNode.js +71 -8
- package/src/nodes/accessors/UniformArrayNode.js +0 -16
- package/src/nodes/accessors/VelocityNode.js +1 -0
- package/src/nodes/accessors/VertexColorNode.js +4 -4
- package/src/nodes/code/CodeNode.js +8 -11
- package/src/nodes/core/ArrayNode.js +12 -0
- package/src/nodes/core/AssignNode.js +30 -5
- package/src/nodes/core/AttributeNode.js +2 -2
- package/src/nodes/core/ContextNode.js +27 -4
- package/src/nodes/core/Node.js +83 -22
- package/src/nodes/core/NodeBuilder.js +273 -49
- package/src/nodes/core/NodeUtils.js +46 -1
- package/src/nodes/core/NodeVarying.js +19 -1
- package/src/nodes/core/PropertyNode.js +8 -12
- package/src/nodes/core/StackNode.js +171 -26
- package/src/nodes/core/StructTypeNode.js +26 -4
- package/src/nodes/core/SubBuildNode.js +89 -0
- package/src/nodes/core/UniformNode.js +63 -5
- package/src/nodes/core/VarNode.js +102 -4
- package/src/nodes/core/VaryingNode.js +45 -24
- package/src/nodes/display/BlendModes.js +42 -1
- package/src/nodes/display/ColorSpaceNode.js +4 -27
- package/src/nodes/display/FrontFacingNode.js +34 -2
- package/src/nodes/display/NormalMapNode.js +19 -50
- package/src/nodes/display/PassNode.js +165 -20
- package/src/nodes/display/ScreenNode.js +0 -26
- package/src/nodes/display/ViewportTextureNode.js +67 -7
- package/src/nodes/functions/BSDF/BRDF_GGX.js +2 -6
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +4 -4
- package/src/nodes/functions/PhongLightingModel.js +3 -3
- package/src/nodes/functions/PhysicalLightingModel.js +16 -16
- package/src/nodes/functions/ShadowMaskModel.js +5 -1
- package/src/nodes/functions/material/getGeometryRoughness.js +2 -2
- package/src/nodes/functions/material/getParallaxCorrectNormal.js +1 -1
- package/src/nodes/gpgpu/AtomicFunctionNode.js +28 -10
- package/src/nodes/gpgpu/BarrierNode.js +3 -3
- package/src/nodes/gpgpu/ComputeNode.js +68 -24
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +28 -3
- package/src/nodes/lighting/AnalyticLightNode.js +7 -13
- package/src/nodes/lighting/EnvironmentNode.js +5 -5
- package/src/nodes/lighting/HemisphereLightNode.js +2 -2
- package/src/nodes/lighting/IESSpotLightNode.js +2 -1
- package/src/nodes/lighting/LightsNode.js +29 -11
- package/src/nodes/lighting/ProjectorLightNode.js +91 -0
- package/src/nodes/lighting/ShadowBaseNode.js +1 -12
- package/src/nodes/lighting/ShadowFilterNode.js +274 -0
- package/src/nodes/lighting/ShadowNode.js +174 -242
- package/src/nodes/lighting/SpotLightNode.js +44 -7
- package/src/nodes/materialx/MaterialXNodes.js +131 -2
- package/src/nodes/materialx/lib/mx_noise.js +166 -2
- package/src/nodes/math/ConditionalNode.js +1 -20
- package/src/nodes/math/MathNode.js +146 -75
- package/src/nodes/math/OperatorNode.js +129 -119
- package/src/nodes/shapes/Shapes.js +5 -4
- package/src/nodes/tsl/TSLBase.js +1 -0
- package/src/nodes/tsl/TSLCore.js +222 -72
- package/src/nodes/utils/DebugNode.js +16 -4
- package/src/nodes/utils/Discard.js +2 -2
- package/src/nodes/utils/EquirectUV.js +27 -0
- package/src/nodes/utils/EventNode.js +83 -0
- package/src/nodes/utils/LoopNode.js +64 -34
- package/src/nodes/utils/MatcapUV.js +22 -0
- package/src/nodes/utils/RTTNode.js +22 -5
- package/src/nodes/utils/ReflectorNode.js +77 -7
- package/src/nodes/utils/SampleNode.js +81 -0
- package/src/nodes/utils/TriplanarTextures.js +65 -0
- package/src/objects/BatchedMesh.js +20 -6
- package/src/objects/Mesh.js +9 -0
- package/src/objects/Skeleton.js +1 -1
- package/src/objects/Sprite.js +9 -0
- package/src/renderers/WebGL3DRenderTarget.js +1 -0
- package/src/renderers/WebGLArrayRenderTarget.js +1 -0
- package/src/renderers/WebGLCubeRenderTarget.js +2 -4
- package/src/renderers/WebGLRenderer.js +45 -32
- package/src/renderers/common/Animation.js +2 -2
- package/src/renderers/common/Background.js +13 -2
- package/src/renderers/common/Bindings.js +19 -18
- package/src/renderers/common/Color4.js +2 -2
- package/src/renderers/common/CubeRenderTarget.js +1 -1
- package/src/renderers/common/PostProcessing.js +60 -5
- package/src/renderers/common/RenderList.js +0 -4
- package/src/renderers/common/RenderObject.js +80 -4
- package/src/renderers/common/Renderer.js +133 -22
- package/src/renderers/common/SampledTexture.js +3 -71
- package/src/renderers/common/Sampler.js +79 -0
- package/src/renderers/common/Storage3DTexture.js +100 -0
- package/src/renderers/common/StorageArrayTexture.js +84 -0
- package/src/renderers/common/StorageTexture.js +19 -0
- package/src/renderers/common/Textures.js +34 -24
- package/src/renderers/common/TimestampQueryPool.js +1 -0
- package/src/renderers/common/Uniform.js +1 -1
- package/src/renderers/common/UniformsGroup.js +14 -18
- package/src/renderers/common/XRManager.js +183 -35
- package/src/renderers/common/XRRenderTarget.js +21 -4
- package/src/renderers/common/extras/PMREMGenerator.js +30 -23
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
- package/src/renderers/common/nodes/Nodes.js +13 -3
- package/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +20 -2
- package/src/renderers/shaders/ShaderLib/background.glsl.js +1 -1
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +11 -2
- package/src/renderers/webgl/WebGLAttributes.js +4 -0
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLMaterials.js +6 -6
- package/src/renderers/webgl/WebGLProgram.js +22 -16
- package/src/renderers/webgl/WebGLPrograms.js +8 -6
- package/src/renderers/webgl/WebGLShadowMap.js +14 -3
- package/src/renderers/webgl/WebGLState.js +4 -4
- package/src/renderers/webgl/WebGLTextures.js +163 -11
- package/src/renderers/webgl/WebGLUtils.js +1 -3
- package/src/renderers/webgl-fallback/WebGLBackend.js +261 -94
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +75 -9
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +4 -0
- package/src/renderers/webgl-fallback/utils/WebGLConstants.js +1 -0
- package/src/renderers/webgl-fallback/utils/WebGLState.js +4 -4
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +44 -29
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +22 -21
- package/src/renderers/webgpu/WebGPUBackend.js +505 -143
- package/src/renderers/webgpu/WebGPURenderer.js +7 -0
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +4 -1
- package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +4 -1
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +129 -96
- package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +3 -0
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +9 -1
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +58 -31
- package/src/renderers/webgpu/utils/WebGPUConstants.js +8 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +39 -9
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +50 -108
- package/src/renderers/webgpu/utils/WebGPUUtils.js +2 -17
- package/src/renderers/webxr/WebXRController.js +1 -1
- package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
- package/src/renderers/webxr/WebXRManager.js +70 -9
- package/src/textures/DepthTexture.js +6 -10
- package/src/textures/ExternalTexture.js +45 -0
- package/src/textures/FramebufferTexture.js +2 -2
- package/src/textures/Source.js +32 -0
- package/src/textures/Texture.js +118 -1
- package/src/textures/VideoTexture.js +31 -3
- package/examples/jsm/effects/PeppersGhostEffect.js +0 -172
- package/src/core/RenderTargetArray.js +0 -40
- package/src/nodes/utils/EquirectUVNode.js +0 -65
- package/src/nodes/utils/MatcapUVNode.js +0 -49
- package/src/nodes/utils/TriplanarTexturesNode.js +0 -148
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;
|
|
@@ -14,25 +16,31 @@ export const Fn = TSL.Fn;
|
|
|
14
16
|
export const INFINITY = TSL.INFINITY;
|
|
15
17
|
export const If = TSL.If;
|
|
16
18
|
export const Loop = TSL.Loop;
|
|
19
|
+
export const NodeAccess = TSL.NodeAccess;
|
|
17
20
|
export const NodeShaderStage = TSL.NodeShaderStage;
|
|
18
21
|
export const NodeType = TSL.NodeType;
|
|
19
22
|
export const NodeUpdateType = TSL.NodeUpdateType;
|
|
20
|
-
export const NodeAccess = TSL.NodeAccess;
|
|
21
23
|
export const PCFShadowFilter = TSL.PCFShadowFilter;
|
|
22
24
|
export const PCFSoftShadowFilter = TSL.PCFSoftShadowFilter;
|
|
23
25
|
export const PI = TSL.PI;
|
|
24
26
|
export const PI2 = TSL.PI2;
|
|
27
|
+
export const PointShadowFilter = TSL.PointShadowFilter;
|
|
25
28
|
export const Return = TSL.Return;
|
|
26
29
|
export const Schlick_to_F0 = TSL.Schlick_to_F0;
|
|
27
30
|
export const ScriptableNodeResources = TSL.ScriptableNodeResources;
|
|
28
31
|
export const ShaderNode = TSL.ShaderNode;
|
|
32
|
+
export const Stack = TSL.Stack;
|
|
33
|
+
export const Switch = TSL.Switch;
|
|
29
34
|
export const TBNViewMatrix = TSL.TBNViewMatrix;
|
|
30
35
|
export const VSMShadowFilter = TSL.VSMShadowFilter;
|
|
31
36
|
export const V_GGX_SmithCorrelated = TSL.V_GGX_SmithCorrelated;
|
|
37
|
+
export const Var = TSL.Var;
|
|
38
|
+
export const VarIntent = TSL.VarIntent;
|
|
32
39
|
export const abs = TSL.abs;
|
|
33
40
|
export const acesFilmicToneMapping = TSL.acesFilmicToneMapping;
|
|
34
41
|
export const acos = TSL.acos;
|
|
35
42
|
export const add = TSL.add;
|
|
43
|
+
export const addMethodChaining = TSL.addMethodChaining;
|
|
36
44
|
export const addNodeElement = TSL.addNodeElement;
|
|
37
45
|
export const agxToneMapping = TSL.agxToneMapping;
|
|
38
46
|
export const all = TSL.all;
|
|
@@ -52,13 +60,13 @@ export const atan2 = TSL.atan2;
|
|
|
52
60
|
export const atomicAdd = TSL.atomicAdd;
|
|
53
61
|
export const atomicAnd = TSL.atomicAnd;
|
|
54
62
|
export const atomicFunc = TSL.atomicFunc;
|
|
63
|
+
export const atomicLoad = TSL.atomicLoad;
|
|
55
64
|
export const atomicMax = TSL.atomicMax;
|
|
56
65
|
export const atomicMin = TSL.atomicMin;
|
|
57
66
|
export const atomicOr = TSL.atomicOr;
|
|
58
67
|
export const atomicStore = TSL.atomicStore;
|
|
59
68
|
export const atomicSub = TSL.atomicSub;
|
|
60
69
|
export const atomicXor = TSL.atomicXor;
|
|
61
|
-
export const atomicLoad = TSL.atomicLoad;
|
|
62
70
|
export const attenuationColor = TSL.attenuationColor;
|
|
63
71
|
export const attenuationDistance = TSL.attenuationDistance;
|
|
64
72
|
export const attribute = TSL.attribute;
|
|
@@ -67,6 +75,7 @@ export const backgroundBlurriness = TSL.backgroundBlurriness;
|
|
|
67
75
|
export const backgroundIntensity = TSL.backgroundIntensity;
|
|
68
76
|
export const backgroundRotation = TSL.backgroundRotation;
|
|
69
77
|
export const batch = TSL.batch;
|
|
78
|
+
export const bentNormalView = TSL.bentNormalView;
|
|
70
79
|
export const billboarding = TSL.billboarding;
|
|
71
80
|
export const bitAnd = TSL.bitAnd;
|
|
72
81
|
export const bitNot = TSL.bitNot;
|
|
@@ -110,15 +119,15 @@ export const checker = TSL.checker;
|
|
|
110
119
|
export const cineonToneMapping = TSL.cineonToneMapping;
|
|
111
120
|
export const clamp = TSL.clamp;
|
|
112
121
|
export const clearcoat = TSL.clearcoat;
|
|
122
|
+
export const clearcoatNormalView = TSL.clearcoatNormalView;
|
|
113
123
|
export const clearcoatRoughness = TSL.clearcoatRoughness;
|
|
114
124
|
export const code = TSL.code;
|
|
115
125
|
export const color = TSL.color;
|
|
116
126
|
export const colorSpaceToWorking = TSL.colorSpaceToWorking;
|
|
117
127
|
export const colorToDirection = TSL.colorToDirection;
|
|
118
128
|
export const compute = TSL.compute;
|
|
129
|
+
export const computeKernel = TSL.computeKernel;
|
|
119
130
|
export const computeSkinning = TSL.computeSkinning;
|
|
120
|
-
export const cond = TSL.cond;
|
|
121
|
-
export const Const = TSL.Const;
|
|
122
131
|
export const context = TSL.context;
|
|
123
132
|
export const convert = TSL.convert;
|
|
124
133
|
export const convertColorSpace = TSL.convertColorSpace;
|
|
@@ -126,10 +135,14 @@ export const convertToTexture = TSL.convertToTexture;
|
|
|
126
135
|
export const cos = TSL.cos;
|
|
127
136
|
export const cross = TSL.cross;
|
|
128
137
|
export const cubeTexture = TSL.cubeTexture;
|
|
138
|
+
export const cubeTextureBase = TSL.cubeTextureBase;
|
|
139
|
+
export const cubeToUV = TSL.cubeToUV;
|
|
129
140
|
export const dFdx = TSL.dFdx;
|
|
130
141
|
export const dFdy = TSL.dFdy;
|
|
131
142
|
export const dashSize = TSL.dashSize;
|
|
132
143
|
export const debug = TSL.debug;
|
|
144
|
+
export const decrement = TSL.decrement;
|
|
145
|
+
export const decrementBefore = TSL.decrementBefore;
|
|
133
146
|
export const defaultBuildStages = TSL.defaultBuildStages;
|
|
134
147
|
export const defaultShaderStages = TSL.defaultShaderStages;
|
|
135
148
|
export const defined = TSL.defined;
|
|
@@ -139,10 +152,12 @@ export const densityFog = TSL.densityFog;
|
|
|
139
152
|
export const densityFogFactor = TSL.densityFogFactor;
|
|
140
153
|
export const depth = TSL.depth;
|
|
141
154
|
export const depthPass = TSL.depthPass;
|
|
155
|
+
export const determinant = TSL.determinant;
|
|
142
156
|
export const difference = TSL.difference;
|
|
143
157
|
export const diffuseColor = TSL.diffuseColor;
|
|
144
158
|
export const directPointLight = TSL.directPointLight;
|
|
145
159
|
export const directionToColor = TSL.directionToColor;
|
|
160
|
+
export const directionToFaceDirection = TSL.directionToFaceDirection;
|
|
146
161
|
export const dispersion = TSL.dispersion;
|
|
147
162
|
export const distance = TSL.distance;
|
|
148
163
|
export const div = TSL.div;
|
|
@@ -181,8 +196,11 @@ export const getParallaxCorrectNormal = TSL.getParallaxCorrectNormal;
|
|
|
181
196
|
export const getRoughness = TSL.getRoughness;
|
|
182
197
|
export const getScreenPosition = TSL.getScreenPosition;
|
|
183
198
|
export const getShIrradianceAt = TSL.getShIrradianceAt;
|
|
199
|
+
export const getShadowMaterial = TSL.getShadowMaterial;
|
|
200
|
+
export const getShadowRenderObjectFunction = TSL.getShadowRenderObjectFunction;
|
|
184
201
|
export const getTextureIndex = TSL.getTextureIndex;
|
|
185
202
|
export const getViewPosition = TSL.getViewPosition;
|
|
203
|
+
export const globalId = TSL.globalId;
|
|
186
204
|
export const glsl = TSL.glsl;
|
|
187
205
|
export const glslFn = TSL.glslFn;
|
|
188
206
|
export const grayscale = TSL.grayscale;
|
|
@@ -192,6 +210,8 @@ export const hash = TSL.hash;
|
|
|
192
210
|
export const highpModelNormalViewMatrix = TSL.highpModelNormalViewMatrix;
|
|
193
211
|
export const highpModelViewMatrix = TSL.highpModelViewMatrix;
|
|
194
212
|
export const hue = TSL.hue;
|
|
213
|
+
export const increment = TSL.increment;
|
|
214
|
+
export const incrementBefore = TSL.incrementBefore;
|
|
195
215
|
export const instance = TSL.instance;
|
|
196
216
|
export const instanceIndex = TSL.instanceIndex;
|
|
197
217
|
export const instancedArray = TSL.instancedArray;
|
|
@@ -199,6 +219,7 @@ export const instancedBufferAttribute = TSL.instancedBufferAttribute;
|
|
|
199
219
|
export const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribute;
|
|
200
220
|
export const instancedMesh = TSL.instancedMesh;
|
|
201
221
|
export const int = TSL.int;
|
|
222
|
+
export const inverse = TSL.inverse;
|
|
202
223
|
export const inverseSqrt = TSL.inverseSqrt;
|
|
203
224
|
export const inversesqrt = TSL.inversesqrt;
|
|
204
225
|
export const invocationLocalIndex = TSL.invocationLocalIndex;
|
|
@@ -217,6 +238,8 @@ export const lengthSq = TSL.lengthSq;
|
|
|
217
238
|
export const lessThan = TSL.lessThan;
|
|
218
239
|
export const lessThanEqual = TSL.lessThanEqual;
|
|
219
240
|
export const lightPosition = TSL.lightPosition;
|
|
241
|
+
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
242
|
+
export const lightShadowMatrix = TSL.lightShadowMatrix;
|
|
220
243
|
export const lightTargetDirection = TSL.lightTargetDirection;
|
|
221
244
|
export const lightTargetPosition = TSL.lightTargetPosition;
|
|
222
245
|
export const lightViewPosition = TSL.lightViewPosition;
|
|
@@ -225,13 +248,10 @@ export const lights = TSL.lights;
|
|
|
225
248
|
export const linearDepth = TSL.linearDepth;
|
|
226
249
|
export const linearToneMapping = TSL.linearToneMapping;
|
|
227
250
|
export const localId = TSL.localId;
|
|
228
|
-
export const globalId = TSL.globalId;
|
|
229
251
|
export const log = TSL.log;
|
|
230
252
|
export const log2 = TSL.log2;
|
|
231
253
|
export const logarithmicDepthToViewZ = TSL.logarithmicDepthToViewZ;
|
|
232
|
-
export const loop = TSL.loop;
|
|
233
254
|
export const luminance = TSL.luminance;
|
|
234
|
-
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
235
255
|
export const mat2 = TSL.mat2;
|
|
236
256
|
export const mat3 = TSL.mat3;
|
|
237
257
|
export const mat4 = TSL.mat4;
|
|
@@ -248,6 +268,8 @@ export const materialClearcoatRoughness = TSL.materialClearcoatRoughness;
|
|
|
248
268
|
export const materialColor = TSL.materialColor;
|
|
249
269
|
export const materialDispersion = TSL.materialDispersion;
|
|
250
270
|
export const materialEmissive = TSL.materialEmissive;
|
|
271
|
+
export const materialEnvIntensity = TSL.materialEnvIntensity;
|
|
272
|
+
export const materialEnvRotation = TSL.materialEnvRotation;
|
|
251
273
|
export const materialIOR = TSL.materialIOR;
|
|
252
274
|
export const materialIridescence = TSL.materialIridescence;
|
|
253
275
|
export const materialIridescenceIOR = TSL.materialIridescenceIOR;
|
|
@@ -278,6 +300,7 @@ export const materialThickness = TSL.materialThickness;
|
|
|
278
300
|
export const materialTransmission = TSL.materialTransmission;
|
|
279
301
|
export const max = TSL.max;
|
|
280
302
|
export const maxMipLevel = TSL.maxMipLevel;
|
|
303
|
+
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
281
304
|
export const metalness = TSL.metalness;
|
|
282
305
|
export const min = TSL.min;
|
|
283
306
|
export const mix = TSL.mix;
|
|
@@ -298,24 +321,45 @@ export const morphReference = TSL.morphReference;
|
|
|
298
321
|
export const mrt = TSL.mrt;
|
|
299
322
|
export const mul = TSL.mul;
|
|
300
323
|
export const mx_aastep = TSL.mx_aastep;
|
|
324
|
+
export const mx_add = TSL.mx_add;
|
|
325
|
+
export const mx_atan2 = TSL.mx_atan2;
|
|
301
326
|
export const mx_cell_noise_float = TSL.mx_cell_noise_float;
|
|
302
327
|
export const mx_contrast = TSL.mx_contrast;
|
|
328
|
+
export const mx_divide = TSL.mx_divide;
|
|
303
329
|
export const mx_fractal_noise_float = TSL.mx_fractal_noise_float;
|
|
304
330
|
export const mx_fractal_noise_vec2 = TSL.mx_fractal_noise_vec2;
|
|
305
331
|
export const mx_fractal_noise_vec3 = TSL.mx_fractal_noise_vec3;
|
|
306
332
|
export const mx_fractal_noise_vec4 = TSL.mx_fractal_noise_vec4;
|
|
333
|
+
export const mx_frame = TSL.mx_frame;
|
|
334
|
+
export const mx_heighttonormal = TSL.mx_heighttonormal;
|
|
307
335
|
export const mx_hsvtorgb = TSL.mx_hsvtorgb;
|
|
336
|
+
export const mx_ifequal = TSL.mx_ifequal;
|
|
337
|
+
export const mx_ifgreater = TSL.mx_ifgreater;
|
|
338
|
+
export const mx_ifgreatereq = TSL.mx_ifgreatereq;
|
|
339
|
+
export const mx_invert = TSL.mx_invert;
|
|
340
|
+
export const mx_modulo = TSL.mx_modulo;
|
|
341
|
+
export const mx_multiply = TSL.mx_multiply;
|
|
308
342
|
export const mx_noise_float = TSL.mx_noise_float;
|
|
309
343
|
export const mx_noise_vec3 = TSL.mx_noise_vec3;
|
|
310
344
|
export const mx_noise_vec4 = TSL.mx_noise_vec4;
|
|
345
|
+
export const mx_place2d = TSL.mx_place2d;
|
|
346
|
+
export const mx_power = TSL.mx_power;
|
|
347
|
+
export const mx_ramp4 = TSL.mx_ramp4;
|
|
311
348
|
export const mx_ramplr = TSL.mx_ramplr;
|
|
312
349
|
export const mx_ramptb = TSL.mx_ramptb;
|
|
313
350
|
export const mx_rgbtohsv = TSL.mx_rgbtohsv;
|
|
351
|
+
export const mx_rotate2d = TSL.mx_rotate2d;
|
|
352
|
+
export const mx_rotate3d = TSL.mx_rotate3d;
|
|
314
353
|
export const mx_safepower = TSL.mx_safepower;
|
|
354
|
+
export const mx_separate = TSL.mx_separate;
|
|
315
355
|
export const mx_splitlr = TSL.mx_splitlr;
|
|
316
356
|
export const mx_splittb = TSL.mx_splittb;
|
|
317
357
|
export const mx_srgb_texture_to_lin_rec709 = TSL.mx_srgb_texture_to_lin_rec709;
|
|
358
|
+
export const mx_subtract = TSL.mx_subtract;
|
|
359
|
+
export const mx_timer = TSL.mx_timer;
|
|
318
360
|
export const mx_transform_uv = TSL.mx_transform_uv;
|
|
361
|
+
export const mx_unifiednoise2d = TSL.mx_unifiednoise2d;
|
|
362
|
+
export const mx_unifiednoise3d = TSL.mx_unifiednoise3d;
|
|
319
363
|
export const mx_worley_noise_float = TSL.mx_worley_noise_float;
|
|
320
364
|
export const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
|
|
321
365
|
export const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
|
|
@@ -324,14 +368,18 @@ export const neutralToneMapping = TSL.neutralToneMapping;
|
|
|
324
368
|
export const nodeArray = TSL.nodeArray;
|
|
325
369
|
export const nodeImmutable = TSL.nodeImmutable;
|
|
326
370
|
export const nodeObject = TSL.nodeObject;
|
|
371
|
+
export const nodeObjectIntent = TSL.nodeObjectIntent;
|
|
327
372
|
export const nodeObjects = TSL.nodeObjects;
|
|
328
373
|
export const nodeProxy = TSL.nodeProxy;
|
|
374
|
+
export const nodeProxyIntent = TSL.nodeProxyIntent;
|
|
329
375
|
export const normalFlat = TSL.normalFlat;
|
|
330
376
|
export const normalGeometry = TSL.normalGeometry;
|
|
331
377
|
export const normalLocal = TSL.normalLocal;
|
|
332
378
|
export const normalMap = TSL.normalMap;
|
|
333
379
|
export const normalView = TSL.normalView;
|
|
380
|
+
export const normalViewGeometry = TSL.normalViewGeometry;
|
|
334
381
|
export const normalWorld = TSL.normalWorld;
|
|
382
|
+
export const normalWorldGeometry = TSL.normalWorldGeometry;
|
|
335
383
|
export const normalize = TSL.normalize;
|
|
336
384
|
export const not = TSL.not;
|
|
337
385
|
export const notEqual = TSL.notEqual;
|
|
@@ -343,6 +391,8 @@ export const objectRadius = TSL.objectRadius;
|
|
|
343
391
|
export const objectScale = TSL.objectScale;
|
|
344
392
|
export const objectViewPosition = TSL.objectViewPosition;
|
|
345
393
|
export const objectWorldMatrix = TSL.objectWorldMatrix;
|
|
394
|
+
export const OnObjectUpdate = TSL.OnObjectUpdate;
|
|
395
|
+
export const OnMaterialUpdate = TSL.OnMaterialUpdate;
|
|
346
396
|
export const oneMinus = TSL.oneMinus;
|
|
347
397
|
export const or = TSL.or;
|
|
348
398
|
export const orthographicDepthToViewZ = TSL.orthographicDepthToViewZ;
|
|
@@ -363,6 +413,7 @@ export const passTexture = TSL.passTexture;
|
|
|
363
413
|
export const pcurve = TSL.pcurve;
|
|
364
414
|
export const perspectiveDepthToViewZ = TSL.perspectiveDepthToViewZ;
|
|
365
415
|
export const pmremTexture = TSL.pmremTexture;
|
|
416
|
+
export const pointShadow = TSL.pointShadow;
|
|
366
417
|
export const pointUV = TSL.pointUV;
|
|
367
418
|
export const pointWidth = TSL.pointWidth;
|
|
368
419
|
export const positionGeometry = TSL.positionGeometry;
|
|
@@ -377,6 +428,7 @@ export const pow = TSL.pow;
|
|
|
377
428
|
export const pow2 = TSL.pow2;
|
|
378
429
|
export const pow3 = TSL.pow3;
|
|
379
430
|
export const pow4 = TSL.pow4;
|
|
431
|
+
export const premultiplyAlpha = TSL.premultiplyAlpha;
|
|
380
432
|
export const property = TSL.property;
|
|
381
433
|
export const radians = TSL.radians;
|
|
382
434
|
export const rand = TSL.rand;
|
|
@@ -384,7 +436,6 @@ export const range = TSL.range;
|
|
|
384
436
|
export const rangeFog = TSL.rangeFog;
|
|
385
437
|
export const rangeFogFactor = TSL.rangeFogFactor;
|
|
386
438
|
export const reciprocal = TSL.reciprocal;
|
|
387
|
-
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
388
439
|
export const reference = TSL.reference;
|
|
389
440
|
export const referenceBuffer = TSL.referenceBuffer;
|
|
390
441
|
export const reflect = TSL.reflect;
|
|
@@ -395,7 +446,6 @@ export const refract = TSL.refract;
|
|
|
395
446
|
export const refractVector = TSL.refractVector;
|
|
396
447
|
export const refractView = TSL.refractView;
|
|
397
448
|
export const reinhardToneMapping = TSL.reinhardToneMapping;
|
|
398
|
-
export const remainder = TSL.remainder;
|
|
399
449
|
export const remap = TSL.remap;
|
|
400
450
|
export const remapClamp = TSL.remapClamp;
|
|
401
451
|
export const renderGroup = TSL.renderGroup;
|
|
@@ -408,6 +458,7 @@ export const round = TSL.round;
|
|
|
408
458
|
export const rtt = TSL.rtt;
|
|
409
459
|
export const sRGBTransferEOTF = TSL.sRGBTransferEOTF;
|
|
410
460
|
export const sRGBTransferOETF = TSL.sRGBTransferOETF;
|
|
461
|
+
export const sample = TSL.sample;
|
|
411
462
|
export const sampler = TSL.sampler;
|
|
412
463
|
export const samplerComparison = TSL.samplerComparison;
|
|
413
464
|
export const saturate = TSL.saturate;
|
|
@@ -420,12 +471,12 @@ export const scriptable = TSL.scriptable;
|
|
|
420
471
|
export const scriptableValue = TSL.scriptableValue;
|
|
421
472
|
export const select = TSL.select;
|
|
422
473
|
export const setCurrentStack = TSL.setCurrentStack;
|
|
474
|
+
export const setName = TSL.setName;
|
|
423
475
|
export const shaderStages = TSL.shaderStages;
|
|
424
476
|
export const shadow = TSL.shadow;
|
|
425
|
-
export const pointShadow = TSL.pointShadow;
|
|
426
477
|
export const shadowPositionWorld = TSL.shadowPositionWorld;
|
|
427
|
-
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
428
478
|
export const shapeCircle = TSL.shapeCircle;
|
|
479
|
+
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
429
480
|
export const sheen = TSL.sheen;
|
|
430
481
|
export const sheenRoughness = TSL.sheenRoughness;
|
|
431
482
|
export const shiftLeft = TSL.shiftLeft;
|
|
@@ -445,6 +496,7 @@ export const spritesheetUV = TSL.spritesheetUV;
|
|
|
445
496
|
export const sqrt = TSL.sqrt;
|
|
446
497
|
export const stack = TSL.stack;
|
|
447
498
|
export const step = TSL.step;
|
|
499
|
+
export const stepElement = TSL.stepElement;
|
|
448
500
|
export const storage = TSL.storage;
|
|
449
501
|
export const storageBarrier = TSL.storageBarrier;
|
|
450
502
|
export const storageObject = TSL.storageObject;
|
|
@@ -452,6 +504,7 @@ export const storageTexture = TSL.storageTexture;
|
|
|
452
504
|
export const string = TSL.string;
|
|
453
505
|
export const struct = TSL.struct;
|
|
454
506
|
export const sub = TSL.sub;
|
|
507
|
+
export const subBuild = TSL.subBuild;
|
|
455
508
|
export const subgroupIndex = TSL.subgroupIndex;
|
|
456
509
|
export const subgroupSize = TSL.subgroupSize;
|
|
457
510
|
export const tan = TSL.tan;
|
|
@@ -464,52 +517,43 @@ export const texture = TSL.texture;
|
|
|
464
517
|
export const texture3D = TSL.texture3D;
|
|
465
518
|
export const textureBarrier = TSL.textureBarrier;
|
|
466
519
|
export const textureBicubic = TSL.textureBicubic;
|
|
520
|
+
export const textureBicubicLevel = TSL.textureBicubicLevel;
|
|
467
521
|
export const textureCubeUV = TSL.textureCubeUV;
|
|
468
522
|
export const textureLoad = TSL.textureLoad;
|
|
469
523
|
export const textureSize = TSL.textureSize;
|
|
470
524
|
export const textureStore = TSL.textureStore;
|
|
471
525
|
export const thickness = TSL.thickness;
|
|
472
|
-
export const threshold = TSL.threshold;
|
|
473
526
|
export const time = TSL.time;
|
|
474
527
|
export const timerDelta = TSL.timerDelta;
|
|
475
528
|
export const timerGlobal = TSL.timerGlobal;
|
|
476
529
|
export const timerLocal = TSL.timerLocal;
|
|
477
|
-
export const toOutputColorSpace = TSL.toOutputColorSpace;
|
|
478
|
-
export const toWorkingColorSpace = TSL.toWorkingColorSpace;
|
|
479
530
|
export const toneMapping = TSL.toneMapping;
|
|
480
531
|
export const toneMappingExposure = TSL.toneMappingExposure;
|
|
481
532
|
export const toonOutlinePass = TSL.toonOutlinePass;
|
|
482
533
|
export const transformDirection = TSL.transformDirection;
|
|
483
534
|
export const transformNormal = TSL.transformNormal;
|
|
484
535
|
export const transformNormalToView = TSL.transformNormalToView;
|
|
485
|
-
export const transformedBentNormalView = TSL.transformedBentNormalView;
|
|
486
|
-
export const transformedBitangentView = TSL.transformedBitangentView;
|
|
487
|
-
export const transformedBitangentWorld = TSL.transformedBitangentWorld;
|
|
488
536
|
export const transformedClearcoatNormalView = TSL.transformedClearcoatNormalView;
|
|
489
537
|
export const transformedNormalView = TSL.transformedNormalView;
|
|
490
538
|
export const transformedNormalWorld = TSL.transformedNormalWorld;
|
|
491
|
-
export const transformedTangentView = TSL.transformedTangentView;
|
|
492
|
-
export const transformedTangentWorld = TSL.transformedTangentWorld;
|
|
493
539
|
export const transmission = TSL.transmission;
|
|
494
540
|
export const transpose = TSL.transpose;
|
|
495
|
-
export const tri = TSL.tri;
|
|
496
|
-
export const tri3 = TSL.tri3;
|
|
497
541
|
export const triNoise3D = TSL.triNoise3D;
|
|
498
542
|
export const triplanarTexture = TSL.triplanarTexture;
|
|
499
543
|
export const triplanarTextures = TSL.triplanarTextures;
|
|
500
544
|
export const trunc = TSL.trunc;
|
|
501
|
-
export const tslFn = TSL.tslFn;
|
|
502
545
|
export const uint = TSL.uint;
|
|
503
546
|
export const uniform = TSL.uniform;
|
|
504
547
|
export const uniformArray = TSL.uniformArray;
|
|
548
|
+
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
505
549
|
export const uniformGroup = TSL.uniformGroup;
|
|
506
|
-
export const
|
|
550
|
+
export const uniformTexture = TSL.uniformTexture;
|
|
551
|
+
export const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
|
|
507
552
|
export const userData = TSL.userData;
|
|
508
553
|
export const uv = TSL.uv;
|
|
509
554
|
export const uvec2 = TSL.uvec2;
|
|
510
555
|
export const uvec3 = TSL.uvec3;
|
|
511
556
|
export const uvec4 = TSL.uvec4;
|
|
512
|
-
export const Var = TSL.Var;
|
|
513
557
|
export const varying = TSL.varying;
|
|
514
558
|
export const varyingProperty = TSL.varyingProperty;
|
|
515
559
|
export const vec2 = TSL.vec2;
|
|
@@ -519,12 +563,12 @@ export const vectorComponents = TSL.vectorComponents;
|
|
|
519
563
|
export const velocity = TSL.velocity;
|
|
520
564
|
export const vertexColor = TSL.vertexColor;
|
|
521
565
|
export const vertexIndex = TSL.vertexIndex;
|
|
566
|
+
export const vertexStage = TSL.vertexStage;
|
|
522
567
|
export const vibrance = TSL.vibrance;
|
|
523
568
|
export const viewZToLogarithmicDepth = TSL.viewZToLogarithmicDepth;
|
|
524
569
|
export const viewZToOrthographicDepth = TSL.viewZToOrthographicDepth;
|
|
525
570
|
export const viewZToPerspectiveDepth = TSL.viewZToPerspectiveDepth;
|
|
526
571
|
export const viewport = TSL.viewport;
|
|
527
|
-
export const viewportBottomLeft = TSL.viewportBottomLeft;
|
|
528
572
|
export const viewportCoordinate = TSL.viewportCoordinate;
|
|
529
573
|
export const viewportDepthTexture = TSL.viewportDepthTexture;
|
|
530
574
|
export const viewportLinearDepth = TSL.viewportLinearDepth;
|
|
@@ -534,7 +578,6 @@ export const viewportSafeUV = TSL.viewportSafeUV;
|
|
|
534
578
|
export const viewportSharedTexture = TSL.viewportSharedTexture;
|
|
535
579
|
export const viewportSize = TSL.viewportSize;
|
|
536
580
|
export const viewportTexture = TSL.viewportTexture;
|
|
537
|
-
export const viewportTopLeft = TSL.viewportTopLeft;
|
|
538
581
|
export const viewportUV = TSL.viewportUV;
|
|
539
582
|
export const wgsl = TSL.wgsl;
|
|
540
583
|
export const wgslFn = TSL.wgslFn;
|
|
@@ -543,3 +586,17 @@ export const workgroupBarrier = TSL.workgroupBarrier;
|
|
|
543
586
|
export const workgroupId = TSL.workgroupId;
|
|
544
587
|
export const workingToColorSpace = TSL.workingToColorSpace;
|
|
545
588
|
export const xor = TSL.xor;
|
|
589
|
+
|
|
590
|
+
/*
|
|
591
|
+
// Use this code to generate the export statements dynamically
|
|
592
|
+
|
|
593
|
+
let code = '';
|
|
594
|
+
|
|
595
|
+
for ( const key of Object.keys( THREE.TSL ) ) {
|
|
596
|
+
|
|
597
|
+
code += `export const ${ key } = TSL.${ key };\n`;
|
|
598
|
+
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
console.log( code );
|
|
602
|
+
//*/
|
|
@@ -14,6 +14,7 @@ export { default as StorageBufferAttribute } from './renderers/common/StorageBuf
|
|
|
14
14
|
export { default as StorageInstancedBufferAttribute } from './renderers/common/StorageInstancedBufferAttribute.js';
|
|
15
15
|
export { default as IndirectStorageBufferAttribute } from './renderers/common/IndirectStorageBufferAttribute.js';
|
|
16
16
|
export { default as IESSpotLight } from './lights/webgpu/IESSpotLight.js';
|
|
17
|
+
export { default as ProjectorLight } from './lights/webgpu/ProjectorLight.js';
|
|
17
18
|
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
18
19
|
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
19
20
|
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
package/src/Three.WebGPU.js
CHANGED
|
@@ -10,10 +10,13 @@ export { default as PostProcessing } from './renderers/common/PostProcessing.js'
|
|
|
10
10
|
import * as RendererUtils from './renderers/common/RendererUtils.js';
|
|
11
11
|
export { RendererUtils };
|
|
12
12
|
export { default as StorageTexture } from './renderers/common/StorageTexture.js';
|
|
13
|
+
export { default as Storage3DTexture } from './renderers/common/Storage3DTexture.js';
|
|
14
|
+
export { default as StorageArrayTexture } from './renderers/common/StorageArrayTexture.js';
|
|
13
15
|
export { default as StorageBufferAttribute } from './renderers/common/StorageBufferAttribute.js';
|
|
14
16
|
export { default as StorageInstancedBufferAttribute } from './renderers/common/StorageInstancedBufferAttribute.js';
|
|
15
17
|
export { default as IndirectStorageBufferAttribute } from './renderers/common/IndirectStorageBufferAttribute.js';
|
|
16
18
|
export { default as IESSpotLight } from './lights/webgpu/IESSpotLight.js';
|
|
19
|
+
export { default as ProjectorLight } from './lights/webgpu/ProjectorLight.js';
|
|
17
20
|
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
18
21
|
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
19
22
|
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
|
@@ -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
|
|
|
@@ -7,7 +7,9 @@ import { AudioContext } from './AudioContext.js';
|
|
|
7
7
|
const _position = /*@__PURE__*/ new Vector3();
|
|
8
8
|
const _quaternion = /*@__PURE__*/ new Quaternion();
|
|
9
9
|
const _scale = /*@__PURE__*/ new Vector3();
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
const _forward = /*@__PURE__*/ new Vector3();
|
|
12
|
+
const _up = /*@__PURE__*/ new Vector3();
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* The class represents a virtual listener of the all positional and non-positional audio effects
|
|
@@ -175,13 +177,14 @@ class AudioListener extends Object3D {
|
|
|
175
177
|
super.updateMatrixWorld( force );
|
|
176
178
|
|
|
177
179
|
const listener = this.context.listener;
|
|
178
|
-
const up = this.up;
|
|
179
180
|
|
|
180
181
|
this.timeDelta = this._clock.getDelta();
|
|
181
182
|
|
|
182
183
|
this.matrixWorld.decompose( _position, _quaternion, _scale );
|
|
183
184
|
|
|
184
|
-
|
|
185
|
+
// the initial forward and up directions must be orthogonal
|
|
186
|
+
_forward.set( 0, 0, - 1 ).applyQuaternion( _quaternion );
|
|
187
|
+
_up.set( 0, 1, 0 ).applyQuaternion( _quaternion );
|
|
185
188
|
|
|
186
189
|
if ( listener.positionX ) {
|
|
187
190
|
|
|
@@ -192,17 +195,17 @@ class AudioListener extends Object3D {
|
|
|
192
195
|
listener.positionX.linearRampToValueAtTime( _position.x, endTime );
|
|
193
196
|
listener.positionY.linearRampToValueAtTime( _position.y, endTime );
|
|
194
197
|
listener.positionZ.linearRampToValueAtTime( _position.z, endTime );
|
|
195
|
-
listener.forwardX.linearRampToValueAtTime(
|
|
196
|
-
listener.forwardY.linearRampToValueAtTime(
|
|
197
|
-
listener.forwardZ.linearRampToValueAtTime(
|
|
198
|
-
listener.upX.linearRampToValueAtTime(
|
|
199
|
-
listener.upY.linearRampToValueAtTime(
|
|
200
|
-
listener.upZ.linearRampToValueAtTime(
|
|
198
|
+
listener.forwardX.linearRampToValueAtTime( _forward.x, endTime );
|
|
199
|
+
listener.forwardY.linearRampToValueAtTime( _forward.y, endTime );
|
|
200
|
+
listener.forwardZ.linearRampToValueAtTime( _forward.z, endTime );
|
|
201
|
+
listener.upX.linearRampToValueAtTime( _up.x, endTime );
|
|
202
|
+
listener.upY.linearRampToValueAtTime( _up.y, endTime );
|
|
203
|
+
listener.upZ.linearRampToValueAtTime( _up.z, endTime );
|
|
201
204
|
|
|
202
205
|
} else {
|
|
203
206
|
|
|
204
207
|
listener.setPosition( _position.x, _position.y, _position.z );
|
|
205
|
-
listener.setOrientation(
|
|
208
|
+
listener.setOrientation( _forward.x, _forward.y, _forward.z, _up.x, _up.y, _up.z );
|
|
206
209
|
|
|
207
210
|
}
|
|
208
211
|
|
|
@@ -31,13 +31,21 @@ class ArrayCamera extends PerspectiveCamera {
|
|
|
31
31
|
*/
|
|
32
32
|
this.isArrayCamera = true;
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Whether this camera is used with multiview rendering or not.
|
|
36
|
+
*
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @readonly
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
this.isMultiViewCamera = false;
|
|
42
|
+
|
|
34
43
|
/**
|
|
35
44
|
* An array of perspective sub cameras.
|
|
36
45
|
*
|
|
37
46
|
* @type {Array<PerspectiveCamera>}
|
|
38
47
|
*/
|
|
39
48
|
this.cameras = array;
|
|
40
|
-
this.index = 0;
|
|
41
49
|
|
|
42
50
|
}
|
|
43
51
|
|
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 = '179';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents mouse buttons and interaction types in context of controls.
|
|
@@ -748,25 +748,6 @@ export const RGBFormat = 1022;
|
|
|
748
748
|
*/
|
|
749
749
|
export const RGBAFormat = 1023;
|
|
750
750
|
|
|
751
|
-
/**
|
|
752
|
-
* reads each element as a single luminance component. This is then converted to a floating point,
|
|
753
|
-
* clamped to the range `[0,1]`, and then assembled into an RGBA element by placing the luminance value
|
|
754
|
-
* in the red, green and blue channels, and attaching 1.0 to the alpha channel.
|
|
755
|
-
*
|
|
756
|
-
* @type {number}
|
|
757
|
-
* @constant
|
|
758
|
-
*/
|
|
759
|
-
export const LuminanceFormat = 1024;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Reads each element as a luminance/alpha double. The same process occurs as for the `LuminanceFormat`,
|
|
763
|
-
* except that the alpha channel may have values other than `1.0`.
|
|
764
|
-
*
|
|
765
|
-
* @type {number}
|
|
766
|
-
* @constant
|
|
767
|
-
*/
|
|
768
|
-
export const LuminanceAlphaFormat = 1025;
|
|
769
|
-
|
|
770
751
|
/**
|
|
771
752
|
* Reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`.
|
|
772
753
|
*
|
|
@@ -1612,6 +1593,32 @@ export const TimestampQuery = {
|
|
|
1612
1593
|
RENDER: 'render'
|
|
1613
1594
|
};
|
|
1614
1595
|
|
|
1596
|
+
/**
|
|
1597
|
+
* Represents mouse buttons and interaction types in context of controls.
|
|
1598
|
+
*
|
|
1599
|
+
* @type {ConstantsInterpolationSamplingType}
|
|
1600
|
+
* @constant
|
|
1601
|
+
*/
|
|
1602
|
+
export const InterpolationSamplingType = {
|
|
1603
|
+
PERSPECTIVE: 'perspective',
|
|
1604
|
+
LINEAR: 'linear',
|
|
1605
|
+
FLAT: 'flat'
|
|
1606
|
+
};
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* Represents the different interpolation sampling modes.
|
|
1610
|
+
*
|
|
1611
|
+
* @type {ConstantsInterpolationSamplingMode}
|
|
1612
|
+
* @constant
|
|
1613
|
+
*/
|
|
1614
|
+
export const InterpolationSamplingMode = {
|
|
1615
|
+
NORMAL: 'normal',
|
|
1616
|
+
CENTROID: 'centroid',
|
|
1617
|
+
SAMPLE: 'sample',
|
|
1618
|
+
FIRST: 'first',
|
|
1619
|
+
EITHER: 'either'
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1615
1622
|
/**
|
|
1616
1623
|
* This type represents mouse buttons and interaction types in context of controls.
|
|
1617
1624
|
*
|
|
@@ -1641,3 +1648,23 @@ export const TimestampQuery = {
|
|
|
1641
1648
|
* @property {string} COMPUTE - A `compute` timestamp query.
|
|
1642
1649
|
* @property {string} RENDER - A `render` timestamp query.
|
|
1643
1650
|
**/
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Represents the different interpolation sampling types.
|
|
1654
|
+
*
|
|
1655
|
+
* @typedef {Object} ConstantsInterpolationSamplingType
|
|
1656
|
+
* @property {string} PERSPECTIVE - Perspective-correct interpolation.
|
|
1657
|
+
* @property {string} LINEAR - Linear interpolation.
|
|
1658
|
+
* @property {string} FLAT - Flat interpolation.
|
|
1659
|
+
*/
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* Represents the different interpolation sampling modes.
|
|
1663
|
+
*
|
|
1664
|
+
* @typedef {Object} ConstantsInterpolationSamplingMode
|
|
1665
|
+
* @property {string} NORMAL - Normal sampling mode.
|
|
1666
|
+
* @property {string} CENTROID - Centroid sampling mode.
|
|
1667
|
+
* @property {string} SAMPLE - Sample-specific sampling mode.
|
|
1668
|
+
* @property {string} FLAT_FIRST - Flat interpolation using the first vertex.
|
|
1669
|
+
* @property {string} FLAT_EITHER - Flat interpolation using either vertex.
|
|
1670
|
+
*/
|