super-three 0.167.0 → 0.169.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 +532 -173
- package/build/three.module.js +532 -174
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +18173 -14266
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +79941 -0
- package/build/three.webgpu.nodes.min.js +6 -0
- package/examples/jsm/Addons.js +0 -4
- package/examples/jsm/animation/AnimationClipCreator.js +1 -1
- package/examples/jsm/capabilities/WebGL.js +27 -21
- package/examples/jsm/controls/ArcballControls.js +174 -158
- package/examples/jsm/controls/DragControls.js +260 -132
- package/examples/jsm/controls/FirstPersonControls.js +175 -163
- package/examples/jsm/controls/FlyControls.js +194 -188
- package/examples/jsm/controls/OrbitControls.js +777 -786
- package/examples/jsm/controls/PointerLockControls.js +24 -15
- package/examples/jsm/controls/TrackballControls.js +469 -448
- package/examples/jsm/controls/TransformControls.js +97 -62
- package/examples/jsm/effects/AnaglyphEffect.js +6 -13
- package/examples/jsm/effects/ParallaxBarrierEffect.js +17 -11
- package/examples/jsm/effects/StereoEffect.js +6 -1
- package/examples/jsm/environments/RoomEnvironment.js +1 -1
- package/examples/jsm/exporters/DRACOExporter.js +4 -2
- package/examples/jsm/exporters/EXRExporter.js +19 -11
- package/examples/jsm/exporters/GLTFExporter.js +6 -1
- package/examples/jsm/exporters/KTX2Exporter.js +21 -13
- package/examples/jsm/exporters/OBJExporter.js +5 -1
- package/examples/jsm/exporters/PLYExporter.js +9 -7
- package/examples/jsm/exporters/USDZExporter.js +29 -8
- package/examples/jsm/geometries/DecalGeometry.js +4 -1
- package/examples/jsm/geometries/InstancedPointsGeometry.js +1 -1
- package/examples/jsm/helpers/LightProbeHelper.js +43 -44
- package/examples/jsm/helpers/LightProbeHelperGPU.js +65 -0
- package/examples/jsm/libs/basis/basis_transcoder.js +8 -10
- package/examples/jsm/libs/basis/basis_transcoder.wasm +0 -0
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/lights/LightProbeGenerator.js +24 -10
- package/examples/jsm/loaders/ColladaLoader.js +9 -6
- package/examples/jsm/loaders/DRACOLoader.js +3 -1
- package/examples/jsm/loaders/FBXLoader.js +30 -20
- package/examples/jsm/loaders/GLTFLoader.js +5 -10
- package/examples/jsm/loaders/KTX2Loader.js +27 -12
- package/examples/jsm/loaders/MTLLoader.js +4 -3
- package/examples/jsm/loaders/MaterialXLoader.js +40 -14
- package/examples/jsm/loaders/OBJLoader.js +5 -3
- package/examples/jsm/loaders/PCDLoader.js +14 -13
- package/examples/jsm/loaders/PDBLoader.js +3 -2
- package/examples/jsm/loaders/PLYLoader.js +8 -5
- package/examples/jsm/loaders/STLLoader.js +3 -2
- package/examples/jsm/loaders/VRMLLoader.js +10 -10
- package/examples/jsm/loaders/VTKLoader.js +4 -3
- package/examples/jsm/loaders/XYZLoader.js +3 -2
- package/examples/jsm/misc/Timer.js +1 -1
- package/examples/jsm/modifiers/CurveModifierGPU.js +233 -0
- package/examples/jsm/objects/LensflareMesh.js +322 -0
- package/examples/jsm/objects/SkyMesh.js +187 -0
- package/examples/jsm/objects/Water2Mesh.js +158 -0
- package/examples/jsm/objects/WaterMesh.js +101 -0
- package/examples/jsm/physics/JoltPhysics.js +1 -1
- package/examples/jsm/physics/RapierPhysics.js +21 -1
- package/examples/jsm/postprocessing/OutlinePass.js +31 -46
- package/examples/jsm/postprocessing/SSAARenderPass.js +3 -1
- package/examples/jsm/shaders/BleachBypassShader.js +1 -2
- package/examples/jsm/shaders/OutputShader.js +1 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +1 -1
- package/examples/jsm/transpiler/ShaderToyDecoder.js +2 -2
- package/examples/jsm/transpiler/TSLEncoder.js +8 -8
- package/examples/jsm/utils/GeometryCompressionUtils.js +37 -122
- package/examples/jsm/utils/ShadowMapViewer.js +3 -8
- package/examples/jsm/utils/ShadowMapViewerGPU.js +201 -0
- package/examples/jsm/utils/SkeletonUtils.js +84 -66
- package/examples/jsm/utils/TextureUtils.js +2 -1
- package/examples/jsm/utils/TextureUtilsGPU.js +63 -0
- package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
- package/package.json +3 -2
- package/src/Three.WebGPU.Nodes.js +200 -0
- package/src/Three.WebGPU.js +7 -0
- package/src/Three.js +1 -0
- package/src/audio/Audio.js +2 -2
- package/src/constants.js +1 -1
- package/src/core/BufferAttribute.js +0 -9
- package/src/core/Clock.js +1 -1
- package/src/core/InterleavedBuffer.js +0 -9
- package/src/extras/Controls.js +32 -0
- package/src/geometries/CylinderGeometry.js +11 -4
- package/src/loaders/MaterialLoader.js +7 -1
- package/src/loaders/ObjectLoader.js +3 -3
- package/src/{nodes/loaders → loaders/nodes}/NodeLoader.js +25 -5
- package/src/{nodes/loaders → loaders/nodes}/NodeMaterialLoader.js +21 -18
- package/src/{nodes/loaders → loaders/nodes}/NodeObjectLoader.js +19 -0
- package/src/materials/Material.js +4 -7
- package/src/materials/nodes/InstancedPointsNodeMaterial.js +156 -0
- package/src/{nodes/materials → materials/nodes}/Line2NodeMaterial.js +56 -59
- package/src/{nodes/materials → materials/nodes}/LineBasicNodeMaterial.js +8 -5
- package/src/{nodes/materials → materials/nodes}/LineDashedNodeMaterial.js +12 -10
- package/src/{nodes/materials → materials/nodes}/MeshBasicNodeMaterial.js +16 -12
- package/src/{nodes/materials → materials/nodes}/MeshLambertNodeMaterial.js +10 -6
- package/src/{nodes/materials → materials/nodes}/MeshMatcapNodeMaterial.js +13 -9
- package/src/{nodes/materials → materials/nodes}/MeshNormalNodeMaterial.js +13 -9
- package/src/{nodes/materials → materials/nodes}/MeshPhongNodeMaterial.js +14 -9
- package/src/{nodes/materials → materials/nodes}/MeshPhysicalNodeMaterial.js +22 -18
- package/src/{nodes/materials → materials/nodes}/MeshSSSNodeMaterial.js +10 -7
- package/src/{nodes/materials → materials/nodes}/MeshStandardNodeMaterial.js +22 -12
- package/src/{nodes/materials → materials/nodes}/MeshToonNodeMaterial.js +9 -5
- package/src/{nodes/materials → materials/nodes}/NodeMaterial.js +71 -115
- package/src/{nodes/materials/Materials.js → materials/nodes/NodeMaterials.js} +3 -1
- package/src/{nodes/materials → materials/nodes}/PointsNodeMaterial.js +8 -5
- package/src/{nodes/materials → materials/nodes}/ShadowNodeMaterial.js +9 -5
- package/src/{nodes/materials → materials/nodes}/SpriteNodeMaterial.js +47 -14
- package/src/{nodes/materials → materials/nodes}/VolumeNodeMaterial.js +24 -22
- package/src/materials/nodes/manager/NodeMaterialObserver.js +302 -0
- package/src/math/Triangle.js +24 -0
- package/src/nodes/Nodes.js +103 -159
- package/src/nodes/TSL.js +179 -0
- package/src/nodes/accessors/AccessorsUtils.js +8 -8
- package/src/nodes/accessors/BatchNode.js +53 -21
- package/src/nodes/accessors/{BitangentNode.js → Bitangent.js} +9 -9
- package/src/nodes/accessors/BufferAttributeNode.js +8 -5
- package/src/nodes/accessors/BufferNode.js +7 -4
- package/src/nodes/accessors/Camera.js +13 -0
- package/src/nodes/accessors/ClippingNode.js +19 -13
- package/src/nodes/accessors/CubeTextureNode.js +9 -8
- package/src/nodes/accessors/InstanceNode.js +19 -15
- package/src/nodes/accessors/InstancedPointsMaterialNode.js +8 -5
- package/src/nodes/accessors/Lights.js +51 -0
- package/src/nodes/accessors/MaterialNode.js +56 -55
- package/src/nodes/accessors/MaterialProperties.js +3 -0
- package/src/nodes/accessors/MaterialReferenceNode.js +9 -4
- package/src/nodes/accessors/ModelNode.js +47 -12
- package/src/nodes/accessors/ModelViewProjectionNode.js +12 -9
- package/src/nodes/accessors/MorphNode.js +17 -13
- package/src/nodes/accessors/Normal.js +88 -0
- package/src/nodes/accessors/Object3DNode.js +17 -33
- package/src/nodes/accessors/PointUVNode.js +9 -5
- package/src/nodes/accessors/Position.js +10 -0
- package/src/nodes/accessors/ReferenceBaseNode.js +171 -0
- package/src/nodes/accessors/ReferenceNode.js +50 -7
- package/src/nodes/accessors/ReflectVector.js +10 -0
- package/src/nodes/accessors/RendererReferenceNode.js +12 -6
- package/src/nodes/accessors/SceneNode.js +9 -6
- package/src/nodes/accessors/SkinningNode.js +88 -21
- package/src/nodes/accessors/StorageBufferNode.js +22 -5
- package/src/nodes/accessors/StorageTextureNode.js +9 -6
- package/src/nodes/accessors/Tangent.js +22 -0
- package/src/nodes/accessors/Texture3DNode.js +16 -13
- package/src/nodes/accessors/{TextureBicubicNode.js → TextureBicubic.js} +3 -32
- package/src/nodes/accessors/TextureNode.js +29 -23
- package/src/nodes/accessors/TextureSizeNode.js +10 -9
- package/src/nodes/accessors/{UniformsNode.js → UniformArrayNode.js} +26 -14
- package/src/nodes/accessors/UserDataNode.js +10 -7
- package/src/nodes/accessors/VelocityNode.js +134 -0
- package/src/nodes/accessors/VertexColorNode.js +7 -4
- package/src/nodes/code/CodeNode.js +9 -5
- package/src/nodes/code/ExpressionNode.js +10 -6
- package/src/nodes/code/FunctionCallNode.js +8 -5
- package/src/nodes/code/FunctionNode.js +8 -23
- package/src/nodes/code/ScriptableNode.js +13 -10
- package/src/nodes/code/ScriptableValueNode.js +9 -7
- package/src/nodes/core/AssignNode.js +12 -9
- package/src/nodes/core/AttributeNode.js +12 -21
- package/src/nodes/core/BypassNode.js +11 -7
- package/src/nodes/core/CacheNode.js +10 -6
- package/src/nodes/core/ConstNode.js +6 -3
- package/src/nodes/core/ContextNode.js +21 -11
- package/src/nodes/core/IndexNode.js +35 -8
- package/src/nodes/core/InputNode.js +7 -3
- package/src/nodes/core/MRTNode.js +16 -7
- package/src/nodes/core/Node.js +19 -40
- package/src/nodes/core/NodeBuilder.js +117 -38
- package/src/nodes/core/NodeUtils.js +49 -6
- package/src/nodes/core/OutputStructNode.js +10 -6
- package/src/nodes/core/ParameterNode.js +7 -4
- package/src/nodes/core/PropertyNode.js +36 -32
- package/src/nodes/core/StackNode.js +31 -11
- package/src/nodes/core/StructTypeNode.js +7 -3
- package/src/nodes/core/TempNode.js +8 -4
- package/src/nodes/core/UniformGroupNode.js +14 -11
- package/src/nodes/core/UniformNode.js +7 -4
- package/src/nodes/core/VarNode.js +12 -8
- package/src/nodes/core/VaryingNode.js +10 -6
- package/src/nodes/display/AfterImageNode.js +15 -9
- package/src/nodes/display/AnaglyphPassNode.js +67 -0
- package/src/nodes/display/AnamorphicNode.js +17 -11
- package/src/nodes/display/BleachBypass.js +26 -0
- package/src/nodes/display/BlendMode.js +54 -0
- package/src/nodes/display/BloomNode.js +27 -19
- package/src/nodes/display/BumpMapNode.js +13 -12
- package/src/nodes/display/ColorAdjustment.js +46 -0
- package/src/nodes/display/ColorSpaceFunctions.js +38 -0
- package/src/nodes/display/ColorSpaceNode.js +67 -61
- package/src/nodes/display/DenoiseNode.js +23 -17
- package/src/nodes/display/DepthOfFieldNode.js +12 -7
- package/src/nodes/display/DotScreenNode.js +13 -22
- package/src/nodes/display/FXAANode.js +21 -16
- package/src/nodes/display/FilmNode.js +11 -7
- package/src/nodes/display/FrontFacingNode.js +10 -6
- package/src/nodes/display/GTAONode.js +22 -15
- package/src/nodes/display/GaussianBlurNode.js +14 -8
- package/src/nodes/display/Lut3DNode.js +10 -6
- package/src/nodes/display/MotionBlur.js +25 -0
- package/src/nodes/display/NormalMapNode.js +13 -13
- package/src/nodes/display/ParallaxBarrierPassNode.js +58 -0
- package/src/nodes/display/PassNode.js +95 -8
- package/src/nodes/display/PixelationPassNode.js +20 -8
- package/src/nodes/display/PosterizeNode.js +8 -7
- package/src/nodes/display/RGBShiftNode.js +11 -7
- package/src/nodes/display/RenderOutputNode.js +15 -11
- package/src/nodes/display/SSAAPassNode.js +287 -0
- package/src/nodes/display/ScreenNode.js +181 -0
- package/src/nodes/display/Sepia.js +17 -0
- package/src/nodes/display/SobelOperatorNode.js +13 -8
- package/src/nodes/display/StereoCompositePassNode.js +110 -0
- package/src/nodes/display/StereoPassNode.js +83 -0
- package/src/nodes/display/ToneMappingFunctions.js +190 -0
- package/src/nodes/display/ToneMappingNode.js +15 -175
- package/src/nodes/display/ToonOutlinePassNode.js +111 -0
- package/src/nodes/display/TransitionNode.js +12 -8
- package/src/nodes/display/ViewportDepthNode.js +34 -29
- package/src/nodes/display/ViewportDepthTextureNode.js +10 -9
- package/src/nodes/display/ViewportSharedTextureNode.js +10 -9
- package/src/nodes/display/ViewportTextureNode.js +11 -11
- package/src/nodes/fog/FogExp2Node.js +8 -7
- package/src/nodes/fog/FogNode.js +10 -8
- package/src/nodes/fog/FogRangeNode.js +8 -7
- package/src/nodes/functions/BSDF/BRDF_GGX.js +4 -4
- package/src/nodes/functions/BSDF/BRDF_Lambert.js +2 -2
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +6 -6
- package/src/nodes/functions/BSDF/DFGApprox.js +2 -2
- package/src/nodes/functions/BSDF/D_GGX.js +2 -2
- package/src/nodes/functions/BSDF/D_GGX_Anisotropic.js +3 -3
- package/src/nodes/functions/BSDF/EnvironmentBRDF.js +2 -2
- package/src/nodes/functions/BSDF/F_Schlick.js +2 -2
- package/src/nodes/functions/BSDF/LTC.js +6 -6
- package/src/nodes/functions/BSDF/Schlick_to_F0.js +2 -2
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.js +2 -2
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.js +2 -2
- package/src/nodes/functions/BasicLightingModel.js +1 -1
- package/src/nodes/functions/PhongLightingModel.js +5 -5
- package/src/nodes/functions/PhysicalLightingModel.js +34 -33
- package/src/nodes/functions/ShadowMaskModel.js +1 -1
- package/src/nodes/functions/ToonLightingModel.js +3 -3
- package/src/nodes/functions/material/getGeometryRoughness.js +4 -4
- package/src/nodes/functions/material/getRoughness.js +2 -2
- package/src/nodes/functions/material/getShIrradianceAt.js +28 -0
- package/src/nodes/geometry/RangeNode.js +9 -5
- package/src/nodes/gpgpu/AtomicFunctionNode.js +99 -0
- package/src/nodes/gpgpu/BarrierNode.js +40 -0
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +98 -0
- package/src/nodes/gpgpu/ComputeNode.js +10 -6
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +100 -0
- package/src/nodes/lighting/AONode.js +6 -3
- package/src/nodes/lighting/AmbientLightNode.js +6 -8
- package/src/nodes/lighting/AnalyticLightNode.js +225 -36
- package/src/nodes/lighting/BasicEnvironmentNode.js +8 -4
- package/src/nodes/lighting/BasicLightMapNode.js +7 -4
- package/src/nodes/lighting/DirectionalLightNode.js +7 -9
- package/src/nodes/lighting/EnvironmentNode.js +23 -19
- package/src/nodes/lighting/HemisphereLightNode.js +11 -11
- package/src/nodes/lighting/IESSpotLightNode.js +7 -9
- package/src/nodes/lighting/IrradianceNode.js +6 -3
- package/src/nodes/lighting/LightProbeNode.js +53 -0
- package/src/nodes/lighting/LightUtils.js +3 -3
- package/src/nodes/lighting/LightingContextNode.js +19 -18
- package/src/nodes/lighting/LightingNode.js +7 -3
- package/src/nodes/lighting/LightsNode.js +112 -75
- package/src/nodes/lighting/PointLightNode.js +12 -13
- package/src/nodes/lighting/RectAreaLightNode.js +11 -11
- package/src/nodes/lighting/SpotLightNode.js +14 -16
- package/src/nodes/materialx/MaterialXNodes.js +2 -2
- package/src/nodes/materialx/lib/mx_hsv.js +36 -31
- package/src/nodes/materialx/lib/mx_noise.js +96 -96
- package/src/nodes/materialx/lib/mx_transform_color.js +2 -2
- package/src/nodes/math/{CondNode.js → ConditionalNode.js} +38 -10
- package/src/nodes/math/Hash.js +13 -0
- package/src/nodes/math/MathNode.js +127 -124
- package/src/nodes/math/MathUtils.js +0 -7
- package/src/nodes/math/OperatorNode.js +97 -52
- package/src/nodes/math/TriNoise3D.js +19 -29
- package/src/nodes/pmrem/PMREMNode.js +61 -15
- package/src/nodes/pmrem/PMREMUtils.js +46 -46
- package/src/nodes/procedural/Checker.js +14 -0
- package/src/nodes/tsl/TSLBase.js +30 -0
- package/src/nodes/{shadernode/ShaderNode.js → tsl/TSLCore.js} +105 -97
- package/src/nodes/utils/ArrayElementNode.js +8 -4
- package/src/nodes/utils/ConvertNode.js +7 -3
- package/src/nodes/utils/CubeMapNode.js +160 -0
- package/src/nodes/utils/Discard.js +8 -0
- package/src/nodes/utils/EquirectUVNode.js +9 -6
- package/src/nodes/utils/FlipNode.js +68 -0
- package/src/nodes/utils/FunctionOverloadingNode.js +9 -5
- package/src/nodes/utils/JoinNode.js +6 -3
- package/src/nodes/utils/LoopNode.js +16 -6
- package/src/nodes/utils/MatcapUVNode.js +10 -7
- package/src/nodes/utils/MaxMipLevelNode.js +8 -5
- package/src/nodes/utils/OscNode.js +12 -8
- package/src/nodes/utils/Packing.js +4 -0
- package/src/nodes/utils/RTTNode.js +11 -8
- package/src/nodes/utils/ReflectorNode.js +12 -4
- package/src/nodes/utils/RemapNode.js +12 -8
- package/src/nodes/utils/RotateNode.js +8 -13
- package/src/nodes/utils/SetNode.js +7 -4
- package/src/nodes/utils/SplitNode.js +7 -3
- package/src/nodes/utils/SpriteSheetUVNode.js +10 -6
- package/src/nodes/utils/SpriteUtils.js +47 -0
- package/src/nodes/utils/StorageArrayElementNode.js +11 -12
- package/src/nodes/utils/TimerNode.js +8 -5
- package/src/nodes/utils/TriplanarTexturesNode.js +11 -9
- package/src/nodes/utils/UVUtils.js +19 -0
- package/src/nodes/utils/ViewportUtils.js +14 -0
- package/src/objects/BatchedMesh.js +78 -13
- package/src/objects/LOD.js +21 -0
- package/src/objects/Line.js +1 -0
- package/src/objects/Mesh.js +7 -23
- package/src/objects/Points.js +2 -0
- package/src/renderers/WebGLRenderer.js +88 -41
- package/src/renderers/common/Backend.js +2 -2
- package/src/renderers/common/Background.js +3 -1
- package/src/renderers/common/BindGroup.js +3 -1
- package/src/renderers/common/Bindings.js +13 -15
- package/src/renderers/common/BundleGroup.js +26 -0
- package/src/renderers/common/ClippingContext.js +15 -5
- package/src/renderers/common/CubeRenderTarget.js +9 -3
- package/src/renderers/common/PostProcessing.js +4 -1
- package/src/renderers/common/QuadMesh.js +2 -0
- package/src/renderers/common/RenderContext.js +23 -0
- package/src/renderers/common/RenderList.js +1 -1
- package/src/renderers/common/RenderObject.js +117 -6
- package/src/renderers/common/RenderObjects.js +8 -1
- package/src/renderers/common/Renderer.js +128 -94
- package/src/renderers/common/SampledTexture.js +12 -3
- package/src/renderers/common/Textures.js +8 -12
- package/src/renderers/common/extras/PMREMGenerator.js +19 -22
- package/src/renderers/common/nodes/NodeBuilderState.js +4 -4
- package/src/renderers/common/nodes/NodeLibrary.js +118 -0
- package/src/renderers/common/nodes/NodeSampledTexture.js +2 -2
- package/src/renderers/common/nodes/Nodes.js +65 -19
- package/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.js +2 -2
- package/src/renderers/shaders/ShaderLib/sprite.glsl.js +2 -4
- package/src/renderers/webgl/WebGLAttributes.js +45 -14
- package/src/renderers/webgl/WebGLCapabilities.js +9 -0
- package/src/renderers/webgl/WebGLProgram.js +3 -1
- package/src/renderers/webgl/WebGLPrograms.js +21 -17
- package/src/renderers/webgl/WebGLProperties.js +7 -0
- package/src/renderers/webgl/WebGLState.js +21 -0
- package/src/renderers/webgl/WebGLTextures.js +83 -4
- package/src/renderers/webgl-fallback/WebGLBackend.js +135 -110
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +60 -12
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +6 -0
- package/src/renderers/webgl-fallback/utils/WebGLState.js +20 -2
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +89 -37
- package/src/renderers/webgpu/WebGPUBackend.js +112 -86
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +42 -0
- package/src/renderers/webgpu/WebGPURenderer.js +9 -6
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +59 -0
- package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +105 -0
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +189 -73
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +6 -16
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +45 -21
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -1
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +7 -16
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +62 -5
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +43 -26
- package/src/renderers/webgpu/utils/WebGPUUtils.js +19 -2
- package/src/renderers/webxr/WebXRManager.js +32 -25
- package/src/utils.js +33 -1
- package/examples/jsm/geometries/SDFGeometryGenerator.js +0 -144
- package/examples/jsm/loaders/LogLuvLoader.js +0 -606
- package/examples/jsm/loaders/TiltLoader.js +0 -520
- package/examples/jsm/utils/GPUStatsPanel.js +0 -95
- package/examples/jsm/utils/PackedPhongMaterial.js +0 -178
- package/src/nodes/accessors/CameraNode.js +0 -19
- package/src/nodes/accessors/NormalNode.js +0 -14
- package/src/nodes/accessors/PositionNode.js +0 -10
- package/src/nodes/accessors/ReflectVectorNode.js +0 -10
- package/src/nodes/accessors/TangentNode.js +0 -23
- package/src/nodes/core/NodeKeywords.js +0 -80
- package/src/nodes/display/BlendModeNode.js +0 -128
- package/src/nodes/display/ColorAdjustmentNode.js +0 -104
- package/src/nodes/display/ViewportNode.js +0 -137
- package/src/nodes/lighting/LightNode.js +0 -57
- package/src/nodes/materials/InstancedPointsNodeMaterial.js +0 -162
- package/src/nodes/math/HashNode.js +0 -34
- package/src/nodes/procedural/CheckerNode.js +0 -42
- package/src/nodes/utils/DiscardNode.js +0 -28
- package/src/nodes/utils/PackingNode.js +0 -55
- package/src/nodes/utils/RotateUVNode.js +0 -35
- /package/src/nodes/accessors/{UVNode.js → UV.js} +0 -0
|
@@ -9,28 +9,37 @@ import {
|
|
|
9
9
|
VectorKeyframeTrack
|
|
10
10
|
} from 'three';
|
|
11
11
|
|
|
12
|
+
function getBoneName( bone, options ) {
|
|
13
|
+
|
|
14
|
+
if ( options.getBoneName !== undefined ) {
|
|
15
|
+
|
|
16
|
+
return options.getBoneName( bone );
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return options.names[ bone.name ];
|
|
21
|
+
|
|
22
|
+
}
|
|
12
23
|
|
|
13
24
|
function retarget( target, source, options = {} ) {
|
|
14
25
|
|
|
15
|
-
const
|
|
16
|
-
quat = new Quaternion(),
|
|
26
|
+
const quat = new Quaternion(),
|
|
17
27
|
scale = new Vector3(),
|
|
18
|
-
bindBoneMatrix = new Matrix4(),
|
|
19
28
|
relativeMatrix = new Matrix4(),
|
|
20
29
|
globalMatrix = new Matrix4();
|
|
21
30
|
|
|
22
|
-
options.
|
|
23
|
-
options.
|
|
24
|
-
options.preserveHipPosition = options.preserveHipPosition !== undefined ? options.preserveHipPosition : false;
|
|
31
|
+
options.preserveBoneMatrix = options.preserveBoneMatrix !== undefined ? options.preserveBoneMatrix : true;
|
|
32
|
+
options.preserveBonePositions = options.preserveBonePositions !== undefined ? options.preserveBonePositions : true;
|
|
25
33
|
options.useTargetMatrix = options.useTargetMatrix !== undefined ? options.useTargetMatrix : false;
|
|
26
34
|
options.hip = options.hip !== undefined ? options.hip : 'hip';
|
|
35
|
+
options.hipInfluence = options.hipInfluence !== undefined ? options.hipInfluence : new Vector3( 1, 1, 1 );
|
|
36
|
+
options.scale = options.scale !== undefined ? options.scale : 1;
|
|
27
37
|
options.names = options.names || {};
|
|
28
38
|
|
|
29
39
|
const sourceBones = source.isObject3D ? source.skeleton.bones : getBones( source ),
|
|
30
40
|
bones = target.isObject3D ? target.skeleton.bones : getBones( target );
|
|
31
41
|
|
|
32
|
-
let
|
|
33
|
-
bone, name, boneTo,
|
|
42
|
+
let bone, name, boneTo,
|
|
34
43
|
bonesPosition;
|
|
35
44
|
|
|
36
45
|
// reset bones
|
|
@@ -42,11 +51,11 @@ function retarget( target, source, options = {} ) {
|
|
|
42
51
|
} else {
|
|
43
52
|
|
|
44
53
|
options.useTargetMatrix = true;
|
|
45
|
-
options.
|
|
54
|
+
options.preserveBoneMatrix = false;
|
|
46
55
|
|
|
47
56
|
}
|
|
48
57
|
|
|
49
|
-
if ( options.
|
|
58
|
+
if ( options.preserveBonePositions ) {
|
|
50
59
|
|
|
51
60
|
bonesPosition = [];
|
|
52
61
|
|
|
@@ -58,7 +67,7 @@ function retarget( target, source, options = {} ) {
|
|
|
58
67
|
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
if ( options.
|
|
70
|
+
if ( options.preserveBoneMatrix ) {
|
|
62
71
|
|
|
63
72
|
// reset matrix
|
|
64
73
|
|
|
@@ -76,35 +85,10 @@ function retarget( target, source, options = {} ) {
|
|
|
76
85
|
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
if ( options.offsets ) {
|
|
80
|
-
|
|
81
|
-
bindBones = [];
|
|
82
|
-
|
|
83
|
-
for ( let i = 0; i < bones.length; ++ i ) {
|
|
84
|
-
|
|
85
|
-
bone = bones[ i ];
|
|
86
|
-
name = options.names[ bone.name ] || bone.name;
|
|
87
|
-
|
|
88
|
-
if ( options.offsets[ name ] ) {
|
|
89
|
-
|
|
90
|
-
bone.matrix.multiply( options.offsets[ name ] );
|
|
91
|
-
|
|
92
|
-
bone.matrix.decompose( bone.position, bone.quaternion, bone.scale );
|
|
93
|
-
|
|
94
|
-
bone.updateMatrixWorld();
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
bindBones.push( bone.matrixWorld.clone() );
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
88
|
for ( let i = 0; i < bones.length; ++ i ) {
|
|
105
89
|
|
|
106
90
|
bone = bones[ i ];
|
|
107
|
-
name =
|
|
91
|
+
name = getBoneName( bone, options );
|
|
108
92
|
|
|
109
93
|
boneTo = getBoneByName( name, sourceBones );
|
|
110
94
|
|
|
@@ -136,10 +120,15 @@ function retarget( target, source, options = {} ) {
|
|
|
136
120
|
|
|
137
121
|
if ( target.isObject3D ) {
|
|
138
122
|
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
if ( options.localOffsets ) {
|
|
124
|
+
|
|
125
|
+
if ( options.localOffsets[ bone.name ] ) {
|
|
141
126
|
|
|
142
|
-
|
|
127
|
+
globalMatrix.multiply( options.localOffsets[ bone.name ] );
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
}
|
|
143
132
|
|
|
144
133
|
}
|
|
145
134
|
|
|
@@ -147,20 +136,30 @@ function retarget( target, source, options = {} ) {
|
|
|
147
136
|
|
|
148
137
|
}
|
|
149
138
|
|
|
150
|
-
if (
|
|
139
|
+
if ( name === options.hip ) {
|
|
151
140
|
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
globalMatrix.elements[ 12 ] *= options.scale * options.hipInfluence.x;
|
|
142
|
+
globalMatrix.elements[ 13 ] *= options.scale * options.hipInfluence.y;
|
|
143
|
+
globalMatrix.elements[ 14 ] *= options.scale * options.hipInfluence.z;
|
|
154
144
|
|
|
155
|
-
|
|
145
|
+
if ( options.hipPosition !== undefined ) {
|
|
156
146
|
|
|
157
|
-
|
|
147
|
+
globalMatrix.elements[ 12 ] += options.hipPosition.x * options.scale;
|
|
148
|
+
globalMatrix.elements[ 13 ] += options.hipPosition.y * options.scale;
|
|
149
|
+
globalMatrix.elements[ 14 ] += options.hipPosition.z * options.scale;
|
|
150
|
+
|
|
151
|
+
}
|
|
158
152
|
|
|
159
153
|
}
|
|
160
154
|
|
|
161
|
-
if (
|
|
155
|
+
if ( bone.parent ) {
|
|
162
156
|
|
|
163
|
-
bone.matrix.
|
|
157
|
+
bone.matrix.copy( bone.parent.matrixWorld ).invert();
|
|
158
|
+
bone.matrix.multiply( globalMatrix );
|
|
159
|
+
|
|
160
|
+
} else {
|
|
161
|
+
|
|
162
|
+
bone.matrix.copy( globalMatrix );
|
|
164
163
|
|
|
165
164
|
}
|
|
166
165
|
|
|
@@ -170,12 +169,12 @@ function retarget( target, source, options = {} ) {
|
|
|
170
169
|
|
|
171
170
|
}
|
|
172
171
|
|
|
173
|
-
if ( options.
|
|
172
|
+
if ( options.preserveBonePositions ) {
|
|
174
173
|
|
|
175
174
|
for ( let i = 0; i < bones.length; ++ i ) {
|
|
176
175
|
|
|
177
176
|
bone = bones[ i ];
|
|
178
|
-
name =
|
|
177
|
+
name = getBoneName( bone, options ) || bone.name;
|
|
179
178
|
|
|
180
179
|
if ( name !== options.hip ) {
|
|
181
180
|
|
|
@@ -187,7 +186,7 @@ function retarget( target, source, options = {} ) {
|
|
|
187
186
|
|
|
188
187
|
}
|
|
189
188
|
|
|
190
|
-
if ( options.
|
|
189
|
+
if ( options.preserveBoneMatrix ) {
|
|
191
190
|
|
|
192
191
|
// restore matrix
|
|
193
192
|
|
|
@@ -200,6 +199,7 @@ function retarget( target, source, options = {} ) {
|
|
|
200
199
|
function retargetClip( target, source, clip, options = {} ) {
|
|
201
200
|
|
|
202
201
|
options.useFirstFramePosition = options.useFirstFramePosition !== undefined ? options.useFirstFramePosition : false;
|
|
202
|
+
|
|
203
203
|
// Calculate the fps from the source clip based on the track with the most frames, unless fps is already provided.
|
|
204
204
|
options.fps = options.fps !== undefined ? options.fps : ( Math.max( ...clip.tracks.map( track => track.times.length ) ) / clip.duration );
|
|
205
205
|
options.names = options.names || [];
|
|
@@ -216,30 +216,48 @@ function retargetClip( target, source, clip, options = {} ) {
|
|
|
216
216
|
mixer = new AnimationMixer( source ),
|
|
217
217
|
bones = getBones( target.skeleton ),
|
|
218
218
|
boneDatas = [];
|
|
219
|
+
|
|
219
220
|
let positionOffset,
|
|
220
221
|
bone, boneTo, boneData,
|
|
221
222
|
name;
|
|
222
223
|
|
|
223
224
|
mixer.clipAction( clip ).play();
|
|
224
|
-
|
|
225
|
+
|
|
226
|
+
// trim
|
|
227
|
+
|
|
228
|
+
let start = 0, end = numFrames;
|
|
229
|
+
|
|
230
|
+
if ( options.trim !== undefined ) {
|
|
231
|
+
|
|
232
|
+
start = Math.round( options.trim[ 0 ] * options.fps );
|
|
233
|
+
end = Math.min( Math.round( options.trim[ 1 ] * options.fps ), numFrames ) - start;
|
|
234
|
+
|
|
235
|
+
mixer.update( options.trim[ 0 ] );
|
|
236
|
+
|
|
237
|
+
} else {
|
|
238
|
+
|
|
239
|
+
mixer.update( 0 );
|
|
240
|
+
|
|
241
|
+
}
|
|
225
242
|
|
|
226
243
|
source.updateMatrixWorld();
|
|
227
244
|
|
|
228
|
-
|
|
245
|
+
//
|
|
246
|
+
|
|
247
|
+
for ( let frame = 0; frame < end; ++ frame ) {
|
|
229
248
|
|
|
230
|
-
const time =
|
|
249
|
+
const time = frame * delta;
|
|
231
250
|
|
|
232
251
|
retarget( target, source, options );
|
|
233
252
|
|
|
234
253
|
for ( let j = 0; j < bones.length; ++ j ) {
|
|
235
254
|
|
|
236
|
-
|
|
237
|
-
|
|
255
|
+
bone = bones[ j ];
|
|
256
|
+
name = getBoneName( bone, options ) || bone.name;
|
|
238
257
|
boneTo = getBoneByName( name, source.skeleton );
|
|
239
258
|
|
|
240
259
|
if ( boneTo ) {
|
|
241
260
|
|
|
242
|
-
bone = bones[ j ];
|
|
243
261
|
boneData = boneDatas[ j ] = boneDatas[ j ] || { bone: bone };
|
|
244
262
|
|
|
245
263
|
if ( options.hip === name ) {
|
|
@@ -247,15 +265,15 @@ function retargetClip( target, source, clip, options = {} ) {
|
|
|
247
265
|
if ( ! boneData.pos ) {
|
|
248
266
|
|
|
249
267
|
boneData.pos = {
|
|
250
|
-
times: new Float32Array(
|
|
251
|
-
values: new Float32Array(
|
|
268
|
+
times: new Float32Array( end ),
|
|
269
|
+
values: new Float32Array( end * 3 )
|
|
252
270
|
};
|
|
253
271
|
|
|
254
272
|
}
|
|
255
273
|
|
|
256
274
|
if ( options.useFirstFramePosition ) {
|
|
257
275
|
|
|
258
|
-
if (
|
|
276
|
+
if ( frame === 0 ) {
|
|
259
277
|
|
|
260
278
|
positionOffset = bone.position.clone();
|
|
261
279
|
|
|
@@ -265,30 +283,30 @@ function retargetClip( target, source, clip, options = {} ) {
|
|
|
265
283
|
|
|
266
284
|
}
|
|
267
285
|
|
|
268
|
-
boneData.pos.times[
|
|
286
|
+
boneData.pos.times[ frame ] = time;
|
|
269
287
|
|
|
270
|
-
bone.position.toArray( boneData.pos.values,
|
|
288
|
+
bone.position.toArray( boneData.pos.values, frame * 3 );
|
|
271
289
|
|
|
272
290
|
}
|
|
273
291
|
|
|
274
292
|
if ( ! boneData.quat ) {
|
|
275
293
|
|
|
276
294
|
boneData.quat = {
|
|
277
|
-
times: new Float32Array(
|
|
278
|
-
values: new Float32Array(
|
|
295
|
+
times: new Float32Array( end ),
|
|
296
|
+
values: new Float32Array( end * 4 )
|
|
279
297
|
};
|
|
280
298
|
|
|
281
299
|
}
|
|
282
300
|
|
|
283
|
-
boneData.quat.times[
|
|
301
|
+
boneData.quat.times[ frame ] = time;
|
|
284
302
|
|
|
285
|
-
bone.quaternion.toArray( boneData.quat.values,
|
|
303
|
+
bone.quaternion.toArray( boneData.quat.values, frame * 4 );
|
|
286
304
|
|
|
287
305
|
}
|
|
288
306
|
|
|
289
307
|
}
|
|
290
308
|
|
|
291
|
-
if (
|
|
309
|
+
if ( frame === end - 2 ) {
|
|
292
310
|
|
|
293
311
|
// last mixer update before final loop iteration
|
|
294
312
|
// make sure we do not go over or equal to clip duration
|
|
@@ -34,7 +34,7 @@ export function decompress( texture, maxTextureSize = Infinity, renderer = null
|
|
|
34
34
|
gl_FragColor = vec4(vUv.xy, 0, 1);
|
|
35
35
|
|
|
36
36
|
#ifdef IS_SRGB
|
|
37
|
-
gl_FragColor =
|
|
37
|
+
gl_FragColor = sRGBTransferOETF( texture2D( blitTexture, vUv) );
|
|
38
38
|
#else
|
|
39
39
|
gl_FragColor = texture2D( blitTexture, vUv);
|
|
40
40
|
#endif
|
|
@@ -83,6 +83,7 @@ export function decompress( texture, maxTextureSize = Infinity, renderer = null
|
|
|
83
83
|
readableTexture.magFilter = texture.magFilter;
|
|
84
84
|
readableTexture.wrapS = texture.wrapS;
|
|
85
85
|
readableTexture.wrapT = texture.wrapT;
|
|
86
|
+
readableTexture.colorSpace = texture.colorSpace;
|
|
86
87
|
readableTexture.name = texture.name;
|
|
87
88
|
|
|
88
89
|
if ( _renderer ) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
QuadMesh,
|
|
3
|
+
NodeMaterial,
|
|
4
|
+
WebGPURenderer,
|
|
5
|
+
CanvasTexture
|
|
6
|
+
} from 'three';
|
|
7
|
+
import { texture, uv } from 'three/tsl';
|
|
8
|
+
|
|
9
|
+
let _renderer;
|
|
10
|
+
const _quadMesh = /*@__PURE__*/ new QuadMesh();
|
|
11
|
+
|
|
12
|
+
export async function decompress( blitTexture, maxTextureSize = Infinity, renderer = null ) {
|
|
13
|
+
|
|
14
|
+
if ( renderer === null ) {
|
|
15
|
+
|
|
16
|
+
renderer = _renderer = new WebGPURenderer();
|
|
17
|
+
await renderer.init();
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const material = new NodeMaterial();
|
|
22
|
+
material.fragmentNode = texture( blitTexture ).uv( uv().flipY() );
|
|
23
|
+
|
|
24
|
+
const width = Math.min( blitTexture.image.width, maxTextureSize );
|
|
25
|
+
const height = Math.min( blitTexture.image.height, maxTextureSize );
|
|
26
|
+
|
|
27
|
+
const currentOutputColorSpace = renderer.outputColorSpace;
|
|
28
|
+
|
|
29
|
+
renderer.setSize( width, height );
|
|
30
|
+
renderer.outputColorSpace = blitTexture.colorSpace;
|
|
31
|
+
|
|
32
|
+
_quadMesh.material = material;
|
|
33
|
+
_quadMesh.render( renderer );
|
|
34
|
+
|
|
35
|
+
renderer.outputColorSpace = currentOutputColorSpace;
|
|
36
|
+
|
|
37
|
+
const canvas = document.createElement( 'canvas' );
|
|
38
|
+
const context = canvas.getContext( '2d' );
|
|
39
|
+
|
|
40
|
+
canvas.width = width;
|
|
41
|
+
canvas.height = height;
|
|
42
|
+
|
|
43
|
+
context.drawImage( renderer.domElement, 0, 0, width, height );
|
|
44
|
+
|
|
45
|
+
const readableTexture = new CanvasTexture( canvas );
|
|
46
|
+
|
|
47
|
+
readableTexture.minFilter = blitTexture.minFilter;
|
|
48
|
+
readableTexture.magFilter = blitTexture.magFilter;
|
|
49
|
+
readableTexture.wrapS = blitTexture.wrapS;
|
|
50
|
+
readableTexture.wrapT = blitTexture.wrapT;
|
|
51
|
+
readableTexture.colorSpace = blitTexture.colorSpace;
|
|
52
|
+
readableTexture.name = blitTexture.name;
|
|
53
|
+
|
|
54
|
+
if ( _renderer !== null ) {
|
|
55
|
+
|
|
56
|
+
_renderer.dispose();
|
|
57
|
+
_renderer = null;
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return readableTexture;
|
|
62
|
+
|
|
63
|
+
}
|
|
@@ -239,7 +239,7 @@ class XRControllerModelFactory {
|
|
|
239
239
|
|
|
240
240
|
const xrInputSource = event.data;
|
|
241
241
|
|
|
242
|
-
if ( xrInputSource.targetRayMode !== 'tracked-pointer' || ! xrInputSource.gamepad ) return;
|
|
242
|
+
if ( xrInputSource.targetRayMode !== 'tracked-pointer' || ! xrInputSource.gamepad || xrInputSource.hand ) return;
|
|
243
243
|
|
|
244
244
|
fetchProfile( xrInputSource, this.path, DEFAULT_PROFILE ).then( ( { profile, assetPath } ) => {
|
|
245
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.169.0",
|
|
4
4
|
"description": "JavaScript 3D library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/three.cjs",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"test-unit-addons": "qunit -r failonlyreporter -f !-webonly test/unit/three.addons.unit.js",
|
|
63
63
|
"test-e2e": "node test/e2e/puppeteer.js",
|
|
64
64
|
"test-e2e-cov": "node test/e2e/check-coverage.js",
|
|
65
|
+
"test-e2e-webgpu": "node test/e2e/puppeteer.js --webgpu",
|
|
65
66
|
"test-treeshake": "rollup -c test/rollup.treeshake.config.js",
|
|
66
67
|
"test-circular-deps": "dpdm --no-warning --no-tree --exit-code circular:1 src/nodes/Nodes.js",
|
|
67
68
|
"make-screenshot": "node test/e2e/puppeteer.js --make"
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
93
94
|
"@rollup/plugin-terser": "^0.4.0",
|
|
94
95
|
"chalk": "^5.2.0",
|
|
95
|
-
"concurrently": "^
|
|
96
|
+
"concurrently": "^9.0.0",
|
|
96
97
|
"dpdm": "^3.14.0",
|
|
97
98
|
"eslint": "^8.37.0",
|
|
98
99
|
"eslint-config-mdcs": "^5.0.0",
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { REVISION } from './constants.js';
|
|
2
|
+
|
|
3
|
+
export { WebGLArrayRenderTarget } from './renderers/WebGLArrayRenderTarget.js';
|
|
4
|
+
export { WebGL3DRenderTarget } from './renderers/WebGL3DRenderTarget.js';
|
|
5
|
+
export { WebGLCubeRenderTarget } from './renderers/WebGLCubeRenderTarget.js';
|
|
6
|
+
export { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
|
|
7
|
+
//export { WebGLRenderer } from './renderers/WebGLRenderer.js';
|
|
8
|
+
//export { ShaderLib } from './renderers/shaders/ShaderLib.js';
|
|
9
|
+
//export { UniformsLib } from './renderers/shaders/UniformsLib.js';
|
|
10
|
+
//export { UniformsUtils } from './renderers/shaders/UniformsUtils.js';
|
|
11
|
+
//export { ShaderChunk } from './renderers/shaders/ShaderChunk.js';
|
|
12
|
+
export { FogExp2 } from './scenes/FogExp2.js';
|
|
13
|
+
export { Fog } from './scenes/Fog.js';
|
|
14
|
+
export { Scene } from './scenes/Scene.js';
|
|
15
|
+
export { Sprite } from './objects/Sprite.js';
|
|
16
|
+
export { LOD } from './objects/LOD.js';
|
|
17
|
+
export { SkinnedMesh } from './objects/SkinnedMesh.js';
|
|
18
|
+
export { Skeleton } from './objects/Skeleton.js';
|
|
19
|
+
export { Bone } from './objects/Bone.js';
|
|
20
|
+
export { Mesh } from './objects/Mesh.js';
|
|
21
|
+
export { InstancedMesh } from './objects/InstancedMesh.js';
|
|
22
|
+
export { BatchedMesh } from './objects/BatchedMesh.js';
|
|
23
|
+
export { LineSegments } from './objects/LineSegments.js';
|
|
24
|
+
export { LineLoop } from './objects/LineLoop.js';
|
|
25
|
+
export { Line } from './objects/Line.js';
|
|
26
|
+
export { Points } from './objects/Points.js';
|
|
27
|
+
export { Group } from './objects/Group.js';
|
|
28
|
+
export { VideoTexture } from './textures/VideoTexture.js';
|
|
29
|
+
export { FramebufferTexture } from './textures/FramebufferTexture.js';
|
|
30
|
+
export { Source } from './textures/Source.js';
|
|
31
|
+
export { DataTexture } from './textures/DataTexture.js';
|
|
32
|
+
export { DataArrayTexture } from './textures/DataArrayTexture.js';
|
|
33
|
+
export { Data3DTexture } from './textures/Data3DTexture.js';
|
|
34
|
+
export { CompressedTexture } from './textures/CompressedTexture.js';
|
|
35
|
+
export { CompressedArrayTexture } from './textures/CompressedArrayTexture.js';
|
|
36
|
+
export { CompressedCubeTexture } from './textures/CompressedCubeTexture.js';
|
|
37
|
+
export { CubeTexture } from './textures/CubeTexture.js';
|
|
38
|
+
export { CanvasTexture } from './textures/CanvasTexture.js';
|
|
39
|
+
export { DepthTexture } from './textures/DepthTexture.js';
|
|
40
|
+
export { Texture } from './textures/Texture.js';
|
|
41
|
+
export * from './geometries/Geometries.js';
|
|
42
|
+
export * from './materials/Materials.js';
|
|
43
|
+
export { Material } from './materials/Material.js';
|
|
44
|
+
export { AnimationLoader } from './loaders/AnimationLoader.js';
|
|
45
|
+
export { CompressedTextureLoader } from './loaders/CompressedTextureLoader.js';
|
|
46
|
+
export { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
|
|
47
|
+
export { DataTextureLoader } from './loaders/DataTextureLoader.js';
|
|
48
|
+
export { TextureLoader } from './loaders/TextureLoader.js';
|
|
49
|
+
export { ObjectLoader } from './loaders/ObjectLoader.js';
|
|
50
|
+
export { MaterialLoader } from './loaders/MaterialLoader.js';
|
|
51
|
+
export { BufferGeometryLoader } from './loaders/BufferGeometryLoader.js';
|
|
52
|
+
export { DefaultLoadingManager, LoadingManager } from './loaders/LoadingManager.js';
|
|
53
|
+
export { ImageLoader } from './loaders/ImageLoader.js';
|
|
54
|
+
export { ImageBitmapLoader } from './loaders/ImageBitmapLoader.js';
|
|
55
|
+
export { FileLoader } from './loaders/FileLoader.js';
|
|
56
|
+
export { Loader } from './loaders/Loader.js';
|
|
57
|
+
export { LoaderUtils } from './loaders/LoaderUtils.js';
|
|
58
|
+
export { Cache } from './loaders/Cache.js';
|
|
59
|
+
export { AudioLoader } from './loaders/AudioLoader.js';
|
|
60
|
+
export { SpotLight } from './lights/SpotLight.js';
|
|
61
|
+
export { PointLight } from './lights/PointLight.js';
|
|
62
|
+
export { RectAreaLight } from './lights/RectAreaLight.js';
|
|
63
|
+
export { HemisphereLight } from './lights/HemisphereLight.js';
|
|
64
|
+
export { DirectionalLight } from './lights/DirectionalLight.js';
|
|
65
|
+
export { AmbientLight } from './lights/AmbientLight.js';
|
|
66
|
+
export { Light } from './lights/Light.js';
|
|
67
|
+
export { LightProbe } from './lights/LightProbe.js';
|
|
68
|
+
export { StereoCamera } from './cameras/StereoCamera.js';
|
|
69
|
+
export { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
|
|
70
|
+
export { OrthographicCamera } from './cameras/OrthographicCamera.js';
|
|
71
|
+
export { CubeCamera } from './cameras/CubeCamera.js';
|
|
72
|
+
export { ArrayCamera } from './cameras/ArrayCamera.js';
|
|
73
|
+
export { Camera } from './cameras/Camera.js';
|
|
74
|
+
export { AudioListener } from './audio/AudioListener.js';
|
|
75
|
+
export { PositionalAudio } from './audio/PositionalAudio.js';
|
|
76
|
+
export { AudioContext } from './audio/AudioContext.js';
|
|
77
|
+
export { AudioAnalyser } from './audio/AudioAnalyser.js';
|
|
78
|
+
export { Audio } from './audio/Audio.js';
|
|
79
|
+
export { VectorKeyframeTrack } from './animation/tracks/VectorKeyframeTrack.js';
|
|
80
|
+
export { StringKeyframeTrack } from './animation/tracks/StringKeyframeTrack.js';
|
|
81
|
+
export { QuaternionKeyframeTrack } from './animation/tracks/QuaternionKeyframeTrack.js';
|
|
82
|
+
export { NumberKeyframeTrack } from './animation/tracks/NumberKeyframeTrack.js';
|
|
83
|
+
export { ColorKeyframeTrack } from './animation/tracks/ColorKeyframeTrack.js';
|
|
84
|
+
export { BooleanKeyframeTrack } from './animation/tracks/BooleanKeyframeTrack.js';
|
|
85
|
+
export { PropertyMixer } from './animation/PropertyMixer.js';
|
|
86
|
+
export { PropertyBinding } from './animation/PropertyBinding.js';
|
|
87
|
+
export { KeyframeTrack } from './animation/KeyframeTrack.js';
|
|
88
|
+
export { AnimationUtils } from './animation/AnimationUtils.js';
|
|
89
|
+
export { AnimationObjectGroup } from './animation/AnimationObjectGroup.js';
|
|
90
|
+
export { AnimationMixer } from './animation/AnimationMixer.js';
|
|
91
|
+
export { AnimationClip } from './animation/AnimationClip.js';
|
|
92
|
+
export { AnimationAction } from './animation/AnimationAction.js';
|
|
93
|
+
export { RenderTarget } from './core/RenderTarget.js';
|
|
94
|
+
export { Uniform } from './core/Uniform.js';
|
|
95
|
+
export { UniformsGroup } from './core/UniformsGroup.js';
|
|
96
|
+
export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
|
|
97
|
+
export { BufferGeometry } from './core/BufferGeometry.js';
|
|
98
|
+
export { InterleavedBufferAttribute } from './core/InterleavedBufferAttribute.js';
|
|
99
|
+
export { InstancedInterleavedBuffer } from './core/InstancedInterleavedBuffer.js';
|
|
100
|
+
export { InterleavedBuffer } from './core/InterleavedBuffer.js';
|
|
101
|
+
export { InstancedBufferAttribute } from './core/InstancedBufferAttribute.js';
|
|
102
|
+
export { GLBufferAttribute } from './core/GLBufferAttribute.js';
|
|
103
|
+
export * from './core/BufferAttribute.js';
|
|
104
|
+
export { Object3D } from './core/Object3D.js';
|
|
105
|
+
export { Raycaster } from './core/Raycaster.js';
|
|
106
|
+
export { Layers } from './core/Layers.js';
|
|
107
|
+
export { EventDispatcher } from './core/EventDispatcher.js';
|
|
108
|
+
export { Clock } from './core/Clock.js';
|
|
109
|
+
export { QuaternionLinearInterpolant } from './math/interpolants/QuaternionLinearInterpolant.js';
|
|
110
|
+
export { LinearInterpolant } from './math/interpolants/LinearInterpolant.js';
|
|
111
|
+
export { DiscreteInterpolant } from './math/interpolants/DiscreteInterpolant.js';
|
|
112
|
+
export { CubicInterpolant } from './math/interpolants/CubicInterpolant.js';
|
|
113
|
+
export { Interpolant } from './math/Interpolant.js';
|
|
114
|
+
export { Triangle } from './math/Triangle.js';
|
|
115
|
+
export { MathUtils } from './math/MathUtils.js';
|
|
116
|
+
export { Spherical } from './math/Spherical.js';
|
|
117
|
+
export { Cylindrical } from './math/Cylindrical.js';
|
|
118
|
+
export { Plane } from './math/Plane.js';
|
|
119
|
+
export { Frustum } from './math/Frustum.js';
|
|
120
|
+
export { Sphere } from './math/Sphere.js';
|
|
121
|
+
export { Ray } from './math/Ray.js';
|
|
122
|
+
export { Matrix4 } from './math/Matrix4.js';
|
|
123
|
+
export { Matrix3 } from './math/Matrix3.js';
|
|
124
|
+
export { Matrix2 } from './math/Matrix2.js';
|
|
125
|
+
export { Box3 } from './math/Box3.js';
|
|
126
|
+
export { Box2 } from './math/Box2.js';
|
|
127
|
+
export { Line3 } from './math/Line3.js';
|
|
128
|
+
export { Euler } from './math/Euler.js';
|
|
129
|
+
export { Vector4 } from './math/Vector4.js';
|
|
130
|
+
export { Vector3 } from './math/Vector3.js';
|
|
131
|
+
export { Vector2 } from './math/Vector2.js';
|
|
132
|
+
export { Quaternion } from './math/Quaternion.js';
|
|
133
|
+
export { Color } from './math/Color.js';
|
|
134
|
+
export { ColorManagement } from './math/ColorManagement.js';
|
|
135
|
+
export { SphericalHarmonics3 } from './math/SphericalHarmonics3.js';
|
|
136
|
+
export { SpotLightHelper } from './helpers/SpotLightHelper.js';
|
|
137
|
+
export { SkeletonHelper } from './helpers/SkeletonHelper.js';
|
|
138
|
+
export { PointLightHelper } from './helpers/PointLightHelper.js';
|
|
139
|
+
export { HemisphereLightHelper } from './helpers/HemisphereLightHelper.js';
|
|
140
|
+
export { GridHelper } from './helpers/GridHelper.js';
|
|
141
|
+
export { PolarGridHelper } from './helpers/PolarGridHelper.js';
|
|
142
|
+
export { DirectionalLightHelper } from './helpers/DirectionalLightHelper.js';
|
|
143
|
+
export { CameraHelper } from './helpers/CameraHelper.js';
|
|
144
|
+
export { BoxHelper } from './helpers/BoxHelper.js';
|
|
145
|
+
export { Box3Helper } from './helpers/Box3Helper.js';
|
|
146
|
+
export { PlaneHelper } from './helpers/PlaneHelper.js';
|
|
147
|
+
export { ArrowHelper } from './helpers/ArrowHelper.js';
|
|
148
|
+
export { AxesHelper } from './helpers/AxesHelper.js';
|
|
149
|
+
export * from './extras/curves/Curves.js';
|
|
150
|
+
export { Shape } from './extras/core/Shape.js';
|
|
151
|
+
export { Path } from './extras/core/Path.js';
|
|
152
|
+
export { ShapePath } from './extras/core/ShapePath.js';
|
|
153
|
+
export { CurvePath } from './extras/core/CurvePath.js';
|
|
154
|
+
export { Curve } from './extras/core/Curve.js';
|
|
155
|
+
export { Controls } from './extras/Controls.js';
|
|
156
|
+
export { DataUtils } from './extras/DataUtils.js';
|
|
157
|
+
export { ImageUtils } from './extras/ImageUtils.js';
|
|
158
|
+
export { ShapeUtils } from './extras/ShapeUtils.js';
|
|
159
|
+
//export { PMREMGenerator } from './extras/PMREMGenerator.js';
|
|
160
|
+
//export { WebGLUtils } from './renderers/webgl/WebGLUtils.js';
|
|
161
|
+
export { createCanvasElement } from './utils.js';
|
|
162
|
+
export * from './constants.js';
|
|
163
|
+
export * from './Three.Legacy.js';
|
|
164
|
+
|
|
165
|
+
export * from './materials/nodes/NodeMaterials.js';
|
|
166
|
+
export { default as WebGPURenderer } from './renderers/webgpu/WebGPURenderer.Nodes.js';
|
|
167
|
+
export { default as QuadMesh } from './renderers/common/QuadMesh.js';
|
|
168
|
+
export { default as PMREMGenerator } from './renderers/common/extras/PMREMGenerator.js';
|
|
169
|
+
export { default as PostProcessing } from './renderers/common/PostProcessing.js';
|
|
170
|
+
export { default as StorageTexture } from './renderers/common/StorageTexture.js';
|
|
171
|
+
export { default as StorageBufferAttribute } from './renderers/common/StorageBufferAttribute.js';
|
|
172
|
+
export { default as StorageInstancedBufferAttribute } from './renderers/common/StorageInstancedBufferAttribute.js';
|
|
173
|
+
export { default as IESSpotLight } from './lights/webgpu/IESSpotLight.js';
|
|
174
|
+
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
175
|
+
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
176
|
+
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
|
177
|
+
export * from './nodes/Nodes.js';
|
|
178
|
+
export * from './nodes/TSL.js';
|
|
179
|
+
|
|
180
|
+
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
181
|
+
|
|
182
|
+
__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {
|
|
183
|
+
revision: REVISION,
|
|
184
|
+
} } ) );
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if ( typeof window !== 'undefined' ) {
|
|
189
|
+
|
|
190
|
+
if ( window.__THREE__ ) {
|
|
191
|
+
|
|
192
|
+
console.warn( 'WARNING: Multiple instances of Three.js being imported.' );
|
|
193
|
+
|
|
194
|
+
} else {
|
|
195
|
+
|
|
196
|
+
window.__THREE__ = REVISION;
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
}
|
package/src/Three.WebGPU.js
CHANGED
|
@@ -152,6 +152,7 @@ export { Path } from './extras/core/Path.js';
|
|
|
152
152
|
export { ShapePath } from './extras/core/ShapePath.js';
|
|
153
153
|
export { CurvePath } from './extras/core/CurvePath.js';
|
|
154
154
|
export { Curve } from './extras/core/Curve.js';
|
|
155
|
+
export { Controls } from './extras/Controls.js';
|
|
155
156
|
export { DataUtils } from './extras/DataUtils.js';
|
|
156
157
|
export { ImageUtils } from './extras/ImageUtils.js';
|
|
157
158
|
export { ShapeUtils } from './extras/ShapeUtils.js';
|
|
@@ -161,7 +162,9 @@ export { createCanvasElement } from './utils.js';
|
|
|
161
162
|
export * from './constants.js';
|
|
162
163
|
export * from './Three.Legacy.js';
|
|
163
164
|
|
|
165
|
+
export * from './materials/nodes/NodeMaterials.js';
|
|
164
166
|
export { default as WebGPURenderer } from './renderers/webgpu/WebGPURenderer.js';
|
|
167
|
+
export { default as BundleGroup } from './renderers/common/BundleGroup.js';
|
|
165
168
|
export { default as QuadMesh } from './renderers/common/QuadMesh.js';
|
|
166
169
|
export { default as PMREMGenerator } from './renderers/common/extras/PMREMGenerator.js';
|
|
167
170
|
export { default as PostProcessing } from './renderers/common/PostProcessing.js';
|
|
@@ -169,7 +172,11 @@ export { default as StorageTexture } from './renderers/common/StorageTexture.js'
|
|
|
169
172
|
export { default as StorageBufferAttribute } from './renderers/common/StorageBufferAttribute.js';
|
|
170
173
|
export { default as StorageInstancedBufferAttribute } from './renderers/common/StorageInstancedBufferAttribute.js';
|
|
171
174
|
export { default as IESSpotLight } from './lights/webgpu/IESSpotLight.js';
|
|
175
|
+
export { default as NodeLoader } from './loaders/nodes/NodeLoader.js';
|
|
176
|
+
export { default as NodeObjectLoader } from './loaders/nodes/NodeObjectLoader.js';
|
|
177
|
+
export { default as NodeMaterialLoader } from './loaders/nodes/NodeMaterialLoader.js';
|
|
172
178
|
export * from './nodes/Nodes.js';
|
|
179
|
+
export * from './nodes/TSL.js';
|
|
173
180
|
|
|
174
181
|
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
175
182
|
|
package/src/Three.js
CHANGED
|
@@ -151,6 +151,7 @@ export { Path } from './extras/core/Path.js';
|
|
|
151
151
|
export { ShapePath } from './extras/core/ShapePath.js';
|
|
152
152
|
export { CurvePath } from './extras/core/CurvePath.js';
|
|
153
153
|
export { Curve } from './extras/core/Curve.js';
|
|
154
|
+
export { Controls } from './extras/Controls.js';
|
|
154
155
|
export { DataUtils } from './extras/DataUtils.js';
|
|
155
156
|
export { ImageUtils } from './extras/ImageUtils.js';
|
|
156
157
|
export { ShapeUtils } from './extras/ShapeUtils.js';
|