super-three 0.179.0 → 0.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +1112 -595
- package/build/three.core.js +616 -345
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +492 -254
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +37 -6
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +6573 -2150
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +6572 -2149
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
- package/examples/fonts/MPLUSRounded1c/OFL.txt +91 -0
- package/examples/jsm/Addons.js +1 -1
- package/examples/jsm/animation/CCDIKSolver.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +8 -8
- package/examples/jsm/controls/DragControls.js +7 -57
- package/examples/jsm/controls/FirstPersonControls.js +3 -3
- package/examples/jsm/controls/FlyControls.js +1 -1
- package/examples/jsm/controls/OrbitControls.js +2 -2
- package/examples/jsm/controls/PointerLockControls.js +2 -10
- package/examples/jsm/controls/TrackballControls.js +1 -1
- package/examples/jsm/controls/TransformControls.js +1 -1
- package/examples/jsm/effects/AsciiEffect.js +8 -8
- package/examples/jsm/exporters/DRACOExporter.js +2 -2
- package/examples/jsm/exporters/EXRExporter.js +1 -1
- package/examples/jsm/exporters/GLTFExporter.js +33 -25
- package/examples/jsm/exporters/KTX2Exporter.js +4 -2
- package/examples/jsm/exporters/PLYExporter.js +1 -1
- package/examples/jsm/exporters/USDZExporter.js +9 -2
- package/examples/jsm/geometries/DecalGeometry.js +2 -2
- package/examples/jsm/geometries/ParametricGeometry.js +1 -1
- package/examples/jsm/geometries/TeapotGeometry.js +2 -2
- package/examples/jsm/geometries/TextGeometry.js +3 -2
- package/examples/jsm/gpgpu/BitonicSort.js +715 -0
- package/examples/jsm/helpers/ViewHelper.js +43 -5
- package/examples/jsm/inspector/Inspector.js +427 -0
- package/examples/jsm/inspector/RendererInspector.js +415 -0
- package/examples/jsm/inspector/tabs/Console.js +204 -0
- package/examples/jsm/inspector/tabs/Parameters.js +332 -0
- package/examples/jsm/inspector/tabs/Performance.js +268 -0
- package/examples/jsm/inspector/tabs/Viewer.js +166 -0
- package/examples/jsm/inspector/ui/Graph.js +95 -0
- package/examples/jsm/inspector/ui/Item.js +170 -0
- package/examples/jsm/inspector/ui/List.js +75 -0
- package/examples/jsm/inspector/ui/Profiler.js +170 -0
- package/examples/jsm/inspector/ui/Style.js +654 -0
- package/examples/jsm/inspector/ui/Tab.js +46 -0
- package/examples/jsm/inspector/ui/Values.js +423 -0
- package/examples/jsm/inspector/ui/utils.js +56 -0
- package/examples/jsm/interactive/HTMLMesh.js +6 -10
- package/examples/jsm/interactive/InteractiveGroup.js +1 -1
- package/examples/jsm/interactive/SelectionBox.js +30 -0
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/lights/RectAreaLightTexturesLib.js +1 -1
- package/examples/jsm/lines/Line2.js +3 -3
- package/examples/jsm/lines/LineGeometry.js +1 -1
- package/examples/jsm/lines/LineSegments2.js +2 -2
- package/examples/jsm/lines/Wireframe.js +2 -2
- package/examples/jsm/lines/WireframeGeometry2.js +1 -1
- package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
- package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
- package/examples/jsm/loaders/3MFLoader.js +1 -1
- package/examples/jsm/loaders/ColladaLoader.js +3 -3
- package/examples/jsm/loaders/DDSLoader.js +1 -1
- package/examples/jsm/loaders/DRACOLoader.js +73 -22
- package/examples/jsm/loaders/EXRLoader.js +5 -5
- package/examples/jsm/loaders/FBXLoader.js +2 -2
- package/examples/jsm/loaders/FontLoader.js +23 -5
- package/examples/jsm/loaders/GLTFLoader.js +14 -8
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
- package/examples/jsm/loaders/HDRLoader.js +486 -0
- package/examples/jsm/loaders/KTX2Loader.js +136 -49
- package/examples/jsm/loaders/KTXLoader.js +2 -2
- package/examples/jsm/loaders/LDrawLoader.js +1 -1
- package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
- package/examples/jsm/loaders/LUTCubeLoader.js +1 -1
- package/examples/jsm/loaders/LWOLoader.js +2 -2
- package/examples/jsm/loaders/MaterialXLoader.js +22 -5
- package/examples/jsm/loaders/OBJLoader.js +1 -1
- package/examples/jsm/loaders/PDBLoader.js +1 -1
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/SVGLoader.js +2 -2
- package/examples/jsm/loaders/TTFLoader.js +4 -4
- package/examples/jsm/loaders/UltraHDRLoader.js +2 -2
- package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
- package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
- package/examples/jsm/math/ColorSpaces.js +19 -1
- package/examples/jsm/math/ConvexHull.js +3 -3
- package/examples/jsm/math/ImprovedNoise.js +1 -1
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/math/SimplexNoise.js +1 -1
- package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
- package/examples/jsm/misc/ProgressiveLightMap.js +9 -3
- package/examples/jsm/misc/ProgressiveLightMapGPU.js +7 -1
- package/examples/jsm/misc/TubePainter.js +383 -40
- package/examples/jsm/misc/Volume.js +1 -1
- package/examples/jsm/modifiers/SimplifyModifier.js +1 -1
- package/examples/jsm/objects/ReflectorForSSRPass.js +1 -0
- package/examples/jsm/objects/Sky.js +1 -1
- package/examples/jsm/objects/SkyMesh.js +1 -1
- package/examples/jsm/objects/Water.js +3 -3
- package/examples/jsm/objects/WaterMesh.js +6 -6
- package/examples/jsm/postprocessing/GlitchPass.js +2 -2
- package/examples/jsm/postprocessing/OutlinePass.js +1 -1
- package/examples/jsm/postprocessing/SSRPass.js +37 -8
- package/examples/jsm/postprocessing/UnrealBloomPass.js +8 -6
- package/examples/jsm/renderers/CSS2DRenderer.js +16 -5
- package/examples/jsm/renderers/CSS3DRenderer.js +7 -6
- package/examples/jsm/renderers/SVGRenderer.js +1 -1
- package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +1 -1
- package/examples/jsm/shaders/AfterimageShader.js +1 -1
- package/examples/jsm/shaders/BleachBypassShader.js +1 -1
- package/examples/jsm/shaders/BokehShader.js +1 -1
- package/examples/jsm/shaders/BokehShader2.js +1 -1
- package/examples/jsm/shaders/DotScreenShader.js +1 -1
- package/examples/jsm/shaders/FocusShader.js +1 -1
- package/examples/jsm/shaders/GTAOShader.js +2 -2
- package/examples/jsm/shaders/GodRaysShader.js +1 -1
- package/examples/jsm/shaders/KaleidoShader.js +1 -1
- package/examples/jsm/shaders/PoissonDenoiseShader.js +2 -2
- package/examples/jsm/shaders/SSRShader.js +1 -1
- package/examples/jsm/shaders/SepiaShader.js +1 -1
- package/examples/jsm/shaders/SubsurfaceScatteringShader.js +1 -1
- package/examples/jsm/shaders/TriangleBlurShader.js +1 -1
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +1 -1
- package/examples/jsm/shaders/VignetteShader.js +1 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +22 -19
- package/examples/jsm/transpiler/TSLEncoder.js +9 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
- package/examples/jsm/tsl/display/AfterImageNode.js +26 -24
- package/examples/jsm/tsl/display/AnamorphicNode.js +28 -4
- package/examples/jsm/tsl/display/BloomNode.js +7 -3
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
- package/examples/jsm/tsl/display/DenoiseNode.js +2 -0
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +446 -90
- package/examples/jsm/tsl/display/GTAONode.js +53 -5
- package/examples/jsm/tsl/display/GaussianBlurNode.js +49 -35
- package/examples/jsm/tsl/display/OutlineNode.js +13 -2
- package/examples/jsm/tsl/display/SSGINode.js +654 -0
- package/examples/jsm/tsl/display/SSRNode.js +182 -65
- package/examples/jsm/tsl/display/SSSNode.js +488 -0
- package/examples/jsm/tsl/display/TRAANode.js +124 -7
- package/examples/jsm/tsl/display/boxBlur.js +65 -0
- package/examples/jsm/tsl/display/hashBlur.js +16 -18
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +21 -1
- package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
- package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
- package/examples/jsm/webxr/OculusHandModel.js +1 -1
- package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
- package/examples/jsm/webxr/XRHandModelFactory.js +2 -6
- package/package.json +5 -10
- package/src/Three.Core.js +4 -2
- package/src/Three.TSL.js +36 -5
- package/src/Three.WebGPU.Nodes.js +2 -0
- package/src/Three.WebGPU.js +2 -0
- package/src/animation/AnimationClip.js +20 -4
- package/src/animation/AnimationMixer.js +3 -3
- package/src/animation/AnimationObjectGroup.js +2 -1
- package/src/animation/KeyframeTrack.js +7 -6
- package/src/animation/PropertyBinding.js +12 -11
- package/src/audio/Audio.js +10 -9
- package/src/audio/PositionalAudio.js +1 -1
- package/src/cameras/OrthographicCamera.js +1 -1
- package/src/cameras/PerspectiveCamera.js +1 -1
- package/src/cameras/StereoCamera.js +2 -2
- package/src/constants.js +11 -3
- package/src/core/BufferGeometry.js +10 -10
- package/src/core/EventDispatcher.js +1 -1
- package/src/core/InterleavedBuffer.js +1 -1
- package/src/core/InterleavedBufferAttribute.js +3 -2
- package/src/core/Object3D.js +3 -2
- package/src/core/Raycaster.js +2 -1
- package/src/core/RenderTarget.js +10 -1
- package/src/extras/Controls.js +5 -4
- package/src/extras/DataUtils.js +2 -1
- package/src/extras/Earcut.js +6 -0
- package/src/extras/ImageUtils.js +2 -2
- package/src/extras/PMREMGenerator.js +268 -55
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/core/Curve.js +2 -1
- package/src/extras/core/Interpolations.js +7 -1
- package/src/extras/core/ShapePath.js +4 -4
- package/src/extras/lib/earcut.js +8 -8
- package/src/geometries/BoxGeometry.js +1 -0
- package/src/geometries/CapsuleGeometry.js +1 -0
- package/src/geometries/CircleGeometry.js +1 -0
- package/src/geometries/ConeGeometry.js +1 -0
- package/src/geometries/CylinderGeometry.js +1 -0
- package/src/geometries/DodecahedronGeometry.js +1 -0
- package/src/geometries/ExtrudeGeometry.js +8 -6
- package/src/geometries/IcosahedronGeometry.js +1 -0
- package/src/geometries/LatheGeometry.js +1 -0
- package/src/geometries/OctahedronGeometry.js +1 -0
- package/src/geometries/PlaneGeometry.js +1 -0
- package/src/geometries/RingGeometry.js +1 -0
- package/src/geometries/ShapeGeometry.js +1 -0
- package/src/geometries/SphereGeometry.js +1 -0
- package/src/geometries/TetrahedronGeometry.js +1 -0
- package/src/geometries/TorusGeometry.js +1 -0
- package/src/geometries/TorusKnotGeometry.js +1 -0
- package/src/geometries/TubeGeometry.js +1 -0
- package/src/helpers/CameraHelper.js +1 -1
- package/src/lights/webgpu/ProjectorLight.js +1 -1
- package/src/loaders/AnimationLoader.js +2 -1
- package/src/loaders/AudioLoader.js +2 -1
- package/src/loaders/BufferGeometryLoader.js +2 -2
- package/src/loaders/Cache.js +2 -2
- package/src/loaders/DataTextureLoader.js +1 -1
- package/src/loaders/FileLoader.js +3 -2
- package/src/loaders/ImageBitmapLoader.js +5 -4
- package/src/loaders/ImageLoader.js +1 -1
- package/src/loaders/Loader.js +3 -3
- package/src/loaders/LoadingManager.js +25 -3
- package/src/loaders/MaterialLoader.js +3 -2
- package/src/loaders/ObjectLoader.js +13 -13
- package/src/loaders/TextureLoader.js +1 -1
- package/src/loaders/nodes/NodeLoader.js +3 -2
- package/src/materials/Material.js +16 -3
- package/src/materials/MeshBasicMaterial.js +1 -0
- package/src/materials/MeshDepthMaterial.js +1 -0
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/MeshLambertMaterial.js +2 -1
- package/src/materials/MeshMatcapMaterial.js +22 -0
- package/src/materials/MeshNormalMaterial.js +1 -0
- package/src/materials/MeshPhongMaterial.js +2 -1
- package/src/materials/MeshPhysicalMaterial.js +2 -1
- package/src/materials/MeshStandardMaterial.js +8 -7
- package/src/materials/MeshToonMaterial.js +1 -0
- package/src/materials/PointsMaterial.js +1 -1
- package/src/materials/ShaderMaterial.js +2 -2
- package/src/materials/nodes/Line2NodeMaterial.js +2 -2
- package/src/materials/nodes/MeshSSSNodeMaterial.js +1 -1
- package/src/materials/nodes/NodeMaterial.js +62 -22
- package/src/materials/nodes/PointsNodeMaterial.js +81 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +3 -2
- package/src/math/Color.js +6 -5
- package/src/math/ColorManagement.js +9 -3
- package/src/math/Cylindrical.js +1 -1
- package/src/math/Euler.js +2 -1
- package/src/math/MathUtils.js +13 -11
- package/src/math/Matrix2.js +1 -1
- package/src/math/Matrix3.js +2 -2
- package/src/math/Matrix4.js +7 -7
- package/src/math/Plane.js +1 -1
- package/src/math/Quaternion.js +68 -66
- package/src/math/Spherical.js +1 -1
- package/src/nodes/Nodes.js +4 -1
- package/src/nodes/TSL.js +4 -1
- package/src/nodes/accessors/BufferNode.js +1 -1
- package/src/nodes/accessors/Camera.js +133 -7
- package/src/nodes/accessors/ClippingNode.js +6 -5
- package/src/nodes/accessors/CubeTextureNode.js +5 -4
- package/src/nodes/accessors/InstanceNode.js +25 -5
- package/src/nodes/accessors/Lights.js +10 -0
- package/src/nodes/accessors/Normal.js +5 -4
- package/src/nodes/accessors/Object3DNode.js +1 -1
- package/src/nodes/accessors/Position.js +18 -2
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +3 -2
- package/src/nodes/accessors/SceneNode.js +2 -1
- package/src/nodes/accessors/StorageBufferNode.js +2 -1
- package/src/nodes/accessors/StorageTextureNode.js +22 -0
- package/src/nodes/accessors/Texture3DNode.js +14 -1
- package/src/nodes/accessors/TextureNode.js +130 -44
- package/src/nodes/code/FunctionCallNode.js +24 -4
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/ArrayNode.js +1 -0
- package/src/nodes/core/AssignNode.js +4 -3
- package/src/nodes/core/AttributeNode.js +2 -1
- package/src/nodes/core/ContextNode.js +29 -10
- package/src/nodes/core/IndexNode.js +2 -2
- package/src/nodes/core/InputNode.js +2 -1
- package/src/nodes/core/InspectorNode.js +128 -0
- package/src/nodes/core/{CacheNode.js → IsolateNode.js} +40 -7
- package/src/nodes/core/Node.js +152 -31
- package/src/nodes/core/NodeBuilder.js +183 -35
- package/src/nodes/core/NodeFrame.js +21 -21
- package/src/nodes/core/NodeFunction.js +2 -1
- package/src/nodes/core/NodeParser.js +2 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +17 -91
- package/src/nodes/core/ParameterNode.js +31 -0
- package/src/nodes/core/PropertyNode.js +7 -0
- package/src/nodes/core/StackNode.js +43 -16
- package/src/nodes/core/StructNode.js +5 -5
- package/src/nodes/core/StructTypeNode.js +1 -0
- package/src/nodes/core/SubBuildNode.js +2 -2
- package/src/nodes/core/UniformNode.js +18 -10
- package/src/nodes/core/VarNode.js +70 -33
- package/src/nodes/core/VaryingNode.js +3 -2
- package/src/nodes/display/BlendModes.js +5 -4
- package/src/nodes/display/BumpMapNode.js +1 -1
- package/src/nodes/display/ColorAdjustment.js +1 -1
- package/src/nodes/display/FrontFacingNode.js +4 -8
- package/src/nodes/display/NormalMapNode.js +2 -1
- package/src/nodes/display/PassNode.js +52 -11
- package/src/nodes/display/RenderOutputNode.js +28 -2
- package/src/nodes/display/ScreenNode.js +44 -14
- package/src/nodes/display/ToneMappingNode.js +31 -4
- package/src/nodes/display/ToonOutlinePassNode.js +8 -0
- package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
- package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
- package/src/nodes/display/ViewportTextureNode.js +42 -12
- package/src/nodes/fog/Fog.js +3 -2
- package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +52 -0
- package/src/nodes/functions/BSDF/DFGApprox.js +60 -19
- package/src/nodes/functions/BasicLightingModel.js +2 -1
- package/src/nodes/functions/PhysicalLightingModel.js +3 -2
- package/src/nodes/functions/VolumetricLightingModel.js +5 -5
- package/src/nodes/geometry/RangeNode.js +40 -4
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +2 -1
- package/src/nodes/gpgpu/ComputeNode.js +17 -5
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +455 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +2 -1
- package/src/nodes/lighting/EnvironmentNode.js +6 -6
- package/src/nodes/lighting/LightsNode.js +3 -4
- package/src/nodes/lighting/PointShadowNode.js +6 -0
- package/src/nodes/lighting/ShadowFilterNode.js +2 -0
- package/src/nodes/lighting/ShadowNode.js +75 -8
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/ConditionalNode.js +24 -7
- package/src/nodes/math/MathNode.js +25 -19
- package/src/nodes/math/OperatorNode.js +7 -5
- package/src/nodes/pmrem/PMREMUtils.js +117 -2
- package/src/nodes/shapes/Shapes.js +1 -1
- package/src/nodes/tsl/TSLBase.js +5 -2
- package/src/nodes/tsl/TSLCore.js +460 -159
- package/src/nodes/utils/DebugNode.js +2 -1
- package/src/nodes/utils/EventNode.js +36 -0
- package/src/nodes/utils/FunctionOverloadingNode.js +37 -19
- package/src/nodes/utils/JoinNode.js +6 -3
- package/src/nodes/utils/LoopNode.js +20 -24
- package/src/nodes/utils/MemberNode.js +59 -7
- package/src/nodes/utils/PostProcessingUtils.js +28 -1
- package/src/nodes/utils/RTTNode.js +13 -3
- package/src/nodes/utils/ReflectorNode.js +58 -7
- package/src/nodes/utils/SampleNode.js +12 -2
- package/src/nodes/utils/SplitNode.js +11 -0
- package/src/nodes/utils/Timer.js +0 -47
- package/src/objects/BatchedMesh.js +2 -2
- package/src/objects/LOD.js +1 -1
- package/src/objects/Line.js +2 -1
- package/src/objects/LineSegments.js +2 -1
- package/src/objects/Skeleton.js +3 -2
- package/src/objects/SkinnedMesh.js +3 -1
- package/src/objects/Sprite.js +4 -3
- package/src/renderers/WebGLRenderer.js +52 -43
- package/src/renderers/common/Animation.js +13 -1
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +108 -27
- package/src/renderers/common/Background.js +2 -1
- package/src/renderers/common/Bindings.js +58 -2
- package/src/renderers/common/CanvasTarget.js +341 -0
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Geometries.js +26 -0
- package/src/renderers/common/Info.js +4 -2
- package/src/renderers/common/InspectorBase.js +146 -0
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/PostProcessing.js +6 -25
- package/src/renderers/common/QuadMesh.js +7 -1
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderList.js +7 -3
- package/src/renderers/common/RenderObject.js +16 -2
- package/src/renderers/common/RenderObjects.js +1 -1
- package/src/renderers/common/Renderer.js +473 -245
- package/src/renderers/common/RendererUtils.js +9 -0
- package/src/renderers/common/SampledTexture.js +9 -1
- package/src/renderers/common/Sampler.js +50 -12
- package/src/renderers/common/StorageTexture.js +9 -1
- package/src/renderers/common/Textures.js +121 -45
- package/src/renderers/common/TimestampQueryPool.js +65 -3
- package/src/renderers/common/UniformsGroup.js +2 -1
- package/src/renderers/common/XRManager.js +42 -22
- package/src/renderers/common/extras/PMREMGenerator.js +160 -65
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +9 -7
- package/src/renderers/common/nodes/NodeSampler.js +13 -1
- package/src/renderers/common/nodes/Nodes.js +38 -16
- package/src/renderers/shaders/DFGLUTData.js +64 -0
- package/src/renderers/shaders/ShaderChunk/common.glsl.js +0 -12
- package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +52 -18
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +7 -15
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +1 -1
- package/src/renderers/shaders/UniformsLib.js +1 -0
- package/src/renderers/shaders/UniformsUtils.js +25 -4
- package/src/renderers/webgl/WebGLCapabilities.js +2 -1
- package/src/renderers/webgl/WebGLExtensions.js +2 -25
- package/src/renderers/webgl/WebGLInfo.js +3 -1
- package/src/renderers/webgl/WebGLProgram.js +15 -14
- package/src/renderers/webgl/WebGLPrograms.js +3 -2
- package/src/renderers/webgl/WebGLShadowMap.js +3 -2
- package/src/renderers/webgl/WebGLState.js +15 -14
- package/src/renderers/webgl/WebGLTextures.js +19 -14
- package/src/renderers/webgl/WebGLUniformsGroups.js +5 -3
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +199 -167
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +181 -25
- package/src/renderers/webgl-fallback/utils/WebGLConstants.js +2 -3
- package/src/renderers/webgl-fallback/utils/WebGLState.js +7 -6
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +169 -19
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +51 -22
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
- package/src/renderers/webgpu/WebGPUBackend.js +153 -123
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +2 -1
- package/src/renderers/webgpu/WebGPURenderer.js +3 -2
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +142 -50
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +2 -1
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +5 -3
- package/src/renderers/webgpu/utils/WebGPUConstants.js +7 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +53 -34
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +6 -8
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +260 -99
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +32 -9
- package/src/renderers/webgpu/utils/WebGPUUtils.js +22 -2
- package/src/renderers/webxr/WebXRManager.js +41 -27
- package/src/textures/ExternalTexture.js +15 -4
- package/src/textures/Source.js +3 -2
- package/src/textures/Texture.js +3 -2
- package/src/textures/VideoTexture.js +2 -3
- package/src/utils.js +67 -3
- package/examples/jsm/loaders/RGBMLoader.js +0 -1148
package/build/three.core.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
const REVISION = '
|
|
6
|
+
const REVISION = '181';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Represents mouse buttons and interaction types in context of controls.
|
|
@@ -726,6 +726,14 @@ const UnsignedInt248Type = 1020;
|
|
|
726
726
|
*/
|
|
727
727
|
const UnsignedInt5999Type = 35902;
|
|
728
728
|
|
|
729
|
+
/**
|
|
730
|
+
* An unsigned int 10_11_11 (packed) data type for textures.
|
|
731
|
+
*
|
|
732
|
+
* @type {number}
|
|
733
|
+
* @constant
|
|
734
|
+
*/
|
|
735
|
+
const UnsignedInt101111Type = 35899;
|
|
736
|
+
|
|
729
737
|
/**
|
|
730
738
|
* Discards the red, green and blue components and reads just the alpha component.
|
|
731
739
|
*
|
|
@@ -1667,14 +1675,165 @@ const InterpolationSamplingMode = {
|
|
|
1667
1675
|
* @property {string} NORMAL - Normal sampling mode.
|
|
1668
1676
|
* @property {string} CENTROID - Centroid sampling mode.
|
|
1669
1677
|
* @property {string} SAMPLE - Sample-specific sampling mode.
|
|
1670
|
-
* @property {string}
|
|
1671
|
-
* @property {string}
|
|
1678
|
+
* @property {string} FIRST - Flat interpolation using the first vertex.
|
|
1679
|
+
* @property {string} EITHER - Flat interpolation using either vertex.
|
|
1672
1680
|
*/
|
|
1673
1681
|
|
|
1682
|
+
function arrayNeedsUint32( array ) {
|
|
1683
|
+
|
|
1684
|
+
// assumes larger values usually on last
|
|
1685
|
+
|
|
1686
|
+
for ( let i = array.length - 1; i >= 0; -- i ) {
|
|
1687
|
+
|
|
1688
|
+
if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565
|
|
1689
|
+
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
return false;
|
|
1693
|
+
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
const TYPED_ARRAYS = {
|
|
1697
|
+
Int8Array: Int8Array,
|
|
1698
|
+
Uint8Array: Uint8Array,
|
|
1699
|
+
Uint8ClampedArray: Uint8ClampedArray,
|
|
1700
|
+
Int16Array: Int16Array,
|
|
1701
|
+
Uint16Array: Uint16Array,
|
|
1702
|
+
Int32Array: Int32Array,
|
|
1703
|
+
Uint32Array: Uint32Array,
|
|
1704
|
+
Float32Array: Float32Array,
|
|
1705
|
+
Float64Array: Float64Array
|
|
1706
|
+
};
|
|
1707
|
+
|
|
1708
|
+
function getTypedArray( type, buffer ) {
|
|
1709
|
+
|
|
1710
|
+
return new TYPED_ARRAYS[ type ]( buffer );
|
|
1711
|
+
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
function createElementNS( name ) {
|
|
1715
|
+
|
|
1716
|
+
return document.createElementNS( 'http://www.w3.org/1999/xhtml', name );
|
|
1717
|
+
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
function createCanvasElement() {
|
|
1721
|
+
|
|
1722
|
+
const canvas = createElementNS( 'canvas' );
|
|
1723
|
+
canvas.style.display = 'block';
|
|
1724
|
+
return canvas;
|
|
1725
|
+
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
const _cache = {};
|
|
1729
|
+
|
|
1730
|
+
let _setConsoleFunction = null;
|
|
1731
|
+
|
|
1732
|
+
function setConsoleFunction( fn ) {
|
|
1733
|
+
|
|
1734
|
+
_setConsoleFunction = fn;
|
|
1735
|
+
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
function getConsoleFunction() {
|
|
1739
|
+
|
|
1740
|
+
return _setConsoleFunction;
|
|
1741
|
+
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
function log( ...params ) {
|
|
1745
|
+
|
|
1746
|
+
const message = 'THREE.' + params.shift();
|
|
1747
|
+
|
|
1748
|
+
if ( _setConsoleFunction ) {
|
|
1749
|
+
|
|
1750
|
+
_setConsoleFunction( 'log', message, ...params );
|
|
1751
|
+
|
|
1752
|
+
} else {
|
|
1753
|
+
|
|
1754
|
+
console.log( message, ...params );
|
|
1755
|
+
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
function warn( ...params ) {
|
|
1761
|
+
|
|
1762
|
+
const message = 'THREE.' + params.shift();
|
|
1763
|
+
|
|
1764
|
+
if ( _setConsoleFunction ) {
|
|
1765
|
+
|
|
1766
|
+
_setConsoleFunction( 'warn', message, ...params );
|
|
1767
|
+
|
|
1768
|
+
} else {
|
|
1769
|
+
|
|
1770
|
+
console.warn( message, ...params );
|
|
1771
|
+
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
function error( ...params ) {
|
|
1777
|
+
|
|
1778
|
+
const message = 'THREE.' + params.shift();
|
|
1779
|
+
|
|
1780
|
+
if ( _setConsoleFunction ) {
|
|
1781
|
+
|
|
1782
|
+
_setConsoleFunction( 'error', message, ...params );
|
|
1783
|
+
|
|
1784
|
+
} else {
|
|
1785
|
+
|
|
1786
|
+
console.error( message, ...params );
|
|
1787
|
+
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
function warnOnce( ...params ) {
|
|
1793
|
+
|
|
1794
|
+
const message = params.join( ' ' );
|
|
1795
|
+
|
|
1796
|
+
if ( message in _cache ) return;
|
|
1797
|
+
|
|
1798
|
+
_cache[ message ] = true;
|
|
1799
|
+
|
|
1800
|
+
warn( ...params );
|
|
1801
|
+
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
function probeAsync( gl, sync, interval ) {
|
|
1805
|
+
|
|
1806
|
+
return new Promise( function ( resolve, reject ) {
|
|
1807
|
+
|
|
1808
|
+
function probe() {
|
|
1809
|
+
|
|
1810
|
+
switch ( gl.clientWaitSync( sync, gl.SYNC_FLUSH_COMMANDS_BIT, 0 ) ) {
|
|
1811
|
+
|
|
1812
|
+
case gl.WAIT_FAILED:
|
|
1813
|
+
reject();
|
|
1814
|
+
break;
|
|
1815
|
+
|
|
1816
|
+
case gl.TIMEOUT_EXPIRED:
|
|
1817
|
+
setTimeout( probe, interval );
|
|
1818
|
+
break;
|
|
1819
|
+
|
|
1820
|
+
default:
|
|
1821
|
+
resolve();
|
|
1822
|
+
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
setTimeout( probe, interval );
|
|
1828
|
+
|
|
1829
|
+
} );
|
|
1830
|
+
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1674
1833
|
/**
|
|
1675
1834
|
* This modules allows to dispatch event objects on custom JavaScript objects.
|
|
1676
1835
|
*
|
|
1677
|
-
* Main repository: [eventdispatcher.js]
|
|
1836
|
+
* Main repository: [eventdispatcher.js](https://github.com/mrdoob/eventdispatcher.js/)
|
|
1678
1837
|
*
|
|
1679
1838
|
* Code Example:
|
|
1680
1839
|
* ```js
|
|
@@ -1809,7 +1968,7 @@ const DEG2RAD = Math.PI / 180;
|
|
|
1809
1968
|
const RAD2DEG = 180 / Math.PI;
|
|
1810
1969
|
|
|
1811
1970
|
/**
|
|
1812
|
-
* Generate a [UUID]
|
|
1971
|
+
* Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)
|
|
1813
1972
|
* (universally unique identifier).
|
|
1814
1973
|
*
|
|
1815
1974
|
* @return {string} The UUID.
|
|
@@ -1922,7 +2081,7 @@ function lerp( x, y, t ) {
|
|
|
1922
2081
|
/**
|
|
1923
2082
|
* Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta
|
|
1924
2083
|
* time to maintain frame rate independent movement. For details, see
|
|
1925
|
-
* [Frame rate independent damping using lerp]
|
|
2084
|
+
* [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/).
|
|
1926
2085
|
*
|
|
1927
2086
|
* @param {number} x - The current point.
|
|
1928
2087
|
* @param {number} y - The target point.
|
|
@@ -1957,7 +2116,7 @@ function pingpong( x, length = 1 ) {
|
|
|
1957
2116
|
* moved between `min` and `max`, but smoothed or slowed down the closer `x` is to
|
|
1958
2117
|
* the `min` and `max`.
|
|
1959
2118
|
*
|
|
1960
|
-
* See [Smoothstep]
|
|
2119
|
+
* See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details.
|
|
1961
2120
|
*
|
|
1962
2121
|
* @param {number} x - The value to evaluate based on its position between min and max.
|
|
1963
2122
|
* @param {number} min - The min value. Any x value below min will be `0`.
|
|
@@ -1976,7 +2135,7 @@ function smoothstep( x, min, max ) {
|
|
|
1976
2135
|
}
|
|
1977
2136
|
|
|
1978
2137
|
/**
|
|
1979
|
-
* A [variation on smoothstep]
|
|
2138
|
+
* A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations)
|
|
1980
2139
|
* that has zero 1st and 2nd order derivatives at x=0 and x=1.
|
|
1981
2140
|
*
|
|
1982
2141
|
* @param {number} x - The value to evaluate based on its position between min and max.
|
|
@@ -2116,7 +2275,7 @@ function floorPowerOfTwo( value ) {
|
|
|
2116
2275
|
}
|
|
2117
2276
|
|
|
2118
2277
|
/**
|
|
2119
|
-
* Sets the given quaternion from the [Intrinsic Proper Euler Angles]
|
|
2278
|
+
* Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles)
|
|
2120
2279
|
* defined by the given angles and order.
|
|
2121
2280
|
*
|
|
2122
2281
|
* Rotations are applied to the axes in the order specified by order:
|
|
@@ -2172,7 +2331,7 @@ function setQuaternionFromProperEuler( q, a, b, c, order ) {
|
|
|
2172
2331
|
break;
|
|
2173
2332
|
|
|
2174
2333
|
default:
|
|
2175
|
-
|
|
2334
|
+
warn( 'MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );
|
|
2176
2335
|
|
|
2177
2336
|
}
|
|
2178
2337
|
|
|
@@ -2281,7 +2440,7 @@ const MathUtils = {
|
|
|
2281
2440
|
DEG2RAD: DEG2RAD,
|
|
2282
2441
|
RAD2DEG: RAD2DEG,
|
|
2283
2442
|
/**
|
|
2284
|
-
* Generate a [UUID]
|
|
2443
|
+
* Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)
|
|
2285
2444
|
* (universally unique identifier).
|
|
2286
2445
|
*
|
|
2287
2446
|
* @static
|
|
@@ -2352,7 +2511,7 @@ const MathUtils = {
|
|
|
2352
2511
|
/**
|
|
2353
2512
|
* Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta
|
|
2354
2513
|
* time to maintain frame rate independent movement. For details, see
|
|
2355
|
-
* [Frame rate independent damping using lerp]
|
|
2514
|
+
* [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/).
|
|
2356
2515
|
*
|
|
2357
2516
|
* @static
|
|
2358
2517
|
* @method
|
|
@@ -2379,7 +2538,7 @@ const MathUtils = {
|
|
|
2379
2538
|
* moved between `min` and `max`, but smoothed or slowed down the closer `x` is to
|
|
2380
2539
|
* the `min` and `max`.
|
|
2381
2540
|
*
|
|
2382
|
-
* See [Smoothstep]
|
|
2541
|
+
* See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details.
|
|
2383
2542
|
*
|
|
2384
2543
|
* @static
|
|
2385
2544
|
* @method
|
|
@@ -2390,7 +2549,7 @@ const MathUtils = {
|
|
|
2390
2549
|
*/
|
|
2391
2550
|
smoothstep: smoothstep,
|
|
2392
2551
|
/**
|
|
2393
|
-
* A [variation on smoothstep]
|
|
2552
|
+
* A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations)
|
|
2394
2553
|
* that has zero 1st and 2nd order derivatives at x=0 and x=1.
|
|
2395
2554
|
*
|
|
2396
2555
|
* @static
|
|
@@ -2485,7 +2644,7 @@ const MathUtils = {
|
|
|
2485
2644
|
*/
|
|
2486
2645
|
floorPowerOfTwo: floorPowerOfTwo,
|
|
2487
2646
|
/**
|
|
2488
|
-
* Sets the given quaternion from the [Intrinsic Proper Euler Angles]
|
|
2647
|
+
* Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles)
|
|
2489
2648
|
* defined by the given angles and order.
|
|
2490
2649
|
*
|
|
2491
2650
|
* Rotations are applied to the axes in the order specified by order:
|
|
@@ -3430,7 +3589,7 @@ class Quaternion {
|
|
|
3430
3589
|
|
|
3431
3590
|
/**
|
|
3432
3591
|
* Interpolates between two quaternions via SLERP. This implementation assumes the
|
|
3433
|
-
* quaternion data are managed
|
|
3592
|
+
* quaternion data are managed in flat arrays.
|
|
3434
3593
|
*
|
|
3435
3594
|
* @param {Array<number>} dst - The destination array.
|
|
3436
3595
|
* @param {number} dstOffset - An offset into the destination array.
|
|
@@ -3443,65 +3602,78 @@ class Quaternion {
|
|
|
3443
3602
|
*/
|
|
3444
3603
|
static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {
|
|
3445
3604
|
|
|
3446
|
-
// fuzz-free, array-based Quaternion SLERP operation
|
|
3447
|
-
|
|
3448
3605
|
let x0 = src0[ srcOffset0 + 0 ],
|
|
3449
3606
|
y0 = src0[ srcOffset0 + 1 ],
|
|
3450
3607
|
z0 = src0[ srcOffset0 + 2 ],
|
|
3451
3608
|
w0 = src0[ srcOffset0 + 3 ];
|
|
3452
3609
|
|
|
3453
|
-
|
|
3610
|
+
let x1 = src1[ srcOffset1 + 0 ],
|
|
3454
3611
|
y1 = src1[ srcOffset1 + 1 ],
|
|
3455
3612
|
z1 = src1[ srcOffset1 + 2 ],
|
|
3456
3613
|
w1 = src1[ srcOffset1 + 3 ];
|
|
3457
3614
|
|
|
3458
|
-
if ( t
|
|
3615
|
+
if ( t <= 0 ) {
|
|
3459
3616
|
|
|
3460
3617
|
dst[ dstOffset + 0 ] = x0;
|
|
3461
3618
|
dst[ dstOffset + 1 ] = y0;
|
|
3462
3619
|
dst[ dstOffset + 2 ] = z0;
|
|
3463
3620
|
dst[ dstOffset + 3 ] = w0;
|
|
3621
|
+
|
|
3464
3622
|
return;
|
|
3465
3623
|
|
|
3466
3624
|
}
|
|
3467
3625
|
|
|
3468
|
-
if ( t
|
|
3626
|
+
if ( t >= 1 ) {
|
|
3469
3627
|
|
|
3470
3628
|
dst[ dstOffset + 0 ] = x1;
|
|
3471
3629
|
dst[ dstOffset + 1 ] = y1;
|
|
3472
3630
|
dst[ dstOffset + 2 ] = z1;
|
|
3473
3631
|
dst[ dstOffset + 3 ] = w1;
|
|
3632
|
+
|
|
3474
3633
|
return;
|
|
3475
3634
|
|
|
3476
3635
|
}
|
|
3477
3636
|
|
|
3478
3637
|
if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {
|
|
3479
3638
|
|
|
3480
|
-
let
|
|
3481
|
-
const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
|
|
3482
|
-
dir = ( cos >= 0 ? 1 : -1 ),
|
|
3483
|
-
sqrSin = 1 - cos * cos;
|
|
3639
|
+
let dot = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1;
|
|
3484
3640
|
|
|
3485
|
-
|
|
3486
|
-
if ( sqrSin > Number.EPSILON ) {
|
|
3641
|
+
if ( dot < 0 ) {
|
|
3487
3642
|
|
|
3488
|
-
|
|
3489
|
-
|
|
3643
|
+
x1 = - x1;
|
|
3644
|
+
y1 = - y1;
|
|
3645
|
+
z1 = - z1;
|
|
3646
|
+
w1 = - w1;
|
|
3490
3647
|
|
|
3491
|
-
|
|
3492
|
-
t = Math.sin( t * len ) / sin;
|
|
3648
|
+
dot = - dot;
|
|
3493
3649
|
|
|
3494
3650
|
}
|
|
3495
3651
|
|
|
3496
|
-
|
|
3652
|
+
let s = 1 - t;
|
|
3653
|
+
|
|
3654
|
+
if ( dot < 0.9995 ) {
|
|
3655
|
+
|
|
3656
|
+
// slerp
|
|
3657
|
+
|
|
3658
|
+
const theta = Math.acos( dot );
|
|
3659
|
+
const sin = Math.sin( theta );
|
|
3660
|
+
|
|
3661
|
+
s = Math.sin( s * theta ) / sin;
|
|
3662
|
+
t = Math.sin( t * theta ) / sin;
|
|
3663
|
+
|
|
3664
|
+
x0 = x0 * s + x1 * t;
|
|
3665
|
+
y0 = y0 * s + y1 * t;
|
|
3666
|
+
z0 = z0 * s + z1 * t;
|
|
3667
|
+
w0 = w0 * s + w1 * t;
|
|
3497
3668
|
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
w0 = w0 * s + w1 * tDir;
|
|
3669
|
+
} else {
|
|
3670
|
+
|
|
3671
|
+
// for small angles, lerp then normalize
|
|
3502
3672
|
|
|
3503
|
-
|
|
3504
|
-
|
|
3673
|
+
x0 = x0 * s + x1 * t;
|
|
3674
|
+
y0 = y0 * s + y1 * t;
|
|
3675
|
+
z0 = z0 * s + z1 * t;
|
|
3676
|
+
w0 = w0 * s + w1 * t;
|
|
3505
3677
|
|
|
3506
3678
|
const f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );
|
|
3507
3679
|
|
|
@@ -3755,7 +3927,7 @@ class Quaternion {
|
|
|
3755
3927
|
break;
|
|
3756
3928
|
|
|
3757
3929
|
default:
|
|
3758
|
-
|
|
3930
|
+
warn( 'Quaternion: .setFromEuler() encountered an unknown order: ' + order );
|
|
3759
3931
|
|
|
3760
3932
|
}
|
|
3761
3933
|
|
|
@@ -4111,68 +4283,56 @@ class Quaternion {
|
|
|
4111
4283
|
*/
|
|
4112
4284
|
slerp( qb, t ) {
|
|
4113
4285
|
|
|
4114
|
-
if ( t
|
|
4115
|
-
if ( t === 1 ) return this.copy( qb );
|
|
4116
|
-
|
|
4117
|
-
const x = this._x, y = this._y, z = this._z, w = this._w;
|
|
4286
|
+
if ( t <= 0 ) return this;
|
|
4118
4287
|
|
|
4119
|
-
//
|
|
4288
|
+
if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()
|
|
4120
4289
|
|
|
4121
|
-
let
|
|
4290
|
+
let x = qb._x, y = qb._y, z = qb._z, w = qb._w;
|
|
4122
4291
|
|
|
4123
|
-
|
|
4292
|
+
let dot = this.dot( qb );
|
|
4124
4293
|
|
|
4125
|
-
|
|
4126
|
-
this._x = - qb._x;
|
|
4127
|
-
this._y = - qb._y;
|
|
4128
|
-
this._z = - qb._z;
|
|
4294
|
+
if ( dot < 0 ) {
|
|
4129
4295
|
|
|
4130
|
-
|
|
4296
|
+
x = - x;
|
|
4297
|
+
y = - y;
|
|
4298
|
+
z = - z;
|
|
4299
|
+
w = - w;
|
|
4131
4300
|
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
this.copy( qb );
|
|
4301
|
+
dot = - dot;
|
|
4135
4302
|
|
|
4136
4303
|
}
|
|
4137
4304
|
|
|
4138
|
-
|
|
4305
|
+
let s = 1 - t;
|
|
4139
4306
|
|
|
4140
|
-
|
|
4141
|
-
this._x = x;
|
|
4142
|
-
this._y = y;
|
|
4143
|
-
this._z = z;
|
|
4307
|
+
if ( dot < 0.9995 ) {
|
|
4144
4308
|
|
|
4145
|
-
|
|
4309
|
+
// slerp
|
|
4146
4310
|
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;
|
|
4311
|
+
const theta = Math.acos( dot );
|
|
4312
|
+
const sin = Math.sin( theta );
|
|
4150
4313
|
|
|
4151
|
-
|
|
4314
|
+
s = Math.sin( s * theta ) / sin;
|
|
4315
|
+
t = Math.sin( t * theta ) / sin;
|
|
4152
4316
|
|
|
4153
|
-
|
|
4154
|
-
this.
|
|
4155
|
-
this.
|
|
4156
|
-
this.
|
|
4157
|
-
this._z = s * z + t * this._z;
|
|
4317
|
+
this._x = this._x * s + x * t;
|
|
4318
|
+
this._y = this._y * s + y * t;
|
|
4319
|
+
this._z = this._z * s + z * t;
|
|
4320
|
+
this._w = this._w * s + w * t;
|
|
4158
4321
|
|
|
4159
|
-
this.
|
|
4322
|
+
this._onChangeCallback();
|
|
4160
4323
|
|
|
4161
|
-
|
|
4324
|
+
} else {
|
|
4162
4325
|
|
|
4163
|
-
|
|
4326
|
+
// for small angles, lerp then normalize
|
|
4164
4327
|
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4328
|
+
this._x = this._x * s + x * t;
|
|
4329
|
+
this._y = this._y * s + y * t;
|
|
4330
|
+
this._z = this._z * s + z * t;
|
|
4331
|
+
this._w = this._w * s + w * t;
|
|
4169
4332
|
|
|
4170
|
-
|
|
4171
|
-
this._x = ( x * ratioA + this._x * ratioB );
|
|
4172
|
-
this._y = ( y * ratioA + this._y * ratioB );
|
|
4173
|
-
this._z = ( z * ratioA + this._z * ratioB );
|
|
4333
|
+
this.normalize(); // normalize calls _onChangeCallback()
|
|
4174
4334
|
|
|
4175
|
-
|
|
4335
|
+
}
|
|
4176
4336
|
|
|
4177
4337
|
return this;
|
|
4178
4338
|
|
|
@@ -5587,7 +5747,7 @@ const _quaternion$4 = /*@__PURE__*/ new Quaternion();
|
|
|
5587
5747
|
* A Note on Row-Major and Column-Major Ordering:
|
|
5588
5748
|
*
|
|
5589
5749
|
* The constructor and {@link Matrix3#set} method take arguments in
|
|
5590
|
-
* [row-major]
|
|
5750
|
+
* [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
|
|
5591
5751
|
* order, while internally they are stored in the {@link Matrix3#elements} array in column-major order.
|
|
5592
5752
|
* This means that calling:
|
|
5593
5753
|
* ```js
|
|
@@ -5861,7 +6021,7 @@ class Matrix3 {
|
|
|
5861
6021
|
}
|
|
5862
6022
|
|
|
5863
6023
|
/**
|
|
5864
|
-
* Inverts this matrix, using the [analytic method]
|
|
6024
|
+
* Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution).
|
|
5865
6025
|
* You can not invert with a determinant of zero. If you attempt this, the method produces
|
|
5866
6026
|
* a zero matrix instead.
|
|
5867
6027
|
*
|
|
@@ -6193,93 +6353,6 @@ class Matrix3 {
|
|
|
6193
6353
|
|
|
6194
6354
|
const _m3 = /*@__PURE__*/ new Matrix3();
|
|
6195
6355
|
|
|
6196
|
-
function arrayNeedsUint32( array ) {
|
|
6197
|
-
|
|
6198
|
-
// assumes larger values usually on last
|
|
6199
|
-
|
|
6200
|
-
for ( let i = array.length - 1; i >= 0; -- i ) {
|
|
6201
|
-
|
|
6202
|
-
if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565
|
|
6203
|
-
|
|
6204
|
-
}
|
|
6205
|
-
|
|
6206
|
-
return false;
|
|
6207
|
-
|
|
6208
|
-
}
|
|
6209
|
-
|
|
6210
|
-
const TYPED_ARRAYS = {
|
|
6211
|
-
Int8Array: Int8Array,
|
|
6212
|
-
Uint8Array: Uint8Array,
|
|
6213
|
-
Uint8ClampedArray: Uint8ClampedArray,
|
|
6214
|
-
Int16Array: Int16Array,
|
|
6215
|
-
Uint16Array: Uint16Array,
|
|
6216
|
-
Int32Array: Int32Array,
|
|
6217
|
-
Uint32Array: Uint32Array,
|
|
6218
|
-
Float32Array: Float32Array,
|
|
6219
|
-
Float64Array: Float64Array
|
|
6220
|
-
};
|
|
6221
|
-
|
|
6222
|
-
function getTypedArray( type, buffer ) {
|
|
6223
|
-
|
|
6224
|
-
return new TYPED_ARRAYS[ type ]( buffer );
|
|
6225
|
-
|
|
6226
|
-
}
|
|
6227
|
-
|
|
6228
|
-
function createElementNS( name ) {
|
|
6229
|
-
|
|
6230
|
-
return document.createElementNS( 'http://www.w3.org/1999/xhtml', name );
|
|
6231
|
-
|
|
6232
|
-
}
|
|
6233
|
-
|
|
6234
|
-
function createCanvasElement() {
|
|
6235
|
-
|
|
6236
|
-
const canvas = createElementNS( 'canvas' );
|
|
6237
|
-
canvas.style.display = 'block';
|
|
6238
|
-
return canvas;
|
|
6239
|
-
|
|
6240
|
-
}
|
|
6241
|
-
|
|
6242
|
-
const _cache = {};
|
|
6243
|
-
|
|
6244
|
-
function warnOnce( message ) {
|
|
6245
|
-
|
|
6246
|
-
if ( message in _cache ) return;
|
|
6247
|
-
|
|
6248
|
-
_cache[ message ] = true;
|
|
6249
|
-
|
|
6250
|
-
console.warn( message );
|
|
6251
|
-
|
|
6252
|
-
}
|
|
6253
|
-
|
|
6254
|
-
function probeAsync( gl, sync, interval ) {
|
|
6255
|
-
|
|
6256
|
-
return new Promise( function ( resolve, reject ) {
|
|
6257
|
-
|
|
6258
|
-
function probe() {
|
|
6259
|
-
|
|
6260
|
-
switch ( gl.clientWaitSync( sync, gl.SYNC_FLUSH_COMMANDS_BIT, 0 ) ) {
|
|
6261
|
-
|
|
6262
|
-
case gl.WAIT_FAILED:
|
|
6263
|
-
reject();
|
|
6264
|
-
break;
|
|
6265
|
-
|
|
6266
|
-
case gl.TIMEOUT_EXPIRED:
|
|
6267
|
-
setTimeout( probe, interval );
|
|
6268
|
-
break;
|
|
6269
|
-
|
|
6270
|
-
default:
|
|
6271
|
-
resolve();
|
|
6272
|
-
|
|
6273
|
-
}
|
|
6274
|
-
|
|
6275
|
-
}
|
|
6276
|
-
|
|
6277
|
-
setTimeout( probe, interval );
|
|
6278
|
-
|
|
6279
|
-
} );
|
|
6280
|
-
|
|
6281
|
-
}
|
|
6282
|
-
|
|
6283
6356
|
const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
|
|
6284
6357
|
0.4123908, 0.3575843, 0.1804808,
|
|
6285
6358
|
0.2126390, 0.7151687, 0.0721923,
|
|
@@ -6312,7 +6385,7 @@ function createColorManagement() {
|
|
|
6312
6385
|
* - luminanceCoefficients: RGB luminance coefficients
|
|
6313
6386
|
*
|
|
6314
6387
|
* Optional:
|
|
6315
|
-
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace }
|
|
6388
|
+
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace, toneMappingMode: 'extended' | 'standard' }
|
|
6316
6389
|
* - workingColorSpaceConfig: { unpackColorSpace: ColorSpace }
|
|
6317
6390
|
*
|
|
6318
6391
|
* Reference:
|
|
@@ -6381,6 +6454,12 @@ function createColorManagement() {
|
|
|
6381
6454
|
|
|
6382
6455
|
},
|
|
6383
6456
|
|
|
6457
|
+
getToneMappingMode: function ( colorSpace ) {
|
|
6458
|
+
|
|
6459
|
+
return this.spaces[ colorSpace ].outputColorSpaceConfig.toneMappingMode || 'standard';
|
|
6460
|
+
|
|
6461
|
+
},
|
|
6462
|
+
|
|
6384
6463
|
getLuminanceCoefficients: function ( target, colorSpace = this.workingColorSpace ) {
|
|
6385
6464
|
|
|
6386
6465
|
return target.fromArray( this.spaces[ colorSpace ].luminanceCoefficients );
|
|
@@ -6419,7 +6498,7 @@ function createColorManagement() {
|
|
|
6419
6498
|
|
|
6420
6499
|
fromWorkingColorSpace: function ( color, targetColorSpace ) {
|
|
6421
6500
|
|
|
6422
|
-
warnOnce( '
|
|
6501
|
+
warnOnce( 'ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().' ); // @deprecated, r177
|
|
6423
6502
|
|
|
6424
6503
|
return ColorManagement.workingToColorSpace( color, targetColorSpace );
|
|
6425
6504
|
|
|
@@ -6427,7 +6506,7 @@ function createColorManagement() {
|
|
|
6427
6506
|
|
|
6428
6507
|
toWorkingColorSpace: function ( color, sourceColorSpace ) {
|
|
6429
6508
|
|
|
6430
|
-
warnOnce( '
|
|
6509
|
+
warnOnce( 'ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().' ); // @deprecated, r177
|
|
6431
6510
|
|
|
6432
6511
|
return ColorManagement.colorSpaceToWorking( color, sourceColorSpace );
|
|
6433
6512
|
|
|
@@ -6610,7 +6689,7 @@ class ImageUtils {
|
|
|
6610
6689
|
|
|
6611
6690
|
} else {
|
|
6612
6691
|
|
|
6613
|
-
|
|
6692
|
+
warn( 'ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' );
|
|
6614
6693
|
return image;
|
|
6615
6694
|
|
|
6616
6695
|
}
|
|
@@ -6701,7 +6780,7 @@ class Source {
|
|
|
6701
6780
|
|
|
6702
6781
|
const data = this.data;
|
|
6703
6782
|
|
|
6704
|
-
if ( data instanceof HTMLVideoElement ) {
|
|
6783
|
+
if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( data instanceof HTMLVideoElement ) ) {
|
|
6705
6784
|
|
|
6706
6785
|
target.set( data.videoWidth, data.videoHeight, 0 );
|
|
6707
6786
|
|
|
@@ -6835,7 +6914,7 @@ function serializeImage( image ) {
|
|
|
6835
6914
|
|
|
6836
6915
|
} else {
|
|
6837
6916
|
|
|
6838
|
-
|
|
6917
|
+
warn( 'Texture: Unable to serialize Texture.' );
|
|
6839
6918
|
return {};
|
|
6840
6919
|
|
|
6841
6920
|
}
|
|
@@ -7349,7 +7428,7 @@ class Texture extends EventDispatcher {
|
|
|
7349
7428
|
|
|
7350
7429
|
if ( newValue === undefined ) {
|
|
7351
7430
|
|
|
7352
|
-
|
|
7431
|
+
warn( `Texture.setValues(): parameter '${ key }' has value of undefined.` );
|
|
7353
7432
|
continue;
|
|
7354
7433
|
|
|
7355
7434
|
}
|
|
@@ -7358,7 +7437,7 @@ class Texture extends EventDispatcher {
|
|
|
7358
7437
|
|
|
7359
7438
|
if ( currentValue === undefined ) {
|
|
7360
7439
|
|
|
7361
|
-
|
|
7440
|
+
warn( `Texture.setValues(): property '${ key }' does not exist.` );
|
|
7362
7441
|
continue;
|
|
7363
7442
|
|
|
7364
7443
|
}
|
|
@@ -8975,7 +9054,16 @@ class RenderTarget extends EventDispatcher {
|
|
|
8975
9054
|
this.textures[ i ].image.width = width;
|
|
8976
9055
|
this.textures[ i ].image.height = height;
|
|
8977
9056
|
this.textures[ i ].image.depth = depth;
|
|
8978
|
-
|
|
9057
|
+
|
|
9058
|
+
if ( this.textures[ i ].isData3DTexture !== true ) { // Fix for #31693
|
|
9059
|
+
|
|
9060
|
+
// TODO: Reconsider setting isArrayTexture flag here and in the ctor of Texture.
|
|
9061
|
+
// Maybe a method `isArrayTexture()` or just a getter could replace a flag since
|
|
9062
|
+
// both are evaluated on each call?
|
|
9063
|
+
|
|
9064
|
+
this.textures[ i ].isArrayTexture = this.textures[ i ].image.depth > 1;
|
|
9065
|
+
|
|
9066
|
+
}
|
|
8979
9067
|
|
|
8980
9068
|
}
|
|
8981
9069
|
|
|
@@ -11292,7 +11380,7 @@ class Ray {
|
|
|
11292
11380
|
* Represents a 4x4 matrix.
|
|
11293
11381
|
*
|
|
11294
11382
|
* The most common use of a 4x4 matrix in 3D computer graphics is as a transformation matrix.
|
|
11295
|
-
* For an introduction to transformation matrices as used in WebGL, check out [this tutorial]
|
|
11383
|
+
* For an introduction to transformation matrices as used in WebGL, check out [this tutorial](https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices)
|
|
11296
11384
|
*
|
|
11297
11385
|
* This allows a 3D vector representing a point in 3D space to undergo
|
|
11298
11386
|
* transformations such as translation, rotation, shear, scale, reflection,
|
|
@@ -11302,7 +11390,7 @@ class Ray {
|
|
|
11302
11390
|
* A Note on Row-Major and Column-Major Ordering:
|
|
11303
11391
|
*
|
|
11304
11392
|
* The constructor and {@link Matrix3#set} method take arguments in
|
|
11305
|
-
* [row-major]
|
|
11393
|
+
* [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
|
|
11306
11394
|
* order, while internally they are stored in the {@link Matrix3#elements} array in column-major order.
|
|
11307
11395
|
* This means that calling:
|
|
11308
11396
|
* ```js
|
|
@@ -11596,7 +11684,7 @@ class Matrix4 {
|
|
|
11596
11684
|
* Sets the rotation component (the upper left 3x3 matrix) of this matrix to
|
|
11597
11685
|
* the rotation specified by the given Euler angles. The rest of
|
|
11598
11686
|
* the matrix is set to the identity. Depending on the {@link Euler#order},
|
|
11599
|
-
* there are six possible outcomes. See [this page]
|
|
11687
|
+
* there are six possible outcomes. See [this page](https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix)
|
|
11600
11688
|
* for a complete list.
|
|
11601
11689
|
*
|
|
11602
11690
|
* @param {Euler} euler - The Euler angles.
|
|
@@ -11726,7 +11814,7 @@ class Matrix4 {
|
|
|
11726
11814
|
|
|
11727
11815
|
/**
|
|
11728
11816
|
* Sets the rotation component of this matrix to the rotation specified by
|
|
11729
|
-
* the given Quaternion as outlined [here]
|
|
11817
|
+
* the given Quaternion as outlined [here](https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion)
|
|
11730
11818
|
* The rest of the matrix is set to the identity.
|
|
11731
11819
|
*
|
|
11732
11820
|
* @param {Quaternion} q - The Quaternion.
|
|
@@ -11888,7 +11976,7 @@ class Matrix4 {
|
|
|
11888
11976
|
/**
|
|
11889
11977
|
* Computes and returns the determinant of this matrix.
|
|
11890
11978
|
*
|
|
11891
|
-
* Based on the method outlined [here]
|
|
11979
|
+
* Based on the method outlined [here](http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.html).
|
|
11892
11980
|
*
|
|
11893
11981
|
* @return {number} The determinant.
|
|
11894
11982
|
*/
|
|
@@ -11995,7 +12083,7 @@ class Matrix4 {
|
|
|
11995
12083
|
}
|
|
11996
12084
|
|
|
11997
12085
|
/**
|
|
11998
|
-
* Inverts this matrix, using the [analytic method]
|
|
12086
|
+
* Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution).
|
|
11999
12087
|
* You can not invert with a determinant of zero. If you attempt this, the method produces
|
|
12000
12088
|
* a zero matrix instead.
|
|
12001
12089
|
*
|
|
@@ -12198,7 +12286,7 @@ class Matrix4 {
|
|
|
12198
12286
|
* the given angle.
|
|
12199
12287
|
*
|
|
12200
12288
|
* This is a somewhat controversial but mathematically sound alternative to
|
|
12201
|
-
* rotating via Quaternions. See the discussion [here]
|
|
12289
|
+
* rotating via Quaternions. See the discussion [here](https://www.gamedev.net/articles/programming/math-and-physics/do-we-really-need-quaternions-r1199).
|
|
12202
12290
|
*
|
|
12203
12291
|
* @param {Vector3} axis - The normalized rotation axis.
|
|
12204
12292
|
* @param {number} angle - The rotation in radians.
|
|
@@ -12887,7 +12975,7 @@ class Euler {
|
|
|
12887
12975
|
|
|
12888
12976
|
default:
|
|
12889
12977
|
|
|
12890
|
-
|
|
12978
|
+
warn( 'Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );
|
|
12891
12979
|
|
|
12892
12980
|
}
|
|
12893
12981
|
|
|
@@ -13873,7 +13961,7 @@ class Object3D extends EventDispatcher {
|
|
|
13873
13961
|
|
|
13874
13962
|
if ( object === this ) {
|
|
13875
13963
|
|
|
13876
|
-
|
|
13964
|
+
error( 'Object3D.add: object can\'t be added as a child of itself.', object );
|
|
13877
13965
|
return this;
|
|
13878
13966
|
|
|
13879
13967
|
}
|
|
@@ -13892,7 +13980,7 @@ class Object3D extends EventDispatcher {
|
|
|
13892
13980
|
|
|
13893
13981
|
} else {
|
|
13894
13982
|
|
|
13895
|
-
|
|
13983
|
+
error( 'Object3D.add: object not an instance of THREE.Object3D.', object );
|
|
13896
13984
|
|
|
13897
13985
|
}
|
|
13898
13986
|
|
|
@@ -15563,7 +15651,7 @@ class Color {
|
|
|
15563
15651
|
/**
|
|
15564
15652
|
* Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`,
|
|
15565
15653
|
* `rgb(100%, 0%, 0%)`, `hsl(0, 100%, 50%)`, `#ff0000`, `#f00`, or `red` ( or
|
|
15566
|
-
* any [X11 color name]
|
|
15654
|
+
* any [X11 color name](https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart) -
|
|
15567
15655
|
* all 140 color names are supported).
|
|
15568
15656
|
*
|
|
15569
15657
|
* @param {string} style - Color as a CSS-style string.
|
|
@@ -15578,7 +15666,7 @@ class Color {
|
|
|
15578
15666
|
|
|
15579
15667
|
if ( parseFloat( string ) < 1 ) {
|
|
15580
15668
|
|
|
15581
|
-
|
|
15669
|
+
warn( 'Color: Alpha component of ' + style + ' will be ignored.' );
|
|
15582
15670
|
|
|
15583
15671
|
}
|
|
15584
15672
|
|
|
@@ -15654,7 +15742,7 @@ class Color {
|
|
|
15654
15742
|
|
|
15655
15743
|
default:
|
|
15656
15744
|
|
|
15657
|
-
|
|
15745
|
+
warn( 'Color: Unknown color model ' + style );
|
|
15658
15746
|
|
|
15659
15747
|
}
|
|
15660
15748
|
|
|
@@ -15682,7 +15770,7 @@ class Color {
|
|
|
15682
15770
|
|
|
15683
15771
|
} else {
|
|
15684
15772
|
|
|
15685
|
-
|
|
15773
|
+
warn( 'Color: Invalid hex color ' + style );
|
|
15686
15774
|
|
|
15687
15775
|
}
|
|
15688
15776
|
|
|
@@ -15722,7 +15810,7 @@ class Color {
|
|
|
15722
15810
|
} else {
|
|
15723
15811
|
|
|
15724
15812
|
// unknown color
|
|
15725
|
-
|
|
15813
|
+
warn( 'Color: Unknown color ' + style );
|
|
15726
15814
|
|
|
15727
15815
|
}
|
|
15728
15816
|
|
|
@@ -16770,7 +16858,7 @@ class Material extends EventDispatcher {
|
|
|
16770
16858
|
*
|
|
16771
16859
|
* This method can only be used when rendering with {@link WebGLRenderer}. The
|
|
16772
16860
|
* recommended approach when customizing materials is to use `WebGPURenderer` with the new
|
|
16773
|
-
* Node Material system and [TSL]
|
|
16861
|
+
* Node Material system and [TSL](https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language).
|
|
16774
16862
|
*
|
|
16775
16863
|
* @param {{vertexShader:string,fragmentShader:string,uniforms:Object}} shaderobject - The object holds the uniforms and the vertex and fragment shader source.
|
|
16776
16864
|
* @param {WebGLRenderer} renderer - A reference to the renderer.
|
|
@@ -16809,7 +16897,7 @@ class Material extends EventDispatcher {
|
|
|
16809
16897
|
|
|
16810
16898
|
if ( newValue === undefined ) {
|
|
16811
16899
|
|
|
16812
|
-
|
|
16900
|
+
warn( `Material: parameter '${ key }' has value of undefined.` );
|
|
16813
16901
|
continue;
|
|
16814
16902
|
|
|
16815
16903
|
}
|
|
@@ -16818,7 +16906,7 @@ class Material extends EventDispatcher {
|
|
|
16818
16906
|
|
|
16819
16907
|
if ( currentValue === undefined ) {
|
|
16820
16908
|
|
|
16821
|
-
|
|
16909
|
+
warn( `Material: '${ key }' is not a property of THREE.${ this.type }.` );
|
|
16822
16910
|
continue;
|
|
16823
16911
|
|
|
16824
16912
|
}
|
|
@@ -16912,6 +17000,18 @@ class Material extends EventDispatcher {
|
|
|
16912
17000
|
|
|
16913
17001
|
}
|
|
16914
17002
|
|
|
17003
|
+
if ( this.sheenColorMap && this.sheenColorMap.isTexture ) {
|
|
17004
|
+
|
|
17005
|
+
data.sheenColorMap = this.sheenColorMap.toJSON( meta ).uuid;
|
|
17006
|
+
|
|
17007
|
+
}
|
|
17008
|
+
|
|
17009
|
+
if ( this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture ) {
|
|
17010
|
+
|
|
17011
|
+
data.sheenRoughnessMap = this.sheenRoughnessMap.toJSON( meta ).uuid;
|
|
17012
|
+
|
|
17013
|
+
}
|
|
17014
|
+
|
|
16915
17015
|
if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
|
|
16916
17016
|
|
|
16917
17017
|
if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;
|
|
@@ -17253,6 +17353,7 @@ class Material extends EventDispatcher {
|
|
|
17253
17353
|
* This material is not affected by lights.
|
|
17254
17354
|
*
|
|
17255
17355
|
* @augments Material
|
|
17356
|
+
* @demo scenes/material-browser.html#MeshBasicMaterial
|
|
17256
17357
|
*/
|
|
17257
17358
|
class MeshBasicMaterial extends Material {
|
|
17258
17359
|
|
|
@@ -17638,7 +17739,7 @@ function _generateTables() {
|
|
|
17638
17739
|
*/
|
|
17639
17740
|
function toHalfFloat( val ) {
|
|
17640
17741
|
|
|
17641
|
-
if ( Math.abs( val ) > 65504 )
|
|
17742
|
+
if ( Math.abs( val ) > 65504 ) warn( 'DataUtils.toHalfFloat(): Value out of range.' );
|
|
17642
17743
|
|
|
17643
17744
|
val = clamp( val, -65504, 65504 );
|
|
17644
17745
|
|
|
@@ -18869,7 +18970,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18869
18970
|
/**
|
|
18870
18971
|
* Bounding box for the geometry which can be calculated with `computeBoundingBox()`.
|
|
18871
18972
|
*
|
|
18872
|
-
* @type {Box3}
|
|
18973
|
+
* @type {?Box3}
|
|
18873
18974
|
* @default null
|
|
18874
18975
|
*/
|
|
18875
18976
|
this.boundingBox = null;
|
|
@@ -18877,7 +18978,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18877
18978
|
/**
|
|
18878
18979
|
* Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`.
|
|
18879
18980
|
*
|
|
18880
|
-
* @type {Sphere}
|
|
18981
|
+
* @type {?Sphere}
|
|
18881
18982
|
* @default null
|
|
18882
18983
|
*/
|
|
18883
18984
|
this.boundingSphere = null;
|
|
@@ -19309,7 +19410,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19309
19410
|
|
|
19310
19411
|
if ( points.length > positionAttribute.count ) {
|
|
19311
19412
|
|
|
19312
|
-
|
|
19413
|
+
warn( 'BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.' );
|
|
19313
19414
|
|
|
19314
19415
|
}
|
|
19315
19416
|
|
|
@@ -19339,7 +19440,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19339
19440
|
|
|
19340
19441
|
if ( position && position.isGLBufferAttribute ) {
|
|
19341
19442
|
|
|
19342
|
-
|
|
19443
|
+
error( 'BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.', this );
|
|
19343
19444
|
|
|
19344
19445
|
this.boundingBox.set(
|
|
19345
19446
|
new Vector3( - Infinity, - Infinity, - Infinity ),
|
|
@@ -19390,7 +19491,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19390
19491
|
|
|
19391
19492
|
if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {
|
|
19392
19493
|
|
|
19393
|
-
|
|
19494
|
+
error( 'BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this );
|
|
19394
19495
|
|
|
19395
19496
|
}
|
|
19396
19497
|
|
|
@@ -19414,7 +19515,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19414
19515
|
|
|
19415
19516
|
if ( position && position.isGLBufferAttribute ) {
|
|
19416
19517
|
|
|
19417
|
-
|
|
19518
|
+
error( 'BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.', this );
|
|
19418
19519
|
|
|
19419
19520
|
this.boundingSphere.set( new Vector3(), Infinity );
|
|
19420
19521
|
|
|
@@ -19505,7 +19606,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19505
19606
|
|
|
19506
19607
|
if ( isNaN( this.boundingSphere.radius ) ) {
|
|
19507
19608
|
|
|
19508
|
-
|
|
19609
|
+
error( 'BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this );
|
|
19509
19610
|
|
|
19510
19611
|
}
|
|
19511
19612
|
|
|
@@ -19533,7 +19634,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19533
19634
|
attributes.normal === undefined ||
|
|
19534
19635
|
attributes.uv === undefined ) {
|
|
19535
19636
|
|
|
19536
|
-
|
|
19637
|
+
error( 'BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );
|
|
19537
19638
|
return;
|
|
19538
19639
|
|
|
19539
19640
|
}
|
|
@@ -19843,7 +19944,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
19843
19944
|
|
|
19844
19945
|
if ( this.index === null ) {
|
|
19845
19946
|
|
|
19846
|
-
|
|
19947
|
+
warn( 'BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );
|
|
19847
19948
|
return this;
|
|
19848
19949
|
|
|
19849
19950
|
}
|
|
@@ -20653,6 +20754,7 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
|
|
|
20653
20754
|
* ```
|
|
20654
20755
|
*
|
|
20655
20756
|
* @augments BufferGeometry
|
|
20757
|
+
* @demo scenes/geometry-browser.html#BoxGeometry
|
|
20656
20758
|
*/
|
|
20657
20759
|
class BoxGeometry extends BufferGeometry {
|
|
20658
20760
|
|
|
@@ -20853,8 +20955,20 @@ class BoxGeometry extends BufferGeometry {
|
|
|
20853
20955
|
|
|
20854
20956
|
}
|
|
20855
20957
|
|
|
20856
|
-
|
|
20958
|
+
/**
|
|
20959
|
+
* Provides utility functions for managing uniforms.
|
|
20960
|
+
*
|
|
20961
|
+
* @module UniformsUtils
|
|
20962
|
+
*/
|
|
20857
20963
|
|
|
20964
|
+
/**
|
|
20965
|
+
* Clones the given uniform definitions by performing a deep-copy. That means
|
|
20966
|
+
* if the value of a uniform refers to an object like a Vector3 or Texture,
|
|
20967
|
+
* the cloned uniform will refer to a new object reference.
|
|
20968
|
+
*
|
|
20969
|
+
* @param {Object} src - An object representing uniform definitions.
|
|
20970
|
+
* @return {Object} The cloned uniforms.
|
|
20971
|
+
*/
|
|
20858
20972
|
function cloneUniforms( src ) {
|
|
20859
20973
|
|
|
20860
20974
|
const dst = {};
|
|
@@ -20874,7 +20988,7 @@ function cloneUniforms( src ) {
|
|
|
20874
20988
|
|
|
20875
20989
|
if ( property.isRenderTargetTexture ) {
|
|
20876
20990
|
|
|
20877
|
-
|
|
20991
|
+
warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' );
|
|
20878
20992
|
dst[ u ][ p ] = null;
|
|
20879
20993
|
|
|
20880
20994
|
} else {
|
|
@@ -20901,6 +21015,14 @@ function cloneUniforms( src ) {
|
|
|
20901
21015
|
|
|
20902
21016
|
}
|
|
20903
21017
|
|
|
21018
|
+
/**
|
|
21019
|
+
* Merges the given uniform definitions into a single object. Since the
|
|
21020
|
+
* method internally uses cloneUniforms(), it performs a deep-copy when
|
|
21021
|
+
* producing the merged uniform definitions.
|
|
21022
|
+
*
|
|
21023
|
+
* @param {Array} uniforms - An array of objects containing uniform definitions.
|
|
21024
|
+
* @return {Object} The merged uniforms.
|
|
21025
|
+
*/
|
|
20904
21026
|
function mergeUniforms( uniforms ) {
|
|
20905
21027
|
|
|
20906
21028
|
const merged = {};
|
|
@@ -20978,7 +21100,7 @@ var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0
|
|
|
20978
21100
|
* - You can use the directive `#pragma unroll_loop_start` and `#pragma unroll_loop_end`
|
|
20979
21101
|
* in order to unroll a `for` loop in GLSL by the shader preprocessor. The directive has
|
|
20980
21102
|
* to be placed right above the loop. The loop formatting has to correspond to a defined standard.
|
|
20981
|
-
* - The loop has to be [normalized]
|
|
21103
|
+
* - The loop has to be [normalized](https://en.wikipedia.org/wiki/Normalized_loop).
|
|
20982
21104
|
* - The loop variable has to be *i*.
|
|
20983
21105
|
* - The value `UNROLLED_LOOP_INDEX` will be replaced with the explicitly
|
|
20984
21106
|
* value of *i* for the given iteration and can be used in preprocessor
|
|
@@ -21184,7 +21306,7 @@ class ShaderMaterial extends Material {
|
|
|
21184
21306
|
};
|
|
21185
21307
|
|
|
21186
21308
|
/**
|
|
21187
|
-
* If set, this calls [gl.bindAttribLocation]
|
|
21309
|
+
* If set, this calls [gl.bindAttribLocation](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation)
|
|
21188
21310
|
* to bind a generic vertex index to an attribute variable.
|
|
21189
21311
|
*
|
|
21190
21312
|
* @type {string|undefined}
|
|
@@ -21471,7 +21593,7 @@ const _minTarget = /*@__PURE__*/ new Vector2();
|
|
|
21471
21593
|
const _maxTarget = /*@__PURE__*/ new Vector2();
|
|
21472
21594
|
|
|
21473
21595
|
/**
|
|
21474
|
-
* Camera that uses [perspective projection]
|
|
21596
|
+
* Camera that uses [perspective projection](https://en.wikipedia.org/wiki/Perspective_(graphical)).
|
|
21475
21597
|
*
|
|
21476
21598
|
* This projection mode is designed to mimic the way the human eye sees. It
|
|
21477
21599
|
* is the most common projection mode used for rendering a 3D scene.
|
|
@@ -23154,7 +23276,7 @@ class Scene extends Object3D {
|
|
|
23154
23276
|
* "Interleaved" means that multiple attributes, possibly of different types,
|
|
23155
23277
|
* (e.g., position, normal, uv, color) are packed into a single array buffer.
|
|
23156
23278
|
*
|
|
23157
|
-
* An introduction into interleaved arrays can be found here: [Interleaved array basics]
|
|
23279
|
+
* An introduction into interleaved arrays can be found here: [Interleaved array basics](https://blog.tojicode.com/2011/05/interleaved-array-basics.html)
|
|
23158
23280
|
*/
|
|
23159
23281
|
class InterleavedBuffer {
|
|
23160
23282
|
|
|
@@ -23874,7 +23996,7 @@ class InterleavedBufferAttribute {
|
|
|
23874
23996
|
|
|
23875
23997
|
if ( data === undefined ) {
|
|
23876
23998
|
|
|
23877
|
-
|
|
23999
|
+
log( 'InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' );
|
|
23878
24000
|
|
|
23879
24001
|
const array = [];
|
|
23880
24002
|
|
|
@@ -23924,7 +24046,7 @@ class InterleavedBufferAttribute {
|
|
|
23924
24046
|
|
|
23925
24047
|
if ( data === undefined ) {
|
|
23926
24048
|
|
|
23927
|
-
|
|
24049
|
+
log( 'InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' );
|
|
23928
24050
|
|
|
23929
24051
|
const array = [];
|
|
23930
24052
|
|
|
@@ -24151,7 +24273,7 @@ class Sprite extends Object3D {
|
|
|
24151
24273
|
/**
|
|
24152
24274
|
* Constructs a new sprite.
|
|
24153
24275
|
*
|
|
24154
|
-
* @param {SpriteMaterial} [material] - The sprite material.
|
|
24276
|
+
* @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material.
|
|
24155
24277
|
*/
|
|
24156
24278
|
constructor( material = new SpriteMaterial() ) {
|
|
24157
24279
|
|
|
@@ -24197,7 +24319,7 @@ class Sprite extends Object3D {
|
|
|
24197
24319
|
/**
|
|
24198
24320
|
* The sprite material.
|
|
24199
24321
|
*
|
|
24200
|
-
* @type {SpriteMaterial}
|
|
24322
|
+
* @type {(SpriteMaterial|SpriteNodeMaterial)}
|
|
24201
24323
|
*/
|
|
24202
24324
|
this.material = material;
|
|
24203
24325
|
|
|
@@ -24232,7 +24354,7 @@ class Sprite extends Object3D {
|
|
|
24232
24354
|
|
|
24233
24355
|
if ( raycaster.camera === null ) {
|
|
24234
24356
|
|
|
24235
|
-
|
|
24357
|
+
error( 'Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' );
|
|
24236
24358
|
|
|
24237
24359
|
}
|
|
24238
24360
|
|
|
@@ -24526,7 +24648,7 @@ class LOD extends Object3D {
|
|
|
24526
24648
|
* the given distance.
|
|
24527
24649
|
*
|
|
24528
24650
|
* @param {number} distance - The LOD distance.
|
|
24529
|
-
* @return {Object3D
|
|
24651
|
+
* @return {?Object3D} The found 3D object. `null` if no 3D object has been found.
|
|
24530
24652
|
*/
|
|
24531
24653
|
getObjectForDistance( distance ) {
|
|
24532
24654
|
|
|
@@ -24693,6 +24815,7 @@ const _ray$2 = /*@__PURE__*/ new Ray();
|
|
|
24693
24815
|
* or {@link FBXLoader } import respective models.
|
|
24694
24816
|
*
|
|
24695
24817
|
* @augments Mesh
|
|
24818
|
+
* @demo scenes/bones-browser.html
|
|
24696
24819
|
*/
|
|
24697
24820
|
class SkinnedMesh extends Mesh {
|
|
24698
24821
|
|
|
@@ -24960,7 +25083,7 @@ class SkinnedMesh extends Mesh {
|
|
|
24960
25083
|
|
|
24961
25084
|
} else {
|
|
24962
25085
|
|
|
24963
|
-
|
|
25086
|
+
warn( 'SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );
|
|
24964
25087
|
|
|
24965
25088
|
}
|
|
24966
25089
|
|
|
@@ -25229,7 +25352,7 @@ class Skeleton {
|
|
|
25229
25352
|
|
|
25230
25353
|
if ( bones.length !== boneInverses.length ) {
|
|
25231
25354
|
|
|
25232
|
-
|
|
25355
|
+
warn( 'Skeleton: Number of inverse bone matrices does not match amount of bones.' );
|
|
25233
25356
|
|
|
25234
25357
|
this.boneInverses = [];
|
|
25235
25358
|
|
|
@@ -25447,7 +25570,7 @@ class Skeleton {
|
|
|
25447
25570
|
|
|
25448
25571
|
if ( bone === undefined ) {
|
|
25449
25572
|
|
|
25450
|
-
|
|
25573
|
+
warn( 'Skeleton: No bone found with UUID:', uuid );
|
|
25451
25574
|
bone = new Bone();
|
|
25452
25575
|
|
|
25453
25576
|
}
|
|
@@ -25959,7 +26082,7 @@ const _normalMatrix = /*@__PURE__*/ new Matrix3();
|
|
|
25959
26082
|
|
|
25960
26083
|
/**
|
|
25961
26084
|
* A two dimensional surface that extends infinitely in 3D space, represented
|
|
25962
|
-
* in [Hessian normal form]
|
|
26085
|
+
* in [Hessian normal form](http://mathworld.wolfram.com/HessianNormalForm.html)
|
|
25963
26086
|
* by a unit length normal vector and a constant.
|
|
25964
26087
|
*/
|
|
25965
26088
|
class Plane {
|
|
@@ -27805,7 +27928,7 @@ class BatchedMesh extends Mesh {
|
|
|
27805
27928
|
*
|
|
27806
27929
|
* @param {number} geometryId - The ID of the geometry to return the bounding box for.
|
|
27807
27930
|
* @param {Box3} target - The target object that is used to store the method's result.
|
|
27808
|
-
* @return {Box3
|
|
27931
|
+
* @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID.
|
|
27809
27932
|
*/
|
|
27810
27933
|
getBoundingBoxAt( geometryId, target ) {
|
|
27811
27934
|
|
|
@@ -27850,7 +27973,7 @@ class BatchedMesh extends Mesh {
|
|
|
27850
27973
|
*
|
|
27851
27974
|
* @param {number} geometryId - The ID of the geometry to return the bounding sphere for.
|
|
27852
27975
|
* @param {Sphere} target - The target object that is used to store the method's result.
|
|
27853
|
-
* @return {Sphere
|
|
27976
|
+
* @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID.
|
|
27854
27977
|
*/
|
|
27855
27978
|
getBoundingSphereAt( geometryId, target ) {
|
|
27856
27979
|
|
|
@@ -28738,7 +28861,7 @@ class Line extends Object3D {
|
|
|
28738
28861
|
|
|
28739
28862
|
} else {
|
|
28740
28863
|
|
|
28741
|
-
|
|
28864
|
+
warn( 'Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
|
|
28742
28865
|
|
|
28743
28866
|
}
|
|
28744
28867
|
|
|
@@ -28979,7 +29102,7 @@ class LineSegments extends Line {
|
|
|
28979
29102
|
|
|
28980
29103
|
} else {
|
|
28981
29104
|
|
|
28982
|
-
|
|
29105
|
+
warn( 'LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );
|
|
28983
29106
|
|
|
28984
29107
|
}
|
|
28985
29108
|
|
|
@@ -29110,7 +29233,7 @@ class PointsMaterial extends Material {
|
|
|
29110
29233
|
/**
|
|
29111
29234
|
* Defines the size of the points in pixels.
|
|
29112
29235
|
*
|
|
29113
|
-
* Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE]
|
|
29236
|
+
* Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete).
|
|
29114
29237
|
*
|
|
29115
29238
|
* @type {number}
|
|
29116
29239
|
* @default 1
|
|
@@ -29484,15 +29607,14 @@ class VideoTexture extends Texture {
|
|
|
29484
29607
|
|
|
29485
29608
|
}
|
|
29486
29609
|
|
|
29487
|
-
/**
|
|
29488
|
-
* @override
|
|
29489
|
-
*/
|
|
29490
29610
|
dispose() {
|
|
29491
29611
|
|
|
29492
29612
|
if ( this._requestVideoFrameCallbackId !== 0 ) {
|
|
29493
29613
|
|
|
29494
29614
|
this.source.data.cancelVideoFrameCallback( this._requestVideoFrameCallbackId );
|
|
29495
29615
|
|
|
29616
|
+
this._requestVideoFrameCallbackId = 0;
|
|
29617
|
+
|
|
29496
29618
|
}
|
|
29497
29619
|
|
|
29498
29620
|
super.dispose();
|
|
@@ -30004,6 +30126,59 @@ class DepthTexture extends Texture {
|
|
|
30004
30126
|
|
|
30005
30127
|
}
|
|
30006
30128
|
|
|
30129
|
+
/**
|
|
30130
|
+
* Represents a texture created externally with the same renderer context.
|
|
30131
|
+
*
|
|
30132
|
+
* This may be a texture from a protected media stream, device camera feed,
|
|
30133
|
+
* or other data feeds like a depth sensor.
|
|
30134
|
+
*
|
|
30135
|
+
* Note that this class is only supported in {@link WebGLRenderer}, and in
|
|
30136
|
+
* the {@link WebGPURenderer} WebGPU backend.
|
|
30137
|
+
*
|
|
30138
|
+
* @augments Texture
|
|
30139
|
+
*/
|
|
30140
|
+
class ExternalTexture extends Texture {
|
|
30141
|
+
|
|
30142
|
+
/**
|
|
30143
|
+
* Creates a new raw texture.
|
|
30144
|
+
*
|
|
30145
|
+
* @param {?(WebGLTexture|GPUTexture)} [sourceTexture=null] - The external texture.
|
|
30146
|
+
*/
|
|
30147
|
+
constructor( sourceTexture = null ) {
|
|
30148
|
+
|
|
30149
|
+
super();
|
|
30150
|
+
|
|
30151
|
+
/**
|
|
30152
|
+
* The external source texture.
|
|
30153
|
+
*
|
|
30154
|
+
* @type {?(WebGLTexture|GPUTexture)}
|
|
30155
|
+
* @default null
|
|
30156
|
+
*/
|
|
30157
|
+
this.sourceTexture = sourceTexture;
|
|
30158
|
+
|
|
30159
|
+
/**
|
|
30160
|
+
* This flag can be used for type testing.
|
|
30161
|
+
*
|
|
30162
|
+
* @type {boolean}
|
|
30163
|
+
* @readonly
|
|
30164
|
+
* @default true
|
|
30165
|
+
*/
|
|
30166
|
+
this.isExternalTexture = true;
|
|
30167
|
+
|
|
30168
|
+
}
|
|
30169
|
+
|
|
30170
|
+
copy( source ) {
|
|
30171
|
+
|
|
30172
|
+
super.copy( source );
|
|
30173
|
+
|
|
30174
|
+
this.sourceTexture = source.sourceTexture;
|
|
30175
|
+
|
|
30176
|
+
return this;
|
|
30177
|
+
|
|
30178
|
+
}
|
|
30179
|
+
|
|
30180
|
+
}
|
|
30181
|
+
|
|
30007
30182
|
/**
|
|
30008
30183
|
* A geometry class for representing a capsule.
|
|
30009
30184
|
*
|
|
@@ -30015,6 +30190,7 @@ class DepthTexture extends Texture {
|
|
|
30015
30190
|
* ```
|
|
30016
30191
|
*
|
|
30017
30192
|
* @augments BufferGeometry
|
|
30193
|
+
* @demo scenes/geometry-browser.html#CapsuleGeometry
|
|
30018
30194
|
*/
|
|
30019
30195
|
class CapsuleGeometry extends BufferGeometry {
|
|
30020
30196
|
|
|
@@ -30232,6 +30408,7 @@ class CapsuleGeometry extends BufferGeometry {
|
|
|
30232
30408
|
* ```
|
|
30233
30409
|
*
|
|
30234
30410
|
* @augments BufferGeometry
|
|
30411
|
+
* @demo scenes/geometry-browser.html#CircleGeometry
|
|
30235
30412
|
*/
|
|
30236
30413
|
class CircleGeometry extends BufferGeometry {
|
|
30237
30414
|
|
|
@@ -30361,6 +30538,7 @@ class CircleGeometry extends BufferGeometry {
|
|
|
30361
30538
|
* ```
|
|
30362
30539
|
*
|
|
30363
30540
|
* @augments BufferGeometry
|
|
30541
|
+
* @demo scenes/geometry-browser.html#CylinderGeometry
|
|
30364
30542
|
*/
|
|
30365
30543
|
class CylinderGeometry extends BufferGeometry {
|
|
30366
30544
|
|
|
@@ -30686,6 +30864,7 @@ class CylinderGeometry extends BufferGeometry {
|
|
|
30686
30864
|
* ```
|
|
30687
30865
|
*
|
|
30688
30866
|
* @augments CylinderGeometry
|
|
30867
|
+
* @demo scenes/geometry-browser.html#ConeGeometry
|
|
30689
30868
|
*/
|
|
30690
30869
|
class ConeGeometry extends CylinderGeometry {
|
|
30691
30870
|
|
|
@@ -31094,6 +31273,7 @@ class PolyhedronGeometry extends BufferGeometry {
|
|
|
31094
31273
|
* ```
|
|
31095
31274
|
*
|
|
31096
31275
|
* @augments PolyhedronGeometry
|
|
31276
|
+
* @demo scenes/geometry-browser.html#DodecahedronGeometry
|
|
31097
31277
|
*/
|
|
31098
31278
|
class DodecahedronGeometry extends PolyhedronGeometry {
|
|
31099
31279
|
|
|
@@ -31413,7 +31593,7 @@ class Curve {
|
|
|
31413
31593
|
*/
|
|
31414
31594
|
getPoint( /* t, optionalTarget */ ) {
|
|
31415
31595
|
|
|
31416
|
-
|
|
31596
|
+
warn( 'Curve: .getPoint() not implemented.' );
|
|
31417
31597
|
|
|
31418
31598
|
}
|
|
31419
31599
|
|
|
@@ -32471,7 +32651,13 @@ class CatmullRomCurve3 extends Curve {
|
|
|
32471
32651
|
|
|
32472
32652
|
}
|
|
32473
32653
|
|
|
32474
|
-
|
|
32654
|
+
/**
|
|
32655
|
+
* Interpolations contains spline and Bézier functions internally used by concrete curve classes.
|
|
32656
|
+
*
|
|
32657
|
+
* Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
|
|
32658
|
+
*
|
|
32659
|
+
* @module Interpolations
|
|
32660
|
+
*/
|
|
32475
32661
|
|
|
32476
32662
|
/**
|
|
32477
32663
|
* Computes a point on a Catmull-Rom spline.
|
|
@@ -34253,8 +34439,8 @@ class Shape extends Path {
|
|
|
34253
34439
|
}
|
|
34254
34440
|
|
|
34255
34441
|
/* eslint-disable */
|
|
34256
|
-
// copy of mapbox/earcut version 3.0.
|
|
34257
|
-
// https://github.com/mapbox/earcut/tree/v3.0.
|
|
34442
|
+
// copy of mapbox/earcut version 3.0.2
|
|
34443
|
+
// https://github.com/mapbox/earcut/tree/v3.0.2
|
|
34258
34444
|
|
|
34259
34445
|
function earcut(data, holeIndices, dim = 2) {
|
|
34260
34446
|
|
|
@@ -34271,10 +34457,10 @@ function earcut(data, holeIndices, dim = 2) {
|
|
|
34271
34457
|
|
|
34272
34458
|
// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
|
|
34273
34459
|
if (data.length > 80 * dim) {
|
|
34274
|
-
minX =
|
|
34275
|
-
minY =
|
|
34276
|
-
let maxX =
|
|
34277
|
-
let maxY =
|
|
34460
|
+
minX = data[0];
|
|
34461
|
+
minY = data[1];
|
|
34462
|
+
let maxX = minX;
|
|
34463
|
+
let maxY = minY;
|
|
34278
34464
|
|
|
34279
34465
|
for (let i = dim; i < outerLen; i += dim) {
|
|
34280
34466
|
const x = data[i];
|
|
@@ -34550,7 +34736,7 @@ function compareXYSlope(a, b) {
|
|
|
34550
34736
|
return result;
|
|
34551
34737
|
}
|
|
34552
34738
|
|
|
34553
|
-
// find a bridge between vertices that connects hole with an outer ring and
|
|
34739
|
+
// find a bridge between vertices that connects hole with an outer ring and link it
|
|
34554
34740
|
function eliminateHole(hole, outerNode) {
|
|
34555
34741
|
const bridge = findHoleBridge(hole, outerNode);
|
|
34556
34742
|
if (!bridge) {
|
|
@@ -34741,7 +34927,7 @@ function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
|
|
|
34741
34927
|
|
|
34742
34928
|
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
|
34743
34929
|
function isValidDiagonal(a, b) {
|
|
34744
|
-
return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && //
|
|
34930
|
+
return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // doesn't intersect other edges
|
|
34745
34931
|
(locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
|
|
34746
34932
|
(area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
|
|
34747
34933
|
equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
|
|
@@ -34888,6 +35074,12 @@ function signedArea(data, start, end, dim) {
|
|
|
34888
35074
|
return sum;
|
|
34889
35075
|
}
|
|
34890
35076
|
|
|
35077
|
+
/**
|
|
35078
|
+
* An implementation of the earcut polygon triangulation algorithm.
|
|
35079
|
+
* The code is a port of [mapbox/earcut](https://github.com/mapbox/earcut).
|
|
35080
|
+
*
|
|
35081
|
+
* @see https://github.com/mapbox/earcut
|
|
35082
|
+
*/
|
|
34891
35083
|
class Earcut {
|
|
34892
35084
|
|
|
34893
35085
|
/**
|
|
@@ -35038,6 +35230,7 @@ function addContour( vertices, contour ) {
|
|
|
35038
35230
|
* ```
|
|
35039
35231
|
*
|
|
35040
35232
|
* @augments BufferGeometry
|
|
35233
|
+
* @demo scenes/geometry-browser.html#ExtrudeGeometry
|
|
35041
35234
|
*/
|
|
35042
35235
|
class ExtrudeGeometry extends BufferGeometry {
|
|
35043
35236
|
|
|
@@ -35126,7 +35319,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
35126
35319
|
|
|
35127
35320
|
splineTube = extrudePath.computeFrenetFrames( steps, false );
|
|
35128
35321
|
|
|
35129
|
-
//
|
|
35322
|
+
// log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
|
|
35130
35323
|
|
|
35131
35324
|
binormal = new Vector3();
|
|
35132
35325
|
normal = new Vector3();
|
|
@@ -35231,7 +35424,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
35231
35424
|
|
|
35232
35425
|
function scalePt2( pt, vec, size ) {
|
|
35233
35426
|
|
|
35234
|
-
if ( ! vec )
|
|
35427
|
+
if ( ! vec ) error( 'ExtrudeGeometry: vec does not exist' );
|
|
35235
35428
|
|
|
35236
35429
|
return pt.clone().addScaledVector( vec, size );
|
|
35237
35430
|
|
|
@@ -35346,14 +35539,14 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
35346
35539
|
|
|
35347
35540
|
if ( direction_eq ) {
|
|
35348
35541
|
|
|
35349
|
-
//
|
|
35542
|
+
// log("Warning: lines are a straight sequence");
|
|
35350
35543
|
v_trans_x = - v_prev_y;
|
|
35351
35544
|
v_trans_y = v_prev_x;
|
|
35352
35545
|
shrink_by = Math.sqrt( v_prev_lensq );
|
|
35353
35546
|
|
|
35354
35547
|
} else {
|
|
35355
35548
|
|
|
35356
|
-
//
|
|
35549
|
+
// log("Warning: lines are a straight spike");
|
|
35357
35550
|
v_trans_x = v_prev_x;
|
|
35358
35551
|
v_trans_y = v_prev_y;
|
|
35359
35552
|
shrink_by = Math.sqrt( v_prev_lensq / 2 );
|
|
@@ -35375,7 +35568,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
35375
35568
|
if ( k === il ) k = 0;
|
|
35376
35569
|
|
|
35377
35570
|
// (j)---(i)---(k)
|
|
35378
|
-
//
|
|
35571
|
+
// log('i,j,k', i, j , k)
|
|
35379
35572
|
|
|
35380
35573
|
contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );
|
|
35381
35574
|
|
|
@@ -35672,7 +35865,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
35672
35865
|
let k = i - 1;
|
|
35673
35866
|
if ( k < 0 ) k = contour.length - 1;
|
|
35674
35867
|
|
|
35675
|
-
//
|
|
35868
|
+
//log('b', i,j, i-1, k,vertices.length);
|
|
35676
35869
|
|
|
35677
35870
|
for ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {
|
|
35678
35871
|
|
|
@@ -35912,6 +36105,7 @@ function toJSON$1( shapes, options, data ) {
|
|
|
35912
36105
|
* ```
|
|
35913
36106
|
*
|
|
35914
36107
|
* @augments PolyhedronGeometry
|
|
36108
|
+
* @demo scenes/geometry-browser.html#IcosahedronGeometry
|
|
35915
36109
|
*/
|
|
35916
36110
|
class IcosahedronGeometry extends PolyhedronGeometry {
|
|
35917
36111
|
|
|
@@ -35986,6 +36180,7 @@ class IcosahedronGeometry extends PolyhedronGeometry {
|
|
|
35986
36180
|
* ```
|
|
35987
36181
|
*
|
|
35988
36182
|
* @augments BufferGeometry
|
|
36183
|
+
* @demo scenes/geometry-browser.html#LatheGeometry
|
|
35989
36184
|
*/
|
|
35990
36185
|
class LatheGeometry extends BufferGeometry {
|
|
35991
36186
|
|
|
@@ -36203,6 +36398,7 @@ class LatheGeometry extends BufferGeometry {
|
|
|
36203
36398
|
* ```
|
|
36204
36399
|
*
|
|
36205
36400
|
* @augments PolyhedronGeometry
|
|
36401
|
+
* @demo scenes/geometry-browser.html#OctahedronGeometry
|
|
36206
36402
|
*/
|
|
36207
36403
|
class OctahedronGeometry extends PolyhedronGeometry {
|
|
36208
36404
|
|
|
@@ -36269,6 +36465,7 @@ class OctahedronGeometry extends PolyhedronGeometry {
|
|
|
36269
36465
|
* ```
|
|
36270
36466
|
*
|
|
36271
36467
|
* @augments BufferGeometry
|
|
36468
|
+
* @demo scenes/geometry-browser.html#PlaneGeometry
|
|
36272
36469
|
*/
|
|
36273
36470
|
class PlaneGeometry extends BufferGeometry {
|
|
36274
36471
|
|
|
@@ -36397,6 +36594,7 @@ class PlaneGeometry extends BufferGeometry {
|
|
|
36397
36594
|
* ```
|
|
36398
36595
|
*
|
|
36399
36596
|
* @augments BufferGeometry
|
|
36597
|
+
* @demo scenes/geometry-browser.html#RingGeometry
|
|
36400
36598
|
*/
|
|
36401
36599
|
class RingGeometry extends BufferGeometry {
|
|
36402
36600
|
|
|
@@ -36558,6 +36756,7 @@ class RingGeometry extends BufferGeometry {
|
|
|
36558
36756
|
* ```
|
|
36559
36757
|
*
|
|
36560
36758
|
* @augments BufferGeometry
|
|
36759
|
+
* @demo scenes/geometry-browser.html#ShapeGeometry
|
|
36561
36760
|
*/
|
|
36562
36761
|
class ShapeGeometry extends BufferGeometry {
|
|
36563
36762
|
|
|
@@ -36779,6 +36978,7 @@ function toJSON( shapes, data ) {
|
|
|
36779
36978
|
* ```
|
|
36780
36979
|
*
|
|
36781
36980
|
* @augments BufferGeometry
|
|
36981
|
+
* @demo scenes/geometry-browser.html#SphereGeometry
|
|
36782
36982
|
*/
|
|
36783
36983
|
class SphereGeometry extends BufferGeometry {
|
|
36784
36984
|
|
|
@@ -36948,6 +37148,7 @@ class SphereGeometry extends BufferGeometry {
|
|
|
36948
37148
|
* ```
|
|
36949
37149
|
*
|
|
36950
37150
|
* @augments PolyhedronGeometry
|
|
37151
|
+
* @demo scenes/geometry-browser.html#TetrahedronGeometry
|
|
36951
37152
|
*/
|
|
36952
37153
|
class TetrahedronGeometry extends PolyhedronGeometry {
|
|
36953
37154
|
|
|
@@ -37011,6 +37212,7 @@ class TetrahedronGeometry extends PolyhedronGeometry {
|
|
|
37011
37212
|
* ```
|
|
37012
37213
|
*
|
|
37013
37214
|
* @augments BufferGeometry
|
|
37215
|
+
* @demo scenes/geometry-browser.html#TorusGeometry
|
|
37014
37216
|
*/
|
|
37015
37217
|
class TorusGeometry extends BufferGeometry {
|
|
37016
37218
|
|
|
@@ -37163,6 +37365,7 @@ class TorusGeometry extends BufferGeometry {
|
|
|
37163
37365
|
* ```
|
|
37164
37366
|
*
|
|
37165
37367
|
* @augments BufferGeometry
|
|
37368
|
+
* @demo scenes/geometry-browser.html#TorusKnotGeometry
|
|
37166
37369
|
*/
|
|
37167
37370
|
class TorusKnotGeometry extends BufferGeometry {
|
|
37168
37371
|
|
|
@@ -37375,6 +37578,7 @@ class TorusKnotGeometry extends BufferGeometry {
|
|
|
37375
37578
|
* ```
|
|
37376
37579
|
*
|
|
37377
37580
|
* @augments BufferGeometry
|
|
37581
|
+
* @demo scenes/geometry-browser.html#TubeGeometry
|
|
37378
37582
|
*/
|
|
37379
37583
|
class TubeGeometry extends BufferGeometry {
|
|
37380
37584
|
|
|
@@ -37922,9 +38126,9 @@ class RawShaderMaterial extends ShaderMaterial {
|
|
|
37922
38126
|
* A standard physically based material, using Metallic-Roughness workflow.
|
|
37923
38127
|
*
|
|
37924
38128
|
* Physically based rendering (PBR) has recently become the standard in many
|
|
37925
|
-
* 3D applications, such as [Unity]
|
|
37926
|
-
* [Unreal]
|
|
37927
|
-
* [3D Studio Max]
|
|
38129
|
+
* 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/),
|
|
38130
|
+
* [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and
|
|
38131
|
+
* [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017).
|
|
37928
38132
|
*
|
|
37929
38133
|
* This approach differs from older approaches in that instead of using
|
|
37930
38134
|
* approximations for the way in which light interacts with a surface, a
|
|
@@ -37940,16 +38144,17 @@ class RawShaderMaterial extends ShaderMaterial {
|
|
|
37940
38144
|
* Note that for best results you should always specify an environment map when using this material.
|
|
37941
38145
|
*
|
|
37942
38146
|
* For a non-technical introduction to the concept of PBR and how to set up a
|
|
37943
|
-
* PBR material, check out these articles by the people at [marmoset]
|
|
38147
|
+
* PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co):
|
|
37944
38148
|
*
|
|
37945
|
-
* - [Basic Theory of Physically Based Rendering]
|
|
37946
|
-
* - [Physically Based Rendering and You Can Too]
|
|
38149
|
+
* - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/)
|
|
38150
|
+
* - [Physically Based Rendering and You Can Too](https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/)
|
|
37947
38151
|
*
|
|
37948
38152
|
* Technical details of the approach used in three.js (and most other PBR systems) can be found is this
|
|
37949
|
-
* [paper from Disney]
|
|
38153
|
+
* [paper from Disney](https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf)
|
|
37950
38154
|
* (pdf), by Brent Burley.
|
|
37951
38155
|
*
|
|
37952
38156
|
* @augments Material
|
|
38157
|
+
* @demo scenes/material-browser.html#MeshStandardMaterial
|
|
37953
38158
|
*/
|
|
37954
38159
|
class MeshStandardMaterial extends Material {
|
|
37955
38160
|
|
|
@@ -38359,6 +38564,7 @@ class MeshStandardMaterial extends Material {
|
|
|
38359
38564
|
* best results, always specify an environment map when using this material.
|
|
38360
38565
|
*
|
|
38361
38566
|
* @augments MeshStandardMaterial
|
|
38567
|
+
* @demo scenes/material-browser.html#MeshPhysicalMaterial
|
|
38362
38568
|
*/
|
|
38363
38569
|
class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
38364
38570
|
|
|
@@ -38655,7 +38861,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
38655
38861
|
}
|
|
38656
38862
|
|
|
38657
38863
|
/**
|
|
38658
|
-
* The anisotropy strength.
|
|
38864
|
+
* The anisotropy strength, from `0.0` to `1.0`.
|
|
38659
38865
|
*
|
|
38660
38866
|
* @type {number}
|
|
38661
38867
|
* @default 0
|
|
@@ -38867,7 +39073,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
38867
39073
|
/**
|
|
38868
39074
|
* A material for shiny surfaces with specular highlights.
|
|
38869
39075
|
*
|
|
38870
|
-
* The material uses a non-physically based [Blinn-Phong]
|
|
39076
|
+
* The material uses a non-physically based [Blinn-Phong](https://en.wikipedia.org/wiki/Blinn-Phong_shading_model)
|
|
38871
39077
|
* model for calculating reflectance. Unlike the Lambertian model used in the
|
|
38872
39078
|
* {@link MeshLambertMaterial} this can simulate shiny surfaces with specular
|
|
38873
39079
|
* highlights (such as varnished wood). `MeshPhongMaterial` uses per-fragment shading.
|
|
@@ -38877,6 +39083,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
38877
39083
|
* some graphical accuracy.
|
|
38878
39084
|
*
|
|
38879
39085
|
* @augments Material
|
|
39086
|
+
* @demo scenes/material-browser.html#MeshPhongMaterial
|
|
38880
39087
|
*/
|
|
38881
39088
|
class MeshPhongMaterial extends Material {
|
|
38882
39089
|
|
|
@@ -39272,6 +39479,7 @@ class MeshPhongMaterial extends Material {
|
|
|
39272
39479
|
* A material implementing toon shading.
|
|
39273
39480
|
*
|
|
39274
39481
|
* @augments Material
|
|
39482
|
+
* @demo scenes/material-browser.html#MeshToonMaterial
|
|
39275
39483
|
*/
|
|
39276
39484
|
class MeshToonMaterial extends Material {
|
|
39277
39485
|
|
|
@@ -39586,6 +39794,7 @@ class MeshToonMaterial extends Material {
|
|
|
39586
39794
|
* A material that maps the normal vectors to RGB colors.
|
|
39587
39795
|
*
|
|
39588
39796
|
* @augments Material
|
|
39797
|
+
* @demo scenes/material-browser.html#MeshNormalMaterial
|
|
39589
39798
|
*/
|
|
39590
39799
|
class MeshNormalMaterial extends Material {
|
|
39591
39800
|
|
|
@@ -39754,7 +39963,7 @@ class MeshNormalMaterial extends Material {
|
|
|
39754
39963
|
/**
|
|
39755
39964
|
* A material for non-shiny surfaces, without specular highlights.
|
|
39756
39965
|
*
|
|
39757
|
-
* The material uses a non-physically based [Lambertian]
|
|
39966
|
+
* The material uses a non-physically based [Lambertian](https://en.wikipedia.org/wiki/Lambertian_reflectance)
|
|
39758
39967
|
* model for calculating reflectance. This can simulate some surfaces (such
|
|
39759
39968
|
* as untreated wood or stone) well, but cannot simulate shiny surfaces with
|
|
39760
39969
|
* specular highlights (such as varnished wood). `MeshLambertMaterial` uses per-fragment
|
|
@@ -39766,6 +39975,7 @@ class MeshNormalMaterial extends Material {
|
|
|
39766
39975
|
* {@link MeshPhysicalMaterial}, at the cost of some graphical accuracy.
|
|
39767
39976
|
*
|
|
39768
39977
|
* @augments Material
|
|
39978
|
+
* @demo scenes/material-browser.html#MeshLambertMaterial
|
|
39769
39979
|
*/
|
|
39770
39980
|
class MeshLambertMaterial extends Material {
|
|
39771
39981
|
|
|
@@ -40141,6 +40351,7 @@ class MeshLambertMaterial extends Material {
|
|
|
40141
40351
|
* near and far plane. White is nearest, black is farthest.
|
|
40142
40352
|
*
|
|
40143
40353
|
* @augments Material
|
|
40354
|
+
* @demo scenes/material-browser.html#MeshDepthMaterial
|
|
40144
40355
|
*/
|
|
40145
40356
|
class MeshDepthMaterial extends Material {
|
|
40146
40357
|
|
|
@@ -40286,7 +40497,7 @@ class MeshDepthMaterial extends Material {
|
|
|
40286
40497
|
* Can also be used to customize the shadow casting of an object by assigning
|
|
40287
40498
|
* an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}.
|
|
40288
40499
|
* The following examples demonstrates this approach in order to ensure
|
|
40289
|
-
* transparent parts of objects do
|
|
40500
|
+
* transparent parts of objects do not cast shadows.
|
|
40290
40501
|
*
|
|
40291
40502
|
* @augments Material
|
|
40292
40503
|
*/
|
|
@@ -40405,6 +40616,7 @@ class MeshDistanceMaterial extends Material {
|
|
|
40405
40616
|
* shadows.
|
|
40406
40617
|
*
|
|
40407
40618
|
* @augments Material
|
|
40619
|
+
* @demo scenes/material-browser.html#MeshMatcapMaterial
|
|
40408
40620
|
*/
|
|
40409
40621
|
class MeshMatcapMaterial extends Material {
|
|
40410
40622
|
|
|
@@ -40556,6 +40768,24 @@ class MeshMatcapMaterial extends Material {
|
|
|
40556
40768
|
*/
|
|
40557
40769
|
this.alphaMap = null;
|
|
40558
40770
|
|
|
40771
|
+
/**
|
|
40772
|
+
* Renders the geometry as a wireframe.
|
|
40773
|
+
*
|
|
40774
|
+
* @type {boolean}
|
|
40775
|
+
* @default false
|
|
40776
|
+
*/
|
|
40777
|
+
this.wireframe = false;
|
|
40778
|
+
|
|
40779
|
+
/**
|
|
40780
|
+
* Controls the thickness of the wireframe.
|
|
40781
|
+
*
|
|
40782
|
+
* Can only be used with {@link SVGRenderer}.
|
|
40783
|
+
*
|
|
40784
|
+
* @type {number}
|
|
40785
|
+
* @default 1
|
|
40786
|
+
*/
|
|
40787
|
+
this.wireframeLinewidth = 1;
|
|
40788
|
+
|
|
40559
40789
|
/**
|
|
40560
40790
|
* Whether the material is rendered with flat shading or not.
|
|
40561
40791
|
*
|
|
@@ -40602,6 +40832,9 @@ class MeshMatcapMaterial extends Material {
|
|
|
40602
40832
|
|
|
40603
40833
|
this.alphaMap = source.alphaMap;
|
|
40604
40834
|
|
|
40835
|
+
this.wireframe = source.wireframe;
|
|
40836
|
+
this.wireframeLinewidth = source.wireframeLinewidth;
|
|
40837
|
+
|
|
40605
40838
|
this.flatShading = source.flatShading;
|
|
40606
40839
|
|
|
40607
40840
|
this.fog = source.fog;
|
|
@@ -41922,7 +42155,7 @@ class KeyframeTrack {
|
|
|
41922
42155
|
|
|
41923
42156
|
}
|
|
41924
42157
|
|
|
41925
|
-
|
|
42158
|
+
warn( 'KeyframeTrack:', message );
|
|
41926
42159
|
return this;
|
|
41927
42160
|
|
|
41928
42161
|
}
|
|
@@ -42082,7 +42315,7 @@ class KeyframeTrack {
|
|
|
42082
42315
|
const valueSize = this.getValueSize();
|
|
42083
42316
|
if ( valueSize - Math.floor( valueSize ) !== 0 ) {
|
|
42084
42317
|
|
|
42085
|
-
|
|
42318
|
+
error( 'KeyframeTrack: Invalid value size in track.', this );
|
|
42086
42319
|
valid = false;
|
|
42087
42320
|
|
|
42088
42321
|
}
|
|
@@ -42094,7 +42327,7 @@ class KeyframeTrack {
|
|
|
42094
42327
|
|
|
42095
42328
|
if ( nKeys === 0 ) {
|
|
42096
42329
|
|
|
42097
|
-
|
|
42330
|
+
error( 'KeyframeTrack: Track is empty.', this );
|
|
42098
42331
|
valid = false;
|
|
42099
42332
|
|
|
42100
42333
|
}
|
|
@@ -42107,7 +42340,7 @@ class KeyframeTrack {
|
|
|
42107
42340
|
|
|
42108
42341
|
if ( typeof currTime === 'number' && isNaN( currTime ) ) {
|
|
42109
42342
|
|
|
42110
|
-
|
|
42343
|
+
error( 'KeyframeTrack: Time is not a valid number.', this, i, currTime );
|
|
42111
42344
|
valid = false;
|
|
42112
42345
|
break;
|
|
42113
42346
|
|
|
@@ -42115,7 +42348,7 @@ class KeyframeTrack {
|
|
|
42115
42348
|
|
|
42116
42349
|
if ( prevTime !== null && prevTime > currTime ) {
|
|
42117
42350
|
|
|
42118
|
-
|
|
42351
|
+
error( 'KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );
|
|
42119
42352
|
valid = false;
|
|
42120
42353
|
break;
|
|
42121
42354
|
|
|
@@ -42135,7 +42368,7 @@ class KeyframeTrack {
|
|
|
42135
42368
|
|
|
42136
42369
|
if ( isNaN( value ) ) {
|
|
42137
42370
|
|
|
42138
|
-
|
|
42371
|
+
error( 'KeyframeTrack: Value is not a valid number.', this, i, value );
|
|
42139
42372
|
valid = false;
|
|
42140
42373
|
break;
|
|
42141
42374
|
|
|
@@ -42667,6 +42900,14 @@ class AnimationClip {
|
|
|
42667
42900
|
*/
|
|
42668
42901
|
this.uuid = generateUUID();
|
|
42669
42902
|
|
|
42903
|
+
/**
|
|
42904
|
+
* An object that can be used to store custom data about the animation clip.
|
|
42905
|
+
* It should not hold references to functions as these will not be cloned.
|
|
42906
|
+
*
|
|
42907
|
+
* @type {Object}
|
|
42908
|
+
*/
|
|
42909
|
+
this.userData = {};
|
|
42910
|
+
|
|
42670
42911
|
// this means it should figure out its duration by scanning the tracks
|
|
42671
42912
|
if ( this.duration < 0 ) {
|
|
42672
42913
|
|
|
@@ -42698,6 +42939,8 @@ class AnimationClip {
|
|
|
42698
42939
|
const clip = new this( json.name, json.duration, tracks, json.blendMode );
|
|
42699
42940
|
clip.uuid = json.uuid;
|
|
42700
42941
|
|
|
42942
|
+
clip.userData = JSON.parse( json.userData || '{}' );
|
|
42943
|
+
|
|
42701
42944
|
return clip;
|
|
42702
42945
|
|
|
42703
42946
|
}
|
|
@@ -42720,7 +42963,8 @@ class AnimationClip {
|
|
|
42720
42963
|
'duration': clip.duration,
|
|
42721
42964
|
'tracks': tracks,
|
|
42722
42965
|
'uuid': clip.uuid,
|
|
42723
|
-
'blendMode': clip.blendMode
|
|
42966
|
+
'blendMode': clip.blendMode,
|
|
42967
|
+
'userData': JSON.stringify( clip.userData ),
|
|
42724
42968
|
|
|
42725
42969
|
};
|
|
42726
42970
|
|
|
@@ -42894,11 +43138,11 @@ class AnimationClip {
|
|
|
42894
43138
|
*/
|
|
42895
43139
|
static parseAnimation( animation, bones ) {
|
|
42896
43140
|
|
|
42897
|
-
|
|
43141
|
+
warn( 'AnimationClip: parseAnimation() is deprecated and will be removed with r185' );
|
|
42898
43142
|
|
|
42899
43143
|
if ( ! animation ) {
|
|
42900
43144
|
|
|
42901
|
-
|
|
43145
|
+
error( 'AnimationClip: No animation in JSONLoader data.' );
|
|
42902
43146
|
return null;
|
|
42903
43147
|
|
|
42904
43148
|
}
|
|
@@ -43115,7 +43359,11 @@ class AnimationClip {
|
|
|
43115
43359
|
|
|
43116
43360
|
}
|
|
43117
43361
|
|
|
43118
|
-
|
|
43362
|
+
const clip = new this.constructor( this.name, this.duration, tracks, this.blendMode );
|
|
43363
|
+
|
|
43364
|
+
clip.userData = JSON.parse( JSON.stringify( this.userData ) );
|
|
43365
|
+
|
|
43366
|
+
return clip;
|
|
43119
43367
|
|
|
43120
43368
|
}
|
|
43121
43369
|
|
|
@@ -43246,7 +43494,7 @@ const Cache = {
|
|
|
43246
43494
|
|
|
43247
43495
|
if ( this.enabled === false ) return;
|
|
43248
43496
|
|
|
43249
|
-
//
|
|
43497
|
+
// log( 'Cache', 'Adding key:', key );
|
|
43250
43498
|
|
|
43251
43499
|
this.files[ key ] = file;
|
|
43252
43500
|
|
|
@@ -43263,7 +43511,7 @@ const Cache = {
|
|
|
43263
43511
|
|
|
43264
43512
|
if ( this.enabled === false ) return;
|
|
43265
43513
|
|
|
43266
|
-
//
|
|
43514
|
+
// log( 'Cache', 'Checking key:', key );
|
|
43267
43515
|
|
|
43268
43516
|
return this.files[ key ];
|
|
43269
43517
|
|
|
@@ -43368,9 +43616,10 @@ class LoadingManager {
|
|
|
43368
43616
|
/**
|
|
43369
43617
|
* Used for aborting ongoing requests in loaders using this manager.
|
|
43370
43618
|
*
|
|
43371
|
-
* @
|
|
43619
|
+
* @private
|
|
43620
|
+
* @type {AbortController | null}
|
|
43372
43621
|
*/
|
|
43373
|
-
this.
|
|
43622
|
+
this._abortController = null;
|
|
43374
43623
|
|
|
43375
43624
|
/**
|
|
43376
43625
|
* This should be called by any loader using the manager when the loader
|
|
@@ -43581,8 +43830,9 @@ class LoadingManager {
|
|
|
43581
43830
|
*/
|
|
43582
43831
|
this.abort = function () {
|
|
43583
43832
|
|
|
43833
|
+
|
|
43584
43834
|
this.abortController.abort();
|
|
43585
|
-
this.
|
|
43835
|
+
this._abortController = null;
|
|
43586
43836
|
|
|
43587
43837
|
return this;
|
|
43588
43838
|
|
|
@@ -43590,6 +43840,26 @@ class LoadingManager {
|
|
|
43590
43840
|
|
|
43591
43841
|
}
|
|
43592
43842
|
|
|
43843
|
+
// TODO: Revert this back to a single member variable once this issue has been fixed
|
|
43844
|
+
// https://github.com/cloudflare/workerd/issues/3657
|
|
43845
|
+
|
|
43846
|
+
/**
|
|
43847
|
+
* Used for aborting ongoing requests in loaders using this manager.
|
|
43848
|
+
*
|
|
43849
|
+
* @type {AbortController}
|
|
43850
|
+
*/
|
|
43851
|
+
get abortController() {
|
|
43852
|
+
|
|
43853
|
+
if ( ! this._abortController ) {
|
|
43854
|
+
|
|
43855
|
+
this._abortController = new AbortController();
|
|
43856
|
+
|
|
43857
|
+
}
|
|
43858
|
+
|
|
43859
|
+
return this._abortController;
|
|
43860
|
+
|
|
43861
|
+
}
|
|
43862
|
+
|
|
43593
43863
|
}
|
|
43594
43864
|
|
|
43595
43865
|
/**
|
|
@@ -43654,7 +43924,7 @@ class Loader {
|
|
|
43654
43924
|
this.resourcePath = '';
|
|
43655
43925
|
|
|
43656
43926
|
/**
|
|
43657
|
-
* The [request header]
|
|
43927
|
+
* The [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header)
|
|
43658
43928
|
* used in HTTP request.
|
|
43659
43929
|
*
|
|
43660
43930
|
* @type {Object<string, any>}
|
|
@@ -43719,7 +43989,7 @@ class Loader {
|
|
|
43719
43989
|
|
|
43720
43990
|
/**
|
|
43721
43991
|
* Whether the XMLHttpRequest uses credentials such as cookies, authorization
|
|
43722
|
-
* headers or TLS client certificates, see [XMLHttpRequest.withCredentials]
|
|
43992
|
+
* headers or TLS client certificates, see [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials).
|
|
43723
43993
|
*
|
|
43724
43994
|
* Note: This setting has no effect if you are loading files locally or from the same domain.
|
|
43725
43995
|
*
|
|
@@ -43762,7 +44032,7 @@ class Loader {
|
|
|
43762
44032
|
/**
|
|
43763
44033
|
* Sets the given request header.
|
|
43764
44034
|
*
|
|
43765
|
-
* @param {Object} requestHeader - A [request header]
|
|
44035
|
+
* @param {Object} requestHeader - A [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header)
|
|
43766
44036
|
* for configuring the HTTP request.
|
|
43767
44037
|
* @return {Loader} A reference to this instance.
|
|
43768
44038
|
*/
|
|
@@ -43854,7 +44124,7 @@ class FileLoader extends Loader {
|
|
|
43854
44124
|
|
|
43855
44125
|
/**
|
|
43856
44126
|
* The expected mime type. Valid values can be found
|
|
43857
|
-
* [here]
|
|
44127
|
+
* [here](hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype)
|
|
43858
44128
|
*
|
|
43859
44129
|
* @type {string}
|
|
43860
44130
|
*/
|
|
@@ -43960,7 +44230,7 @@ class FileLoader extends Loader {
|
|
|
43960
44230
|
|
|
43961
44231
|
if ( response.status === 0 ) {
|
|
43962
44232
|
|
|
43963
|
-
|
|
44233
|
+
warn( 'FileLoader: HTTP Status 0 received.' );
|
|
43964
44234
|
|
|
43965
44235
|
}
|
|
43966
44236
|
|
|
@@ -44230,7 +44500,7 @@ class AnimationLoader extends Loader {
|
|
|
44230
44500
|
|
|
44231
44501
|
} else {
|
|
44232
44502
|
|
|
44233
|
-
|
|
44503
|
+
error( e );
|
|
44234
44504
|
|
|
44235
44505
|
}
|
|
44236
44506
|
|
|
@@ -44425,7 +44695,7 @@ const _loading = new WeakMap();
|
|
|
44425
44695
|
* ```
|
|
44426
44696
|
* Please note that `ImageLoader` has dropped support for progress
|
|
44427
44697
|
* events in `r84`. For an `ImageLoader` that supports progress events, see
|
|
44428
|
-
* [this thread]
|
|
44698
|
+
* [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-275785639).
|
|
44429
44699
|
*
|
|
44430
44700
|
* @augments Loader
|
|
44431
44701
|
*/
|
|
@@ -44734,7 +45004,7 @@ class DataTextureLoader extends Loader {
|
|
|
44734
45004
|
|
|
44735
45005
|
} else {
|
|
44736
45006
|
|
|
44737
|
-
|
|
45007
|
+
error( error );
|
|
44738
45008
|
return;
|
|
44739
45009
|
|
|
44740
45010
|
}
|
|
@@ -44829,7 +45099,7 @@ class DataTextureLoader extends Loader {
|
|
|
44829
45099
|
* ```
|
|
44830
45100
|
* Please note that `TextureLoader` has dropped support for progress
|
|
44831
45101
|
* events in `r84`. For a `TextureLoader` that supports progress events, see
|
|
44832
|
-
* [this thread]
|
|
45102
|
+
* [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-293260145).
|
|
44833
45103
|
*
|
|
44834
45104
|
* @augments Loader
|
|
44835
45105
|
*/
|
|
@@ -45832,7 +46102,7 @@ class PointLight extends Light {
|
|
|
45832
46102
|
}
|
|
45833
46103
|
|
|
45834
46104
|
/**
|
|
45835
|
-
* Camera that uses [orthographic projection]
|
|
46105
|
+
* Camera that uses [orthographic projection](https://en.wikipedia.org/wiki/Orthographic_projection).
|
|
45836
46106
|
*
|
|
45837
46107
|
* In this projection mode, an object's size in the rendered image stays
|
|
45838
46108
|
* constant regardless of its distance from the camera. This can be useful
|
|
@@ -46832,7 +47102,7 @@ class MaterialLoader extends Loader {
|
|
|
46832
47102
|
|
|
46833
47103
|
} else {
|
|
46834
47104
|
|
|
46835
|
-
|
|
47105
|
+
error( e );
|
|
46836
47106
|
|
|
46837
47107
|
}
|
|
46838
47108
|
|
|
@@ -46858,7 +47128,7 @@ class MaterialLoader extends Loader {
|
|
|
46858
47128
|
|
|
46859
47129
|
if ( textures[ name ] === undefined ) {
|
|
46860
47130
|
|
|
46861
|
-
|
|
47131
|
+
warn( 'MaterialLoader: Undefined texture', name );
|
|
46862
47132
|
|
|
46863
47133
|
}
|
|
46864
47134
|
|
|
@@ -47350,7 +47620,7 @@ class BufferGeometryLoader extends Loader {
|
|
|
47350
47620
|
|
|
47351
47621
|
} else {
|
|
47352
47622
|
|
|
47353
|
-
|
|
47623
|
+
error( e );
|
|
47354
47624
|
|
|
47355
47625
|
}
|
|
47356
47626
|
|
|
@@ -47523,7 +47793,7 @@ class BufferGeometryLoader extends Loader {
|
|
|
47523
47793
|
}
|
|
47524
47794
|
|
|
47525
47795
|
/**
|
|
47526
|
-
* A loader for loading a JSON resource in the [JSON Object/Scene format]
|
|
47796
|
+
* A loader for loading a JSON resource in the [JSON Object/Scene format](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4).
|
|
47527
47797
|
* The files are internally loaded via {@link FileLoader}.
|
|
47528
47798
|
*
|
|
47529
47799
|
* ```js
|
|
@@ -47582,7 +47852,7 @@ class ObjectLoader extends Loader {
|
|
|
47582
47852
|
|
|
47583
47853
|
if ( onError !== undefined ) onError( error );
|
|
47584
47854
|
|
|
47585
|
-
|
|
47855
|
+
error( 'ObjectLoader: Can\'t parse ' + url + '.', error.message );
|
|
47586
47856
|
|
|
47587
47857
|
return;
|
|
47588
47858
|
|
|
@@ -47594,7 +47864,7 @@ class ObjectLoader extends Loader {
|
|
|
47594
47864
|
|
|
47595
47865
|
if ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\'t load ' + url ) );
|
|
47596
47866
|
|
|
47597
|
-
|
|
47867
|
+
error( 'ObjectLoader: Can\'t load ' + url );
|
|
47598
47868
|
return;
|
|
47599
47869
|
|
|
47600
47870
|
}
|
|
@@ -47819,7 +48089,7 @@ class ObjectLoader extends Loader {
|
|
|
47819
48089
|
|
|
47820
48090
|
} else {
|
|
47821
48091
|
|
|
47822
|
-
|
|
48092
|
+
warn( `ObjectLoader: Unsupported geometry type "${ data.type }"` );
|
|
47823
48093
|
|
|
47824
48094
|
}
|
|
47825
48095
|
|
|
@@ -48110,7 +48380,7 @@ class ObjectLoader extends Loader {
|
|
|
48110
48380
|
|
|
48111
48381
|
if ( typeof value === 'number' ) return value;
|
|
48112
48382
|
|
|
48113
|
-
|
|
48383
|
+
warn( 'ObjectLoader.parseTexture: Constant should be in numeric form.', value );
|
|
48114
48384
|
|
|
48115
48385
|
return type[ value ];
|
|
48116
48386
|
|
|
@@ -48126,13 +48396,13 @@ class ObjectLoader extends Loader {
|
|
|
48126
48396
|
|
|
48127
48397
|
if ( data.image === undefined ) {
|
|
48128
48398
|
|
|
48129
|
-
|
|
48399
|
+
warn( 'ObjectLoader: No "image" specified for', data.uuid );
|
|
48130
48400
|
|
|
48131
48401
|
}
|
|
48132
48402
|
|
|
48133
48403
|
if ( images[ data.image ] === undefined ) {
|
|
48134
48404
|
|
|
48135
|
-
|
|
48405
|
+
warn( 'ObjectLoader: Undefined image', data.image );
|
|
48136
48406
|
|
|
48137
48407
|
}
|
|
48138
48408
|
|
|
@@ -48220,7 +48490,7 @@ class ObjectLoader extends Loader {
|
|
|
48220
48490
|
|
|
48221
48491
|
if ( geometries[ name ] === undefined ) {
|
|
48222
48492
|
|
|
48223
|
-
|
|
48493
|
+
warn( 'ObjectLoader: Undefined geometry', name );
|
|
48224
48494
|
|
|
48225
48495
|
}
|
|
48226
48496
|
|
|
@@ -48242,7 +48512,7 @@ class ObjectLoader extends Loader {
|
|
|
48242
48512
|
|
|
48243
48513
|
if ( materials[ uuid ] === undefined ) {
|
|
48244
48514
|
|
|
48245
|
-
|
|
48515
|
+
warn( 'ObjectLoader: Undefined material', uuid );
|
|
48246
48516
|
|
|
48247
48517
|
}
|
|
48248
48518
|
|
|
@@ -48256,7 +48526,7 @@ class ObjectLoader extends Loader {
|
|
|
48256
48526
|
|
|
48257
48527
|
if ( materials[ name ] === undefined ) {
|
|
48258
48528
|
|
|
48259
|
-
|
|
48529
|
+
warn( 'ObjectLoader: Undefined material', name );
|
|
48260
48530
|
|
|
48261
48531
|
}
|
|
48262
48532
|
|
|
@@ -48268,7 +48538,7 @@ class ObjectLoader extends Loader {
|
|
|
48268
48538
|
|
|
48269
48539
|
if ( textures[ uuid ] === undefined ) {
|
|
48270
48540
|
|
|
48271
|
-
|
|
48541
|
+
warn( 'ObjectLoader: Undefined texture', uuid );
|
|
48272
48542
|
|
|
48273
48543
|
}
|
|
48274
48544
|
|
|
@@ -48669,7 +48939,7 @@ class ObjectLoader extends Loader {
|
|
|
48669
48939
|
|
|
48670
48940
|
if ( skeleton === undefined ) {
|
|
48671
48941
|
|
|
48672
|
-
|
|
48942
|
+
warn( 'ObjectLoader: No skeleton found with UUID:', child.skeleton );
|
|
48673
48943
|
|
|
48674
48944
|
} else {
|
|
48675
48945
|
|
|
@@ -48738,7 +49008,7 @@ const TEXTURE_FILTER = {
|
|
|
48738
49008
|
const _errorMap = new WeakMap();
|
|
48739
49009
|
|
|
48740
49010
|
/**
|
|
48741
|
-
* A loader for loading images as an [ImageBitmap]
|
|
49011
|
+
* A loader for loading images as an [ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap).
|
|
48742
49012
|
* An `ImageBitmap` provides an asynchronous and resource efficient pathway to prepare
|
|
48743
49013
|
* textures for rendering.
|
|
48744
49014
|
*
|
|
@@ -48782,13 +49052,13 @@ class ImageBitmapLoader extends Loader {
|
|
|
48782
49052
|
|
|
48783
49053
|
if ( typeof createImageBitmap === 'undefined' ) {
|
|
48784
49054
|
|
|
48785
|
-
|
|
49055
|
+
warn( 'ImageBitmapLoader: createImageBitmap() not supported.' );
|
|
48786
49056
|
|
|
48787
49057
|
}
|
|
48788
49058
|
|
|
48789
49059
|
if ( typeof fetch === 'undefined' ) {
|
|
48790
49060
|
|
|
48791
|
-
|
|
49061
|
+
warn( 'ImageBitmapLoader: fetch() not supported.' );
|
|
48792
49062
|
|
|
48793
49063
|
}
|
|
48794
49064
|
|
|
@@ -48812,7 +49082,7 @@ class ImageBitmapLoader extends Loader {
|
|
|
48812
49082
|
|
|
48813
49083
|
/**
|
|
48814
49084
|
* Sets the given loader options. The structure of the object must match the `options` parameter of
|
|
48815
|
-
* [createImageBitmap]
|
|
49085
|
+
* [createImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap).
|
|
48816
49086
|
*
|
|
48817
49087
|
* @param {Object} options - The loader options to set.
|
|
48818
49088
|
* @return {ImageBitmapLoader} A reference to this image bitmap loader.
|
|
@@ -49068,7 +49338,7 @@ class AudioLoader extends Loader {
|
|
|
49068
49338
|
|
|
49069
49339
|
} else {
|
|
49070
49340
|
|
|
49071
|
-
|
|
49341
|
+
error( e );
|
|
49072
49342
|
|
|
49073
49343
|
}
|
|
49074
49344
|
|
|
@@ -49087,8 +49357,8 @@ const _projectionMatrix = /*@__PURE__*/ new Matrix4();
|
|
|
49087
49357
|
/**
|
|
49088
49358
|
* A special type of camera that uses two perspective cameras with
|
|
49089
49359
|
* stereoscopic projection. Can be used for rendering stereo effects
|
|
49090
|
-
* like [3D Anaglyph]
|
|
49091
|
-
* [Parallax Barrier]
|
|
49360
|
+
* like [3D Anaglyph](https://en.wikipedia.org/wiki/Anaglyph_3D) or
|
|
49361
|
+
* [Parallax Barrier](https://en.wikipedia.org/wiki/parallax_barrier).
|
|
49092
49362
|
*/
|
|
49093
49363
|
class StereoCamera {
|
|
49094
49364
|
|
|
@@ -49611,7 +49881,7 @@ class AudioListener extends Object3D {
|
|
|
49611
49881
|
/**
|
|
49612
49882
|
* Represents a non-positional ( global ) audio object.
|
|
49613
49883
|
*
|
|
49614
|
-
* This and related audio modules make use of the [Web Audio API]
|
|
49884
|
+
* This and related audio modules make use of the [Web Audio API](https://www.w3.org/TR/webaudio-1.1/).
|
|
49615
49885
|
*
|
|
49616
49886
|
* ```js
|
|
49617
49887
|
* // create an AudioListener and add it to the camera
|
|
@@ -49922,14 +50192,14 @@ class Audio extends Object3D {
|
|
|
49922
50192
|
|
|
49923
50193
|
if ( this.isPlaying === true ) {
|
|
49924
50194
|
|
|
49925
|
-
|
|
50195
|
+
warn( 'Audio: Audio is already playing.' );
|
|
49926
50196
|
return;
|
|
49927
50197
|
|
|
49928
50198
|
}
|
|
49929
50199
|
|
|
49930
50200
|
if ( this.hasPlaybackControl === false ) {
|
|
49931
50201
|
|
|
49932
|
-
|
|
50202
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
49933
50203
|
return;
|
|
49934
50204
|
|
|
49935
50205
|
}
|
|
@@ -49966,7 +50236,7 @@ class Audio extends Object3D {
|
|
|
49966
50236
|
|
|
49967
50237
|
if ( this.hasPlaybackControl === false ) {
|
|
49968
50238
|
|
|
49969
|
-
|
|
50239
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
49970
50240
|
return;
|
|
49971
50241
|
|
|
49972
50242
|
}
|
|
@@ -50008,7 +50278,7 @@ class Audio extends Object3D {
|
|
|
50008
50278
|
|
|
50009
50279
|
if ( this.hasPlaybackControl === false ) {
|
|
50010
50280
|
|
|
50011
|
-
|
|
50281
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
50012
50282
|
return;
|
|
50013
50283
|
|
|
50014
50284
|
}
|
|
@@ -50201,7 +50471,7 @@ class Audio extends Object3D {
|
|
|
50201
50471
|
|
|
50202
50472
|
if ( this.hasPlaybackControl === false ) {
|
|
50203
50473
|
|
|
50204
|
-
|
|
50474
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
50205
50475
|
return;
|
|
50206
50476
|
|
|
50207
50477
|
}
|
|
@@ -50250,7 +50520,7 @@ class Audio extends Object3D {
|
|
|
50250
50520
|
|
|
50251
50521
|
if ( this.hasPlaybackControl === false ) {
|
|
50252
50522
|
|
|
50253
|
-
|
|
50523
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
50254
50524
|
return false;
|
|
50255
50525
|
|
|
50256
50526
|
}
|
|
@@ -50271,7 +50541,7 @@ class Audio extends Object3D {
|
|
|
50271
50541
|
|
|
50272
50542
|
if ( this.hasPlaybackControl === false ) {
|
|
50273
50543
|
|
|
50274
|
-
|
|
50544
|
+
warn( 'Audio: this Audio has no playback control.' );
|
|
50275
50545
|
return;
|
|
50276
50546
|
|
|
50277
50547
|
}
|
|
@@ -50349,7 +50619,7 @@ class Audio extends Object3D {
|
|
|
50349
50619
|
|
|
50350
50620
|
if ( source.sourceType !== 'buffer' ) {
|
|
50351
50621
|
|
|
50352
|
-
|
|
50622
|
+
warn( 'Audio: Audio source type cannot be copied.' );
|
|
50353
50623
|
|
|
50354
50624
|
return this;
|
|
50355
50625
|
|
|
@@ -50534,7 +50804,7 @@ class PositionalAudio extends Audio {
|
|
|
50534
50804
|
* Defines which algorithm to use to reduce the volume of the audio source
|
|
50535
50805
|
* as it moves away from the listener.
|
|
50536
50806
|
*
|
|
50537
|
-
* Read [the spec]
|
|
50807
|
+
* Read [the spec](https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype)
|
|
50538
50808
|
* for more details.
|
|
50539
50809
|
*
|
|
50540
50810
|
* @param {('linear'|'inverse'|'exponential')} value - The distance model to set.
|
|
@@ -51616,7 +51886,7 @@ class PropertyBinding {
|
|
|
51616
51886
|
// ensure there is a value node
|
|
51617
51887
|
if ( ! targetObject ) {
|
|
51618
51888
|
|
|
51619
|
-
|
|
51889
|
+
warn( 'PropertyBinding: No target node found for track: ' + this.path + '.' );
|
|
51620
51890
|
return;
|
|
51621
51891
|
|
|
51622
51892
|
}
|
|
@@ -51632,14 +51902,14 @@ class PropertyBinding {
|
|
|
51632
51902
|
|
|
51633
51903
|
if ( ! targetObject.material ) {
|
|
51634
51904
|
|
|
51635
|
-
|
|
51905
|
+
error( 'PropertyBinding: Can not bind to material as node does not have a material.', this );
|
|
51636
51906
|
return;
|
|
51637
51907
|
|
|
51638
51908
|
}
|
|
51639
51909
|
|
|
51640
51910
|
if ( ! targetObject.material.materials ) {
|
|
51641
51911
|
|
|
51642
|
-
|
|
51912
|
+
error( 'PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );
|
|
51643
51913
|
return;
|
|
51644
51914
|
|
|
51645
51915
|
}
|
|
@@ -51652,7 +51922,7 @@ class PropertyBinding {
|
|
|
51652
51922
|
|
|
51653
51923
|
if ( ! targetObject.skeleton ) {
|
|
51654
51924
|
|
|
51655
|
-
|
|
51925
|
+
error( 'PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );
|
|
51656
51926
|
return;
|
|
51657
51927
|
|
|
51658
51928
|
}
|
|
@@ -51687,14 +51957,14 @@ class PropertyBinding {
|
|
|
51687
51957
|
|
|
51688
51958
|
if ( ! targetObject.material ) {
|
|
51689
51959
|
|
|
51690
|
-
|
|
51960
|
+
error( 'PropertyBinding: Can not bind to material as node does not have a material.', this );
|
|
51691
51961
|
return;
|
|
51692
51962
|
|
|
51693
51963
|
}
|
|
51694
51964
|
|
|
51695
51965
|
if ( ! targetObject.material.map ) {
|
|
51696
51966
|
|
|
51697
|
-
|
|
51967
|
+
error( 'PropertyBinding: Can not bind to material.map as node.material does not have a map.', this );
|
|
51698
51968
|
return;
|
|
51699
51969
|
|
|
51700
51970
|
}
|
|
@@ -51706,7 +51976,7 @@ class PropertyBinding {
|
|
|
51706
51976
|
|
|
51707
51977
|
if ( targetObject[ objectName ] === undefined ) {
|
|
51708
51978
|
|
|
51709
|
-
|
|
51979
|
+
error( 'PropertyBinding: Can not bind to objectName of node undefined.', this );
|
|
51710
51980
|
return;
|
|
51711
51981
|
|
|
51712
51982
|
}
|
|
@@ -51720,7 +51990,7 @@ class PropertyBinding {
|
|
|
51720
51990
|
|
|
51721
51991
|
if ( targetObject[ objectIndex ] === undefined ) {
|
|
51722
51992
|
|
|
51723
|
-
|
|
51993
|
+
error( 'PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );
|
|
51724
51994
|
return;
|
|
51725
51995
|
|
|
51726
51996
|
}
|
|
@@ -51738,7 +52008,7 @@ class PropertyBinding {
|
|
|
51738
52008
|
|
|
51739
52009
|
const nodeName = parsedPath.nodeName;
|
|
51740
52010
|
|
|
51741
|
-
|
|
52011
|
+
error( 'PropertyBinding: Trying to update property for track: ' + nodeName +
|
|
51742
52012
|
'.' + propertyName + ' but it wasn\'t found.', targetObject );
|
|
51743
52013
|
return;
|
|
51744
52014
|
|
|
@@ -51773,14 +52043,14 @@ class PropertyBinding {
|
|
|
51773
52043
|
// support resolving morphTarget names into indices.
|
|
51774
52044
|
if ( ! targetObject.geometry ) {
|
|
51775
52045
|
|
|
51776
|
-
|
|
52046
|
+
error( 'PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );
|
|
51777
52047
|
return;
|
|
51778
52048
|
|
|
51779
52049
|
}
|
|
51780
52050
|
|
|
51781
52051
|
if ( ! targetObject.geometry.morphAttributes ) {
|
|
51782
52052
|
|
|
51783
|
-
|
|
52053
|
+
error( 'PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );
|
|
51784
52054
|
return;
|
|
51785
52055
|
|
|
51786
52056
|
}
|
|
@@ -52072,7 +52342,7 @@ class AnimationObjectGroup {
|
|
|
52072
52342
|
|
|
52073
52343
|
} else if ( objects[ index ] !== knownObject ) {
|
|
52074
52344
|
|
|
52075
|
-
|
|
52345
|
+
error( 'AnimationObjectGroup: Different objects with the same UUID ' +
|
|
52076
52346
|
'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );
|
|
52077
52347
|
|
|
52078
52348
|
} // else the object is already where we want it to be
|
|
@@ -53867,7 +54137,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
53867
54137
|
/**
|
|
53868
54138
|
* Deactivates all previously scheduled actions on this mixer.
|
|
53869
54139
|
*
|
|
53870
|
-
* @return {AnimationMixer} A reference to
|
|
54140
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
53871
54141
|
*/
|
|
53872
54142
|
stopAllAction() {
|
|
53873
54143
|
|
|
@@ -53891,7 +54161,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
53891
54161
|
* time from {@link Clock} or {@link Timer}.
|
|
53892
54162
|
*
|
|
53893
54163
|
* @param {number} deltaTime - The delta time in seconds.
|
|
53894
|
-
* @return {AnimationMixer} A reference to
|
|
54164
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
53895
54165
|
*/
|
|
53896
54166
|
update( deltaTime ) {
|
|
53897
54167
|
|
|
@@ -53937,7 +54207,7 @@ class AnimationMixer extends EventDispatcher {
|
|
|
53937
54207
|
* input parameter will be scaled by {@link AnimationMixer#timeScale}
|
|
53938
54208
|
*
|
|
53939
54209
|
* @param {number} time - The time to set in seconds.
|
|
53940
|
-
* @return {AnimationMixer} A reference to
|
|
54210
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
53941
54211
|
*/
|
|
53942
54212
|
setTime( time ) {
|
|
53943
54213
|
|
|
@@ -54712,7 +54982,7 @@ class Raycaster {
|
|
|
54712
54982
|
|
|
54713
54983
|
} else {
|
|
54714
54984
|
|
|
54715
|
-
|
|
54985
|
+
error( 'Raycaster: Unsupported camera type: ' + camera.type );
|
|
54716
54986
|
|
|
54717
54987
|
}
|
|
54718
54988
|
|
|
@@ -55024,7 +55294,7 @@ function handleVisibilityChange() {
|
|
|
55024
55294
|
|
|
55025
55295
|
/**
|
|
55026
55296
|
* This class can be used to represent points in 3D space as
|
|
55027
|
-
* [Spherical coordinates]
|
|
55297
|
+
* [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system).
|
|
55028
55298
|
*/
|
|
55029
55299
|
class Spherical {
|
|
55030
55300
|
|
|
@@ -55168,7 +55438,7 @@ class Spherical {
|
|
|
55168
55438
|
|
|
55169
55439
|
/**
|
|
55170
55440
|
* This class can be used to represent points in 3D space as
|
|
55171
|
-
* [Cylindrical coordinates]
|
|
55441
|
+
* [Cylindrical coordinates](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system).
|
|
55172
55442
|
*/
|
|
55173
55443
|
class Cylindrical {
|
|
55174
55444
|
|
|
@@ -55291,7 +55561,7 @@ class Cylindrical {
|
|
|
55291
55561
|
* A Note on Row-Major and Column-Major Ordering:
|
|
55292
55562
|
*
|
|
55293
55563
|
* The constructor and {@link Matrix2#set} method take arguments in
|
|
55294
|
-
* [row-major]
|
|
55564
|
+
* [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order)
|
|
55295
55565
|
* order, while internally they are stored in the {@link Matrix2#elements} array in column-major order.
|
|
55296
55566
|
* This means that calling:
|
|
55297
55567
|
* ```js
|
|
@@ -57027,7 +57297,7 @@ const _camera = /*@__PURE__*/ new Camera();
|
|
|
57027
57297
|
* This helps with visualizing what a camera contains in its frustum. It
|
|
57028
57298
|
* visualizes the frustum of a camera using a line segments.
|
|
57029
57299
|
*
|
|
57030
|
-
* Based on frustum visualization in [lightgl.js shadowmap example]
|
|
57300
|
+
* Based on frustum visualization in [lightgl.js shadowmap example](https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html).
|
|
57031
57301
|
*
|
|
57032
57302
|
* `CameraHelper` must be a child of the scene.
|
|
57033
57303
|
*
|
|
@@ -58139,7 +58409,7 @@ class ShapePath {
|
|
|
58139
58409
|
let holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );
|
|
58140
58410
|
holesFirst = isCCW ? ! holesFirst : holesFirst;
|
|
58141
58411
|
|
|
58142
|
-
//
|
|
58412
|
+
// log("Holes first", holesFirst);
|
|
58143
58413
|
|
|
58144
58414
|
const betterShapeHoles = [];
|
|
58145
58415
|
const newShapes = [];
|
|
@@ -58167,13 +58437,13 @@ class ShapePath {
|
|
|
58167
58437
|
if ( holesFirst ) mainIdx ++;
|
|
58168
58438
|
newShapeHoles[ mainIdx ] = [];
|
|
58169
58439
|
|
|
58170
|
-
//
|
|
58440
|
+
//log('cw', i);
|
|
58171
58441
|
|
|
58172
58442
|
} else {
|
|
58173
58443
|
|
|
58174
58444
|
newShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );
|
|
58175
58445
|
|
|
58176
|
-
//
|
|
58446
|
+
//log('ccw', i);
|
|
58177
58447
|
|
|
58178
58448
|
}
|
|
58179
58449
|
|
|
@@ -58258,7 +58528,7 @@ class ShapePath {
|
|
|
58258
58528
|
|
|
58259
58529
|
}
|
|
58260
58530
|
|
|
58261
|
-
//
|
|
58531
|
+
//log("shape", shapes);
|
|
58262
58532
|
|
|
58263
58533
|
return shapes;
|
|
58264
58534
|
|
|
@@ -58278,7 +58548,7 @@ class Controls extends EventDispatcher {
|
|
|
58278
58548
|
* Constructs a new controls instance.
|
|
58279
58549
|
*
|
|
58280
58550
|
* @param {Object3D} object - The object that is managed by the controls.
|
|
58281
|
-
* @param {?
|
|
58551
|
+
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
58282
58552
|
*/
|
|
58283
58553
|
constructor( object, domElement = null ) {
|
|
58284
58554
|
|
|
@@ -58294,7 +58564,7 @@ class Controls extends EventDispatcher {
|
|
|
58294
58564
|
/**
|
|
58295
58565
|
* The HTML element used for event listeners.
|
|
58296
58566
|
*
|
|
58297
|
-
* @type {?
|
|
58567
|
+
* @type {?HTMLElement}
|
|
58298
58568
|
* @default null
|
|
58299
58569
|
*/
|
|
58300
58570
|
this.domElement = domElement;
|
|
@@ -58344,13 +58614,13 @@ class Controls extends EventDispatcher {
|
|
|
58344
58614
|
* Connects the controls to the DOM. This method has so called "side effects" since
|
|
58345
58615
|
* it adds the module's event listeners to the DOM.
|
|
58346
58616
|
*
|
|
58347
|
-
* @param {
|
|
58617
|
+
* @param {HTMLElement} element - The DOM element to connect to.
|
|
58348
58618
|
*/
|
|
58349
58619
|
connect( element ) {
|
|
58350
58620
|
|
|
58351
58621
|
if ( element === undefined ) {
|
|
58352
58622
|
|
|
58353
|
-
|
|
58623
|
+
warn( 'Controls: connect() now requires an element.' ); // @deprecated, the warning can be removed with r185
|
|
58354
58624
|
return;
|
|
58355
58625
|
|
|
58356
58626
|
}
|
|
@@ -58597,6 +58867,7 @@ function getTextureTypeByteLength( type ) {
|
|
|
58597
58867
|
case FloatType:
|
|
58598
58868
|
return { byteLength: 4, components: 1 };
|
|
58599
58869
|
case UnsignedInt5999Type:
|
|
58870
|
+
case UnsignedInt101111Type:
|
|
58600
58871
|
return { byteLength: 4, components: 3 };
|
|
58601
58872
|
|
|
58602
58873
|
}
|
|
@@ -58683,7 +58954,7 @@ if ( typeof window !== 'undefined' ) {
|
|
|
58683
58954
|
|
|
58684
58955
|
if ( window.__THREE__ ) {
|
|
58685
58956
|
|
|
58686
|
-
|
|
58957
|
+
warn( 'WARNING: Multiple instances of Three.js being imported.' );
|
|
58687
58958
|
|
|
58688
58959
|
} else {
|
|
58689
58960
|
|
|
@@ -58693,4 +58964,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
58693
58964
|
|
|
58694
58965
|
}
|
|
58695
58966
|
|
|
58696
|
-
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, getByteLength, getUnlitUniformColorSpace, mergeUniforms, probeAsync, warnOnce };
|
|
58967
|
+
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExternalTexture, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, error, getByteLength, getConsoleFunction, getUnlitUniformColorSpace, log, mergeUniforms, probeAsync, setConsoleFunction, warn, warnOnce };
|