super-three 0.177.0 → 0.181.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 +1994 -749
- package/build/three.core.js +1358 -506
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +631 -247
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +113 -33
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +9571 -3424
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +9397 -3426
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
- package/examples/fonts/MPLUSRounded1c/OFL.txt +91 -0
- package/examples/jsm/Addons.js +2 -3
- package/examples/jsm/animation/CCDIKSolver.js +1 -1
- package/examples/jsm/capabilities/WebGL.js +0 -27
- package/examples/jsm/capabilities/WebGPU.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +9 -9
- package/examples/jsm/controls/DragControls.js +7 -57
- package/examples/jsm/controls/FirstPersonControls.js +3 -3
- package/examples/jsm/controls/FlyControls.js +1 -1
- package/examples/jsm/controls/OrbitControls.js +2 -2
- package/examples/jsm/controls/PointerLockControls.js +2 -10
- package/examples/jsm/controls/TrackballControls.js +1 -1
- package/examples/jsm/controls/TransformControls.js +62 -15
- package/examples/jsm/csm/CSMShadowNode.js +4 -4
- package/examples/jsm/effects/AsciiEffect.js +8 -8
- package/examples/jsm/environments/RoomEnvironment.js +8 -3
- package/examples/jsm/exporters/DRACOExporter.js +2 -2
- package/examples/jsm/exporters/EXRExporter.js +1 -1
- package/examples/jsm/exporters/GLTFExporter.js +33 -25
- package/examples/jsm/exporters/KTX2Exporter.js +4 -2
- package/examples/jsm/exporters/PLYExporter.js +1 -1
- package/examples/jsm/exporters/USDZExporter.js +683 -299
- package/examples/jsm/geometries/DecalGeometry.js +2 -2
- package/examples/jsm/geometries/ParametricGeometry.js +1 -1
- package/examples/jsm/geometries/RoundedBoxGeometry.js +47 -8
- package/examples/jsm/geometries/TeapotGeometry.js +2 -2
- package/examples/jsm/geometries/TextGeometry.js +3 -2
- package/examples/jsm/gpgpu/BitonicSort.js +715 -0
- package/examples/jsm/helpers/ViewHelper.js +43 -5
- package/examples/jsm/inspector/Inspector.js +427 -0
- package/examples/jsm/inspector/RendererInspector.js +415 -0
- package/examples/jsm/inspector/tabs/Console.js +204 -0
- package/examples/jsm/inspector/tabs/Parameters.js +332 -0
- package/examples/jsm/inspector/tabs/Performance.js +268 -0
- package/examples/jsm/inspector/tabs/Viewer.js +166 -0
- package/examples/jsm/inspector/ui/Graph.js +95 -0
- package/examples/jsm/inspector/ui/Item.js +170 -0
- package/examples/jsm/inspector/ui/List.js +75 -0
- package/examples/jsm/inspector/ui/Profiler.js +170 -0
- package/examples/jsm/inspector/ui/Style.js +654 -0
- package/examples/jsm/inspector/ui/Tab.js +46 -0
- package/examples/jsm/inspector/ui/Values.js +423 -0
- package/examples/jsm/inspector/ui/utils.js +56 -0
- package/examples/jsm/interactive/HTMLMesh.js +11 -13
- package/examples/jsm/interactive/InteractiveGroup.js +1 -1
- package/examples/jsm/interactive/SelectionBox.js +30 -0
- 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/lights/RectAreaLightTexturesLib.js +1 -1
- 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/3MFLoader.js +1 -1
- package/examples/jsm/loaders/ColladaLoader.js +4 -4
- package/examples/jsm/loaders/DDSLoader.js +1 -1
- package/examples/jsm/loaders/DRACOLoader.js +73 -22
- package/examples/jsm/loaders/EXRLoader.js +210 -22
- package/examples/jsm/loaders/FBXLoader.js +4 -4
- package/examples/jsm/loaders/FontLoader.js +23 -5
- package/examples/jsm/loaders/GLTFLoader.js +14 -8
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
- package/examples/jsm/loaders/HDRLoader.js +486 -0
- package/examples/jsm/loaders/KTX2Loader.js +136 -49
- package/examples/jsm/loaders/KTXLoader.js +2 -2
- package/examples/jsm/loaders/LDrawLoader.js +1 -1
- package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
- package/examples/jsm/loaders/LUTCubeLoader.js +1 -1
- package/examples/jsm/loaders/LWOLoader.js +2 -2
- package/examples/jsm/loaders/MaterialXLoader.js +233 -34
- package/examples/jsm/loaders/OBJLoader.js +1 -1
- package/examples/jsm/loaders/PDBLoader.js +1 -1
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/SVGLoader.js +2 -2
- 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 +2 -2
- 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 +3 -3
- package/examples/jsm/math/ImprovedNoise.js +1 -1
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/math/SimplexNoise.js +1 -1
- package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
- package/examples/jsm/misc/ProgressiveLightMap.js +9 -3
- package/examples/jsm/misc/ProgressiveLightMapGPU.js +7 -1
- package/examples/jsm/misc/TubePainter.js +383 -40
- package/examples/jsm/misc/Volume.js +1 -1
- package/examples/jsm/modifiers/SimplifyModifier.js +1 -1
- package/examples/jsm/objects/LensflareMesh.js +3 -3
- package/examples/jsm/objects/ReflectorForSSRPass.js +1 -0
- package/examples/jsm/objects/Sky.js +1 -1
- package/examples/jsm/objects/SkyMesh.js +3 -3
- package/examples/jsm/objects/Water.js +3 -3
- package/examples/jsm/objects/WaterMesh.js +6 -6
- package/examples/jsm/physics/RapierPhysics.js +95 -16
- package/examples/jsm/postprocessing/GTAOPass.js +10 -9
- package/examples/jsm/postprocessing/GlitchPass.js +2 -2
- 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/postprocessing/UnrealBloomPass.js +8 -6
- package/examples/jsm/renderers/CSS2DRenderer.js +16 -5
- package/examples/jsm/renderers/CSS3DRenderer.js +7 -6
- package/examples/jsm/renderers/SVGRenderer.js +1 -1
- package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +1 -1
- package/examples/jsm/shaders/AfterimageShader.js +1 -1
- package/examples/jsm/shaders/BleachBypassShader.js +1 -1
- package/examples/jsm/shaders/BokehShader.js +1 -1
- package/examples/jsm/shaders/BokehShader2.js +1 -1
- package/examples/jsm/shaders/DotScreenShader.js +1 -1
- package/examples/jsm/shaders/FocusShader.js +1 -1
- package/examples/jsm/shaders/GTAOShader.js +2 -2
- package/examples/jsm/shaders/GodRaysShader.js +1 -1
- package/examples/jsm/shaders/KaleidoShader.js +1 -1
- package/examples/jsm/shaders/PoissonDenoiseShader.js +2 -2
- package/examples/jsm/shaders/SSRShader.js +1 -1
- package/examples/jsm/shaders/SepiaShader.js +1 -1
- package/examples/jsm/shaders/SubsurfaceScatteringShader.js +1 -1
- package/examples/jsm/shaders/TriangleBlurShader.js +1 -1
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +11 -2
- package/examples/jsm/shaders/VignetteShader.js +1 -1
- package/examples/jsm/transpiler/AST.js +381 -30
- package/examples/jsm/transpiler/GLSLDecoder.js +247 -104
- package/examples/jsm/transpiler/Linker.js +327 -0
- package/examples/jsm/transpiler/TSLEncoder.js +196 -92
- package/examples/jsm/transpiler/Transpiler.js +17 -1
- package/examples/jsm/transpiler/TranspilerUtils.js +29 -0
- package/examples/jsm/transpiler/WGSLEncoder.js +812 -0
- package/examples/jsm/tsl/display/AfterImageNode.js +26 -24
- package/examples/jsm/tsl/display/AnamorphicNode.js +28 -4
- package/examples/jsm/tsl/display/BloomNode.js +11 -6
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +207 -0
- package/examples/jsm/tsl/display/DenoiseNode.js +2 -0
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +446 -90
- package/examples/jsm/tsl/display/GTAONode.js +53 -5
- package/examples/jsm/tsl/display/GaussianBlurNode.js +55 -43
- package/examples/jsm/tsl/display/OutlineNode.js +13 -2
- package/examples/jsm/tsl/display/SSAAPassNode.js +2 -2
- package/examples/jsm/tsl/display/SSGINode.js +654 -0
- package/examples/jsm/tsl/display/SSRNode.js +182 -65
- package/examples/jsm/tsl/display/SSSNode.js +488 -0
- package/examples/jsm/tsl/display/TRAANode.js +578 -0
- package/examples/jsm/tsl/display/boxBlur.js +65 -0
- package/examples/jsm/tsl/display/hashBlur.js +18 -20
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +22 -2
- 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/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
- package/examples/jsm/webxr/XRHandModelFactory.js +2 -6
- package/package.json +5 -10
- package/src/Three.Core.js +5 -2
- package/src/Three.TSL.js +112 -32
- package/src/Three.WebGPU.Nodes.js +2 -0
- package/src/Three.WebGPU.js +4 -0
- package/src/animation/AnimationClip.js +20 -4
- package/src/animation/AnimationMixer.js +3 -3
- package/src/animation/AnimationObjectGroup.js +2 -1
- package/src/animation/KeyframeTrack.js +8 -7
- package/src/animation/PropertyBinding.js +12 -11
- package/src/animation/tracks/BooleanKeyframeTrack.js +1 -1
- package/src/animation/tracks/StringKeyframeTrack.js +1 -1
- package/src/audio/Audio.js +10 -9
- package/src/audio/PositionalAudio.js +1 -1
- package/src/cameras/Camera.js +14 -0
- package/src/cameras/OrthographicCamera.js +2 -2
- package/src/cameras/PerspectiveCamera.js +2 -2
- package/src/cameras/StereoCamera.js +2 -2
- package/src/constants.js +13 -5
- package/src/core/BufferAttribute.js +3 -3
- package/src/core/BufferGeometry.js +10 -10
- package/src/core/Clock.js +2 -8
- package/src/core/EventDispatcher.js +1 -1
- package/src/core/GLBufferAttribute.js +13 -1
- package/src/core/InterleavedBuffer.js +1 -1
- package/src/core/InterleavedBufferAttribute.js +3 -2
- package/src/core/Object3D.js +4 -3
- package/src/core/Raycaster.js +2 -1
- package/src/core/RenderTarget.js +10 -1
- package/{examples/jsm/misc → src/core}/Timer.js +4 -42
- package/src/extras/Controls.js +5 -4
- package/src/extras/DataUtils.js +2 -1
- package/src/extras/Earcut.js +6 -0
- package/src/extras/ImageUtils.js +2 -2
- package/src/extras/PMREMGenerator.js +279 -55
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/core/Curve.js +2 -1
- package/src/extras/core/Interpolations.js +7 -1
- package/src/extras/core/Path.js +22 -22
- package/src/extras/core/ShapePath.js +4 -4
- package/src/extras/lib/earcut.js +8 -8
- package/src/geometries/BoxGeometry.js +1 -0
- package/src/geometries/CapsuleGeometry.js +1 -0
- package/src/geometries/CircleGeometry.js +1 -0
- package/src/geometries/ConeGeometry.js +1 -0
- package/src/geometries/CylinderGeometry.js +1 -0
- package/src/geometries/DodecahedronGeometry.js +1 -0
- package/src/geometries/ExtrudeGeometry.js +8 -6
- package/src/geometries/IcosahedronGeometry.js +1 -0
- package/src/geometries/LatheGeometry.js +1 -0
- package/src/geometries/OctahedronGeometry.js +1 -0
- package/src/geometries/PlaneGeometry.js +1 -0
- package/src/geometries/RingGeometry.js +1 -0
- package/src/geometries/ShapeGeometry.js +1 -0
- package/src/geometries/SphereGeometry.js +1 -0
- package/src/geometries/TetrahedronGeometry.js +1 -0
- package/src/geometries/TorusGeometry.js +1 -0
- package/src/geometries/TorusKnotGeometry.js +1 -0
- package/src/geometries/TubeGeometry.js +1 -0
- package/src/helpers/CameraHelper.js +42 -12
- 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/AnimationLoader.js +2 -1
- package/src/loaders/AudioLoader.js +2 -1
- package/src/loaders/BufferGeometryLoader.js +2 -2
- package/src/loaders/Cache.js +2 -2
- package/src/loaders/DataTextureLoader.js +1 -1
- package/src/loaders/FileLoader.js +29 -5
- package/src/loaders/ImageBitmapLoader.js +32 -8
- package/src/loaders/ImageLoader.js +56 -9
- package/src/loaders/Loader.js +17 -3
- package/src/loaders/LoadingManager.js +45 -0
- package/src/loaders/MaterialLoader.js +3 -2
- package/src/loaders/ObjectLoader.js +13 -13
- package/src/loaders/TextureLoader.js +1 -1
- package/src/loaders/nodes/NodeLoader.js +3 -2
- package/src/materials/Material.js +16 -3
- package/src/materials/MeshBasicMaterial.js +2 -1
- package/src/materials/MeshDepthMaterial.js +1 -0
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/MeshLambertMaterial.js +2 -1
- package/src/materials/MeshMatcapMaterial.js +22 -0
- package/src/materials/MeshNormalMaterial.js +1 -0
- package/src/materials/MeshPhongMaterial.js +2 -1
- package/src/materials/MeshPhysicalMaterial.js +2 -1
- package/src/materials/MeshStandardMaterial.js +8 -7
- package/src/materials/MeshToonMaterial.js +1 -0
- package/src/materials/PointsMaterial.js +1 -1
- package/src/materials/ShaderMaterial.js +2 -2
- package/src/materials/nodes/Line2NodeMaterial.js +2 -10
- 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 +3 -3
- package/src/materials/nodes/NodeMaterial.js +90 -27
- package/src/materials/nodes/PointsNodeMaterial.js +86 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +89 -3
- package/src/math/Color.js +6 -5
- package/src/math/ColorManagement.js +9 -3
- package/src/math/Cylindrical.js +1 -1
- package/src/math/Euler.js +2 -1
- package/src/math/Frustum.js +25 -9
- package/src/math/FrustumArray.js +10 -5
- package/src/math/Line3.js +129 -2
- package/src/math/MathUtils.js +13 -11
- package/src/math/Matrix2.js +1 -1
- package/src/math/Matrix3.js +2 -2
- package/src/math/Matrix4.js +55 -34
- package/src/math/Plane.js +1 -1
- package/src/math/Quaternion.js +69 -67
- package/src/math/Spherical.js +3 -3
- package/src/nodes/Nodes.js +6 -4
- package/src/nodes/TSL.js +9 -4
- package/src/nodes/accessors/AccessorsUtils.js +7 -8
- package/src/nodes/accessors/Bitangent.js +31 -25
- 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 +5 -4
- package/src/nodes/accessors/InstanceNode.js +25 -5
- package/src/nodes/accessors/Lights.js +10 -0
- package/src/nodes/accessors/Normal.js +97 -30
- package/src/nodes/accessors/Object3DNode.js +2 -2
- package/src/nodes/accessors/Position.js +25 -9
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +20 -4
- package/src/nodes/accessors/ReflectVector.js +3 -3
- package/src/nodes/accessors/SceneNode.js +3 -2
- package/src/nodes/accessors/StorageBufferNode.js +2 -1
- package/src/nodes/accessors/StorageTextureNode.js +23 -1
- package/src/nodes/accessors/Tangent.js +25 -17
- package/src/nodes/accessors/TangentUtils.js +46 -0
- package/src/nodes/accessors/Texture3DNode.js +14 -1
- package/src/nodes/accessors/TextureBicubic.js +21 -3
- package/src/nodes/accessors/TextureNode.js +142 -44
- package/src/nodes/accessors/UniformArrayNode.js +0 -16
- package/src/nodes/code/FunctionCallNode.js +24 -4
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/ArrayNode.js +13 -0
- package/src/nodes/core/AssignNode.js +6 -2
- package/src/nodes/core/AttributeNode.js +2 -1
- package/src/nodes/core/ContextNode.js +48 -10
- package/src/nodes/core/IndexNode.js +2 -2
- package/src/nodes/core/InputNode.js +2 -1
- package/src/nodes/core/InspectorNode.js +128 -0
- package/src/nodes/core/{CacheNode.js → IsolateNode.js} +36 -17
- package/src/nodes/core/Node.js +167 -34
- package/src/nodes/core/NodeBuilder.js +404 -120
- package/src/nodes/core/NodeFrame.js +21 -21
- package/src/nodes/core/NodeFunction.js +2 -1
- package/src/nodes/core/NodeParser.js +2 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +17 -88
- package/src/nodes/core/ParameterNode.js +31 -0
- package/src/nodes/core/PropertyNode.js +7 -0
- package/src/nodes/core/StackNode.js +77 -30
- package/src/nodes/core/StructNode.js +5 -5
- package/src/nodes/core/StructTypeNode.js +1 -0
- package/src/nodes/core/SubBuildNode.js +89 -0
- package/src/nodes/core/UniformNode.js +80 -14
- package/src/nodes/core/VarNode.js +142 -16
- package/src/nodes/core/VaryingNode.js +9 -6
- package/src/nodes/display/BlendModes.js +7 -6
- package/src/nodes/display/BumpMapNode.js +1 -1
- package/src/nodes/display/ColorAdjustment.js +1 -1
- package/src/nodes/display/FrontFacingNode.js +35 -7
- package/src/nodes/display/NormalMapNode.js +20 -50
- package/src/nodes/display/PassNode.js +206 -17
- package/src/nodes/display/RenderOutputNode.js +28 -2
- package/src/nodes/display/ScreenNode.js +44 -40
- package/src/nodes/display/ToneMappingNode.js +31 -4
- package/src/nodes/display/ToonOutlinePassNode.js +8 -0
- 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/fog/Fog.js +3 -2
- package/src/nodes/functions/BSDF/BRDF_GGX.js +2 -6
- package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +52 -0
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +4 -4
- package/src/nodes/functions/BSDF/DFGApprox.js +60 -19
- package/src/nodes/functions/BasicLightingModel.js +2 -1
- package/src/nodes/functions/PhongLightingModel.js +3 -3
- package/src/nodes/functions/PhysicalLightingModel.js +19 -18
- package/src/nodes/functions/VolumetricLightingModel.js +5 -5
- package/src/nodes/functions/material/getGeometryRoughness.js +2 -2
- package/src/nodes/geometry/RangeNode.js +40 -4
- package/src/nodes/gpgpu/AtomicFunctionNode.js +1 -1
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +2 -1
- package/src/nodes/gpgpu/ComputeNode.js +81 -25
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +455 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +29 -3
- package/src/nodes/lighting/EnvironmentNode.js +11 -11
- package/src/nodes/lighting/LightsNode.js +7 -8
- package/src/nodes/lighting/PointShadowNode.js +6 -0
- package/src/nodes/lighting/ProjectorLightNode.js +19 -6
- package/src/nodes/lighting/ShadowFilterNode.js +3 -1
- package/src/nodes/lighting/ShadowNode.js +77 -10
- 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 +25 -27
- package/src/nodes/math/MathNode.js +106 -65
- package/src/nodes/math/OperatorNode.js +28 -43
- package/src/nodes/pmrem/PMREMUtils.js +117 -2
- package/src/nodes/shapes/Shapes.js +1 -1
- package/src/nodes/tsl/TSLBase.js +6 -2
- package/src/nodes/tsl/TSLCore.js +546 -186
- package/src/nodes/utils/DebugNode.js +3 -2
- package/src/nodes/utils/EquirectUV.js +27 -0
- package/src/nodes/utils/EventNode.js +119 -0
- package/src/nodes/utils/FunctionOverloadingNode.js +37 -19
- package/src/nodes/utils/JoinNode.js +6 -3
- package/src/nodes/utils/LoopNode.js +20 -41
- package/src/nodes/utils/MatcapUV.js +22 -0
- package/src/nodes/utils/MemberNode.js +59 -7
- package/src/nodes/utils/PostProcessingUtils.js +28 -1
- package/src/nodes/utils/RTTNode.js +33 -6
- package/src/nodes/utils/ReflectorNode.js +68 -10
- package/src/nodes/utils/SampleNode.js +91 -0
- package/src/nodes/utils/SplitNode.js +11 -0
- package/src/nodes/utils/Timer.js +0 -47
- package/src/nodes/utils/TriplanarTextures.js +65 -0
- package/src/objects/BatchedMesh.js +6 -4
- package/src/objects/LOD.js +1 -1
- package/src/objects/Line.js +2 -1
- package/src/objects/LineSegments.js +2 -1
- package/src/objects/Skeleton.js +3 -2
- package/src/objects/SkinnedMesh.js +3 -1
- package/src/objects/Sprite.js +4 -3
- package/src/renderers/WebGLRenderer.js +77 -66
- package/src/renderers/common/Animation.js +13 -1
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +108 -27
- package/src/renderers/common/Background.js +4 -3
- package/src/renderers/common/Bindings.js +76 -19
- package/src/renderers/common/CanvasTarget.js +341 -0
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/Color4.js +2 -2
- package/src/renderers/common/CubeRenderTarget.js +1 -1
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Geometries.js +26 -0
- package/src/renderers/common/Info.js +4 -2
- package/src/renderers/common/InspectorBase.js +146 -0
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/PostProcessing.js +61 -25
- package/src/renderers/common/QuadMesh.js +7 -1
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderList.js +7 -3
- package/src/renderers/common/RenderObject.js +84 -5
- package/src/renderers/common/RenderObjects.js +1 -1
- package/src/renderers/common/Renderer.js +486 -255
- package/src/renderers/common/RendererUtils.js +9 -0
- package/src/renderers/common/SampledTexture.js +8 -68
- package/src/renderers/common/Sampler.js +117 -0
- package/src/renderers/common/Storage3DTexture.js +100 -0
- package/src/renderers/common/StorageArrayTexture.js +84 -0
- package/src/renderers/common/StorageTexture.js +27 -0
- package/src/renderers/common/Textures.js +138 -46
- package/src/renderers/common/TimestampQueryPool.js +65 -3
- package/src/renderers/common/UniformsGroup.js +2 -1
- package/src/renderers/common/XRManager.js +63 -24
- package/src/renderers/common/XRRenderTarget.js +21 -4
- package/src/renderers/common/extras/PMREMGenerator.js +161 -66
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +9 -7
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
- package/src/renderers/common/nodes/NodeSampler.js +13 -1
- package/src/renderers/common/nodes/Nodes.js +38 -16
- package/src/renderers/shaders/DFGLUTData.js +64 -0
- package/src/renderers/shaders/ShaderChunk/common.glsl.js +0 -12
- package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +52 -18
- 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/shaders/UniformsLib.js +1 -0
- package/src/renderers/shaders/UniformsUtils.js +25 -4
- package/src/renderers/webgl/WebGLAttributes.js +4 -0
- package/src/renderers/webgl/WebGLCapabilities.js +4 -3
- package/src/renderers/webgl/WebGLExtensions.js +2 -25
- package/src/renderers/webgl/WebGLInfo.js +3 -1
- package/src/renderers/webgl/WebGLProgram.js +25 -18
- package/src/renderers/webgl/WebGLPrograms.js +9 -6
- package/src/renderers/webgl/WebGLShadowMap.js +13 -2
- package/src/renderers/webgl/WebGLState.js +17 -16
- package/src/renderers/webgl/WebGLTextures.js +38 -21
- package/src/renderers/webgl/WebGLUniformsGroups.js +5 -3
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +245 -182
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +184 -30
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +4 -0
- package/src/renderers/webgl-fallback/utils/WebGLConstants.js +2 -3
- package/src/renderers/webgl-fallback/utils/WebGLState.js +9 -8
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +171 -19
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +51 -22
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
- package/src/renderers/webgpu/WebGPUBackend.js +205 -128
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +2 -1
- package/src/renderers/webgpu/WebGPURenderer.js +3 -2
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +198 -121
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +8 -1
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +49 -33
- package/src/renderers/webgpu/utils/WebGPUConstants.js +14 -3
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +56 -37
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +6 -8
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +266 -158
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +32 -9
- package/src/renderers/webgpu/utils/WebGPUUtils.js +24 -19
- package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
- package/src/renderers/webxr/WebXRManager.js +89 -13
- package/src/textures/ExternalTexture.js +56 -0
- package/src/textures/FramebufferTexture.js +2 -2
- package/src/textures/Source.js +14 -3
- package/src/textures/Texture.js +3 -2
- package/src/textures/VideoTexture.js +29 -2
- package/src/utils.js +67 -3
- package/examples/jsm/loaders/RGBMLoader.js +0 -1148
- package/examples/jsm/tsl/display/TRAAPassNode.js +0 -452
- 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;
|
|
@@ -13,27 +15,34 @@ 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 TWO_PI = TSL.TWO_PI;
|
|
28
|
+
export const HALF_PI = TSL.HALF_PI;
|
|
29
|
+
export const PointShadowFilter = TSL.PointShadowFilter;
|
|
26
30
|
export const Return = TSL.Return;
|
|
27
31
|
export const Schlick_to_F0 = TSL.Schlick_to_F0;
|
|
28
32
|
export const ScriptableNodeResources = TSL.ScriptableNodeResources;
|
|
29
33
|
export const ShaderNode = TSL.ShaderNode;
|
|
34
|
+
export const Stack = TSL.Stack;
|
|
35
|
+
export const Switch = TSL.Switch;
|
|
30
36
|
export const TBNViewMatrix = TSL.TBNViewMatrix;
|
|
31
37
|
export const VSMShadowFilter = TSL.VSMShadowFilter;
|
|
32
38
|
export const V_GGX_SmithCorrelated = TSL.V_GGX_SmithCorrelated;
|
|
39
|
+
export const Var = TSL.Var;
|
|
40
|
+
export const VarIntent = TSL.VarIntent;
|
|
33
41
|
export const abs = TSL.abs;
|
|
34
42
|
export const acesFilmicToneMapping = TSL.acesFilmicToneMapping;
|
|
35
43
|
export const acos = TSL.acos;
|
|
36
44
|
export const add = TSL.add;
|
|
45
|
+
export const addMethodChaining = TSL.addMethodChaining;
|
|
37
46
|
export const addNodeElement = TSL.addNodeElement;
|
|
38
47
|
export const agxToneMapping = TSL.agxToneMapping;
|
|
39
48
|
export const all = TSL.all;
|
|
@@ -53,13 +62,13 @@ export const atan2 = TSL.atan2;
|
|
|
53
62
|
export const atomicAdd = TSL.atomicAdd;
|
|
54
63
|
export const atomicAnd = TSL.atomicAnd;
|
|
55
64
|
export const atomicFunc = TSL.atomicFunc;
|
|
65
|
+
export const atomicLoad = TSL.atomicLoad;
|
|
56
66
|
export const atomicMax = TSL.atomicMax;
|
|
57
67
|
export const atomicMin = TSL.atomicMin;
|
|
58
68
|
export const atomicOr = TSL.atomicOr;
|
|
59
69
|
export const atomicStore = TSL.atomicStore;
|
|
60
70
|
export const atomicSub = TSL.atomicSub;
|
|
61
71
|
export const atomicXor = TSL.atomicXor;
|
|
62
|
-
export const atomicLoad = TSL.atomicLoad;
|
|
63
72
|
export const attenuationColor = TSL.attenuationColor;
|
|
64
73
|
export const attenuationDistance = TSL.attenuationDistance;
|
|
65
74
|
export const attribute = TSL.attribute;
|
|
@@ -68,6 +77,7 @@ export const backgroundBlurriness = TSL.backgroundBlurriness;
|
|
|
68
77
|
export const backgroundIntensity = TSL.backgroundIntensity;
|
|
69
78
|
export const backgroundRotation = TSL.backgroundRotation;
|
|
70
79
|
export const batch = TSL.batch;
|
|
80
|
+
export const bentNormalView = TSL.bentNormalView;
|
|
71
81
|
export const billboarding = TSL.billboarding;
|
|
72
82
|
export const bitAnd = TSL.bitAnd;
|
|
73
83
|
export const bitNot = TSL.bitNot;
|
|
@@ -89,6 +99,7 @@ export const buffer = TSL.buffer;
|
|
|
89
99
|
export const bufferAttribute = TSL.bufferAttribute;
|
|
90
100
|
export const bumpMap = TSL.bumpMap;
|
|
91
101
|
export const burn = TSL.burn;
|
|
102
|
+
export const builtin = TSL.builtin;
|
|
92
103
|
export const bvec2 = TSL.bvec2;
|
|
93
104
|
export const bvec3 = TSL.bvec3;
|
|
94
105
|
export const bvec4 = TSL.bvec4;
|
|
@@ -103,6 +114,7 @@ export const cameraPosition = TSL.cameraPosition;
|
|
|
103
114
|
export const cameraProjectionMatrix = TSL.cameraProjectionMatrix;
|
|
104
115
|
export const cameraProjectionMatrixInverse = TSL.cameraProjectionMatrixInverse;
|
|
105
116
|
export const cameraViewMatrix = TSL.cameraViewMatrix;
|
|
117
|
+
export const cameraViewport = TSL.cameraViewport;
|
|
106
118
|
export const cameraWorldMatrix = TSL.cameraWorldMatrix;
|
|
107
119
|
export const cbrt = TSL.cbrt;
|
|
108
120
|
export const cdl = TSL.cdl;
|
|
@@ -111,15 +123,15 @@ export const checker = TSL.checker;
|
|
|
111
123
|
export const cineonToneMapping = TSL.cineonToneMapping;
|
|
112
124
|
export const clamp = TSL.clamp;
|
|
113
125
|
export const clearcoat = TSL.clearcoat;
|
|
126
|
+
export const clearcoatNormalView = TSL.clearcoatNormalView;
|
|
114
127
|
export const clearcoatRoughness = TSL.clearcoatRoughness;
|
|
115
128
|
export const code = TSL.code;
|
|
116
129
|
export const color = TSL.color;
|
|
117
130
|
export const colorSpaceToWorking = TSL.colorSpaceToWorking;
|
|
118
131
|
export const colorToDirection = TSL.colorToDirection;
|
|
119
132
|
export const compute = TSL.compute;
|
|
133
|
+
export const computeKernel = TSL.computeKernel;
|
|
120
134
|
export const computeSkinning = TSL.computeSkinning;
|
|
121
|
-
export const cond = TSL.cond;
|
|
122
|
-
export const Const = TSL.Const;
|
|
123
135
|
export const context = TSL.context;
|
|
124
136
|
export const convert = TSL.convert;
|
|
125
137
|
export const convertColorSpace = TSL.convertColorSpace;
|
|
@@ -127,6 +139,8 @@ export const convertToTexture = TSL.convertToTexture;
|
|
|
127
139
|
export const cos = TSL.cos;
|
|
128
140
|
export const cross = TSL.cross;
|
|
129
141
|
export const cubeTexture = TSL.cubeTexture;
|
|
142
|
+
export const cubeTextureBase = TSL.cubeTextureBase;
|
|
143
|
+
export const cubeToUV = TSL.cubeToUV;
|
|
130
144
|
export const dFdx = TSL.dFdx;
|
|
131
145
|
export const dFdy = TSL.dFdy;
|
|
132
146
|
export const dashSize = TSL.dashSize;
|
|
@@ -142,10 +156,12 @@ export const densityFog = TSL.densityFog;
|
|
|
142
156
|
export const densityFogFactor = TSL.densityFogFactor;
|
|
143
157
|
export const depth = TSL.depth;
|
|
144
158
|
export const depthPass = TSL.depthPass;
|
|
159
|
+
export const determinant = TSL.determinant;
|
|
145
160
|
export const difference = TSL.difference;
|
|
146
161
|
export const diffuseColor = TSL.diffuseColor;
|
|
147
162
|
export const directPointLight = TSL.directPointLight;
|
|
148
163
|
export const directionToColor = TSL.directionToColor;
|
|
164
|
+
export const directionToFaceDirection = TSL.directionToFaceDirection;
|
|
149
165
|
export const dispersion = TSL.dispersion;
|
|
150
166
|
export const distance = TSL.distance;
|
|
151
167
|
export const div = TSL.div;
|
|
@@ -165,6 +181,8 @@ export const faceDirection = TSL.faceDirection;
|
|
|
165
181
|
export const faceForward = TSL.faceForward;
|
|
166
182
|
export const faceforward = TSL.faceforward;
|
|
167
183
|
export const float = TSL.float;
|
|
184
|
+
export const floatBitsToInt = TSL.floatBitsToInt;
|
|
185
|
+
export const floatBitsToUint = TSL.floatBitsToUint;
|
|
168
186
|
export const floor = TSL.floor;
|
|
169
187
|
export const fog = TSL.fog;
|
|
170
188
|
export const fract = TSL.fract;
|
|
@@ -180,14 +198,16 @@ export const getDirection = TSL.getDirection;
|
|
|
180
198
|
export const getDistanceAttenuation = TSL.getDistanceAttenuation;
|
|
181
199
|
export const getGeometryRoughness = TSL.getGeometryRoughness;
|
|
182
200
|
export const getNormalFromDepth = TSL.getNormalFromDepth;
|
|
201
|
+
export const interleavedGradientNoise = TSL.interleavedGradientNoise;
|
|
183
202
|
export const getParallaxCorrectNormal = TSL.getParallaxCorrectNormal;
|
|
184
203
|
export const getRoughness = TSL.getRoughness;
|
|
185
204
|
export const getScreenPosition = TSL.getScreenPosition;
|
|
186
205
|
export const getShIrradianceAt = TSL.getShIrradianceAt;
|
|
187
|
-
export const getTextureIndex = TSL.getTextureIndex;
|
|
188
|
-
export const getViewPosition = TSL.getViewPosition;
|
|
189
206
|
export const getShadowMaterial = TSL.getShadowMaterial;
|
|
190
207
|
export const getShadowRenderObjectFunction = TSL.getShadowRenderObjectFunction;
|
|
208
|
+
export const getTextureIndex = TSL.getTextureIndex;
|
|
209
|
+
export const getViewPosition = TSL.getViewPosition;
|
|
210
|
+
export const globalId = TSL.globalId;
|
|
191
211
|
export const glsl = TSL.glsl;
|
|
192
212
|
export const glslFn = TSL.glslFn;
|
|
193
213
|
export const grayscale = TSL.grayscale;
|
|
@@ -206,6 +226,8 @@ export const instancedBufferAttribute = TSL.instancedBufferAttribute;
|
|
|
206
226
|
export const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribute;
|
|
207
227
|
export const instancedMesh = TSL.instancedMesh;
|
|
208
228
|
export const int = TSL.int;
|
|
229
|
+
export const intBitsToFloat = TSL.intBitsToFloat;
|
|
230
|
+
export const inverse = TSL.inverse;
|
|
209
231
|
export const inverseSqrt = TSL.inverseSqrt;
|
|
210
232
|
export const inversesqrt = TSL.inversesqrt;
|
|
211
233
|
export const invocationLocalIndex = TSL.invocationLocalIndex;
|
|
@@ -224,6 +246,7 @@ export const lengthSq = TSL.lengthSq;
|
|
|
224
246
|
export const lessThan = TSL.lessThan;
|
|
225
247
|
export const lessThanEqual = TSL.lessThanEqual;
|
|
226
248
|
export const lightPosition = TSL.lightPosition;
|
|
249
|
+
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
227
250
|
export const lightShadowMatrix = TSL.lightShadowMatrix;
|
|
228
251
|
export const lightTargetDirection = TSL.lightTargetDirection;
|
|
229
252
|
export const lightTargetPosition = TSL.lightTargetPosition;
|
|
@@ -233,13 +256,10 @@ export const lights = TSL.lights;
|
|
|
233
256
|
export const linearDepth = TSL.linearDepth;
|
|
234
257
|
export const linearToneMapping = TSL.linearToneMapping;
|
|
235
258
|
export const localId = TSL.localId;
|
|
236
|
-
export const globalId = TSL.globalId;
|
|
237
259
|
export const log = TSL.log;
|
|
238
260
|
export const log2 = TSL.log2;
|
|
239
261
|
export const logarithmicDepthToViewZ = TSL.logarithmicDepthToViewZ;
|
|
240
|
-
export const loop = TSL.loop;
|
|
241
262
|
export const luminance = TSL.luminance;
|
|
242
|
-
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
243
263
|
export const mat2 = TSL.mat2;
|
|
244
264
|
export const mat3 = TSL.mat3;
|
|
245
265
|
export const mat4 = TSL.mat4;
|
|
@@ -256,6 +276,8 @@ export const materialClearcoatRoughness = TSL.materialClearcoatRoughness;
|
|
|
256
276
|
export const materialColor = TSL.materialColor;
|
|
257
277
|
export const materialDispersion = TSL.materialDispersion;
|
|
258
278
|
export const materialEmissive = TSL.materialEmissive;
|
|
279
|
+
export const materialEnvIntensity = TSL.materialEnvIntensity;
|
|
280
|
+
export const materialEnvRotation = TSL.materialEnvRotation;
|
|
259
281
|
export const materialIOR = TSL.materialIOR;
|
|
260
282
|
export const materialIridescence = TSL.materialIridescence;
|
|
261
283
|
export const materialIridescenceIOR = TSL.materialIridescenceIOR;
|
|
@@ -286,6 +308,7 @@ export const materialThickness = TSL.materialThickness;
|
|
|
286
308
|
export const materialTransmission = TSL.materialTransmission;
|
|
287
309
|
export const max = TSL.max;
|
|
288
310
|
export const maxMipLevel = TSL.maxMipLevel;
|
|
311
|
+
export const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
|
|
289
312
|
export const metalness = TSL.metalness;
|
|
290
313
|
export const min = TSL.min;
|
|
291
314
|
export const mix = TSL.mix;
|
|
@@ -306,41 +329,65 @@ export const morphReference = TSL.morphReference;
|
|
|
306
329
|
export const mrt = TSL.mrt;
|
|
307
330
|
export const mul = TSL.mul;
|
|
308
331
|
export const mx_aastep = TSL.mx_aastep;
|
|
332
|
+
export const mx_add = TSL.mx_add;
|
|
333
|
+
export const mx_atan2 = TSL.mx_atan2;
|
|
309
334
|
export const mx_cell_noise_float = TSL.mx_cell_noise_float;
|
|
310
335
|
export const mx_contrast = TSL.mx_contrast;
|
|
336
|
+
export const mx_divide = TSL.mx_divide;
|
|
311
337
|
export const mx_fractal_noise_float = TSL.mx_fractal_noise_float;
|
|
312
338
|
export const mx_fractal_noise_vec2 = TSL.mx_fractal_noise_vec2;
|
|
313
339
|
export const mx_fractal_noise_vec3 = TSL.mx_fractal_noise_vec3;
|
|
314
340
|
export const mx_fractal_noise_vec4 = TSL.mx_fractal_noise_vec4;
|
|
341
|
+
export const mx_frame = TSL.mx_frame;
|
|
342
|
+
export const mx_heighttonormal = TSL.mx_heighttonormal;
|
|
315
343
|
export const mx_hsvtorgb = TSL.mx_hsvtorgb;
|
|
344
|
+
export const mx_ifequal = TSL.mx_ifequal;
|
|
345
|
+
export const mx_ifgreater = TSL.mx_ifgreater;
|
|
346
|
+
export const mx_ifgreatereq = TSL.mx_ifgreatereq;
|
|
347
|
+
export const mx_invert = TSL.mx_invert;
|
|
348
|
+
export const mx_modulo = TSL.mx_modulo;
|
|
349
|
+
export const mx_multiply = TSL.mx_multiply;
|
|
316
350
|
export const mx_noise_float = TSL.mx_noise_float;
|
|
317
351
|
export const mx_noise_vec3 = TSL.mx_noise_vec3;
|
|
318
352
|
export const mx_noise_vec4 = TSL.mx_noise_vec4;
|
|
353
|
+
export const mx_place2d = TSL.mx_place2d;
|
|
354
|
+
export const mx_power = TSL.mx_power;
|
|
355
|
+
export const mx_ramp4 = TSL.mx_ramp4;
|
|
319
356
|
export const mx_ramplr = TSL.mx_ramplr;
|
|
320
357
|
export const mx_ramptb = TSL.mx_ramptb;
|
|
321
358
|
export const mx_rgbtohsv = TSL.mx_rgbtohsv;
|
|
359
|
+
export const mx_rotate2d = TSL.mx_rotate2d;
|
|
360
|
+
export const mx_rotate3d = TSL.mx_rotate3d;
|
|
322
361
|
export const mx_safepower = TSL.mx_safepower;
|
|
362
|
+
export const mx_separate = TSL.mx_separate;
|
|
323
363
|
export const mx_splitlr = TSL.mx_splitlr;
|
|
324
364
|
export const mx_splittb = TSL.mx_splittb;
|
|
325
365
|
export const mx_srgb_texture_to_lin_rec709 = TSL.mx_srgb_texture_to_lin_rec709;
|
|
366
|
+
export const mx_subtract = TSL.mx_subtract;
|
|
367
|
+
export const mx_timer = TSL.mx_timer;
|
|
326
368
|
export const mx_transform_uv = TSL.mx_transform_uv;
|
|
369
|
+
export const mx_unifiednoise2d = TSL.mx_unifiednoise2d;
|
|
370
|
+
export const mx_unifiednoise3d = TSL.mx_unifiednoise3d;
|
|
327
371
|
export const mx_worley_noise_float = TSL.mx_worley_noise_float;
|
|
328
372
|
export const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
|
|
329
373
|
export const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
|
|
330
|
-
export const namespace = TSL.namespace;
|
|
331
374
|
export const negate = TSL.negate;
|
|
332
375
|
export const neutralToneMapping = TSL.neutralToneMapping;
|
|
333
376
|
export const nodeArray = TSL.nodeArray;
|
|
334
377
|
export const nodeImmutable = TSL.nodeImmutable;
|
|
335
378
|
export const nodeObject = TSL.nodeObject;
|
|
379
|
+
export const nodeObjectIntent = TSL.nodeObjectIntent;
|
|
336
380
|
export const nodeObjects = TSL.nodeObjects;
|
|
337
381
|
export const nodeProxy = TSL.nodeProxy;
|
|
382
|
+
export const nodeProxyIntent = TSL.nodeProxyIntent;
|
|
338
383
|
export const normalFlat = TSL.normalFlat;
|
|
339
384
|
export const normalGeometry = TSL.normalGeometry;
|
|
340
385
|
export const normalLocal = TSL.normalLocal;
|
|
341
386
|
export const normalMap = TSL.normalMap;
|
|
342
387
|
export const normalView = TSL.normalView;
|
|
388
|
+
export const normalViewGeometry = TSL.normalViewGeometry;
|
|
343
389
|
export const normalWorld = TSL.normalWorld;
|
|
390
|
+
export const normalWorldGeometry = TSL.normalWorldGeometry;
|
|
344
391
|
export const normalize = TSL.normalize;
|
|
345
392
|
export const not = TSL.not;
|
|
346
393
|
export const notEqual = TSL.notEqual;
|
|
@@ -352,6 +399,10 @@ export const objectRadius = TSL.objectRadius;
|
|
|
352
399
|
export const objectScale = TSL.objectScale;
|
|
353
400
|
export const objectViewPosition = TSL.objectViewPosition;
|
|
354
401
|
export const objectWorldMatrix = TSL.objectWorldMatrix;
|
|
402
|
+
export const OnBeforeObjectUpdate = TSL.OnBeforeObjectUpdate;
|
|
403
|
+
export const OnBeforeMaterialUpdate = TSL.OnBeforeMaterialUpdate;
|
|
404
|
+
export const OnObjectUpdate = TSL.OnObjectUpdate;
|
|
405
|
+
export const OnMaterialUpdate = TSL.OnMaterialUpdate;
|
|
355
406
|
export const oneMinus = TSL.oneMinus;
|
|
356
407
|
export const or = TSL.or;
|
|
357
408
|
export const orthographicDepthToViewZ = TSL.orthographicDepthToViewZ;
|
|
@@ -372,6 +423,7 @@ export const passTexture = TSL.passTexture;
|
|
|
372
423
|
export const pcurve = TSL.pcurve;
|
|
373
424
|
export const perspectiveDepthToViewZ = TSL.perspectiveDepthToViewZ;
|
|
374
425
|
export const pmremTexture = TSL.pmremTexture;
|
|
426
|
+
export const pointShadow = TSL.pointShadow;
|
|
375
427
|
export const pointUV = TSL.pointUV;
|
|
376
428
|
export const pointWidth = TSL.pointWidth;
|
|
377
429
|
export const positionGeometry = TSL.positionGeometry;
|
|
@@ -386,7 +438,7 @@ export const pow = TSL.pow;
|
|
|
386
438
|
export const pow2 = TSL.pow2;
|
|
387
439
|
export const pow3 = TSL.pow3;
|
|
388
440
|
export const pow4 = TSL.pow4;
|
|
389
|
-
export const
|
|
441
|
+
export const premultiplyAlpha = TSL.premultiplyAlpha;
|
|
390
442
|
export const property = TSL.property;
|
|
391
443
|
export const radians = TSL.radians;
|
|
392
444
|
export const rand = TSL.rand;
|
|
@@ -394,7 +446,6 @@ export const range = TSL.range;
|
|
|
394
446
|
export const rangeFog = TSL.rangeFog;
|
|
395
447
|
export const rangeFogFactor = TSL.rangeFogFactor;
|
|
396
448
|
export const reciprocal = TSL.reciprocal;
|
|
397
|
-
export const lightProjectionUV = TSL.lightProjectionUV;
|
|
398
449
|
export const reference = TSL.reference;
|
|
399
450
|
export const referenceBuffer = TSL.referenceBuffer;
|
|
400
451
|
export const reflect = TSL.reflect;
|
|
@@ -405,7 +456,6 @@ export const refract = TSL.refract;
|
|
|
405
456
|
export const refractVector = TSL.refractVector;
|
|
406
457
|
export const refractView = TSL.refractView;
|
|
407
458
|
export const reinhardToneMapping = TSL.reinhardToneMapping;
|
|
408
|
-
export const remainder = TSL.remainder;
|
|
409
459
|
export const remap = TSL.remap;
|
|
410
460
|
export const remapClamp = TSL.remapClamp;
|
|
411
461
|
export const renderGroup = TSL.renderGroup;
|
|
@@ -418,24 +468,26 @@ export const round = TSL.round;
|
|
|
418
468
|
export const rtt = TSL.rtt;
|
|
419
469
|
export const sRGBTransferEOTF = TSL.sRGBTransferEOTF;
|
|
420
470
|
export const sRGBTransferOETF = TSL.sRGBTransferOETF;
|
|
471
|
+
export const sample = TSL.sample;
|
|
421
472
|
export const sampler = TSL.sampler;
|
|
422
473
|
export const samplerComparison = TSL.samplerComparison;
|
|
423
474
|
export const saturate = TSL.saturate;
|
|
424
475
|
export const saturation = TSL.saturation;
|
|
425
476
|
export const screen = TSL.screen;
|
|
426
477
|
export const screenCoordinate = TSL.screenCoordinate;
|
|
478
|
+
export const screenDPR = TSL.screenDPR;
|
|
427
479
|
export const screenSize = TSL.screenSize;
|
|
428
480
|
export const screenUV = TSL.screenUV;
|
|
429
481
|
export const scriptable = TSL.scriptable;
|
|
430
482
|
export const scriptableValue = TSL.scriptableValue;
|
|
431
483
|
export const select = TSL.select;
|
|
432
484
|
export const setCurrentStack = TSL.setCurrentStack;
|
|
485
|
+
export const setName = TSL.setName;
|
|
433
486
|
export const shaderStages = TSL.shaderStages;
|
|
434
487
|
export const shadow = TSL.shadow;
|
|
435
|
-
export const pointShadow = TSL.pointShadow;
|
|
436
488
|
export const shadowPositionWorld = TSL.shadowPositionWorld;
|
|
437
|
-
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
438
489
|
export const shapeCircle = TSL.shapeCircle;
|
|
490
|
+
export const sharedUniformGroup = TSL.sharedUniformGroup;
|
|
439
491
|
export const sheen = TSL.sheen;
|
|
440
492
|
export const sheenRoughness = TSL.sheenRoughness;
|
|
441
493
|
export const shiftLeft = TSL.shiftLeft;
|
|
@@ -455,6 +507,7 @@ export const spritesheetUV = TSL.spritesheetUV;
|
|
|
455
507
|
export const sqrt = TSL.sqrt;
|
|
456
508
|
export const stack = TSL.stack;
|
|
457
509
|
export const step = TSL.step;
|
|
510
|
+
export const stepElement = TSL.stepElement;
|
|
458
511
|
export const storage = TSL.storage;
|
|
459
512
|
export const storageBarrier = TSL.storageBarrier;
|
|
460
513
|
export const storageObject = TSL.storageObject;
|
|
@@ -462,62 +515,76 @@ export const storageTexture = TSL.storageTexture;
|
|
|
462
515
|
export const string = TSL.string;
|
|
463
516
|
export const struct = TSL.struct;
|
|
464
517
|
export const sub = TSL.sub;
|
|
518
|
+
export const subgroupAdd = TSL.subgroupAdd;
|
|
519
|
+
export const subgroupAll = TSL.subgroupAll;
|
|
520
|
+
export const subgroupAnd = TSL.subgroupAnd;
|
|
521
|
+
export const subgroupAny = TSL.subgroupAny;
|
|
522
|
+
export const subgroupBallot = TSL.subgroupBallot;
|
|
523
|
+
export const subgroupBroadcast = TSL.subgroupBroadcast;
|
|
524
|
+
export const subgroupBroadcastFirst = TSL.subgroupBroadcastFirst;
|
|
525
|
+
export const subBuild = TSL.subBuild;
|
|
526
|
+
export const subgroupElect = TSL.subgroupElect;
|
|
527
|
+
export const subgroupExclusiveAdd = TSL.subgroupExclusiveAdd;
|
|
528
|
+
export const subgroupExclusiveMul = TSL.subgroupExclusiveMul;
|
|
529
|
+
export const subgroupInclusiveAdd = TSL.subgroupInclusiveAdd;
|
|
530
|
+
export const subgroupInclusiveMul = TSL.subgroupInclusiveMul;
|
|
465
531
|
export const subgroupIndex = TSL.subgroupIndex;
|
|
532
|
+
export const subgroupMax = TSL.subgroupMax;
|
|
533
|
+
export const subgroupMin = TSL.subgroupMin;
|
|
534
|
+
export const subgroupMul = TSL.subgroupMul;
|
|
535
|
+
export const subgroupOr = TSL.subgroupOr;
|
|
536
|
+
export const subgroupShuffle = TSL.subgroupShuffle;
|
|
537
|
+
export const subgroupShuffleDown = TSL.subgroupShuffleDown;
|
|
538
|
+
export const subgroupShuffleUp = TSL.subgroupShuffleUp;
|
|
539
|
+
export const subgroupShuffleXor = TSL.subgroupShuffleXor;
|
|
466
540
|
export const subgroupSize = TSL.subgroupSize;
|
|
541
|
+
export const subgroupXor = TSL.subgroupXor;
|
|
467
542
|
export const tan = TSL.tan;
|
|
468
543
|
export const tangentGeometry = TSL.tangentGeometry;
|
|
469
544
|
export const tangentLocal = TSL.tangentLocal;
|
|
470
545
|
export const tangentView = TSL.tangentView;
|
|
471
546
|
export const tangentWorld = TSL.tangentWorld;
|
|
472
|
-
export const temp = TSL.temp;
|
|
473
547
|
export const texture = TSL.texture;
|
|
474
548
|
export const texture3D = TSL.texture3D;
|
|
475
549
|
export const textureBarrier = TSL.textureBarrier;
|
|
476
550
|
export const textureBicubic = TSL.textureBicubic;
|
|
551
|
+
export const textureBicubicLevel = TSL.textureBicubicLevel;
|
|
477
552
|
export const textureCubeUV = TSL.textureCubeUV;
|
|
478
553
|
export const textureLoad = TSL.textureLoad;
|
|
479
554
|
export const textureSize = TSL.textureSize;
|
|
555
|
+
export const textureLevel = TSL.textureLevel;
|
|
480
556
|
export const textureStore = TSL.textureStore;
|
|
481
557
|
export const thickness = TSL.thickness;
|
|
482
558
|
export const time = TSL.time;
|
|
483
|
-
export const timerDelta = TSL.timerDelta;
|
|
484
|
-
export const timerGlobal = TSL.timerGlobal;
|
|
485
|
-
export const timerLocal = TSL.timerLocal;
|
|
486
559
|
export const toneMapping = TSL.toneMapping;
|
|
487
560
|
export const toneMappingExposure = TSL.toneMappingExposure;
|
|
488
561
|
export const toonOutlinePass = TSL.toonOutlinePass;
|
|
489
562
|
export const transformDirection = TSL.transformDirection;
|
|
490
563
|
export const transformNormal = TSL.transformNormal;
|
|
491
564
|
export const transformNormalToView = TSL.transformNormalToView;
|
|
492
|
-
export const transformedBentNormalView = TSL.transformedBentNormalView;
|
|
493
|
-
export const transformedBitangentView = TSL.transformedBitangentView;
|
|
494
|
-
export const transformedBitangentWorld = TSL.transformedBitangentWorld;
|
|
495
565
|
export const transformedClearcoatNormalView = TSL.transformedClearcoatNormalView;
|
|
496
566
|
export const transformedNormalView = TSL.transformedNormalView;
|
|
497
567
|
export const transformedNormalWorld = TSL.transformedNormalWorld;
|
|
498
|
-
export const transformedTangentView = TSL.transformedTangentView;
|
|
499
|
-
export const transformedTangentWorld = TSL.transformedTangentWorld;
|
|
500
568
|
export const transmission = TSL.transmission;
|
|
501
569
|
export const transpose = TSL.transpose;
|
|
502
570
|
export const triNoise3D = TSL.triNoise3D;
|
|
503
571
|
export const triplanarTexture = TSL.triplanarTexture;
|
|
504
572
|
export const triplanarTextures = TSL.triplanarTextures;
|
|
505
573
|
export const trunc = TSL.trunc;
|
|
506
|
-
export const tslFn = TSL.tslFn;
|
|
507
574
|
export const uint = TSL.uint;
|
|
575
|
+
export const uintBitsToFloat = TSL.uintBitsToFloat;
|
|
508
576
|
export const uniform = TSL.uniform;
|
|
509
|
-
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
510
577
|
export const uniformArray = TSL.uniformArray;
|
|
578
|
+
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
511
579
|
export const uniformGroup = TSL.uniformGroup;
|
|
580
|
+
export const uniformFlow = TSL.uniformFlow;
|
|
512
581
|
export const uniformTexture = TSL.uniformTexture;
|
|
513
|
-
export const
|
|
514
|
-
export const unpremult = TSL.unpremult;
|
|
582
|
+
export const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
|
|
515
583
|
export const userData = TSL.userData;
|
|
516
584
|
export const uv = TSL.uv;
|
|
517
585
|
export const uvec2 = TSL.uvec2;
|
|
518
586
|
export const uvec3 = TSL.uvec3;
|
|
519
587
|
export const uvec4 = TSL.uvec4;
|
|
520
|
-
export const Var = TSL.Var;
|
|
521
588
|
export const varying = TSL.varying;
|
|
522
589
|
export const varyingProperty = TSL.varyingProperty;
|
|
523
590
|
export const vec2 = TSL.vec2;
|
|
@@ -527,12 +594,12 @@ export const vectorComponents = TSL.vectorComponents;
|
|
|
527
594
|
export const velocity = TSL.velocity;
|
|
528
595
|
export const vertexColor = TSL.vertexColor;
|
|
529
596
|
export const vertexIndex = TSL.vertexIndex;
|
|
597
|
+
export const vertexStage = TSL.vertexStage;
|
|
530
598
|
export const vibrance = TSL.vibrance;
|
|
531
599
|
export const viewZToLogarithmicDepth = TSL.viewZToLogarithmicDepth;
|
|
532
600
|
export const viewZToOrthographicDepth = TSL.viewZToOrthographicDepth;
|
|
533
601
|
export const viewZToPerspectiveDepth = TSL.viewZToPerspectiveDepth;
|
|
534
602
|
export const viewport = TSL.viewport;
|
|
535
|
-
export const viewportBottomLeft = TSL.viewportBottomLeft;
|
|
536
603
|
export const viewportCoordinate = TSL.viewportCoordinate;
|
|
537
604
|
export const viewportDepthTexture = TSL.viewportDepthTexture;
|
|
538
605
|
export const viewportLinearDepth = TSL.viewportLinearDepth;
|
|
@@ -542,7 +609,6 @@ export const viewportSafeUV = TSL.viewportSafeUV;
|
|
|
542
609
|
export const viewportSharedTexture = TSL.viewportSharedTexture;
|
|
543
610
|
export const viewportSize = TSL.viewportSize;
|
|
544
611
|
export const viewportTexture = TSL.viewportTexture;
|
|
545
|
-
export const viewportTopLeft = TSL.viewportTopLeft;
|
|
546
612
|
export const viewportUV = TSL.viewportUV;
|
|
547
613
|
export const wgsl = TSL.wgsl;
|
|
548
614
|
export const wgslFn = TSL.wgslFn;
|
|
@@ -551,3 +617,17 @@ export const workgroupBarrier = TSL.workgroupBarrier;
|
|
|
551
617
|
export const workgroupId = TSL.workgroupId;
|
|
552
618
|
export const workingToColorSpace = TSL.workingToColorSpace;
|
|
553
619
|
export const xor = TSL.xor;
|
|
620
|
+
|
|
621
|
+
/*
|
|
622
|
+
// Use this code to generate the export statements dynamically
|
|
623
|
+
|
|
624
|
+
let code = '';
|
|
625
|
+
|
|
626
|
+
for ( const key of Object.keys( THREE.TSL ) ) {
|
|
627
|
+
|
|
628
|
+
code += `export const ${ key } = TSL.${ key };\n`;
|
|
629
|
+
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
log( code );
|
|
633
|
+
//*/
|
|
@@ -18,6 +18,8 @@ export { default as ProjectorLight } from './lights/webgpu/ProjectorLight.js';
|
|
|
18
18
|
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
19
19
|
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
20
20
|
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
|
21
|
+
export { default as InspectorBase } from './renderers/common/InspectorBase.js';
|
|
22
|
+
export { default as CanvasTarget } from './renderers/common/CanvasTarget.js';
|
|
21
23
|
export { ClippingGroup } from './objects/ClippingGroup.js';
|
|
22
24
|
export * from './nodes/Nodes.js';
|
|
23
25
|
import * as TSL from './nodes/TSL.js';
|
package/src/Three.WebGPU.js
CHANGED
|
@@ -10,6 +10,8 @@ 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';
|
|
@@ -18,6 +20,8 @@ export { default as ProjectorLight } from './lights/webgpu/ProjectorLight.js';
|
|
|
18
20
|
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
19
21
|
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
20
22
|
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
|
23
|
+
export { default as InspectorBase } from './renderers/common/InspectorBase.js';
|
|
24
|
+
export { default as CanvasTarget } from './renderers/common/CanvasTarget.js';
|
|
21
25
|
export { ClippingGroup } from './objects/ClippingGroup.js';
|
|
22
26
|
export * from './nodes/Nodes.js';
|
|
23
27
|
import * as TSL from './nodes/TSL.js';
|
|
@@ -8,6 +8,7 @@ import { StringKeyframeTrack } from './tracks/StringKeyframeTrack.js';
|
|
|
8
8
|
import { VectorKeyframeTrack } from './tracks/VectorKeyframeTrack.js';
|
|
9
9
|
import { generateUUID } from '../math/MathUtils.js';
|
|
10
10
|
import { NormalAnimationBlendMode } from '../constants.js';
|
|
11
|
+
import { warn, error } from '../utils.js';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* A reusable set of keyframe tracks which represent an animation.
|
|
@@ -67,6 +68,14 @@ class AnimationClip {
|
|
|
67
68
|
*/
|
|
68
69
|
this.uuid = generateUUID();
|
|
69
70
|
|
|
71
|
+
/**
|
|
72
|
+
* An object that can be used to store custom data about the animation clip.
|
|
73
|
+
* It should not hold references to functions as these will not be cloned.
|
|
74
|
+
*
|
|
75
|
+
* @type {Object}
|
|
76
|
+
*/
|
|
77
|
+
this.userData = {};
|
|
78
|
+
|
|
70
79
|
// this means it should figure out its duration by scanning the tracks
|
|
71
80
|
if ( this.duration < 0 ) {
|
|
72
81
|
|
|
@@ -98,6 +107,8 @@ class AnimationClip {
|
|
|
98
107
|
const clip = new this( json.name, json.duration, tracks, json.blendMode );
|
|
99
108
|
clip.uuid = json.uuid;
|
|
100
109
|
|
|
110
|
+
clip.userData = JSON.parse( json.userData || '{}' );
|
|
111
|
+
|
|
101
112
|
return clip;
|
|
102
113
|
|
|
103
114
|
}
|
|
@@ -120,7 +131,8 @@ class AnimationClip {
|
|
|
120
131
|
'duration': clip.duration,
|
|
121
132
|
'tracks': tracks,
|
|
122
133
|
'uuid': clip.uuid,
|
|
123
|
-
'blendMode': clip.blendMode
|
|
134
|
+
'blendMode': clip.blendMode,
|
|
135
|
+
'userData': JSON.stringify( clip.userData ),
|
|
124
136
|
|
|
125
137
|
};
|
|
126
138
|
|
|
@@ -294,11 +306,11 @@ class AnimationClip {
|
|
|
294
306
|
*/
|
|
295
307
|
static parseAnimation( animation, bones ) {
|
|
296
308
|
|
|
297
|
-
|
|
309
|
+
warn( 'AnimationClip: parseAnimation() is deprecated and will be removed with r185' );
|
|
298
310
|
|
|
299
311
|
if ( ! animation ) {
|
|
300
312
|
|
|
301
|
-
|
|
313
|
+
error( 'AnimationClip: No animation in JSONLoader data.' );
|
|
302
314
|
return null;
|
|
303
315
|
|
|
304
316
|
}
|
|
@@ -515,7 +527,11 @@ class AnimationClip {
|
|
|
515
527
|
|
|
516
528
|
}
|
|
517
529
|
|
|
518
|
-
|
|
530
|
+
const clip = new this.constructor( this.name, this.duration, tracks, this.blendMode );
|
|
531
|
+
|
|
532
|
+
clip.userData = JSON.parse( JSON.stringify( this.userData ) );
|
|
533
|
+
|
|
534
|
+
return clip;
|
|
519
535
|
|
|
520
536
|
}
|
|
521
537
|
|
|
@@ -641,7 +641,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
641
641
|
/**
|
|
642
642
|
* Deactivates all previously scheduled actions on this mixer.
|
|
643
643
|
*
|
|
644
|
-
* @return {AnimationMixer} A reference to
|
|
644
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
645
645
|
*/
|
|
646
646
|
stopAllAction() {
|
|
647
647
|
|
|
@@ -665,7 +665,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
665
665
|
* time from {@link Clock} or {@link Timer}.
|
|
666
666
|
*
|
|
667
667
|
* @param {number} deltaTime - The delta time in seconds.
|
|
668
|
-
* @return {AnimationMixer} A reference to
|
|
668
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
669
669
|
*/
|
|
670
670
|
update( deltaTime ) {
|
|
671
671
|
|
|
@@ -711,7 +711,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
711
711
|
* input parameter will be scaled by {@link AnimationMixer#timeScale}
|
|
712
712
|
*
|
|
713
713
|
* @param {number} time - The time to set in seconds.
|
|
714
|
-
* @return {AnimationMixer} A reference to
|
|
714
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
715
715
|
*/
|
|
716
716
|
setTime( time ) {
|
|
717
717
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropertyBinding } from './PropertyBinding.js';
|
|
2
2
|
import { generateUUID } from '../math/MathUtils.js';
|
|
3
|
+
import { error } from '../utils.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* A group of objects that receives a shared animation state.
|
|
@@ -175,7 +176,7 @@ class AnimationObjectGroup {
|
|
|
175
176
|
|
|
176
177
|
} else if ( objects[ index ] !== knownObject ) {
|
|
177
178
|
|
|
178
|
-
|
|
179
|
+
error( 'AnimationObjectGroup: Different objects with the same UUID ' +
|
|
179
180
|
'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );
|
|
180
181
|
|
|
181
182
|
} // else the object is already where we want it to be
|
|
@@ -7,6 +7,7 @@ import { CubicInterpolant } from '../math/interpolants/CubicInterpolant.js';
|
|
|
7
7
|
import { LinearInterpolant } from '../math/interpolants/LinearInterpolant.js';
|
|
8
8
|
import { DiscreteInterpolant } from '../math/interpolants/DiscreteInterpolant.js';
|
|
9
9
|
import * as AnimationUtils from './AnimationUtils.js';
|
|
10
|
+
import { warn, error } from '../utils.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Represents s a timed sequence of keyframes, which are composed of lists of
|
|
@@ -20,7 +21,7 @@ class KeyframeTrack {
|
|
|
20
21
|
*
|
|
21
22
|
* @param {string} name - The keyframe track's name.
|
|
22
23
|
* @param {Array<number>} times - A list of keyframe times.
|
|
23
|
-
* @param {Array<number>} values - A list of keyframe values.
|
|
24
|
+
* @param {Array<number|string|boolean>} values - A list of keyframe values.
|
|
24
25
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
25
26
|
*/
|
|
26
27
|
constructor( name, times, values, interpolation ) {
|
|
@@ -191,7 +192,7 @@ class KeyframeTrack {
|
|
|
191
192
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
|
|
195
|
+
warn( 'KeyframeTrack:', message );
|
|
195
196
|
return this;
|
|
196
197
|
|
|
197
198
|
}
|
|
@@ -351,7 +352,7 @@ class KeyframeTrack {
|
|
|
351
352
|
const valueSize = this.getValueSize();
|
|
352
353
|
if ( valueSize - Math.floor( valueSize ) !== 0 ) {
|
|
353
354
|
|
|
354
|
-
|
|
355
|
+
error( 'KeyframeTrack: Invalid value size in track.', this );
|
|
355
356
|
valid = false;
|
|
356
357
|
|
|
357
358
|
}
|
|
@@ -363,7 +364,7 @@ class KeyframeTrack {
|
|
|
363
364
|
|
|
364
365
|
if ( nKeys === 0 ) {
|
|
365
366
|
|
|
366
|
-
|
|
367
|
+
error( 'KeyframeTrack: Track is empty.', this );
|
|
367
368
|
valid = false;
|
|
368
369
|
|
|
369
370
|
}
|
|
@@ -376,7 +377,7 @@ class KeyframeTrack {
|
|
|
376
377
|
|
|
377
378
|
if ( typeof currTime === 'number' && isNaN( currTime ) ) {
|
|
378
379
|
|
|
379
|
-
|
|
380
|
+
error( 'KeyframeTrack: Time is not a valid number.', this, i, currTime );
|
|
380
381
|
valid = false;
|
|
381
382
|
break;
|
|
382
383
|
|
|
@@ -384,7 +385,7 @@ class KeyframeTrack {
|
|
|
384
385
|
|
|
385
386
|
if ( prevTime !== null && prevTime > currTime ) {
|
|
386
387
|
|
|
387
|
-
|
|
388
|
+
error( 'KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );
|
|
388
389
|
valid = false;
|
|
389
390
|
break;
|
|
390
391
|
|
|
@@ -404,7 +405,7 @@ class KeyframeTrack {
|
|
|
404
405
|
|
|
405
406
|
if ( isNaN( value ) ) {
|
|
406
407
|
|
|
407
|
-
|
|
408
|
+
error( 'KeyframeTrack: Value is not a valid number.', this, i, value );
|
|
408
409
|
valid = false;
|
|
409
410
|
break;
|
|
410
411
|
|