@gnsx/three 0.185.16 → 0.186.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/build/three.cjs +10 -82600
- package/build/three.core.js +1309 -807
- package/build/three.module.js +439 -338
- package/build/three.tsl.js +74 -44
- package/build/three.webgpu.js +6036 -2184
- package/build/three.webgpu.nodes.js +6020 -2184
- package/examples/jsm/Addons.js +6 -6
- package/examples/jsm/controls/ArcballControls.js +1 -1
- package/examples/jsm/controls/FirstPersonControls.js +44 -20
- package/examples/jsm/controls/OrbitControls.js +9 -0
- package/examples/jsm/controls/TrackballControls.js +109 -4
- package/examples/jsm/csm/CSMShadowNode.js +13 -0
- package/examples/jsm/exporters/GLTFExporter.js +23 -7
- package/examples/jsm/exporters/USDZExporter.js +2 -2
- package/examples/jsm/generators/CityGenerator.js +377 -45
- package/examples/jsm/generators/ForestGenerator.js +12 -12
- package/examples/jsm/generators/TerrainGenerator.js +49 -37
- package/examples/jsm/generators/TreeGenerator.js +70 -76
- package/examples/jsm/generators/city/BenchGenerator.js +127 -0
- package/examples/jsm/generators/city/CarGenerator.js +479 -0
- package/examples/jsm/generators/city/CityGeneratorUtils.js +31 -0
- package/examples/jsm/generators/city/HydrantGenerator.js +106 -0
- package/examples/jsm/generators/city/InstancedMeshGenerator.js +86 -0
- package/examples/jsm/generators/city/PersonGenerator.js +447 -0
- package/examples/jsm/generators/city/SidewalkGenerator.js +33 -38
- package/examples/jsm/generators/city/SkyscraperGenerator.js +448 -48
- package/examples/jsm/generators/city/StreetTreeGenerator.js +231 -0
- package/examples/jsm/generators/city/StreetlightGenerator.js +100 -0
- package/examples/jsm/generators/city/TrafficlightGenerator.js +106 -0
- package/examples/jsm/generators/city/TrashcanGenerator.js +100 -0
- package/examples/jsm/geometries/BoxLineGeometry.js +1 -1
- package/examples/jsm/geometries/ParametricGeometry.js +1 -1
- package/examples/jsm/geometries/RoundedBoxGeometry.js +1 -1
- package/examples/jsm/gpgpu/CountingSort.js +271 -0
- package/examples/jsm/helpers/LightProbeGridHelper.js +60 -239
- package/examples/jsm/helpers/LightProbeGridHelperWebGL.js +221 -0
- package/examples/jsm/inspector/Extension.js +94 -0
- package/examples/jsm/inspector/Inspector.js +145 -41
- package/examples/jsm/inspector/RendererInspector.js +100 -52
- package/examples/jsm/inspector/extensions/color-grading/ColorGrading.js +2609 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorWheel.js +352 -0
- package/examples/jsm/inspector/extensions/color-grading/CurveEditor.js +599 -0
- package/examples/jsm/inspector/extensions/color-grading/LUT3DStyle.js +1201 -0
- package/examples/jsm/inspector/extensions/color-grading/LUTMath.js +788 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/BrightnessModule.js +72 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ColorWheelModule.js +112 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ContrastModule.js +82 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/CurvesModule.js +109 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureHueModule.js +110 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureModule.js +73 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/HueModule.js +78 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ImportedCubeModule.js +89 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/Module.js +285 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/OutputModule.js +101 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/RendererModule.js +225 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SatVibranceModule.js +102 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SaturationModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/VibranceModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/WhiteBalanceModule.js +86 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.js +26 -31
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.js +1 -0
- package/examples/jsm/inspector/tabs/Memory.js +0 -2
- package/examples/jsm/inspector/tabs/Settings.js +4 -0
- package/examples/jsm/inspector/tabs/Timeline.js +223 -171
- package/examples/jsm/inspector/tabs/Viewer.js +515 -21
- package/examples/jsm/inspector/ui/List.js +15 -9
- package/examples/jsm/inspector/ui/Profiler.js +170 -14
- package/examples/jsm/inspector/ui/Style.js +269 -23
- package/examples/jsm/inspector/ui/Tab.js +2 -0
- package/examples/jsm/inspector/ui/Values.js +14 -2
- package/examples/jsm/interactive/HTMLMesh.js +19 -3
- package/examples/jsm/lighting/LightProbeGrid.js +484 -889
- package/examples/jsm/lighting/LightProbeGridUtils.js +107 -0
- package/examples/jsm/lighting/LightProbeGridWebGL.js +841 -0
- package/examples/jsm/lighting/vxgi/VXGIConeTracer.js +194 -0
- package/examples/jsm/lighting/vxgi/VXGINode.js +660 -0
- package/examples/jsm/lighting/vxgi/VXGISceneCollector.js +478 -0
- package/examples/jsm/lighting/vxgi/VXGIVolume.js +1430 -0
- package/examples/jsm/lights/SunLight.js +95 -0
- package/examples/jsm/lights/SunLightNode.js +56 -0
- package/examples/jsm/lights/SunLightShadow.js +319 -0
- package/examples/jsm/lights/SunShadowNode.js +312 -0
- package/examples/jsm/loaders/3DMLoader.js +150 -49
- package/examples/jsm/loaders/3MFLoader.js +202 -1
- package/examples/jsm/loaders/FBXLoader.js +81 -5
- package/examples/jsm/loaders/GLTFGaussianSplatLoaderExtension.js +330 -0
- package/examples/jsm/loaders/GLTFLoader.js +79 -14
- package/examples/jsm/loaders/GaussianSplatPLYLoader.js +386 -0
- package/examples/jsm/loaders/KSPLATLoader.js +463 -0
- package/examples/jsm/loaders/MaterialXLoader.js +111 -1010
- package/examples/jsm/loaders/PCDLoader.js +1 -1
- package/examples/jsm/loaders/SPLATLoader.js +139 -0
- package/examples/jsm/loaders/SPZLoader.js +561 -0
- package/examples/jsm/loaders/materialx/MaterialXArchive.js +108 -0
- package/examples/jsm/loaders/materialx/MaterialXDocument.js +878 -0
- package/examples/jsm/loaders/materialx/MaterialXHextile.js +183 -0
- package/examples/jsm/loaders/materialx/MaterialXInterfaceValidation.js +376 -0
- package/examples/jsm/loaders/materialx/MaterialXLog.js +75 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeInterfaceRegistry.js +4 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeLibrary.js +1021 -0
- package/examples/jsm/loaders/materialx/MaterialXSurfaceMappings.js +661 -0
- package/examples/jsm/loaders/materialx/MaterialXUtils.js +57 -0
- package/examples/jsm/loaders/materialx/compile/MaterialXCompileRegistry.js +997 -0
- package/examples/jsm/loaders/materialx/parse/MaterialXParser.js +28 -0
- package/examples/jsm/loaders/usd/USDAParser.js +15 -2
- package/examples/jsm/loaders/usd/USDCParser.js +1 -4
- package/examples/jsm/loaders/usd/USDComposer.js +80 -42
- package/examples/jsm/materials/WoodNodeMaterial.js +6 -108
- package/examples/jsm/misc/RollerCoaster.js +2 -2
- package/examples/jsm/misc/SculptGL.LICENSE.txt +21 -0
- package/examples/jsm/misc/Sculptor.js +1679 -0
- package/examples/jsm/misc/SculptorMesh.js +1504 -0
- package/examples/jsm/misc/SculptorTools.js +1180 -0
- package/examples/jsm/misc/SculptorUtils.js +345 -0
- package/examples/jsm/misc/TubePainter.js +28 -16
- package/examples/jsm/misc/VolumeSlice.js +24 -24
- package/examples/jsm/modifiers/SimplifyModifier.js +63 -556
- package/examples/jsm/objects/GaussianSplat.js +1039 -0
- package/examples/jsm/objects/Sky.js +66 -45
- package/examples/jsm/objects/SkyMesh.js +70 -51
- package/examples/jsm/physics/JoltPhysics.js +1 -1
- package/examples/jsm/postprocessing/AfterimagePass.js +4 -2
- package/examples/jsm/postprocessing/BloomPass.js +2 -2
- package/examples/jsm/postprocessing/GTAOPass.js +1 -1
- package/examples/jsm/postprocessing/OutlinePass.js +5 -5
- package/examples/jsm/postprocessing/SAOPass.js +1 -1
- package/examples/jsm/postprocessing/SSAOPass.js +1 -1
- package/examples/jsm/postprocessing/SSRPass.js +4 -2
- package/examples/jsm/postprocessing/SavePass.js +1 -1
- package/examples/jsm/postprocessing/TAARenderPass.js +1 -1
- package/examples/jsm/postprocessing/UnrealBloomPass.js +30 -13
- package/examples/jsm/renderers/CSS2DRenderer.js +29 -5
- package/examples/jsm/shaders/DepthLimitedBlurShader.js +4 -1
- package/examples/jsm/shaders/ExposureShader.js +1 -1
- package/examples/jsm/shaders/FilmShader.js +2 -1
- package/examples/jsm/transpiler/AST.js +21 -2
- package/examples/jsm/transpiler/GLSLDecoder.js +498 -8
- package/examples/jsm/transpiler/TSLEncoder.js +82 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +33 -4
- package/examples/jsm/tsl/WebGLNodesHandler.js +29 -39
- package/examples/jsm/tsl/display/AfterImageNode.js +2 -0
- package/examples/jsm/tsl/display/AnaglyphPassNode.js +3 -2
- package/examples/jsm/tsl/display/BilateralBlurNode.js +5 -2
- package/examples/jsm/tsl/display/BloomNode.js +55 -30
- package/examples/jsm/tsl/display/DenoiseNode.js +21 -1
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +24 -6
- package/examples/jsm/tsl/display/DotScreenNode.js +11 -11
- package/examples/jsm/tsl/display/FSR1Node.js +8 -4
- package/examples/jsm/tsl/display/GTAONode.js +199 -86
- package/examples/jsm/tsl/display/GaussianBlurNode.js +65 -52
- package/examples/jsm/tsl/display/GodraysNode.js +5 -2
- package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +2 -2
- package/examples/jsm/tsl/display/LensflareNode.js +5 -2
- package/examples/jsm/tsl/display/OITPassNode.js +352 -0
- package/examples/jsm/tsl/display/OutlineNode.js +2 -0
- package/examples/jsm/tsl/display/ParallaxBarrierPassNode.js +3 -2
- package/examples/jsm/tsl/display/RGBShiftNode.js +9 -9
- package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +7 -4
- package/examples/jsm/tsl/display/RetroPassNode.js +1 -1
- package/examples/jsm/tsl/display/SMAANode.js +22 -61
- package/examples/jsm/tsl/display/SSAAPassNode.js +2 -4
- package/examples/jsm/tsl/display/SSAONode.js +436 -0
- package/examples/jsm/tsl/display/SSGINode.js +5 -2
- package/examples/jsm/tsl/display/SSRNode.js +7 -2
- package/examples/jsm/tsl/display/SSSNode.js +5 -2
- package/examples/jsm/tsl/display/SharpenNode.js +5 -4
- package/examples/jsm/tsl/display/StereoCompositePassNode.js +1 -3
- package/examples/jsm/tsl/display/StereoPassNode.js +1 -3
- package/examples/jsm/tsl/display/TAAUNode.js +22 -125
- package/examples/jsm/tsl/display/TRAANode.js +16 -142
- package/examples/jsm/tsl/display/TemporalReprojectNode.js +21 -15
- package/examples/jsm/tsl/display/depthAwareBlur.js +63 -0
- package/examples/jsm/tsl/display/hashBlur.js +3 -2
- package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +38 -27
- package/examples/jsm/tsl/lighting/LightProbeGridNode.js +136 -0
- package/examples/jsm/tsl/math/voronoiNoise.js +112 -0
- package/examples/jsm/tsl/shadows/TileShadowNode.js +4 -6
- package/examples/jsm/tsl/utils/Raymarching.js +5 -5
- package/examples/jsm/tsl/utils/SoftParticles.js +60 -0
- package/examples/jsm/tsl/utils/TAAUtils.js +195 -0
- package/examples/jsm/utils/BufferGeometryUtils.js +14 -14
- package/examples/jsm/utils/GaussianSplatUtils.js +229 -0
- package/examples/jsm/utils/WebGLTextureUtils.js +1 -1
- package/examples/jsm/utils/WebGPUTextureUtils.js +1 -1
- package/examples/jsm/webxr/WebGLXRFallback.js +2 -16
- package/examples/jsm/webxr/XRControllerModelFactory.js +16 -4
- package/package.json +9 -16
- package/src/Three.Core.js +2 -1
- package/src/Three.TSL.js +73 -43
- package/src/Three.WebGPU.Nodes.js +1 -0
- package/src/Three.WebGPU.js +1 -0
- package/src/animation/AnimationClip.js +15 -2
- package/src/animation/AnimationObjectGroup.js +18 -6
- package/src/animation/AnimationUtils.js +26 -0
- package/src/animation/KeyframeTrack.js +37 -0
- package/src/constants.js +23 -1
- package/src/core/BufferAttribute.js +3 -2
- package/src/core/BufferGeometry.js +1 -1
- package/src/core/InterleavedBuffer.js +5 -1
- package/src/core/Object3D.js +40 -12
- package/src/core/Raycaster.js +4 -0
- package/src/core/RenderTarget.js +99 -9
- package/src/core/RenderTarget3D.js +12 -8
- package/src/extras/Controls.js +0 -8
- package/src/extras/PMREMGenerator.js +99 -205
- package/src/geometries/TorusGeometry.js +1 -1
- package/src/helpers/ArrowHelper.js +2 -0
- package/src/helpers/AxesHelper.js +2 -0
- package/src/helpers/Box3Helper.js +2 -0
- package/src/helpers/BoxHelper.js +2 -0
- package/src/helpers/CameraHelper.js +2 -0
- package/src/helpers/DirectionalLightHelper.js +2 -0
- package/src/helpers/GridHelper.js +2 -0
- package/src/helpers/HemisphereLightHelper.js +2 -0
- package/src/helpers/PlaneHelper.js +2 -0
- package/src/helpers/PointLightHelper.js +2 -0
- package/src/helpers/PolarGridHelper.js +2 -0
- package/src/helpers/SkeletonHelper.js +2 -0
- package/src/helpers/SpotLightHelper.js +2 -0
- package/src/lights/Light.js +0 -10
- package/src/lights/LightShadow.js +43 -12
- package/src/lights/SpotLightShadow.js +18 -0
- package/src/loaders/BufferGeometryLoader.js +5 -0
- package/src/loaders/ImageBitmapLoader.js +3 -1
- package/src/loaders/ObjectLoader.js +8 -5
- package/src/materials/Material.js +80 -57
- package/src/materials/MeshPhysicalMaterial.js +32 -0
- package/src/materials/nodes/Line2NodeMaterial.js +17 -8
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +42 -5
- package/src/materials/nodes/NodeMaterial.js +19 -13
- package/src/materials/nodes/PointsNodeMaterial.js +2 -1
- package/src/materials/nodes/manager/NodeMaterialObserver.js +282 -55
- package/src/math/Frustum.js +9 -0
- package/src/math/FrustumArray.js +1 -1
- package/src/math/MathUtils.js +5 -3
- package/src/math/Matrix4.js +2 -9
- package/src/math/Plane.js +30 -1
- package/src/math/Quaternion.js +0 -10
- package/src/math/Ray.js +95 -45
- package/src/math/Triangle.js +0 -2
- package/src/math/Vector3.js +2 -2
- package/src/math/Vector4.js +0 -4
- package/src/math/interpolants/BezierInterpolant.js +36 -23
- package/src/nodes/Nodes.js +2 -0
- package/src/nodes/TSL.js +11 -3
- package/src/nodes/accessors/Batch.js +85 -13
- package/src/nodes/accessors/BufferAttributeNode.js +1 -1
- package/src/nodes/accessors/BuiltinNode.js +1 -1
- package/src/nodes/accessors/Instance.js +19 -18
- package/src/nodes/accessors/MaterialNode.js +9 -0
- package/src/nodes/accessors/ModelNode.js +85 -9
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -70
- package/src/nodes/accessors/ReferenceElementNode.js +72 -0
- package/src/nodes/accessors/ReferenceNode.js +1 -70
- package/src/nodes/accessors/Skinning.js +124 -12
- package/src/nodes/accessors/StorageTextureNode.js +7 -3
- package/src/nodes/accessors/Texture3DNode.js +1 -1
- package/src/nodes/accessors/TextureNode.js +51 -21
- package/src/nodes/accessors/TextureSizeNode.js +4 -2
- package/src/nodes/accessors/UniformArrayNode.js +30 -5
- package/src/nodes/code/CodeNode.js +1 -1
- package/src/nodes/code/FunctionNode.js +12 -2
- package/src/nodes/core/ArrayNode.js +2 -2
- package/src/nodes/core/ContextNode.js +57 -4
- package/src/nodes/core/IndexNode.js +69 -4
- package/src/nodes/core/InspectorNode.js +2 -2
- package/src/nodes/core/MRTNode.js +44 -2
- package/src/nodes/core/Node.js +6 -3
- package/src/nodes/core/NodeBuilder.js +65 -50
- package/src/nodes/core/NodeFrame.js +11 -3
- package/src/nodes/core/NodeUtils.js +88 -0
- package/src/nodes/core/PropertyNode.js +8 -0
- package/src/nodes/core/StackNode.js +0 -1
- package/src/nodes/core/StructNode.js +4 -3
- package/src/nodes/core/UniformGroupNode.js +3 -2
- package/src/nodes/core/UniformNode.js +26 -12
- package/src/nodes/core/VarNode.js +0 -1
- package/src/nodes/display/BumpMapNode.js +2 -2
- package/src/nodes/display/ColorAdjustment.js +1 -1
- package/src/nodes/display/PassNode.js +76 -15
- package/src/nodes/display/ScreenNode.js +22 -65
- package/src/nodes/fog/Fog.js +4 -4
- package/src/nodes/functions/BSDF/BRDF_GGX.js +6 -6
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +1 -1
- package/src/nodes/functions/BSDF/DFGLUT.js +2 -1
- package/src/nodes/functions/BSDF/LTC.js +1 -1
- package/src/nodes/functions/PhongLightingModel.js +1 -1
- package/src/nodes/functions/PhysicalLightingModel.js +83 -25
- package/src/nodes/functions/ToonLightingModel.js +2 -2
- package/src/nodes/functions/material/getParallaxCorrectNormal.js +3 -3
- package/src/nodes/gpgpu/AtomicFunctionNode.js +64 -13
- package/src/nodes/gpgpu/BarrierNode.js +13 -4
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +1 -1
- package/src/nodes/gpgpu/ComputeNode.js +20 -17
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +165 -37
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +44 -6
- package/src/nodes/lighting/EnvironmentNode.js +40 -4
- package/src/nodes/lighting/LightsNode.js +20 -4
- package/src/nodes/lighting/ShadowBaseNode.js +158 -1
- package/src/nodes/lighting/ShadowFilterNode.js +2 -106
- package/src/nodes/lighting/ShadowNode.js +22 -91
- package/src/nodes/materialx/{lib/mx_hsv.js → MaterialXColor.js} +3 -6
- package/src/nodes/materialx/{lib/mx_transform_color.js → MaterialXColorTransform.js} +3 -6
- package/src/nodes/materialx/MaterialXCore.js +37 -0
- package/src/nodes/materialx/MaterialXNodes.js +64 -72
- package/src/nodes/materialx/{lib/mx_noise.js → MaterialXNoise.js} +426 -197
- package/src/nodes/math/BitcountNode.js +24 -4
- package/src/nodes/math/MathNode.js +4 -4
- package/src/nodes/math/MathUtils.js +15 -4
- package/src/nodes/math/OperatorNode.js +2 -2
- package/src/nodes/math/PackFloatNode.js +29 -1
- package/src/nodes/math/Packed4x8IntegerNode.js +433 -0
- package/src/nodes/math/UnpackFloatNode.js +30 -2
- package/src/nodes/parsers/GLSLNodeFunction.js +1 -1
- package/src/nodes/pmrem/PMREMNode.js +1 -1
- package/src/nodes/pmrem/PMREMUtils.js +31 -74
- package/src/nodes/shapes/Shapes.js +1 -1
- package/src/nodes/tsl/TSLCore.js +1 -31
- package/src/nodes/utils/EventNode.js +75 -0
- package/src/nodes/utils/LoopNode.js +54 -13
- package/src/nodes/utils/PostProcessingUtils.js +23 -2
- package/src/nodes/utils/RTTNode.js +97 -32
- package/src/nodes/utils/ReflectorNode.js +8 -4
- package/src/nodes/utils/RotateNode.js +85 -8
- package/src/nodes/utils/SpriteUtils.js +58 -23
- package/src/objects/BatchedMesh.js +6 -0
- package/src/objects/InstancedMesh.js +1 -1
- package/src/objects/LOD.js +1 -1
- package/src/objects/Line.js +12 -0
- package/src/objects/Mesh.js +12 -0
- package/src/objects/Points.js +12 -0
- package/src/objects/Sprite.js +12 -0
- package/src/renderers/WebGLRenderer.js +93 -27
- package/src/renderers/common/Animation.js +12 -2
- package/src/renderers/common/Backend.js +38 -10
- package/src/renderers/common/BindGroup.js +0 -1
- package/src/renderers/common/Bindings.js +50 -4
- package/src/renderers/common/BundleGroup.js +4 -0
- package/src/renderers/common/ClippingContext.js +11 -1
- package/src/renderers/common/Color4.js +9 -0
- package/src/renderers/common/Constants.js +0 -5
- package/src/renderers/common/DirectRenderPipeline.js +233 -0
- package/src/renderers/common/Geometries.js +24 -3
- package/src/renderers/common/Info.js +3 -3
- package/src/renderers/common/InspectorBase.js +37 -8
- package/src/renderers/common/Lighting.js +11 -4
- package/src/renderers/common/Pipelines.js +6 -4
- package/src/renderers/common/QuadMesh.js +16 -2
- package/src/renderers/common/RenderContext.js +8 -0
- package/src/renderers/common/RenderList.js +53 -19
- package/src/renderers/common/RenderLists.js +58 -11
- package/src/renderers/common/RenderObject.js +14 -0
- package/src/renderers/common/RenderObjects.js +14 -9
- package/src/renderers/common/RenderPipeline.js +52 -44
- package/src/renderers/common/Renderer.js +226 -55
- package/src/renderers/common/Storage3DTexture.js +16 -0
- package/src/renderers/common/Textures.js +3 -3
- package/src/renderers/common/XRManager.js +79 -72
- package/src/renderers/common/extras/PMREMGenerator.js +76 -144
- package/src/renderers/common/nodes/NodeManager.js +144 -6
- package/src/renderers/common/nodes/NodeStorageBuffer.js +3 -1
- package/src/renderers/common/nodes/NodeUniformBuffer.js +3 -1
- package/src/renderers/shaders/DFGLUTData.js +2 -1
- package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +4 -2
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +48 -0
- package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +53 -4
- package/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js +20 -2
- package/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.js +20 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +6 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +61 -57
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +82 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.js +8 -1
- package/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.js +15 -0
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +4 -0
- package/src/renderers/shaders/ShaderLib.js +1 -0
- package/src/renderers/shaders/UniformsLib.js +16 -0
- package/src/renderers/webgl/WebGLAnimation.js +2 -2
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLLights.js +74 -4
- package/src/renderers/webgl/WebGLMaterials.js +6 -0
- package/src/renderers/webgl/WebGLOutput.js +36 -24
- package/src/renderers/webgl/WebGLProgram.js +3 -0
- package/src/renderers/webgl/WebGLPrograms.js +8 -0
- package/src/renderers/webgl/WebGLRenderLists.js +6 -10
- package/src/renderers/webgl/WebGLShadowMap.js +47 -44
- package/src/renderers/webgl/WebGLTextures.js +7 -7
- package/src/renderers/webgl-fallback/WebGLBackend.js +153 -45
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +83 -29
- package/src/renderers/webgl-fallback/utils/WebGLState.js +163 -17
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +32 -5
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +11 -4
- package/src/renderers/webgpu/WebGPUBackend.js +513 -145
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +99 -20
- package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +2 -1
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +3 -12
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +24 -14
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +80 -14
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +62 -7
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +9 -3
- package/src/renderers/webgpu/utils/WebGPUUtils.js +16 -4
- package/src/renderers/webxr/WebXRManager.js +25 -2
- package/src/scenes/Scene.js +3 -3
- package/src/textures/CompressedArrayTexture.js +16 -0
- package/src/textures/Data3DTexture.js +16 -0
- package/src/textures/DataArrayTexture.js +16 -0
- package/src/textures/DepthTexture.js +3 -3
- package/src/textures/Texture.js +3 -3
- package/src/textures/{Source.js → TextureSource.js} +39 -8
- package/src/utils.js +6 -79
- package/build/three.core.min.js +0 -6
- package/build/three.module.min.js +0 -6
- package/build/three.tsl.min.js +0 -6
- package/build/three.webgpu.min.js +0 -6
- package/build/three.webgpu.nodes.min.js +0 -6
- package/examples/jsm/libs/ecsy.module.js +0 -1792
- package/examples/jsm/loaders/LottieLoader.js +0 -130
- package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +0 -52
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnsx/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.186.0",
|
|
4
4
|
"description": "JavaScript 3D library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/three.cjs",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"build": "rollup -c utils/build/rollup.config.js",
|
|
48
48
|
"build-docs": "jsdoc -c utils/docs/jsdoc.config.json && npm run build-llms",
|
|
49
49
|
"build-llms": "node utils/llms/build.js",
|
|
50
|
-
"build-module": "rollup -c utils/build/rollup.config.js --configOnlyModule",
|
|
51
50
|
"dev": "node utils/build/dev.js && node utils/server.js -p 8080",
|
|
52
51
|
"preview": "node utils/build/preview.js",
|
|
53
52
|
"lint-core": "eslint src",
|
|
@@ -57,8 +56,9 @@
|
|
|
57
56
|
"lint-manual": "eslint manual",
|
|
58
57
|
"lint-test": "eslint test",
|
|
59
58
|
"lint-utils": "eslint utils",
|
|
59
|
+
"lint-tsl": "eslint tsl",
|
|
60
60
|
"lint": "npm run lint-core",
|
|
61
|
-
"lint-fix": "npm run lint-core -- --fix && npm run lint-addons -- --fix && npm run lint-examples -- --fix && npm run lint-editor -- --fix && npm run lint-manual -- --fix && npm run lint-test -- --fix && npm run lint-utils -- --fix",
|
|
61
|
+
"lint-fix": "npm run lint-core -- --fix && npm run lint-addons -- --fix && npm run lint-examples -- --fix && npm run lint-editor -- --fix && npm run lint-manual -- --fix && npm run lint-test -- --fix && npm run lint-utils -- --fix && npm run lint-tsl -- --fix",
|
|
62
62
|
"test-unit": "node test/unit/puppeteer.unit.js --testPage=UnitTests.html --mode=headless",
|
|
63
63
|
"test-unit-headful": "node test/unit/puppeteer.unit.js --testPage=UnitTests.html --mode=headful",
|
|
64
64
|
"test-unit-addons": "node test/unit/puppeteer.unit.js --testPage=UnitTestsAddons.html --mode=headless",
|
|
@@ -99,30 +99,23 @@
|
|
|
99
99
|
"@eslint/js": "^9.0.0",
|
|
100
100
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
101
101
|
"@rollup/plugin-terser": "^1.0.0",
|
|
102
|
-
"eslint": "^
|
|
102
|
+
"eslint": "^10.8.0",
|
|
103
103
|
"eslint-config-mdcs": "^5.0.0",
|
|
104
104
|
"eslint-plugin-compat": "^7.0.0",
|
|
105
105
|
"eslint-plugin-html": "^8.1.3",
|
|
106
|
-
"eslint-plugin-jsdoc": "^
|
|
106
|
+
"eslint-plugin-jsdoc": "^64.0.0",
|
|
107
107
|
"globals": "^17.0.0",
|
|
108
108
|
"jpeg-js": "^0.4.4",
|
|
109
109
|
"jsdoc": "^4.0.5",
|
|
110
|
-
"magic-string": "^0.
|
|
110
|
+
"magic-string": "^1.0.0",
|
|
111
111
|
"pngjs": "^7.0.0",
|
|
112
112
|
"puppeteer": "^25.0.0",
|
|
113
113
|
"rollup": "^4.6.0",
|
|
114
114
|
"three": "file:.",
|
|
115
115
|
"turndown": "^7.2.2"
|
|
116
116
|
},
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
"LICENSE",
|
|
121
|
-
"README.md",
|
|
122
|
-
"build/three.js",
|
|
123
|
-
"build/three.min.js",
|
|
124
|
-
"build/three.module.js"
|
|
125
|
-
],
|
|
126
|
-
"directories": {}
|
|
117
|
+
"allowScripts": {
|
|
118
|
+
"puppeteer": true,
|
|
119
|
+
"fsevents": true
|
|
127
120
|
}
|
|
128
121
|
}
|
package/src/Three.Core.js
CHANGED
|
@@ -24,7 +24,6 @@ export { Group } from './objects/Group.js';
|
|
|
24
24
|
export { VideoTexture } from './textures/VideoTexture.js';
|
|
25
25
|
export { VideoFrameTexture } from './textures/VideoFrameTexture.js';
|
|
26
26
|
export { FramebufferTexture } from './textures/FramebufferTexture.js';
|
|
27
|
-
export { Source } from './textures/Source.js';
|
|
28
27
|
export { DataTexture } from './textures/DataTexture.js';
|
|
29
28
|
export { DataArrayTexture } from './textures/DataArrayTexture.js';
|
|
30
29
|
export { Data3DTexture } from './textures/Data3DTexture.js';
|
|
@@ -38,6 +37,7 @@ export { DepthTexture } from './textures/DepthTexture.js';
|
|
|
38
37
|
export { CubeDepthTexture } from './textures/CubeDepthTexture.js';
|
|
39
38
|
export { ExternalTexture } from './textures/ExternalTexture.js';
|
|
40
39
|
export { Texture } from './textures/Texture.js';
|
|
40
|
+
export { TextureSource, Source } from './textures/TextureSource.js';
|
|
41
41
|
export * from './geometries/Geometries.js';
|
|
42
42
|
export * from './materials/Materials.js';
|
|
43
43
|
export { AnimationLoader } from './loaders/AnimationLoader.js';
|
|
@@ -63,6 +63,7 @@ export { HemisphereLight } from './lights/HemisphereLight.js';
|
|
|
63
63
|
export { DirectionalLight } from './lights/DirectionalLight.js';
|
|
64
64
|
export { AmbientLight } from './lights/AmbientLight.js';
|
|
65
65
|
export { Light } from './lights/Light.js';
|
|
66
|
+
export { LightShadow } from './lights/LightShadow.js';
|
|
66
67
|
export { LightProbe } from './lights/LightProbe.js';
|
|
67
68
|
export { StereoCamera } from './cameras/StereoCamera.js';
|
|
68
69
|
export { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
|
package/src/Three.TSL.js
CHANGED
|
@@ -2,6 +2,7 @@ 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 BRDF_Sheen = TSL.BRDF_Sheen;
|
|
5
6
|
export const BasicPointShadowFilter = TSL.BasicPointShadowFilter;
|
|
6
7
|
export const BasicShadowFilter = TSL.BasicShadowFilter;
|
|
7
8
|
export const Break = TSL.Break;
|
|
@@ -9,23 +10,35 @@ export const Const = TSL.Const;
|
|
|
9
10
|
export const Continue = TSL.Continue;
|
|
10
11
|
export const DFGLUT = TSL.DFGLUT;
|
|
11
12
|
export const D_GGX = TSL.D_GGX;
|
|
13
|
+
export const D_GGX_Anisotropic = TSL.D_GGX_Anisotropic;
|
|
12
14
|
export const Discard = TSL.Discard;
|
|
13
15
|
export const EPSILON = TSL.EPSILON;
|
|
16
|
+
export const EnvironmentBRDF = TSL.EnvironmentBRDF;
|
|
14
17
|
export const F_Schlick = TSL.F_Schlick;
|
|
15
18
|
export const Fn = TSL.Fn;
|
|
19
|
+
export const HALF_PI = TSL.HALF_PI;
|
|
16
20
|
export const INFINITY = TSL.INFINITY;
|
|
17
21
|
export const If = TSL.If;
|
|
22
|
+
export const LTC_Evaluate = TSL.LTC_Evaluate;
|
|
23
|
+
export const LTC_Evaluate_Volume = TSL.LTC_Evaluate_Volume;
|
|
24
|
+
export const LTC_Uv = TSL.LTC_Uv;
|
|
18
25
|
export const Loop = TSL.Loop;
|
|
19
26
|
export const NodeAccess = TSL.NodeAccess;
|
|
20
27
|
export const NodeShaderStage = TSL.NodeShaderStage;
|
|
21
28
|
export const NodeType = TSL.NodeType;
|
|
22
29
|
export const NodeUpdateType = TSL.NodeUpdateType;
|
|
30
|
+
export const OnAfterObjectUpdate = TSL.OnAfterObjectUpdate;
|
|
31
|
+
export const OnAfterRenderPipeline = TSL.OnAfterRenderPipeline;
|
|
32
|
+
export const OnBeforeFrameUpdate = TSL.OnBeforeFrameUpdate;
|
|
33
|
+
export const OnBeforeMaterialUpdate = TSL.OnBeforeMaterialUpdate;
|
|
34
|
+
export const OnBeforeObjectUpdate = TSL.OnBeforeObjectUpdate;
|
|
35
|
+
export const OnBeforeRenderPipeline = TSL.OnBeforeRenderPipeline;
|
|
36
|
+
export const OnFrameUpdate = TSL.OnFrameUpdate;
|
|
37
|
+
export const OnMaterialUpdate = TSL.OnMaterialUpdate;
|
|
38
|
+
export const OnObjectUpdate = TSL.OnObjectUpdate;
|
|
23
39
|
export const PCFShadowFilter = TSL.PCFShadowFilter;
|
|
24
|
-
export const PCFSoftShadowFilter = TSL.PCFSoftShadowFilter;
|
|
25
40
|
export const PI = TSL.PI;
|
|
26
41
|
export const PI2 = TSL.PI2;
|
|
27
|
-
export const TWO_PI = TSL.TWO_PI;
|
|
28
|
-
export const HALF_PI = TSL.HALF_PI;
|
|
29
42
|
export const PointShadowFilter = TSL.PointShadowFilter;
|
|
30
43
|
export const Return = TSL.Return;
|
|
31
44
|
export const Schlick_to_F0 = TSL.Schlick_to_F0;
|
|
@@ -33,8 +46,10 @@ export const ShaderNode = TSL.ShaderNode;
|
|
|
33
46
|
export const Stack = TSL.Stack;
|
|
34
47
|
export const Switch = TSL.Switch;
|
|
35
48
|
export const TBNViewMatrix = TSL.TBNViewMatrix;
|
|
49
|
+
export const TWO_PI = TSL.TWO_PI;
|
|
36
50
|
export const VSMShadowFilter = TSL.VSMShadowFilter;
|
|
37
51
|
export const V_GGX_SmithCorrelated = TSL.V_GGX_SmithCorrelated;
|
|
52
|
+
export const V_GGX_SmithCorrelated_Anisotropic = TSL.V_GGX_SmithCorrelated_Anisotropic;
|
|
38
53
|
export const Var = TSL.Var;
|
|
39
54
|
export const VarIntent = TSL.VarIntent;
|
|
40
55
|
export const abs = TSL.abs;
|
|
@@ -53,7 +68,6 @@ export const anisotropy = TSL.anisotropy;
|
|
|
53
68
|
export const anisotropyB = TSL.anisotropyB;
|
|
54
69
|
export const anisotropyT = TSL.anisotropyT;
|
|
55
70
|
export const any = TSL.any;
|
|
56
|
-
export const append = TSL.append;
|
|
57
71
|
export const array = TSL.array;
|
|
58
72
|
export const asin = TSL.asin;
|
|
59
73
|
export const asinh = TSL.asinh;
|
|
@@ -78,6 +92,8 @@ export const backgroundBlurriness = TSL.backgroundBlurriness;
|
|
|
78
92
|
export const backgroundIntensity = TSL.backgroundIntensity;
|
|
79
93
|
export const backgroundRotation = TSL.backgroundRotation;
|
|
80
94
|
export const batch = TSL.batch;
|
|
95
|
+
export const batchColor = TSL.batchColor;
|
|
96
|
+
export const batchIndirectIndex = TSL.batchIndirectIndex;
|
|
81
97
|
export const bentNormalView = TSL.bentNormalView;
|
|
82
98
|
export const billboarding = TSL.billboarding;
|
|
83
99
|
export const bitAnd = TSL.bitAnd;
|
|
@@ -87,6 +103,7 @@ export const bitXor = TSL.bitXor;
|
|
|
87
103
|
export const bitangentGeometry = TSL.bitangentGeometry;
|
|
88
104
|
export const bitangentLocal = TSL.bitangentLocal;
|
|
89
105
|
export const bitangentView = TSL.bitangentView;
|
|
106
|
+
export const bitangentViewFrame = TSL.bitangentViewFrame;
|
|
90
107
|
export const bitangentWorld = TSL.bitangentWorld;
|
|
91
108
|
export const bitcast = TSL.bitcast;
|
|
92
109
|
export const blendBurn = TSL.blendBurn;
|
|
@@ -94,14 +111,14 @@ export const blendColor = TSL.blendColor;
|
|
|
94
111
|
export const blendDodge = TSL.blendDodge;
|
|
95
112
|
export const blendOverlay = TSL.blendOverlay;
|
|
96
113
|
export const blendScreen = TSL.blendScreen;
|
|
97
|
-
export const blur = TSL.blur;
|
|
98
114
|
export const bool = TSL.bool;
|
|
99
115
|
export const buffer = TSL.buffer;
|
|
100
116
|
export const bufferAttribute = TSL.bufferAttribute;
|
|
101
|
-
export const bumpMap = TSL.bumpMap;
|
|
102
117
|
export const builtin = TSL.builtin;
|
|
103
118
|
export const builtinAOContext = TSL.builtinAOContext;
|
|
119
|
+
export const builtinGIContext = TSL.builtinGIContext;
|
|
104
120
|
export const builtinShadowContext = TSL.builtinShadowContext;
|
|
121
|
+
export const bumpMap = TSL.bumpMap;
|
|
105
122
|
export const bvec2 = TSL.bvec2;
|
|
106
123
|
export const bvec3 = TSL.bvec3;
|
|
107
124
|
export const bvec4 = TSL.bvec4;
|
|
@@ -128,6 +145,8 @@ export const clearcoat = TSL.clearcoat;
|
|
|
128
145
|
export const clearcoatNormalView = TSL.clearcoatNormalView;
|
|
129
146
|
export const clearcoatRoughness = TSL.clearcoatRoughness;
|
|
130
147
|
export const clipSpace = TSL.clipSpace;
|
|
148
|
+
export const clipping = TSL.clipping;
|
|
149
|
+
export const clippingAlpha = TSL.clippingAlpha;
|
|
131
150
|
export const code = TSL.code;
|
|
132
151
|
export const color = TSL.color;
|
|
133
152
|
export const colorSpaceToWorking = TSL.colorSpaceToWorking;
|
|
@@ -139,11 +158,11 @@ export const context = TSL.context;
|
|
|
139
158
|
export const convert = TSL.convert;
|
|
140
159
|
export const convertColorSpace = TSL.convertColorSpace;
|
|
141
160
|
export const convertToTexture = TSL.convertToTexture;
|
|
161
|
+
export const cos = TSL.cos;
|
|
162
|
+
export const cosh = TSL.cosh;
|
|
142
163
|
export const countLeadingZeros = TSL.countLeadingZeros;
|
|
143
164
|
export const countOneBits = TSL.countOneBits;
|
|
144
165
|
export const countTrailingZeros = TSL.countTrailingZeros;
|
|
145
|
-
export const cos = TSL.cos;
|
|
146
|
-
export const cosh = TSL.cosh;
|
|
147
166
|
export const cross = TSL.cross;
|
|
148
167
|
export const cubeTexture = TSL.cubeTexture;
|
|
149
168
|
export const cubeTextureBase = TSL.cubeTextureBase;
|
|
@@ -158,13 +177,13 @@ export const defaultShaderStages = TSL.defaultShaderStages;
|
|
|
158
177
|
export const defined = TSL.defined;
|
|
159
178
|
export const degrees = TSL.degrees;
|
|
160
179
|
export const deltaTime = TSL.deltaTime;
|
|
161
|
-
export const densityFog = TSL.densityFog;
|
|
162
180
|
export const densityFogFactor = TSL.densityFogFactor;
|
|
163
181
|
export const depth = TSL.depth;
|
|
164
182
|
export const depthPass = TSL.depthPass;
|
|
165
183
|
export const determinant = TSL.determinant;
|
|
166
184
|
export const difference = TSL.difference;
|
|
167
185
|
export const diffuseColor = TSL.diffuseColor;
|
|
186
|
+
export const diffuseContribution = TSL.diffuseContribution;
|
|
168
187
|
export const directPointLight = TSL.directPointLight;
|
|
169
188
|
export const directionToColor = TSL.directionToColor;
|
|
170
189
|
export const directionToFaceDirection = TSL.directionToFaceDirection;
|
|
@@ -172,6 +191,8 @@ export const dispersion = TSL.dispersion;
|
|
|
172
191
|
export const distance = TSL.distance;
|
|
173
192
|
export const div = TSL.div;
|
|
174
193
|
export const dot = TSL.dot;
|
|
194
|
+
export const dot4I8Packed = TSL.dot4I8Packed;
|
|
195
|
+
export const dot4U8Packed = TSL.dot4U8Packed;
|
|
175
196
|
export const drawIndex = TSL.drawIndex;
|
|
176
197
|
export const dynamicBufferAttribute = TSL.dynamicBufferAttribute;
|
|
177
198
|
export const element = TSL.element;
|
|
@@ -200,7 +221,6 @@ export const gain = TSL.gain;
|
|
|
200
221
|
export const gapSize = TSL.gapSize;
|
|
201
222
|
export const getConstNodeType = TSL.getConstNodeType;
|
|
202
223
|
export const getCurrentStack = TSL.getCurrentStack;
|
|
203
|
-
export const getDirection = TSL.getDirection;
|
|
204
224
|
export const getDistanceAttenuation = TSL.getDistanceAttenuation;
|
|
205
225
|
export const getGeometryRoughness = TSL.getGeometryRoughness;
|
|
206
226
|
// WITH_GENESYS
|
|
@@ -208,14 +228,11 @@ export const getLightProbeGridIrradiance = TSL.getLightProbeGridIrradiance;
|
|
|
208
228
|
export const getLightProbeGridIrradianceAtUV = TSL.getLightProbeGridIrradianceAtUV;
|
|
209
229
|
// !WITH_GENESYS
|
|
210
230
|
export const getNormalFromDepth = TSL.getNormalFromDepth;
|
|
211
|
-
export const interleavedGradientNoise = TSL.interleavedGradientNoise;
|
|
212
|
-
export const vogelDiskSample = TSL.vogelDiskSample;
|
|
213
231
|
export const getParallaxCorrectNormal = TSL.getParallaxCorrectNormal;
|
|
214
232
|
export const getRoughness = TSL.getRoughness;
|
|
215
233
|
export const getScreenPosition = TSL.getScreenPosition;
|
|
234
|
+
export const getScreenPositionFromClip = TSL.getScreenPositionFromClip;
|
|
216
235
|
export const getShIrradianceAt = TSL.getShIrradianceAt;
|
|
217
|
-
export const getShadowMaterial = TSL.getShadowMaterial;
|
|
218
|
-
export const getShadowRenderObjectFunction = TSL.getShadowRenderObjectFunction;
|
|
219
236
|
export const getTextureIndex = TSL.getTextureIndex;
|
|
220
237
|
export const getViewPosition = TSL.getViewPosition;
|
|
221
238
|
export const globalId = TSL.globalId;
|
|
@@ -224,13 +241,16 @@ export const glslFn = TSL.glslFn;
|
|
|
224
241
|
export const grayscale = TSL.grayscale;
|
|
225
242
|
export const greaterThan = TSL.greaterThan;
|
|
226
243
|
export const greaterThanEqual = TSL.greaterThanEqual;
|
|
244
|
+
export const hardwareClipping = TSL.hardwareClipping;
|
|
227
245
|
export const hash = TSL.hash;
|
|
228
246
|
export const highpModelNormalViewMatrix = TSL.highpModelNormalViewMatrix;
|
|
229
247
|
export const highpModelViewMatrix = TSL.highpModelViewMatrix;
|
|
230
248
|
export const hue = TSL.hue;
|
|
231
249
|
export const increment = TSL.increment;
|
|
232
250
|
export const incrementBefore = TSL.incrementBefore;
|
|
251
|
+
export const inspect = TSL.inspect;
|
|
233
252
|
export const instance = TSL.instance;
|
|
253
|
+
export const instanceColor = TSL.instanceColor;
|
|
234
254
|
export const instanceIndex = TSL.instanceIndex;
|
|
235
255
|
export const instancedArray = TSL.instancedArray;
|
|
236
256
|
export const instancedBufferAttribute = TSL.instancedBufferAttribute;
|
|
@@ -238,6 +258,7 @@ export const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribu
|
|
|
238
258
|
export const instancedMesh = TSL.instancedMesh;
|
|
239
259
|
export const int = TSL.int;
|
|
240
260
|
export const intBitsToFloat = TSL.intBitsToFloat;
|
|
261
|
+
export const interleavedGradientNoise = TSL.interleavedGradientNoise;
|
|
241
262
|
export const inverse = TSL.inverse;
|
|
242
263
|
export const inverseSqrt = TSL.inverseSqrt;
|
|
243
264
|
export const inversesqrt = TSL.inversesqrt;
|
|
@@ -247,6 +268,7 @@ export const ior = TSL.ior;
|
|
|
247
268
|
export const iridescence = TSL.iridescence;
|
|
248
269
|
export const iridescenceIOR = TSL.iridescenceIOR;
|
|
249
270
|
export const iridescenceThickness = TSL.iridescenceThickness;
|
|
271
|
+
export const isolate = TSL.isolate;
|
|
250
272
|
export const ivec2 = TSL.ivec2;
|
|
251
273
|
export const ivec3 = TSL.ivec3;
|
|
252
274
|
export const ivec4 = TSL.ivec4;
|
|
@@ -306,6 +328,7 @@ export const materialPointSize = TSL.materialPointSize;
|
|
|
306
328
|
export const materialReference = TSL.materialReference;
|
|
307
329
|
export const materialReflectivity = TSL.materialReflectivity;
|
|
308
330
|
export const materialRefractionRatio = TSL.materialRefractionRatio;
|
|
331
|
+
export const materialRetroreflectivity = TSL.materialRetroreflectivity;
|
|
309
332
|
export const materialRotation = TSL.materialRotation;
|
|
310
333
|
export const materialRoughness = TSL.materialRoughness;
|
|
311
334
|
export const materialSheen = TSL.materialSheen;
|
|
@@ -342,9 +365,11 @@ export const mx_aastep = TSL.mx_aastep;
|
|
|
342
365
|
export const mx_add = TSL.mx_add;
|
|
343
366
|
export const mx_atan2 = TSL.mx_atan2;
|
|
344
367
|
export const mx_cell_noise_float = TSL.mx_cell_noise_float;
|
|
368
|
+
export const mx_cell_noise_vec3 = TSL.mx_cell_noise_vec3;
|
|
345
369
|
export const mx_contrast = TSL.mx_contrast;
|
|
346
370
|
export const mx_divide = TSL.mx_divide;
|
|
347
371
|
export const mx_fractal_noise_float = TSL.mx_fractal_noise_float;
|
|
372
|
+
export const mx_fractal_noise_float_2d = TSL.mx_fractal_noise_float_2d;
|
|
348
373
|
export const mx_fractal_noise_vec2 = TSL.mx_fractal_noise_vec2;
|
|
349
374
|
export const mx_fractal_noise_vec3 = TSL.mx_fractal_noise_vec3;
|
|
350
375
|
export const mx_fractal_noise_vec4 = TSL.mx_fractal_noise_vec4;
|
|
@@ -370,6 +395,7 @@ export const mx_rotate2d = TSL.mx_rotate2d;
|
|
|
370
395
|
export const mx_rotate3d = TSL.mx_rotate3d;
|
|
371
396
|
export const mx_safepower = TSL.mx_safepower;
|
|
372
397
|
export const mx_separate = TSL.mx_separate;
|
|
398
|
+
export const mx_smoothstep = TSL.mx_smoothstep;
|
|
373
399
|
export const mx_splitlr = TSL.mx_splitlr;
|
|
374
400
|
export const mx_splittb = TSL.mx_splittb;
|
|
375
401
|
export const mx_srgb_texture_to_lin_rec709 = TSL.mx_srgb_texture_to_lin_rec709;
|
|
@@ -379,8 +405,11 @@ export const mx_transform_uv = TSL.mx_transform_uv;
|
|
|
379
405
|
export const mx_unifiednoise2d = TSL.mx_unifiednoise2d;
|
|
380
406
|
export const mx_unifiednoise3d = TSL.mx_unifiednoise3d;
|
|
381
407
|
export const mx_worley_noise_float = TSL.mx_worley_noise_float;
|
|
408
|
+
export const mx_worley_noise_float_2d = TSL.mx_worley_noise_float_2d;
|
|
409
|
+
export const mx_worley_noise_float_3d = TSL.mx_worley_noise_float_3d;
|
|
382
410
|
export const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
|
|
383
411
|
export const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
|
|
412
|
+
export const mx_worley_noise_vec3_style = TSL.mx_worley_noise_vec3_style;
|
|
384
413
|
export const negate = TSL.negate;
|
|
385
414
|
export const negateOnBackSide = TSL.negateOnBackSide;
|
|
386
415
|
export const neutralToneMapping = TSL.neutralToneMapping;
|
|
@@ -390,6 +419,7 @@ export const nodeObject = TSL.nodeObject;
|
|
|
390
419
|
export const nodeObjectIntent = TSL.nodeObjectIntent;
|
|
391
420
|
export const nodeObjects = TSL.nodeObjects;
|
|
392
421
|
export const nodeProxy = TSL.nodeProxy;
|
|
422
|
+
export const nodeProxyConstructor = TSL.nodeProxyConstructor;
|
|
393
423
|
export const nodeProxyIntent = TSL.nodeProxyIntent;
|
|
394
424
|
export const normalFlat = TSL.normalFlat;
|
|
395
425
|
export const normalGeometry = TSL.normalGeometry;
|
|
@@ -410,10 +440,6 @@ export const objectRadius = TSL.objectRadius;
|
|
|
410
440
|
export const objectScale = TSL.objectScale;
|
|
411
441
|
export const objectViewPosition = TSL.objectViewPosition;
|
|
412
442
|
export const objectWorldMatrix = TSL.objectWorldMatrix;
|
|
413
|
-
export const OnBeforeObjectUpdate = TSL.OnBeforeObjectUpdate;
|
|
414
|
-
export const OnBeforeMaterialUpdate = TSL.OnBeforeMaterialUpdate;
|
|
415
|
-
export const OnObjectUpdate = TSL.OnObjectUpdate;
|
|
416
|
-
export const OnMaterialUpdate = TSL.OnMaterialUpdate;
|
|
417
443
|
export const oneMinus = TSL.oneMinus;
|
|
418
444
|
export const or = TSL.or;
|
|
419
445
|
export const orthographicDepthToViewZ = TSL.orthographicDepthToViewZ;
|
|
@@ -426,10 +452,16 @@ export const outputStruct = TSL.outputStruct;
|
|
|
426
452
|
export const overloadingFn = TSL.overloadingFn;
|
|
427
453
|
export const overrideNode = TSL.overrideNode;
|
|
428
454
|
export const overrideNodes = TSL.overrideNodes;
|
|
455
|
+
export const pack4xI8 = TSL.pack4xI8;
|
|
456
|
+
export const pack4xI8Clamp = TSL.pack4xI8Clamp;
|
|
457
|
+
export const pack4xU8 = TSL.pack4xU8;
|
|
458
|
+
export const pack4xU8Clamp = TSL.pack4xU8Clamp;
|
|
429
459
|
export const packHalf2x16 = TSL.packHalf2x16;
|
|
460
|
+
export const packNormalToRGB = TSL.packNormalToRGB;
|
|
430
461
|
export const packSnorm2x16 = TSL.packSnorm2x16;
|
|
462
|
+
export const packSnorm4x8 = TSL.packSnorm4x8;
|
|
431
463
|
export const packUnorm2x16 = TSL.packUnorm2x16;
|
|
432
|
-
export const
|
|
464
|
+
export const packUnorm4x8 = TSL.packUnorm4x8;
|
|
433
465
|
export const parabola = TSL.parabola;
|
|
434
466
|
export const parallaxDirection = TSL.parallaxDirection;
|
|
435
467
|
export const parallaxUV = TSL.parallaxUV;
|
|
@@ -456,10 +488,13 @@ export const pow3 = TSL.pow3;
|
|
|
456
488
|
export const pow4 = TSL.pow4;
|
|
457
489
|
export const premultiplyAlpha = TSL.premultiplyAlpha;
|
|
458
490
|
export const property = TSL.property;
|
|
491
|
+
export const quadBroadcast = TSL.quadBroadcast;
|
|
492
|
+
export const quadSwapDiagonal = TSL.quadSwapDiagonal;
|
|
493
|
+
export const quadSwapX = TSL.quadSwapX;
|
|
494
|
+
export const quadSwapY = TSL.quadSwapY;
|
|
459
495
|
export const radians = TSL.radians;
|
|
460
496
|
export const rand = TSL.rand;
|
|
461
497
|
export const range = TSL.range;
|
|
462
|
-
export const rangeFog = TSL.rangeFog;
|
|
463
498
|
export const rangeFogFactor = TSL.rangeFogFactor;
|
|
464
499
|
export const reciprocal = TSL.reciprocal;
|
|
465
500
|
export const reference = TSL.reference;
|
|
@@ -478,6 +513,7 @@ export const renderGroup = TSL.renderGroup;
|
|
|
478
513
|
export const renderOutput = TSL.renderOutput;
|
|
479
514
|
export const rendererReference = TSL.rendererReference;
|
|
480
515
|
export const replaceDefaultUV = TSL.replaceDefaultUV;
|
|
516
|
+
export const retroreflectivity = TSL.retroreflectivity;
|
|
481
517
|
export const rotate = TSL.rotate;
|
|
482
518
|
export const rotateUV = TSL.rotateUV;
|
|
483
519
|
export const roughness = TSL.roughness;
|
|
@@ -490,7 +526,6 @@ export const sampler = TSL.sampler;
|
|
|
490
526
|
export const samplerComparison = TSL.samplerComparison;
|
|
491
527
|
export const saturate = TSL.saturate;
|
|
492
528
|
export const saturation = TSL.saturation;
|
|
493
|
-
export const screen = TSL.screen;
|
|
494
529
|
export const screenCoordinate = TSL.screenCoordinate;
|
|
495
530
|
export const screenDPR = TSL.screenDPR;
|
|
496
531
|
export const screenSize = TSL.screenSize;
|
|
@@ -510,12 +545,13 @@ export const shiftRight = TSL.shiftRight;
|
|
|
510
545
|
export const shininess = TSL.shininess;
|
|
511
546
|
export const sign = TSL.sign;
|
|
512
547
|
export const sin = TSL.sin;
|
|
513
|
-
export const sinh = TSL.sinh;
|
|
514
548
|
export const sinc = TSL.sinc;
|
|
549
|
+
export const sinh = TSL.sinh;
|
|
515
550
|
export const skinning = TSL.skinning;
|
|
516
551
|
export const smoothstep = TSL.smoothstep;
|
|
517
552
|
export const smoothstepElement = TSL.smoothstepElement;
|
|
518
553
|
export const specularColor = TSL.specularColor;
|
|
554
|
+
export const specularColorBlended = TSL.specularColorBlended;
|
|
519
555
|
export const specularF90 = TSL.specularF90;
|
|
520
556
|
export const spherizeUV = TSL.spherizeUV;
|
|
521
557
|
export const split = TSL.split;
|
|
@@ -526,10 +562,12 @@ export const step = TSL.step;
|
|
|
526
562
|
export const stepElement = TSL.stepElement;
|
|
527
563
|
export const storage = TSL.storage;
|
|
528
564
|
export const storageBarrier = TSL.storageBarrier;
|
|
565
|
+
export const storageElement = TSL.storageElement;
|
|
529
566
|
export const storageTexture = TSL.storageTexture;
|
|
530
567
|
export const storageTexture3D = TSL.storageTexture3D;
|
|
531
568
|
export const struct = TSL.struct;
|
|
532
569
|
export const sub = TSL.sub;
|
|
570
|
+
export const subBuild = TSL.subBuild;
|
|
533
571
|
export const subgroupAdd = TSL.subgroupAdd;
|
|
534
572
|
export const subgroupAll = TSL.subgroupAll;
|
|
535
573
|
export const subgroupAnd = TSL.subgroupAnd;
|
|
@@ -537,7 +575,6 @@ export const subgroupAny = TSL.subgroupAny;
|
|
|
537
575
|
export const subgroupBallot = TSL.subgroupBallot;
|
|
538
576
|
export const subgroupBroadcast = TSL.subgroupBroadcast;
|
|
539
577
|
export const subgroupBroadcastFirst = TSL.subgroupBroadcastFirst;
|
|
540
|
-
export const subBuild = TSL.subBuild;
|
|
541
578
|
export const subgroupElect = TSL.subgroupElect;
|
|
542
579
|
export const subgroupExclusiveAdd = TSL.subgroupExclusiveAdd;
|
|
543
580
|
export const subgroupExclusiveMul = TSL.subgroupExclusiveMul;
|
|
@@ -555,20 +592,22 @@ export const subgroupShuffleXor = TSL.subgroupShuffleXor;
|
|
|
555
592
|
export const subgroupSize = TSL.subgroupSize;
|
|
556
593
|
export const subgroupXor = TSL.subgroupXor;
|
|
557
594
|
export const tan = TSL.tan;
|
|
558
|
-
export const tanh = TSL.tanh;
|
|
559
595
|
export const tangentGeometry = TSL.tangentGeometry;
|
|
560
596
|
export const tangentLocal = TSL.tangentLocal;
|
|
561
597
|
export const tangentView = TSL.tangentView;
|
|
598
|
+
export const tangentViewFrame = TSL.tangentViewFrame;
|
|
562
599
|
export const tangentWorld = TSL.tangentWorld;
|
|
600
|
+
export const tanh = TSL.tanh;
|
|
563
601
|
export const texture = TSL.texture;
|
|
564
602
|
export const texture3D = TSL.texture3D;
|
|
603
|
+
export const texture3DLevel = TSL.texture3DLevel;
|
|
604
|
+
export const texture3DLoad = TSL.texture3DLoad;
|
|
565
605
|
export const textureBarrier = TSL.textureBarrier;
|
|
566
606
|
export const textureBicubic = TSL.textureBicubic;
|
|
567
607
|
export const textureBicubicLevel = TSL.textureBicubicLevel;
|
|
568
|
-
export const
|
|
608
|
+
export const textureLevel = TSL.textureLevel;
|
|
569
609
|
export const textureLoad = TSL.textureLoad;
|
|
570
610
|
export const textureSize = TSL.textureSize;
|
|
571
|
-
export const textureLevel = TSL.textureLevel;
|
|
572
611
|
export const textureStore = TSL.textureStore;
|
|
573
612
|
export const thickness = TSL.thickness;
|
|
574
613
|
export const time = TSL.time;
|
|
@@ -594,13 +633,18 @@ export const uintBitsToFloat = TSL.uintBitsToFloat;
|
|
|
594
633
|
export const uniform = TSL.uniform;
|
|
595
634
|
export const uniformArray = TSL.uniformArray;
|
|
596
635
|
export const uniformCubeTexture = TSL.uniformCubeTexture;
|
|
597
|
-
export const uniformGroup = TSL.uniformGroup;
|
|
598
636
|
export const uniformFlow = TSL.uniformFlow;
|
|
637
|
+
export const uniformGroup = TSL.uniformGroup;
|
|
599
638
|
export const uniformTexture = TSL.uniformTexture;
|
|
639
|
+
export const unpack4xI8 = TSL.unpack4xI8;
|
|
640
|
+
export const unpack4xU8 = TSL.unpack4xU8;
|
|
600
641
|
export const unpackHalf2x16 = TSL.unpackHalf2x16;
|
|
642
|
+
export const unpackNormal = TSL.unpackNormal;
|
|
643
|
+
export const unpackRGBToNormal = TSL.unpackRGBToNormal;
|
|
601
644
|
export const unpackSnorm2x16 = TSL.unpackSnorm2x16;
|
|
645
|
+
export const unpackSnorm4x8 = TSL.unpackSnorm4x8;
|
|
602
646
|
export const unpackUnorm2x16 = TSL.unpackUnorm2x16;
|
|
603
|
-
export const
|
|
647
|
+
export const unpackUnorm4x8 = TSL.unpackUnorm4x8;
|
|
604
648
|
export const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
|
|
605
649
|
export const userData = TSL.userData;
|
|
606
650
|
export const uv = TSL.uv;
|
|
@@ -629,12 +673,12 @@ export const viewportDepthTexture = TSL.viewportDepthTexture;
|
|
|
629
673
|
export const viewportLinearDepth = TSL.viewportLinearDepth;
|
|
630
674
|
export const viewportMipTexture = TSL.viewportMipTexture;
|
|
631
675
|
export const viewportOpaqueMipTexture = TSL.viewportOpaqueMipTexture;
|
|
632
|
-
export const viewportResolution = TSL.viewportResolution;
|
|
633
676
|
export const viewportSafeUV = TSL.viewportSafeUV;
|
|
634
677
|
export const viewportSharedTexture = TSL.viewportSharedTexture;
|
|
635
678
|
export const viewportSize = TSL.viewportSize;
|
|
636
679
|
export const viewportTexture = TSL.viewportTexture;
|
|
637
680
|
export const viewportUV = TSL.viewportUV;
|
|
681
|
+
export const vogelDiskSample = TSL.vogelDiskSample;
|
|
638
682
|
export const wgsl = TSL.wgsl;
|
|
639
683
|
export const wgslFn = TSL.wgslFn;
|
|
640
684
|
export const workgroupArray = TSL.workgroupArray;
|
|
@@ -642,17 +686,3 @@ export const workgroupBarrier = TSL.workgroupBarrier;
|
|
|
642
686
|
export const workgroupId = TSL.workgroupId;
|
|
643
687
|
export const workingToColorSpace = TSL.workingToColorSpace;
|
|
644
688
|
export const xor = TSL.xor;
|
|
645
|
-
|
|
646
|
-
/*
|
|
647
|
-
// Use this code to generate the export statements dynamically
|
|
648
|
-
|
|
649
|
-
let code = '';
|
|
650
|
-
|
|
651
|
-
for ( const key of Object.keys( THREE.TSL ) ) {
|
|
652
|
-
|
|
653
|
-
code += `export const ${ key } = TSL.${ key };\n`;
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
log( code );
|
|
658
|
-
//*/
|
|
@@ -9,6 +9,7 @@ export { default as BundleGroup } from './renderers/common/BundleGroup.js';
|
|
|
9
9
|
export { default as QuadMesh } from './renderers/common/QuadMesh.js';
|
|
10
10
|
export { default as PMREMGenerator } from './renderers/common/extras/PMREMGenerator.js';
|
|
11
11
|
export { default as RenderPipeline } from './renderers/common/RenderPipeline.js';
|
|
12
|
+
export { default as DirectRenderPipeline } from './renderers/common/DirectRenderPipeline.js';
|
|
12
13
|
export { default as PostProcessing } from './renderers/common/PostProcessing.js';
|
|
13
14
|
export { default as ReadbackBuffer } from './renderers/common/ReadbackBuffer.js';
|
|
14
15
|
import * as RendererUtils from './renderers/common/RendererUtils.js';
|
package/src/Three.WebGPU.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as BundleGroup } from './renderers/common/BundleGroup.js';
|
|
|
12
12
|
export { default as QuadMesh } from './renderers/common/QuadMesh.js';
|
|
13
13
|
export { default as PMREMGenerator } from './renderers/common/extras/PMREMGenerator.js';
|
|
14
14
|
export { default as RenderPipeline } from './renderers/common/RenderPipeline.js';
|
|
15
|
+
export { default as DirectRenderPipeline } from './renderers/common/DirectRenderPipeline.js';
|
|
15
16
|
export { default as PostProcessing } from './renderers/common/PostProcessing.js';
|
|
16
17
|
export { default as ReadbackBuffer } from './renderers/common/ReadbackBuffer.js';
|
|
17
18
|
import * as RendererUtils from './renderers/common/RendererUtils.js';
|
|
@@ -472,18 +472,31 @@ function parseKeyframeTrack( json ) {
|
|
|
472
472
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
let track;
|
|
476
|
+
|
|
475
477
|
// derived classes can define a static parse method
|
|
476
478
|
if ( trackType.parse !== undefined ) {
|
|
477
479
|
|
|
478
|
-
|
|
480
|
+
track = trackType.parse( json );
|
|
479
481
|
|
|
480
482
|
} else {
|
|
481
483
|
|
|
482
484
|
// by default, we assume a constructor compatible with the base
|
|
483
|
-
|
|
485
|
+
track = new trackType( json.name, json.times, json.values, json.interpolation );
|
|
484
486
|
|
|
485
487
|
}
|
|
486
488
|
|
|
489
|
+
if ( AnimationUtils.hasTangents( json.settings ) ) {
|
|
490
|
+
|
|
491
|
+
track.settings = {
|
|
492
|
+
inTangents: AnimationUtils.convertArray( json.settings.inTangents, Float32Array ),
|
|
493
|
+
outTangents: AnimationUtils.convertArray( json.settings.outTangents, Float32Array )
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return track;
|
|
499
|
+
|
|
487
500
|
}
|
|
488
501
|
|
|
489
502
|
export { AnimationClip };
|
|
@@ -275,12 +275,24 @@ class AnimationObjectGroup {
|
|
|
275
275
|
lastIndex = -- nObjects,
|
|
276
276
|
lastObject = objects[ lastIndex ];
|
|
277
277
|
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
if ( index !== firstActiveIndex ) {
|
|
279
|
+
|
|
280
|
+
// last cached object takes this object's place
|
|
281
|
+
|
|
282
|
+
indicesByUUID[ lastCachedObject.uuid ] = index;
|
|
283
|
+
|
|
284
|
+
}
|
|
285
|
+
|
|
280
286
|
objects[ index ] = lastCachedObject;
|
|
281
287
|
|
|
282
|
-
|
|
283
|
-
|
|
288
|
+
if ( firstActiveIndex !== lastIndex ) {
|
|
289
|
+
|
|
290
|
+
// last object goes to the activated slot and pop
|
|
291
|
+
|
|
292
|
+
indicesByUUID[ lastObject.uuid ] = firstActiveIndex;
|
|
293
|
+
|
|
294
|
+
}
|
|
295
|
+
|
|
284
296
|
objects[ firstActiveIndex ] = lastObject;
|
|
285
297
|
objects.pop();
|
|
286
298
|
|
|
@@ -305,7 +317,7 @@ class AnimationObjectGroup {
|
|
|
305
317
|
const lastIndex = -- nObjects,
|
|
306
318
|
lastObject = objects[ lastIndex ];
|
|
307
319
|
|
|
308
|
-
if (
|
|
320
|
+
if ( index !== lastIndex ) {
|
|
309
321
|
|
|
310
322
|
indicesByUUID[ lastObject.uuid ] = index;
|
|
311
323
|
|
|
@@ -389,7 +401,7 @@ class AnimationObjectGroup {
|
|
|
389
401
|
bindings = this._bindings,
|
|
390
402
|
lastBindingsIndex = bindings.length - 1,
|
|
391
403
|
lastBindings = bindings[ lastBindingsIndex ],
|
|
392
|
-
lastBindingsPath =
|
|
404
|
+
lastBindingsPath = paths[ lastBindingsIndex ];
|
|
393
405
|
|
|
394
406
|
indicesByPath[ lastBindingsPath ] = index;
|
|
395
407
|
|
|
@@ -23,6 +23,18 @@ function convertArray( array, type ) {
|
|
|
23
23
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` if the given keyframe track settings hold Bezier tangent data.
|
|
28
|
+
*
|
|
29
|
+
* @param {?Object} settings - The settings of a keyframe track.
|
|
30
|
+
* @return {boolean} Whether both tangent arrays are defined or not.
|
|
31
|
+
*/
|
|
32
|
+
function hasTangents( settings ) {
|
|
33
|
+
|
|
34
|
+
return settings !== undefined && settings.inTangents !== undefined && settings.outTangents !== undefined;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
/**
|
|
27
39
|
* Returns an array by which times and values can be sorted.
|
|
28
40
|
*
|
|
@@ -405,6 +417,19 @@ class AnimationUtils {
|
|
|
405
417
|
|
|
406
418
|
}
|
|
407
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Returns `true` if the given keyframe track settings hold Bezier tangent data.
|
|
422
|
+
*
|
|
423
|
+
* @static
|
|
424
|
+
* @param {?Object} settings - The settings of a keyframe track.
|
|
425
|
+
* @return {boolean} Whether both tangent arrays are defined or not.
|
|
426
|
+
*/
|
|
427
|
+
static hasTangents( settings ) {
|
|
428
|
+
|
|
429
|
+
return hasTangents( settings );
|
|
430
|
+
|
|
431
|
+
}
|
|
432
|
+
|
|
408
433
|
/**
|
|
409
434
|
* Returns an array by which times and values can be sorted.
|
|
410
435
|
*
|
|
@@ -486,6 +511,7 @@ class AnimationUtils {
|
|
|
486
511
|
export {
|
|
487
512
|
convertArray,
|
|
488
513
|
isTypedArray,
|
|
514
|
+
hasTangents,
|
|
489
515
|
getKeyframeOrder,
|
|
490
516
|
sortedArray,
|
|
491
517
|
flattenJSON,
|