@needle-tools/three 0.145.2 → 0.146.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/three.cjs +3559 -6924
- package/build/three.js +3559 -6924
- package/build/three.min.js +1 -2
- package/build/three.module.js +732 -339
- package/examples/js/animation/AnimationClipCreator.js +0 -8
- package/examples/js/animation/CCDIKSolver.js +49 -66
- package/examples/js/animation/MMDAnimationHelper.js +66 -137
- package/examples/js/animation/MMDPhysics.js +70 -134
- package/examples/js/cameras/CinematicCamera.js +33 -22
- package/examples/js/controls/ArcballControls.js +138 -405
- package/examples/js/controls/DragControls.js +8 -33
- package/examples/js/controls/FirstPersonControls.js +32 -54
- package/examples/js/controls/FlyControls.js +29 -55
- package/examples/js/controls/OrbitControls.js +85 -95
- package/examples/js/controls/PointerLockControls.js +5 -14
- package/examples/js/controls/TrackballControls.js +33 -86
- package/examples/js/controls/TransformControls.js +84 -169
- package/examples/js/csm/CSM.js +4 -39
- package/examples/js/csm/CSMFrustum.js +3 -9
- package/examples/js/csm/CSMHelper.js +24 -4
- package/examples/js/csm/CSMShader.js +2 -6
- package/examples/js/curves/CurveExtras.js +27 -27
- package/examples/js/curves/NURBSCurve.js +4 -16
- package/examples/js/curves/NURBSSurface.js +3 -9
- package/examples/js/curves/NURBSUtils.js +8 -45
- package/examples/js/effects/AnaglyphEffect.js +4 -18
- package/examples/js/effects/AsciiEffect.js +32 -31
- package/examples/js/effects/OutlineEffect.js +26 -30
- package/examples/js/effects/ParallaxBarrierEffect.js +0 -13
- package/examples/js/effects/PeppersGhostEffect.js +12 -39
- package/examples/js/effects/StereoEffect.js +0 -4
- package/examples/js/environments/RoomEnvironment.js +12 -10
- package/examples/js/exporters/ColladaExporter.js +48 -65
- package/examples/js/exporters/DRACOExporter.js +22 -22
- package/examples/js/exporters/EXRExporter.js +15 -18
- package/examples/js/exporters/GLTFExporter.js +143 -261
- package/examples/js/exporters/MMDExporter.js +5 -12
- package/examples/js/exporters/OBJExporter.js +42 -33
- package/examples/js/exporters/PLYExporter.js +38 -33
- package/examples/js/exporters/STLExporter.js +5 -7
- package/examples/js/exporters/USDZExporter.js +110 -25
- package/examples/js/geometries/BoxLineGeometry.js +0 -1
- package/examples/js/geometries/ConvexGeometry.js +11 -6
- package/examples/js/geometries/DecalGeometry.js +53 -20
- package/examples/js/geometries/LightningStrike.js +54 -67
- package/examples/js/geometries/ParametricGeometries.js +8 -7
- package/examples/js/geometries/ParametricGeometry.js +25 -12
- package/examples/js/geometries/RoundedBoxGeometry.js +21 -19
- package/examples/js/geometries/TeapotGeometry.js +54 -50
- package/examples/js/geometries/TextGeometry.js +6 -4
- package/examples/js/helpers/LightProbeHelper.js +1 -2
- package/examples/js/helpers/OctreeHelper.js +22 -20
- package/examples/js/helpers/PositionalAudioHelper.js +8 -6
- package/examples/js/helpers/RectAreaLightHelper.js +6 -7
- package/examples/js/helpers/VertexNormalsHelper.js +15 -13
- package/examples/js/helpers/VertexTangentsHelper.js +15 -9
- package/examples/js/helpers/ViewHelper.js +31 -16
- package/examples/js/interactive/HTMLMesh.js +22 -33
- package/examples/js/interactive/InteractiveGroup.js +6 -12
- package/examples/js/interactive/SelectionBox.js +3 -70
- package/examples/js/interactive/SelectionHelper.js +0 -8
- package/examples/js/lights/LightProbeGenerator.js +32 -39
- package/examples/js/lights/RectAreaLightUniformsLib.js +5 -1
- package/examples/js/lines/LineGeometry.js +3 -5
- package/examples/js/lines/LineMaterial.js +4 -11
- package/examples/js/lines/LineSegments2.js +38 -89
- package/examples/js/lines/LineSegmentsGeometry.js +7 -28
- package/examples/js/lines/Wireframe.js +2 -7
- package/examples/js/lines/WireframeGeometry2.js +3 -1
- package/examples/js/loaders/3DMLoader.js +58 -155
- package/examples/js/loaders/3MFLoader.js +72 -106
- package/examples/js/loaders/AMFLoader.js +0 -25
- package/examples/js/loaders/BVHLoader.js +44 -43
- package/examples/js/loaders/BasisTextureLoader.js +16 -46
- package/examples/js/loaders/ColladaLoader.js +201 -359
- package/examples/js/loaders/DDSLoader.js +24 -25
- package/examples/js/loaders/DRACOLoader.js +29 -66
- package/examples/js/loaders/EXRLoader.js +67 -164
- package/examples/js/loaders/FBXLoader.js +286 -441
- package/examples/js/loaders/FontLoader.js +6 -15
- package/examples/js/loaders/GCodeLoader.js +15 -16
- package/examples/js/loaders/GLTFLoader.js +354 -405
- package/examples/js/loaders/HDRCubeTextureLoader.js +0 -6
- package/examples/js/loaders/KMZLoader.js +3 -7
- package/examples/js/loaders/KTXLoader.js +12 -30
- package/examples/js/loaders/LDrawLoader.js +178 -289
- package/examples/js/loaders/LUT3dlLoader.js +7 -11
- package/examples/js/loaders/LUTCubeLoader.js +0 -8
- package/examples/js/loaders/LWOLoader.js +59 -124
- package/examples/js/loaders/LogLuvLoader.js +27 -77
- package/examples/js/loaders/LottieLoader.js +4 -4
- package/examples/js/loaders/MD2Loader.js +26 -27
- package/examples/js/loaders/MDDLoader.js +6 -10
- package/examples/js/loaders/MMDLoader.js +180 -189
- package/examples/js/loaders/MTLLoader.js +18 -47
- package/examples/js/loaders/MaterialXLoader.js +392 -0
- package/examples/js/loaders/NRRDLoader.js +44 -84
- package/examples/js/loaders/OBJLoader.js +50 -65
- package/examples/js/loaders/PCDLoader.js +34 -29
- package/examples/js/loaders/PDBLoader.js +17 -13
- package/examples/js/loaders/PLYLoader.js +9 -39
- package/examples/js/loaders/PRWMLoader.js +11 -22
- package/examples/js/loaders/PVRLoader.js +7 -16
- package/examples/js/loaders/RGBELoader.js +36 -61
- package/examples/js/loaders/RGBMLoader.js +26 -87
- package/examples/js/loaders/STLLoader.js +20 -27
- package/examples/js/loaders/SVGLoader.js +361 -233
- package/examples/js/loaders/TDSLoader.js +81 -118
- package/examples/js/loaders/TGALoader.js +39 -41
- package/examples/js/loaders/TIFFLoader.js +0 -1
- package/examples/js/loaders/TTFLoader.js +0 -8
- package/examples/js/loaders/TiltLoader.js +14 -15
- package/examples/js/loaders/VOXLoader.js +8 -16
- package/examples/js/loaders/VRMLLoader.js +243 -340
- package/examples/js/loaders/VTKLoader.js +101 -118
- package/examples/js/loaders/XYZLoader.js +2 -4
- package/examples/js/loaders/lwo/IFFParser.js +55 -136
- package/examples/js/loaders/lwo/LWO2Parser.js +32 -83
- package/examples/js/loaders/lwo/LWO3Parser.js +31 -73
- package/examples/js/materials/MeshGouraudMaterial.js +15 -13
- package/examples/js/math/Capsule.js +0 -17
- package/examples/js/math/ColorConverter.js +3 -3
- package/examples/js/math/ConvexHull.js +183 -139
- package/examples/js/math/ImprovedNoise.js +1 -1
- package/examples/js/math/Lut.js +8 -15
- package/examples/js/math/MeshSurfaceSampler.js +6 -28
- package/examples/js/math/OBB.js +90 -49
- package/examples/js/math/Octree.js +2 -57
- package/examples/js/math/SimplexNoise.js +74 -88
- package/examples/js/misc/ConvexObjectBreaker.js +37 -48
- package/examples/js/misc/GPUComputationRenderer.js +14 -18
- package/examples/js/misc/Gyroscope.js +5 -9
- package/examples/js/misc/MD2Character.js +14 -23
- package/examples/js/misc/MD2CharacterComplex.js +73 -54
- package/examples/js/misc/MorphAnimMesh.js +0 -6
- package/examples/js/misc/MorphBlendMesh.js +3 -30
- package/examples/js/misc/ProgressiveLightMap.js +47 -43
- package/examples/js/misc/RollerCoaster.js +17 -24
- package/examples/js/misc/TubePainter.js +18 -12
- package/examples/js/misc/Volume.js +16 -45
- package/examples/js/misc/VolumeSlice.js +14 -24
- package/examples/js/modifiers/CurveModifier.js +19 -21
- package/examples/js/modifiers/EdgeSplitModifier.js +0 -30
- package/examples/js/modifiers/SimplifyModifier.js +56 -59
- package/examples/js/modifiers/TessellateModifier.js +2 -9
- package/examples/js/objects/GroundProjectedEnv.js +2 -14
- package/examples/js/objects/Lensflare.js +47 -38
- package/examples/js/objects/LightningStorm.js +10 -13
- package/examples/js/objects/MarchingCubes.js +80 -59
- package/examples/js/objects/Reflector.js +22 -20
- package/examples/js/objects/ReflectorForSSRPass.js +19 -23
- package/examples/js/objects/Refractor.js +52 -30
- package/examples/js/objects/ShadowMesh.js +1 -2
- package/examples/js/objects/Sky.js +2 -7
- package/examples/js/objects/Water.js +23 -18
- package/examples/js/objects/Water2.js +20 -19
- package/examples/js/physics/AmmoPhysics.js +23 -20
- package/examples/js/physics/OimoPhysics.js +19 -17
- package/examples/js/postprocessing/AdaptiveToneMappingPass.js +13 -20
- package/examples/js/postprocessing/AfterimagePass.js +19 -12
- package/examples/js/postprocessing/BloomPass.js +38 -17
- package/examples/js/postprocessing/BokehPass.js +29 -12
- package/examples/js/postprocessing/ClearPass.js +1 -6
- package/examples/js/postprocessing/CubeTexturePass.js +12 -9
- package/examples/js/postprocessing/DotScreenPass.js +7 -5
- package/examples/js/postprocessing/EffectComposer.js +25 -32
- package/examples/js/postprocessing/FilmPass.js +7 -5
- package/examples/js/postprocessing/GlitchPass.js +10 -11
- package/examples/js/postprocessing/HalftonePass.js +9 -9
- package/examples/js/postprocessing/LUTPass.js +2 -15
- package/examples/js/postprocessing/MaskPass.js +20 -17
- package/examples/js/postprocessing/OutlinePass.js +45 -36
- package/examples/js/postprocessing/Pass.js +11 -14
- package/examples/js/postprocessing/RenderPass.js +3 -7
- package/examples/js/postprocessing/SAOPass.js +40 -32
- package/examples/js/postprocessing/SMAAPass.js +34 -17
- package/examples/js/postprocessing/SSAARenderPass.js +14 -14
- package/examples/js/postprocessing/SSAOPass.js +56 -42
- package/examples/js/postprocessing/SSRPass.js +78 -61
- package/examples/js/postprocessing/SavePass.js +14 -6
- package/examples/js/postprocessing/ShaderPass.js +9 -8
- package/examples/js/postprocessing/TAARenderPass.js +11 -9
- package/examples/js/postprocessing/TexturePass.js +7 -4
- package/examples/js/postprocessing/UnrealBloomPass.js +43 -25
- package/examples/js/renderers/CSS2DRenderer.js +2 -21
- package/examples/js/renderers/CSS3DRenderer.js +3 -24
- package/examples/js/renderers/Projector.js +29 -85
- package/examples/js/renderers/SVGRenderer.js +4 -50
- package/examples/js/shaders/ACESFilmicToneMappingShader.js +3 -6
- package/examples/js/shaders/AfterimageShader.js +3 -6
- package/examples/js/shaders/BasicShader.js +3 -6
- package/examples/js/shaders/BleachBypassShader.js +3 -6
- package/examples/js/shaders/BlendShader.js +3 -6
- package/examples/js/shaders/BokehShader.js +3 -6
- package/examples/js/shaders/BokehShader2.js +4 -13
- package/examples/js/shaders/BrightnessContrastShader.js +3 -6
- package/examples/js/shaders/ColorCorrectionShader.js +2 -6
- package/examples/js/shaders/ColorifyShader.js +2 -6
- package/examples/js/shaders/ConvolutionShader.js +5 -10
- package/examples/js/shaders/CopyShader.js +3 -6
- package/examples/js/shaders/DOFMipMapShader.js +3 -6
- package/examples/js/shaders/DepthLimitedBlurShader.js +2 -9
- package/examples/js/shaders/DigitalGlitch.js +3 -6
- package/examples/js/shaders/DotScreenShader.js +2 -6
- package/examples/js/shaders/FXAAShader.js +1 -3
- package/examples/js/shaders/FilmShader.js +3 -6
- package/examples/js/shaders/FocusShader.js +3 -6
- package/examples/js/shaders/FreiChenShader.js +2 -6
- package/examples/js/shaders/GammaCorrectionShader.js +3 -6
- package/examples/js/shaders/GodRaysShader.js +11 -24
- package/examples/js/shaders/HalftoneShader.js +3 -6
- package/examples/js/shaders/HorizontalBlurShader.js +3 -6
- package/examples/js/shaders/HorizontalTiltShiftShader.js +3 -6
- package/examples/js/shaders/HueSaturationShader.js +3 -6
- package/examples/js/shaders/KaleidoShader.js +3 -6
- package/examples/js/shaders/LuminosityHighPassShader.js +2 -6
- package/examples/js/shaders/LuminosityShader.js +3 -6
- package/examples/js/shaders/MMDToonShader.js +2 -6
- package/examples/js/shaders/MirrorShader.js +3 -6
- package/examples/js/shaders/NormalMapShader.js +2 -6
- package/examples/js/shaders/RGBShiftShader.js +3 -6
- package/examples/js/shaders/SAOShader.js +2 -6
- package/examples/js/shaders/SMAAShader.js +6 -18
- package/examples/js/shaders/SSAOShader.js +2 -6
- package/examples/js/shaders/SSRShader.js +6 -18
- package/examples/js/shaders/SepiaShader.js +3 -6
- package/examples/js/shaders/SobelOperatorShader.js +2 -6
- package/examples/js/shaders/TechnicolorShader.js +3 -6
- package/examples/js/shaders/ToneMapShader.js +3 -6
- package/examples/js/shaders/ToonShader.js +8 -24
- package/examples/js/shaders/TriangleBlurShader.js +2 -6
- package/examples/js/shaders/UnpackDepthRGBAShader.js +3 -6
- package/examples/js/shaders/VelocityShader.js +126 -0
- package/examples/js/shaders/VerticalBlurShader.js +3 -6
- package/examples/js/shaders/VerticalTiltShiftShader.js +3 -6
- package/examples/js/shaders/VignetteShader.js +3 -6
- package/examples/js/shaders/VolumeShader.js +2 -6
- package/examples/js/shaders/WaterRefractionShader.js +2 -6
- package/examples/js/textures/FlakesTexture.js +0 -1
- package/examples/js/utils/BufferGeometryUtils.js +234 -168
- package/examples/js/utils/CameraUtils.js +5 -20
- package/examples/js/utils/GPUStatsPanel.js +3 -12
- package/examples/js/utils/GeometryCompressionUtils.js +19 -44
- package/examples/js/utils/GeometryUtils.js +13 -18
- package/examples/js/utils/LDrawUtils.js +8 -11
- package/examples/js/utils/PackedPhongMaterial.js +6 -4
- package/examples/js/utils/SceneUtils.js +117 -6
- package/examples/js/utils/ShadowMapViewer.js +17 -14
- package/examples/js/utils/SkeletonUtils.js +13 -27
- package/examples/js/utils/UVsDebug.js +20 -12
- package/examples/js/utils/WorkerPool.js +1 -11
- package/examples/jsm/animation/CCDIKSolver.js +1 -1
- package/examples/jsm/capabilities/WebGPU.js +3 -1
- package/examples/jsm/controls/OrbitControls.js +44 -4
- package/examples/jsm/exporters/GLTFExporter.js +17 -131
- package/examples/jsm/exporters/USDZExporter.js +94 -28
- package/examples/jsm/interactive/HTMLMesh.js +2 -0
- package/examples/jsm/libs/lottie_canvas.module.js +14844 -0
- package/examples/jsm/loaders/3DMLoader.js +1 -2
- package/examples/jsm/loaders/ColladaLoader.js +28 -0
- package/examples/jsm/loaders/FBXLoader.js +16 -2
- package/examples/jsm/loaders/GLTFLoader.js +204 -377
- package/examples/jsm/loaders/KTX2Loader.js +68 -29
- package/examples/jsm/loaders/LDrawLoader.js +14 -13
- package/examples/jsm/loaders/LottieLoader.js +4 -2
- package/examples/jsm/loaders/MaterialXLoader.js +728 -0
- package/examples/jsm/loaders/PCDLoader.js +1 -1
- package/examples/jsm/loaders/PLYLoader.js +68 -16
- package/examples/jsm/loaders/SVGLoader.js +227 -14
- package/examples/jsm/loaders/USDZLoader.js +31 -16
- package/examples/jsm/nodes/Nodes.js +14 -2
- package/examples/jsm/nodes/accessors/Object3DNode.js +1 -1
- package/examples/jsm/nodes/accessors/PositionNode.js +6 -0
- package/examples/jsm/nodes/accessors/ReferenceNode.js +1 -1
- package/examples/jsm/nodes/accessors/SkinningNode.js +1 -1
- package/examples/jsm/nodes/core/Node.js +1 -1
- package/examples/jsm/nodes/core/NodeBuilder.js +36 -4
- package/examples/jsm/nodes/core/NodeFrame.js +2 -2
- package/examples/jsm/nodes/core/NodeVarying.js +7 -4
- package/examples/jsm/nodes/core/VaryingNode.js +6 -4
- package/examples/jsm/nodes/core/constants.js +13 -13
- package/examples/jsm/nodes/display/PosterizeNode.js +25 -0
- package/examples/jsm/nodes/display/ViewportNode.js +106 -0
- package/examples/jsm/nodes/gpgpu/ComputeNode.js +1 -1
- package/examples/jsm/nodes/lighting/AnalyticLightNode.js +1 -1
- package/examples/jsm/nodes/loaders/NodeMaterialLoader.js +3 -1
- package/examples/jsm/nodes/materials/Materials.js +9 -7
- package/examples/jsm/nodes/materials/NodeMaterial.js +9 -1
- package/examples/jsm/nodes/materialx/MaterialXNodes.js +6 -2
- package/examples/jsm/nodes/materialx/lib/mx_transform_color.js +18 -0
- package/examples/jsm/nodes/math/MathNode.js +5 -0
- package/examples/jsm/nodes/math/OperatorNode.js +6 -1
- package/examples/jsm/nodes/shadernode/ShaderNode.js +26 -13
- package/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.js +2 -0
- package/examples/jsm/nodes/shadernode/ShaderNodeElements.js +18 -0
- package/examples/jsm/nodes/utils/EquirectUVNode.js +27 -0
- package/examples/jsm/nodes/utils/JoinNode.js +8 -2
- package/examples/jsm/nodes/utils/MatcapUVNode.js +2 -4
- package/examples/jsm/nodes/utils/MaxMipLevelNode.js +1 -1
- package/examples/jsm/nodes/utils/SpriteSheetUVNode.js +8 -10
- package/examples/jsm/nodes/utils/TimerNode.js +1 -1
- package/examples/jsm/nodes/utils/TriplanarTexturesNode.js +51 -0
- package/examples/jsm/postprocessing/AfterimagePass.js +17 -4
- package/examples/jsm/postprocessing/BloomPass.js +22 -3
- package/examples/jsm/postprocessing/BokehPass.js +18 -4
- package/examples/jsm/postprocessing/CubeTexturePass.js +12 -5
- package/examples/jsm/postprocessing/DotScreenPass.js +8 -0
- package/examples/jsm/postprocessing/EffectComposer.js +9 -0
- package/examples/jsm/postprocessing/FilmPass.js +8 -0
- package/examples/jsm/postprocessing/GlitchPass.js +13 -1
- package/examples/jsm/postprocessing/HalftonePass.js +8 -0
- package/examples/jsm/postprocessing/OutlinePass.js +10 -0
- package/examples/jsm/postprocessing/Pass.js +2 -0
- package/examples/jsm/postprocessing/RenderPixelatedPass.js +234 -0
- package/examples/jsm/postprocessing/SAOPass.js +20 -0
- package/examples/jsm/postprocessing/SMAAPass.js +16 -0
- package/examples/jsm/postprocessing/SSAARenderPass.js +4 -0
- package/examples/jsm/postprocessing/SavePass.js +17 -1
- package/examples/jsm/postprocessing/ShaderPass.js +8 -0
- package/examples/jsm/postprocessing/TAARenderPass.js +9 -0
- package/examples/jsm/postprocessing/TexturePass.js +8 -0
- package/examples/jsm/postprocessing/UnrealBloomPass.js +16 -0
- package/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.js +39 -16
- package/examples/jsm/renderers/webgpu/WebGPUAnimation.js +58 -0
- package/examples/jsm/renderers/webgpu/WebGPUAttributes.js +63 -5
- package/examples/jsm/renderers/webgpu/WebGPUBackground.js +36 -7
- package/examples/jsm/renderers/webgpu/WebGPURenderer.js +47 -12
- package/examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js +35 -5
- package/examples/jsm/shaders/MMDToonShader.js +0 -2
- package/examples/jsm/shaders/VelocityShader.js +128 -0
- package/examples/jsm/utils/BufferGeometryUtils.js +130 -6
- package/examples/jsm/utils/SceneUtils.js +129 -4
- package/examples/jsm/utils/TextureUtils.js +85 -0
- package/examples/jsm/webxr/OculusHandModel.js +1 -1
- package/examples/jsm/webxr/XRHandMeshModel.js +6 -3
- package/package.json +11 -12
- package/src/Three.js +1 -0
- package/src/audio/AudioContext.js +5 -5
- package/src/cameras/CubeCamera.js +14 -14
- package/src/constants.js +1 -1
- package/src/core/InstancedBufferGeometry.js +1 -7
- package/src/extras/Earcut.js +67 -67
- package/src/helpers/DirectionalLightHelper.js +5 -1
- package/src/helpers/HemisphereLightHelper.js +4 -1
- package/src/helpers/PointLightHelper.js +2 -1
- package/src/helpers/SpotLightHelper.js +4 -2
- package/src/lights/PointLight.js +2 -2
- package/src/lights/SpotLight.js +2 -2
- package/src/loaders/FileLoader.js +4 -1
- package/src/loaders/ObjectLoader.js +5 -1
- package/src/materials/Material.js +1 -1
- package/src/math/Color.js +5 -5
- package/src/math/Matrix3.js +53 -18
- package/src/math/Ray.js +2 -5
- package/src/math/Sphere.js +19 -26
- package/src/objects/InstancedMesh.js +7 -0
- package/src/objects/LOD.js +25 -6
- package/src/renderers/WebGL3DRenderTarget.js +1 -1
- package/src/renderers/WebGLArrayRenderTarget.js +1 -1
- package/src/renderers/WebGLCubeRenderTarget.js +1 -1
- package/src/renderers/WebGLMultipleRenderTargets.js +1 -1
- package/src/renderers/WebGLRenderTarget.js +1 -1
- package/src/renderers/WebGLRenderer.js +36 -62
- package/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js +0 -4
- package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +0 -1
- package/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.js +0 -2
- package/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.js +0 -2
- package/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.js +0 -2
- package/src/renderers/shaders/ShaderChunk/packing.glsl.js +8 -0
- package/src/renderers/shaders/ShaderChunk.js +3 -0
- package/src/renderers/shaders/ShaderLib/background.glsl.js +7 -2
- package/src/renderers/shaders/ShaderLib/backgroundCube.glsl.js +62 -0
- package/src/renderers/shaders/ShaderLib/cube.glsl.js +4 -6
- package/src/renderers/shaders/ShaderLib.js +20 -6
- package/src/renderers/shaders/UniformsLib.js +1 -1
- package/src/renderers/shaders/UniformsUtils.js +15 -0
- package/src/renderers/webgl/WebGLAttributes.js +2 -0
- package/src/renderers/webgl/WebGLBackground.js +15 -7
- package/src/renderers/webgl/WebGLCubeUVMaps.js +1 -1
- package/src/renderers/webgl/WebGLLights.js +0 -4
- package/src/renderers/webgl/WebGLMaterials.js +2 -1
- package/src/renderers/webgl/WebGLShadowMap.js +3 -1
- package/src/renderers/webgl/WebGLState.js +31 -1
- package/src/renderers/webgl/WebGLTextures.js +71 -18
- package/src/renderers/webgl/WebGLUniforms.js +116 -20
- package/src/renderers/webgl/WebGLUtils.js +1 -1
- package/src/renderers/webxr/WebXRController.js +46 -13
- package/src/renderers/webxr/WebXRManager.js +85 -3
- package/src/scenes/Scene.js +8 -0
- package/src/textures/CompressedArrayTexture.js +18 -0
- package/examples/js/libs/lottie_canvas.js +0 -12751
- package/examples/js/shaders/PixelShader.js +0 -51
- package/examples/jsm/shaders/PixelShader.js +0 -44
package/build/three.module.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2010-2022 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
const REVISION = '
|
|
6
|
+
const REVISION = '147dev';
|
|
7
7
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
8
8
|
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
9
9
|
const CullFaceNone = 0;
|
|
@@ -1287,12 +1287,11 @@ class Matrix3 {
|
|
|
1287
1287
|
|
|
1288
1288
|
}
|
|
1289
1289
|
|
|
1290
|
-
|
|
1290
|
+
//
|
|
1291
1291
|
|
|
1292
|
-
|
|
1292
|
+
scale( sx, sy ) {
|
|
1293
1293
|
|
|
1294
|
-
|
|
1295
|
-
te[ 1 ] *= sy; te[ 4 ] *= sy; te[ 7 ] *= sy;
|
|
1294
|
+
this.premultiply( _m3.makeScale( sx, sy ) );
|
|
1296
1295
|
|
|
1297
1296
|
return this;
|
|
1298
1297
|
|
|
@@ -1300,37 +1299,71 @@ class Matrix3 {
|
|
|
1300
1299
|
|
|
1301
1300
|
rotate( theta ) {
|
|
1302
1301
|
|
|
1302
|
+
this.premultiply( _m3.makeRotation( - theta ) );
|
|
1303
|
+
|
|
1304
|
+
return this;
|
|
1305
|
+
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
translate( tx, ty ) {
|
|
1309
|
+
|
|
1310
|
+
this.premultiply( _m3.makeTranslation( tx, ty ) );
|
|
1311
|
+
|
|
1312
|
+
return this;
|
|
1313
|
+
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// for 2D Transforms
|
|
1317
|
+
|
|
1318
|
+
makeTranslation( x, y ) {
|
|
1319
|
+
|
|
1320
|
+
this.set(
|
|
1321
|
+
|
|
1322
|
+
1, 0, x,
|
|
1323
|
+
0, 1, y,
|
|
1324
|
+
0, 0, 1
|
|
1325
|
+
|
|
1326
|
+
);
|
|
1327
|
+
|
|
1328
|
+
return this;
|
|
1329
|
+
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
makeRotation( theta ) {
|
|
1333
|
+
|
|
1334
|
+
// counterclockwise
|
|
1335
|
+
|
|
1303
1336
|
const c = Math.cos( theta );
|
|
1304
1337
|
const s = Math.sin( theta );
|
|
1305
1338
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
const a11 = te[ 0 ], a12 = te[ 3 ], a13 = te[ 6 ];
|
|
1309
|
-
const a21 = te[ 1 ], a22 = te[ 4 ], a23 = te[ 7 ];
|
|
1339
|
+
this.set(
|
|
1310
1340
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1341
|
+
c, - s, 0,
|
|
1342
|
+
s, c, 0,
|
|
1343
|
+
0, 0, 1
|
|
1314
1344
|
|
|
1315
|
-
|
|
1316
|
-
te[ 4 ] = - s * a12 + c * a22;
|
|
1317
|
-
te[ 7 ] = - s * a13 + c * a23;
|
|
1345
|
+
);
|
|
1318
1346
|
|
|
1319
1347
|
return this;
|
|
1320
1348
|
|
|
1321
1349
|
}
|
|
1322
1350
|
|
|
1323
|
-
|
|
1351
|
+
makeScale( x, y ) {
|
|
1324
1352
|
|
|
1325
|
-
|
|
1353
|
+
this.set(
|
|
1326
1354
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1355
|
+
x, 0, 0,
|
|
1356
|
+
0, y, 0,
|
|
1357
|
+
0, 0, 1
|
|
1358
|
+
|
|
1359
|
+
);
|
|
1329
1360
|
|
|
1330
1361
|
return this;
|
|
1331
1362
|
|
|
1332
1363
|
}
|
|
1333
1364
|
|
|
1365
|
+
//
|
|
1366
|
+
|
|
1334
1367
|
equals( matrix ) {
|
|
1335
1368
|
|
|
1336
1369
|
const te = this.elements;
|
|
@@ -1386,6 +1419,8 @@ class Matrix3 {
|
|
|
1386
1419
|
|
|
1387
1420
|
}
|
|
1388
1421
|
|
|
1422
|
+
const _m3 = /*@__PURE__*/ new Matrix3();
|
|
1423
|
+
|
|
1389
1424
|
function arrayNeedsUint32( array ) {
|
|
1390
1425
|
|
|
1391
1426
|
// assumes larger values usually on last
|
|
@@ -1522,7 +1557,7 @@ const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua'
|
|
|
1522
1557
|
'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,
|
|
1523
1558
|
'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 };
|
|
1524
1559
|
|
|
1525
|
-
const _rgb = { r: 0, g: 0, b: 0 };
|
|
1560
|
+
const _rgb$1 = { r: 0, g: 0, b: 0 };
|
|
1526
1561
|
const _hslA = { h: 0, s: 0, l: 0 };
|
|
1527
1562
|
const _hslB = { h: 0, s: 0, l: 0 };
|
|
1528
1563
|
|
|
@@ -1612,7 +1647,7 @@ class Color {
|
|
|
1612
1647
|
|
|
1613
1648
|
}
|
|
1614
1649
|
|
|
1615
|
-
setRGB( r, g, b, colorSpace =
|
|
1650
|
+
setRGB( r, g, b, colorSpace = ColorManagement.workingColorSpace ) {
|
|
1616
1651
|
|
|
1617
1652
|
this.r = r;
|
|
1618
1653
|
this.g = g;
|
|
@@ -1624,7 +1659,7 @@ class Color {
|
|
|
1624
1659
|
|
|
1625
1660
|
}
|
|
1626
1661
|
|
|
1627
|
-
setHSL( h, s, l, colorSpace =
|
|
1662
|
+
setHSL( h, s, l, colorSpace = ColorManagement.workingColorSpace ) {
|
|
1628
1663
|
|
|
1629
1664
|
// h,s,l ranges are in 0.0 - 1.0
|
|
1630
1665
|
h = euclideanModulo( h, 1 );
|
|
@@ -1852,9 +1887,9 @@ class Color {
|
|
|
1852
1887
|
|
|
1853
1888
|
getHex( colorSpace = SRGBColorSpace ) {
|
|
1854
1889
|
|
|
1855
|
-
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb ), colorSpace );
|
|
1890
|
+
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb$1 ), colorSpace );
|
|
1856
1891
|
|
|
1857
|
-
return clamp( _rgb.r * 255, 0, 255 ) << 16 ^ clamp( _rgb.g * 255, 0, 255 ) << 8 ^ clamp( _rgb.b * 255, 0, 255 ) << 0;
|
|
1892
|
+
return clamp( _rgb$1.r * 255, 0, 255 ) << 16 ^ clamp( _rgb$1.g * 255, 0, 255 ) << 8 ^ clamp( _rgb$1.b * 255, 0, 255 ) << 0;
|
|
1858
1893
|
|
|
1859
1894
|
}
|
|
1860
1895
|
|
|
@@ -1864,13 +1899,13 @@ class Color {
|
|
|
1864
1899
|
|
|
1865
1900
|
}
|
|
1866
1901
|
|
|
1867
|
-
getHSL( target, colorSpace =
|
|
1902
|
+
getHSL( target, colorSpace = ColorManagement.workingColorSpace ) {
|
|
1868
1903
|
|
|
1869
1904
|
// h,s,l ranges are in 0.0 - 1.0
|
|
1870
1905
|
|
|
1871
|
-
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb ), colorSpace );
|
|
1906
|
+
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb$1 ), colorSpace );
|
|
1872
1907
|
|
|
1873
|
-
const r = _rgb.r, g = _rgb.g, b = _rgb.b;
|
|
1908
|
+
const r = _rgb$1.r, g = _rgb$1.g, b = _rgb$1.b;
|
|
1874
1909
|
|
|
1875
1910
|
const max = Math.max( r, g, b );
|
|
1876
1911
|
const min = Math.min( r, g, b );
|
|
@@ -1909,13 +1944,13 @@ class Color {
|
|
|
1909
1944
|
|
|
1910
1945
|
}
|
|
1911
1946
|
|
|
1912
|
-
getRGB( target, colorSpace =
|
|
1947
|
+
getRGB( target, colorSpace = ColorManagement.workingColorSpace ) {
|
|
1913
1948
|
|
|
1914
|
-
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb ), colorSpace );
|
|
1949
|
+
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb$1 ), colorSpace );
|
|
1915
1950
|
|
|
1916
|
-
target.r = _rgb.r;
|
|
1917
|
-
target.g = _rgb.g;
|
|
1918
|
-
target.b = _rgb.b;
|
|
1951
|
+
target.r = _rgb$1.r;
|
|
1952
|
+
target.g = _rgb$1.g;
|
|
1953
|
+
target.b = _rgb$1.b;
|
|
1919
1954
|
|
|
1920
1955
|
return target;
|
|
1921
1956
|
|
|
@@ -1923,16 +1958,16 @@ class Color {
|
|
|
1923
1958
|
|
|
1924
1959
|
getStyle( colorSpace = SRGBColorSpace ) {
|
|
1925
1960
|
|
|
1926
|
-
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb ), colorSpace );
|
|
1961
|
+
ColorManagement.fromWorkingColorSpace( toComponents( this, _rgb$1 ), colorSpace );
|
|
1927
1962
|
|
|
1928
1963
|
if ( colorSpace !== SRGBColorSpace ) {
|
|
1929
1964
|
|
|
1930
1965
|
// Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/).
|
|
1931
|
-
return `color(${ colorSpace } ${ _rgb.r } ${ _rgb.g } ${ _rgb.b })`;
|
|
1966
|
+
return `color(${ colorSpace } ${ _rgb$1.r } ${ _rgb$1.g } ${ _rgb$1.b })`;
|
|
1932
1967
|
|
|
1933
1968
|
}
|
|
1934
1969
|
|
|
1935
|
-
return `rgb(${( _rgb.r * 255 ) | 0},${( _rgb.g * 255 ) | 0},${( _rgb.b * 255 ) | 0})`;
|
|
1970
|
+
return `rgb(${( _rgb$1.r * 255 ) | 0},${( _rgb$1.g * 255 ) | 0},${( _rgb$1.b * 255 ) | 0})`;
|
|
1936
1971
|
|
|
1937
1972
|
}
|
|
1938
1973
|
|
|
@@ -3281,7 +3316,7 @@ class Vector4 {
|
|
|
3281
3316
|
*/
|
|
3282
3317
|
class WebGLRenderTarget extends EventDispatcher {
|
|
3283
3318
|
|
|
3284
|
-
constructor( width, height, options = {} ) {
|
|
3319
|
+
constructor( width = 1, height = 1, options = {} ) {
|
|
3285
3320
|
|
|
3286
3321
|
super();
|
|
3287
3322
|
|
|
@@ -3402,7 +3437,7 @@ class DataArrayTexture extends Texture {
|
|
|
3402
3437
|
|
|
3403
3438
|
class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
3404
3439
|
|
|
3405
|
-
constructor( width, height, depth ) {
|
|
3440
|
+
constructor( width = 1, height = 1, depth = 1 ) {
|
|
3406
3441
|
|
|
3407
3442
|
super( width, height );
|
|
3408
3443
|
|
|
@@ -3451,7 +3486,7 @@ class Data3DTexture extends Texture {
|
|
|
3451
3486
|
|
|
3452
3487
|
class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
3453
3488
|
|
|
3454
|
-
constructor( width, height, depth ) {
|
|
3489
|
+
constructor( width = 1, height = 1, depth = 1 ) {
|
|
3455
3490
|
|
|
3456
3491
|
super( width, height );
|
|
3457
3492
|
|
|
@@ -3469,7 +3504,7 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
|
3469
3504
|
|
|
3470
3505
|
class WebGLMultipleRenderTargets extends WebGLRenderTarget {
|
|
3471
3506
|
|
|
3472
|
-
constructor( width, height, count, options = {} ) {
|
|
3507
|
+
constructor( width = 1, height = 1, count = 1, options = {} ) {
|
|
3473
3508
|
|
|
3474
3509
|
super( width, height, options );
|
|
3475
3510
|
|
|
@@ -5282,12 +5317,12 @@ class Box3 {
|
|
|
5282
5317
|
// translate triangle to aabb origin
|
|
5283
5318
|
_v0$2.subVectors( triangle.a, _center );
|
|
5284
5319
|
_v1$7.subVectors( triangle.b, _center );
|
|
5285
|
-
_v2$
|
|
5320
|
+
_v2$4.subVectors( triangle.c, _center );
|
|
5286
5321
|
|
|
5287
5322
|
// compute edge vectors for triangle
|
|
5288
5323
|
_f0.subVectors( _v1$7, _v0$2 );
|
|
5289
|
-
_f1.subVectors( _v2$
|
|
5290
|
-
_f2.subVectors( _v0$2, _v2$
|
|
5324
|
+
_f1.subVectors( _v2$4, _v1$7 );
|
|
5325
|
+
_f2.subVectors( _v0$2, _v2$4 );
|
|
5291
5326
|
|
|
5292
5327
|
// test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb
|
|
5293
5328
|
// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation
|
|
@@ -5297,7 +5332,7 @@ class Box3 {
|
|
|
5297
5332
|
_f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x,
|
|
5298
5333
|
- _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0
|
|
5299
5334
|
];
|
|
5300
|
-
if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$
|
|
5335
|
+
if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {
|
|
5301
5336
|
|
|
5302
5337
|
return false;
|
|
5303
5338
|
|
|
@@ -5305,7 +5340,7 @@ class Box3 {
|
|
|
5305
5340
|
|
|
5306
5341
|
// test 3 face normals from the aabb
|
|
5307
5342
|
axes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ];
|
|
5308
|
-
if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$
|
|
5343
|
+
if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {
|
|
5309
5344
|
|
|
5310
5345
|
return false;
|
|
5311
5346
|
|
|
@@ -5316,7 +5351,7 @@ class Box3 {
|
|
|
5316
5351
|
_triangleNormal.crossVectors( _f0, _f1 );
|
|
5317
5352
|
axes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ];
|
|
5318
5353
|
|
|
5319
|
-
return satForAxes( axes, _v0$2, _v1$7, _v2$
|
|
5354
|
+
return satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents );
|
|
5320
5355
|
|
|
5321
5356
|
}
|
|
5322
5357
|
|
|
@@ -5422,7 +5457,7 @@ const _box$3 = /*@__PURE__*/ new Box3();
|
|
|
5422
5457
|
|
|
5423
5458
|
const _v0$2 = /*@__PURE__*/ new Vector3();
|
|
5424
5459
|
const _v1$7 = /*@__PURE__*/ new Vector3();
|
|
5425
|
-
const _v2$
|
|
5460
|
+
const _v2$4 = /*@__PURE__*/ new Vector3();
|
|
5426
5461
|
|
|
5427
5462
|
// triangle edge vectors
|
|
5428
5463
|
|
|
@@ -5463,8 +5498,7 @@ function satForAxes( axes, v0, v1, v2, extents ) {
|
|
|
5463
5498
|
|
|
5464
5499
|
const _box$2 = /*@__PURE__*/ new Box3();
|
|
5465
5500
|
const _v1$6 = /*@__PURE__*/ new Vector3();
|
|
5466
|
-
const
|
|
5467
|
-
const _toPoint = /*@__PURE__*/ new Vector3();
|
|
5501
|
+
const _v2$3 = /*@__PURE__*/ new Vector3();
|
|
5468
5502
|
|
|
5469
5503
|
class Sphere {
|
|
5470
5504
|
|
|
@@ -5624,29 +5658,28 @@ class Sphere {
|
|
|
5624
5658
|
if ( this.isEmpty() ) {
|
|
5625
5659
|
|
|
5626
5660
|
this.center.copy( point );
|
|
5661
|
+
|
|
5627
5662
|
this.radius = 0;
|
|
5628
5663
|
|
|
5629
5664
|
return this;
|
|
5630
5665
|
|
|
5631
5666
|
}
|
|
5632
5667
|
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
_toPoint.subVectors( point, this.center );
|
|
5668
|
+
_v1$6.subVectors( point, this.center );
|
|
5636
5669
|
|
|
5637
|
-
const lengthSq =
|
|
5670
|
+
const lengthSq = _v1$6.lengthSq();
|
|
5638
5671
|
|
|
5639
5672
|
if ( lengthSq > ( this.radius * this.radius ) ) {
|
|
5640
5673
|
|
|
5674
|
+
// calculate the minimal sphere
|
|
5675
|
+
|
|
5641
5676
|
const length = Math.sqrt( lengthSq );
|
|
5642
|
-
const missingRadiusHalf = ( length - this.radius ) * 0.5;
|
|
5643
5677
|
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5678
|
+
const delta = ( length - this.radius ) * 0.5;
|
|
5679
|
+
|
|
5680
|
+
this.center.addScaledVector( _v1$6, delta / length );
|
|
5647
5681
|
|
|
5648
|
-
this.
|
|
5649
|
-
this.radius += missingRadiusHalf;
|
|
5682
|
+
this.radius += delta;
|
|
5650
5683
|
|
|
5651
5684
|
}
|
|
5652
5685
|
|
|
@@ -5656,12 +5689,13 @@ class Sphere {
|
|
|
5656
5689
|
|
|
5657
5690
|
union( sphere ) {
|
|
5658
5691
|
|
|
5659
|
-
// handle empty sphere cases
|
|
5660
5692
|
if ( sphere.isEmpty() ) {
|
|
5661
5693
|
|
|
5662
5694
|
return this;
|
|
5663
5695
|
|
|
5664
|
-
}
|
|
5696
|
+
}
|
|
5697
|
+
|
|
5698
|
+
if ( this.isEmpty() ) {
|
|
5665
5699
|
|
|
5666
5700
|
this.copy( sphere );
|
|
5667
5701
|
|
|
@@ -5669,26 +5703,20 @@ class Sphere {
|
|
|
5669
5703
|
|
|
5670
5704
|
}
|
|
5671
5705
|
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
// To enclose another sphere into this sphere, we only need to enclose two points:
|
|
5675
|
-
// 1) Enclose the farthest point on the other sphere into this sphere.
|
|
5676
|
-
// 2) Enclose the opposite point of the farthest point into this sphere.
|
|
5706
|
+
if ( this.center.equals( sphere.center ) === true ) {
|
|
5677
5707
|
|
|
5678
|
-
|
|
5708
|
+
this.radius = Math.max( this.radius, sphere.radius );
|
|
5679
5709
|
|
|
5680
|
-
|
|
5710
|
+
} else {
|
|
5681
5711
|
|
|
5712
|
+
_v2$3.subVectors( sphere.center, this.center ).setLength( sphere.radius );
|
|
5682
5713
|
|
|
5683
|
-
|
|
5714
|
+
this.expandByPoint( _v1$6.copy( sphere.center ).add( _v2$3 ) );
|
|
5684
5715
|
|
|
5685
|
-
|
|
5716
|
+
this.expandByPoint( _v1$6.copy( sphere.center ).sub( _v2$3 ) );
|
|
5686
5717
|
|
|
5687
5718
|
}
|
|
5688
5719
|
|
|
5689
|
-
this.expandByPoint( _v1$6.copy( sphere.center ).add( _toFarthestPoint ) );
|
|
5690
|
-
this.expandByPoint( _v1$6.copy( sphere.center ).sub( _toFarthestPoint ) );
|
|
5691
|
-
|
|
5692
5720
|
return this;
|
|
5693
5721
|
|
|
5694
5722
|
}
|
|
@@ -6063,12 +6091,9 @@ class Ray {
|
|
|
6063
6091
|
|
|
6064
6092
|
if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;
|
|
6065
6093
|
|
|
6066
|
-
|
|
6067
|
-
// (result of 0 * Infinity). x !== x returns true if x is NaN
|
|
6068
|
-
|
|
6069
|
-
if ( tymin > tmin || tmin !== tmin ) tmin = tymin;
|
|
6094
|
+
if ( tymin > tmin || isNaN( tmin ) ) tmin = tymin;
|
|
6070
6095
|
|
|
6071
|
-
if ( tymax < tmax ||
|
|
6096
|
+
if ( tymax < tmax || isNaN( tmax ) ) tmax = tymax;
|
|
6072
6097
|
|
|
6073
6098
|
if ( invdirz >= 0 ) {
|
|
6074
6099
|
|
|
@@ -8962,7 +8987,7 @@ class Material extends EventDispatcher {
|
|
|
8962
8987
|
if ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;
|
|
8963
8988
|
if ( this.thickness !== undefined ) data.thickness = this.thickness;
|
|
8964
8989
|
if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;
|
|
8965
|
-
if ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance;
|
|
8990
|
+
if ( this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity ) data.attenuationDistance = this.attenuationDistance;
|
|
8966
8991
|
if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();
|
|
8967
8992
|
|
|
8968
8993
|
if ( this.size !== undefined ) data.size = this.size;
|
|
@@ -11405,6 +11430,19 @@ function cloneUniformsGroups( src ) {
|
|
|
11405
11430
|
|
|
11406
11431
|
}
|
|
11407
11432
|
|
|
11433
|
+
function getUnlitUniformColorSpace( renderer ) {
|
|
11434
|
+
|
|
11435
|
+
if ( renderer.getRenderTarget() === null ) {
|
|
11436
|
+
|
|
11437
|
+
// https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398
|
|
11438
|
+
return renderer.outputEncoding === sRGBEncoding ? SRGBColorSpace : LinearSRGBColorSpace;
|
|
11439
|
+
|
|
11440
|
+
}
|
|
11441
|
+
|
|
11442
|
+
return LinearSRGBColorSpace;
|
|
11443
|
+
|
|
11444
|
+
}
|
|
11445
|
+
|
|
11408
11446
|
// Legacy
|
|
11409
11447
|
|
|
11410
11448
|
const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };
|
|
@@ -11881,7 +11919,8 @@ class PerspectiveCamera extends Camera {
|
|
|
11881
11919
|
|
|
11882
11920
|
}
|
|
11883
11921
|
|
|
11884
|
-
const fov = 90
|
|
11922
|
+
const fov = - 90; // negative fov is not an error
|
|
11923
|
+
const aspect = 1;
|
|
11885
11924
|
|
|
11886
11925
|
class CubeCamera extends Object3D {
|
|
11887
11926
|
|
|
@@ -11895,38 +11934,38 @@ class CubeCamera extends Object3D {
|
|
|
11895
11934
|
|
|
11896
11935
|
const cameraPX = new PerspectiveCamera( fov, aspect, near, far );
|
|
11897
11936
|
cameraPX.layers = this.layers;
|
|
11898
|
-
cameraPX.up.set( 0,
|
|
11899
|
-
cameraPX.lookAt(
|
|
11937
|
+
cameraPX.up.set( 0, 1, 0 );
|
|
11938
|
+
cameraPX.lookAt( 1, 0, 0 );
|
|
11900
11939
|
this.add( cameraPX );
|
|
11901
11940
|
|
|
11902
11941
|
const cameraNX = new PerspectiveCamera( fov, aspect, near, far );
|
|
11903
11942
|
cameraNX.layers = this.layers;
|
|
11904
|
-
cameraNX.up.set( 0,
|
|
11905
|
-
cameraNX.lookAt(
|
|
11943
|
+
cameraNX.up.set( 0, 1, 0 );
|
|
11944
|
+
cameraNX.lookAt( - 1, 0, 0 );
|
|
11906
11945
|
this.add( cameraNX );
|
|
11907
11946
|
|
|
11908
11947
|
const cameraPY = new PerspectiveCamera( fov, aspect, near, far );
|
|
11909
11948
|
cameraPY.layers = this.layers;
|
|
11910
|
-
cameraPY.up.set( 0, 0, 1 );
|
|
11911
|
-
cameraPY.lookAt(
|
|
11949
|
+
cameraPY.up.set( 0, 0, - 1 );
|
|
11950
|
+
cameraPY.lookAt( 0, 1, 0 );
|
|
11912
11951
|
this.add( cameraPY );
|
|
11913
11952
|
|
|
11914
11953
|
const cameraNY = new PerspectiveCamera( fov, aspect, near, far );
|
|
11915
11954
|
cameraNY.layers = this.layers;
|
|
11916
|
-
cameraNY.up.set( 0, 0,
|
|
11917
|
-
cameraNY.lookAt(
|
|
11955
|
+
cameraNY.up.set( 0, 0, 1 );
|
|
11956
|
+
cameraNY.lookAt( 0, - 1, 0 );
|
|
11918
11957
|
this.add( cameraNY );
|
|
11919
11958
|
|
|
11920
11959
|
const cameraPZ = new PerspectiveCamera( fov, aspect, near, far );
|
|
11921
11960
|
cameraPZ.layers = this.layers;
|
|
11922
|
-
cameraPZ.up.set( 0,
|
|
11923
|
-
cameraPZ.lookAt(
|
|
11961
|
+
cameraPZ.up.set( 0, 1, 0 );
|
|
11962
|
+
cameraPZ.lookAt( 0, 0, 1 );
|
|
11924
11963
|
this.add( cameraPZ );
|
|
11925
11964
|
|
|
11926
11965
|
const cameraNZ = new PerspectiveCamera( fov, aspect, near, far );
|
|
11927
11966
|
cameraNZ.layers = this.layers;
|
|
11928
|
-
cameraNZ.up.set( 0,
|
|
11929
|
-
cameraNZ.lookAt(
|
|
11967
|
+
cameraNZ.up.set( 0, 1, 0 );
|
|
11968
|
+
cameraNZ.lookAt( 0, 0, - 1 );
|
|
11930
11969
|
this.add( cameraNZ );
|
|
11931
11970
|
|
|
11932
11971
|
}
|
|
@@ -12013,7 +12052,7 @@ class CubeTexture extends Texture {
|
|
|
12013
12052
|
|
|
12014
12053
|
class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
12015
12054
|
|
|
12016
|
-
constructor( size, options = {} ) {
|
|
12055
|
+
constructor( size = 1, options = {} ) {
|
|
12017
12056
|
|
|
12018
12057
|
super( size, size, options );
|
|
12019
12058
|
|
|
@@ -12670,6 +12709,8 @@ function WebGLAttributes( gl, capabilities ) {
|
|
|
12670
12709
|
|
|
12671
12710
|
}
|
|
12672
12711
|
|
|
12712
|
+
attribute.onUploadCallback();
|
|
12713
|
+
|
|
12673
12714
|
}
|
|
12674
12715
|
|
|
12675
12716
|
//
|
|
@@ -12887,7 +12928,7 @@ var encodings_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );";
|
|
|
12887
12928
|
|
|
12888
12929
|
var encodings_pars_fragment = "vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}";
|
|
12889
12930
|
|
|
12890
|
-
var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#
|
|
12931
|
+
var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";
|
|
12891
12932
|
|
|
12892
12933
|
var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif";
|
|
12893
12934
|
|
|
@@ -12913,7 +12954,7 @@ var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;
|
|
|
12913
12954
|
|
|
12914
12955
|
var lights_lambert_fragment = "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";
|
|
12915
12956
|
|
|
12916
|
-
var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert
|
|
12957
|
+
var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";
|
|
12917
12958
|
|
|
12918
12959
|
var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";
|
|
12919
12960
|
|
|
@@ -12921,11 +12962,11 @@ var envmap_physical_pars_fragment = "#if defined( USE_ENVMAP )\n\tvec3 getIBLIrr
|
|
|
12921
12962
|
|
|
12922
12963
|
var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";
|
|
12923
12964
|
|
|
12924
|
-
var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon
|
|
12965
|
+
var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";
|
|
12925
12966
|
|
|
12926
12967
|
var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";
|
|
12927
12968
|
|
|
12928
|
-
var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong
|
|
12969
|
+
var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";
|
|
12929
12970
|
|
|
12930
12971
|
var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif";
|
|
12931
12972
|
|
|
@@ -12987,7 +13028,7 @@ var iridescence_pars_fragment = "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D
|
|
|
12987
13028
|
|
|
12988
13029
|
var output_fragment = "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";
|
|
12989
13030
|
|
|
12990
|
-
var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}";
|
|
13031
|
+
var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}";
|
|
12991
13032
|
|
|
12992
13033
|
var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";
|
|
12993
13034
|
|
|
@@ -13043,13 +13084,17 @@ var uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 =
|
|
|
13043
13084
|
|
|
13044
13085
|
var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";
|
|
13045
13086
|
|
|
13046
|
-
const vertex$
|
|
13087
|
+
const vertex$h = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";
|
|
13088
|
+
|
|
13089
|
+
const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}";
|
|
13047
13090
|
|
|
13048
|
-
const
|
|
13091
|
+
const vertex$g = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";
|
|
13092
|
+
|
|
13093
|
+
const fragment$g = "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}";
|
|
13049
13094
|
|
|
13050
13095
|
const vertex$f = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";
|
|
13051
13096
|
|
|
13052
|
-
const fragment$f = "
|
|
13097
|
+
const fragment$f = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}";
|
|
13053
13098
|
|
|
13054
13099
|
const vertex$e = "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";
|
|
13055
13100
|
|
|
@@ -13215,8 +13260,10 @@ const ShaderChunk = {
|
|
|
13215
13260
|
uv2_vertex: uv2_vertex,
|
|
13216
13261
|
worldpos_vertex: worldpos_vertex,
|
|
13217
13262
|
|
|
13218
|
-
background_vert: vertex$
|
|
13219
|
-
background_frag: fragment$
|
|
13263
|
+
background_vert: vertex$h,
|
|
13264
|
+
background_frag: fragment$h,
|
|
13265
|
+
backgroundCube_vert: vertex$g,
|
|
13266
|
+
backgroundCube_frag: fragment$g,
|
|
13220
13267
|
cube_vert: vertex$f,
|
|
13221
13268
|
cube_frag: fragment$f,
|
|
13222
13269
|
depth_vert: vertex$e,
|
|
@@ -13281,7 +13328,7 @@ const UniformsLib = {
|
|
|
13281
13328
|
flipEnvMap: { value: - 1 },
|
|
13282
13329
|
reflectivity: { value: 1.0 }, // basic, lambert, phong
|
|
13283
13330
|
ior: { value: 1.5 }, // physical
|
|
13284
|
-
refractionRatio: { value: 0.98 } // basic, lambert, phong
|
|
13331
|
+
refractionRatio: { value: 0.98 }, // basic, lambert, phong
|
|
13285
13332
|
|
|
13286
13333
|
},
|
|
13287
13334
|
|
|
@@ -13674,6 +13721,7 @@ const ShaderLib = {
|
|
|
13674
13721
|
uniforms: {
|
|
13675
13722
|
uvTransform: { value: /*@__PURE__*/ new Matrix3() },
|
|
13676
13723
|
t2D: { value: null },
|
|
13724
|
+
backgroundIntensity: { value: 1 }
|
|
13677
13725
|
},
|
|
13678
13726
|
|
|
13679
13727
|
vertexShader: ShaderChunk.background_vert,
|
|
@@ -13681,14 +13729,27 @@ const ShaderLib = {
|
|
|
13681
13729
|
|
|
13682
13730
|
},
|
|
13683
13731
|
|
|
13732
|
+
backgroundCube: {
|
|
13733
|
+
|
|
13734
|
+
uniforms: {
|
|
13735
|
+
envMap: { value: null },
|
|
13736
|
+
flipEnvMap: { value: - 1 },
|
|
13737
|
+
backgroundBlurriness: { value: 0 },
|
|
13738
|
+
backgroundIntensity: { value: 1 }
|
|
13739
|
+
},
|
|
13740
|
+
|
|
13741
|
+
vertexShader: ShaderChunk.backgroundCube_vert,
|
|
13742
|
+
fragmentShader: ShaderChunk.backgroundCube_frag
|
|
13743
|
+
|
|
13744
|
+
},
|
|
13745
|
+
|
|
13684
13746
|
cube: {
|
|
13685
13747
|
|
|
13686
|
-
uniforms:
|
|
13687
|
-
|
|
13688
|
-
{
|
|
13689
|
-
|
|
13690
|
-
|
|
13691
|
-
] ),
|
|
13748
|
+
uniforms: {
|
|
13749
|
+
tCube: { value: null },
|
|
13750
|
+
tFlip: { value: - 1 },
|
|
13751
|
+
opacity: { value: 1.0 }
|
|
13752
|
+
},
|
|
13692
13753
|
|
|
13693
13754
|
vertexShader: ShaderChunk.cube_vert,
|
|
13694
13755
|
fragmentShader: ShaderChunk.cube_frag
|
|
@@ -13783,7 +13844,9 @@ ShaderLib.physical = {
|
|
|
13783
13844
|
|
|
13784
13845
|
};
|
|
13785
13846
|
|
|
13786
|
-
|
|
13847
|
+
const _rgb = { r: 0, b: 0, g: 0 };
|
|
13848
|
+
|
|
13849
|
+
function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) {
|
|
13787
13850
|
|
|
13788
13851
|
const clearColor = new Color( 0x000000 );
|
|
13789
13852
|
let clearAlpha = alpha === true ? 0 : 1;
|
|
@@ -13802,7 +13865,8 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
|
|
|
13802
13865
|
|
|
13803
13866
|
if ( background && background.isTexture ) {
|
|
13804
13867
|
|
|
13805
|
-
|
|
13868
|
+
const usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background
|
|
13869
|
+
background = ( usePMREM ? cubeuvmaps : cubemaps ).get( background );
|
|
13806
13870
|
|
|
13807
13871
|
}
|
|
13808
13872
|
|
|
@@ -13843,9 +13907,9 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
|
|
|
13843
13907
|
new BoxGeometry( 1, 1, 1 ),
|
|
13844
13908
|
new ShaderMaterial( {
|
|
13845
13909
|
name: 'BackgroundCubeMaterial',
|
|
13846
|
-
uniforms: cloneUniforms( ShaderLib.
|
|
13847
|
-
vertexShader: ShaderLib.
|
|
13848
|
-
fragmentShader: ShaderLib.
|
|
13910
|
+
uniforms: cloneUniforms( ShaderLib.backgroundCube.uniforms ),
|
|
13911
|
+
vertexShader: ShaderLib.backgroundCube.vertexShader,
|
|
13912
|
+
fragmentShader: ShaderLib.backgroundCube.fragmentShader,
|
|
13849
13913
|
side: BackSide,
|
|
13850
13914
|
depthTest: false,
|
|
13851
13915
|
depthWrite: false,
|
|
@@ -13879,6 +13943,8 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
|
|
|
13879
13943
|
|
|
13880
13944
|
boxMesh.material.uniforms.envMap.value = background;
|
|
13881
13945
|
boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1;
|
|
13946
|
+
boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;
|
|
13947
|
+
boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;
|
|
13882
13948
|
|
|
13883
13949
|
if ( currentBackground !== background ||
|
|
13884
13950
|
currentBackgroundVersion !== background.version ||
|
|
@@ -13933,6 +13999,7 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
|
|
|
13933
13999
|
}
|
|
13934
14000
|
|
|
13935
14001
|
planeMesh.material.uniforms.t2D.value = background;
|
|
14002
|
+
planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;
|
|
13936
14003
|
|
|
13937
14004
|
if ( background.matrixAutoUpdate === true ) {
|
|
13938
14005
|
|
|
@@ -13965,7 +14032,9 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
|
|
|
13965
14032
|
|
|
13966
14033
|
function setClear( color, alpha ) {
|
|
13967
14034
|
|
|
13968
|
-
|
|
14035
|
+
color.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) );
|
|
14036
|
+
|
|
14037
|
+
state.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha );
|
|
13969
14038
|
|
|
13970
14039
|
}
|
|
13971
14040
|
|
|
@@ -16110,7 +16179,7 @@ function WebGLCubeUVMaps( renderer ) {
|
|
|
16110
16179
|
|
|
16111
16180
|
if ( ( isEquirectMap && image && image.height > 0 ) || ( isCubeMap && image && isCubeTextureComplete( image ) ) ) {
|
|
16112
16181
|
|
|
16113
|
-
|
|
16182
|
+
pmremGenerator = new PMREMGenerator( renderer );
|
|
16114
16183
|
|
|
16115
16184
|
const renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture ) : pmremGenerator.fromCubemap( texture );
|
|
16116
16185
|
cubeUVmaps.set( texture, renderTarget );
|
|
@@ -17337,17 +17406,32 @@ function setValueV1i( gl, v ) {
|
|
|
17337
17406
|
|
|
17338
17407
|
}
|
|
17339
17408
|
|
|
17340
|
-
// Single integer / boolean vector (from flat array)
|
|
17409
|
+
// Single integer / boolean vector (from flat array or THREE.VectorN)
|
|
17341
17410
|
|
|
17342
17411
|
function setValueV2i( gl, v ) {
|
|
17343
17412
|
|
|
17344
17413
|
const cache = this.cache;
|
|
17345
17414
|
|
|
17346
|
-
if (
|
|
17415
|
+
if ( v.x !== undefined ) {
|
|
17347
17416
|
|
|
17348
|
-
|
|
17417
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {
|
|
17349
17418
|
|
|
17350
|
-
|
|
17419
|
+
gl.uniform2i( this.addr, v.x, v.y );
|
|
17420
|
+
|
|
17421
|
+
cache[ 0 ] = v.x;
|
|
17422
|
+
cache[ 1 ] = v.y;
|
|
17423
|
+
|
|
17424
|
+
}
|
|
17425
|
+
|
|
17426
|
+
} else {
|
|
17427
|
+
|
|
17428
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17429
|
+
|
|
17430
|
+
gl.uniform2iv( this.addr, v );
|
|
17431
|
+
|
|
17432
|
+
copyArray( cache, v );
|
|
17433
|
+
|
|
17434
|
+
}
|
|
17351
17435
|
|
|
17352
17436
|
}
|
|
17353
17437
|
|
|
@@ -17355,11 +17439,27 @@ function setValueV3i( gl, v ) {
|
|
|
17355
17439
|
|
|
17356
17440
|
const cache = this.cache;
|
|
17357
17441
|
|
|
17358
|
-
if (
|
|
17442
|
+
if ( v.x !== undefined ) {
|
|
17359
17443
|
|
|
17360
|
-
|
|
17444
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {
|
|
17361
17445
|
|
|
17362
|
-
|
|
17446
|
+
gl.uniform3i( this.addr, v.x, v.y, v.z );
|
|
17447
|
+
|
|
17448
|
+
cache[ 0 ] = v.x;
|
|
17449
|
+
cache[ 1 ] = v.y;
|
|
17450
|
+
cache[ 2 ] = v.z;
|
|
17451
|
+
|
|
17452
|
+
}
|
|
17453
|
+
|
|
17454
|
+
} else {
|
|
17455
|
+
|
|
17456
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17457
|
+
|
|
17458
|
+
gl.uniform3iv( this.addr, v );
|
|
17459
|
+
|
|
17460
|
+
copyArray( cache, v );
|
|
17461
|
+
|
|
17462
|
+
}
|
|
17363
17463
|
|
|
17364
17464
|
}
|
|
17365
17465
|
|
|
@@ -17367,11 +17467,28 @@ function setValueV4i( gl, v ) {
|
|
|
17367
17467
|
|
|
17368
17468
|
const cache = this.cache;
|
|
17369
17469
|
|
|
17370
|
-
if (
|
|
17470
|
+
if ( v.x !== undefined ) {
|
|
17371
17471
|
|
|
17372
|
-
|
|
17472
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {
|
|
17473
|
+
|
|
17474
|
+
gl.uniform4i( this.addr, v.x, v.y, v.z, v.w );
|
|
17475
|
+
|
|
17476
|
+
cache[ 0 ] = v.x;
|
|
17477
|
+
cache[ 1 ] = v.y;
|
|
17478
|
+
cache[ 2 ] = v.z;
|
|
17479
|
+
cache[ 3 ] = v.w;
|
|
17480
|
+
|
|
17481
|
+
}
|
|
17482
|
+
|
|
17483
|
+
} else {
|
|
17484
|
+
|
|
17485
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17373
17486
|
|
|
17374
|
-
|
|
17487
|
+
gl.uniform4iv( this.addr, v );
|
|
17488
|
+
|
|
17489
|
+
copyArray( cache, v );
|
|
17490
|
+
|
|
17491
|
+
}
|
|
17375
17492
|
|
|
17376
17493
|
}
|
|
17377
17494
|
|
|
@@ -17389,17 +17506,32 @@ function setValueV1ui( gl, v ) {
|
|
|
17389
17506
|
|
|
17390
17507
|
}
|
|
17391
17508
|
|
|
17392
|
-
// Single unsigned integer vector (from flat array)
|
|
17509
|
+
// Single unsigned integer vector (from flat array or THREE.VectorN)
|
|
17393
17510
|
|
|
17394
17511
|
function setValueV2ui( gl, v ) {
|
|
17395
17512
|
|
|
17396
17513
|
const cache = this.cache;
|
|
17397
17514
|
|
|
17398
|
-
if (
|
|
17515
|
+
if ( v.x !== undefined ) {
|
|
17516
|
+
|
|
17517
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {
|
|
17399
17518
|
|
|
17400
|
-
|
|
17519
|
+
gl.uniform2ui( this.addr, v.x, v.y );
|
|
17401
17520
|
|
|
17402
|
-
|
|
17521
|
+
cache[ 0 ] = v.x;
|
|
17522
|
+
cache[ 1 ] = v.y;
|
|
17523
|
+
|
|
17524
|
+
}
|
|
17525
|
+
|
|
17526
|
+
} else {
|
|
17527
|
+
|
|
17528
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17529
|
+
|
|
17530
|
+
gl.uniform2uiv( this.addr, v );
|
|
17531
|
+
|
|
17532
|
+
copyArray( cache, v );
|
|
17533
|
+
|
|
17534
|
+
}
|
|
17403
17535
|
|
|
17404
17536
|
}
|
|
17405
17537
|
|
|
@@ -17407,11 +17539,27 @@ function setValueV3ui( gl, v ) {
|
|
|
17407
17539
|
|
|
17408
17540
|
const cache = this.cache;
|
|
17409
17541
|
|
|
17410
|
-
if (
|
|
17542
|
+
if ( v.x !== undefined ) {
|
|
17411
17543
|
|
|
17412
|
-
|
|
17544
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {
|
|
17545
|
+
|
|
17546
|
+
gl.uniform3ui( this.addr, v.x, v.y, v.z );
|
|
17547
|
+
|
|
17548
|
+
cache[ 0 ] = v.x;
|
|
17549
|
+
cache[ 1 ] = v.y;
|
|
17550
|
+
cache[ 2 ] = v.z;
|
|
17551
|
+
|
|
17552
|
+
}
|
|
17413
17553
|
|
|
17414
|
-
|
|
17554
|
+
} else {
|
|
17555
|
+
|
|
17556
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17557
|
+
|
|
17558
|
+
gl.uniform3uiv( this.addr, v );
|
|
17559
|
+
|
|
17560
|
+
copyArray( cache, v );
|
|
17561
|
+
|
|
17562
|
+
}
|
|
17415
17563
|
|
|
17416
17564
|
}
|
|
17417
17565
|
|
|
@@ -17419,11 +17567,28 @@ function setValueV4ui( gl, v ) {
|
|
|
17419
17567
|
|
|
17420
17568
|
const cache = this.cache;
|
|
17421
17569
|
|
|
17422
|
-
if (
|
|
17570
|
+
if ( v.x !== undefined ) {
|
|
17423
17571
|
|
|
17424
|
-
|
|
17572
|
+
if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {
|
|
17573
|
+
|
|
17574
|
+
gl.uniform4ui( this.addr, v.x, v.y, v.z, v.w );
|
|
17575
|
+
|
|
17576
|
+
cache[ 0 ] = v.x;
|
|
17577
|
+
cache[ 1 ] = v.y;
|
|
17578
|
+
cache[ 2 ] = v.z;
|
|
17579
|
+
cache[ 3 ] = v.w;
|
|
17580
|
+
|
|
17581
|
+
}
|
|
17582
|
+
|
|
17583
|
+
} else {
|
|
17584
|
+
|
|
17585
|
+
if ( arraysEqual( cache, v ) ) return;
|
|
17425
17586
|
|
|
17426
|
-
|
|
17587
|
+
gl.uniform4uiv( this.addr, v );
|
|
17588
|
+
|
|
17589
|
+
copyArray( cache, v );
|
|
17590
|
+
|
|
17591
|
+
}
|
|
17427
17592
|
|
|
17428
17593
|
}
|
|
17429
17594
|
|
|
@@ -20195,10 +20360,6 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
20195
20360
|
|
|
20196
20361
|
const uniforms = cache.get( light );
|
|
20197
20362
|
|
|
20198
|
-
// (a) intensity is the total visible light emitted
|
|
20199
|
-
//uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) );
|
|
20200
|
-
|
|
20201
|
-
// (b) intensity is the brightness of the light
|
|
20202
20363
|
uniforms.color.copy( color ).multiplyScalar( intensity );
|
|
20203
20364
|
|
|
20204
20365
|
uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );
|
|
@@ -20869,7 +21030,8 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
|
|
|
20869
21030
|
|
|
20870
21031
|
if ( ( _renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) ||
|
|
20871
21032
|
( material.displacementMap && material.displacementScale !== 0 ) ||
|
|
20872
|
-
( material.alphaMap && material.alphaTest > 0 )
|
|
21033
|
+
( material.alphaMap && material.alphaTest > 0 ) ||
|
|
21034
|
+
( material.map && material.alphaTest > 0 ) ) {
|
|
20873
21035
|
|
|
20874
21036
|
// in this case we need a unique material instance reflecting the
|
|
20875
21037
|
// appropriate state
|
|
@@ -20913,6 +21075,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
|
|
|
20913
21075
|
|
|
20914
21076
|
result.alphaMap = material.alphaMap;
|
|
20915
21077
|
result.alphaTest = material.alphaTest;
|
|
21078
|
+
result.map = material.map;
|
|
20916
21079
|
|
|
20917
21080
|
result.clipShadows = material.clipShadows;
|
|
20918
21081
|
result.clippingPlanes = material.clippingPlanes;
|
|
@@ -21712,7 +21875,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
21712
21875
|
}
|
|
21713
21876
|
|
|
21714
21877
|
currentBlending = blending;
|
|
21715
|
-
currentPremultipledAlpha =
|
|
21878
|
+
currentPremultipledAlpha = false;
|
|
21716
21879
|
|
|
21717
21880
|
}
|
|
21718
21881
|
|
|
@@ -21946,6 +22109,20 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
21946
22109
|
|
|
21947
22110
|
}
|
|
21948
22111
|
|
|
22112
|
+
function compressedTexImage3D() {
|
|
22113
|
+
|
|
22114
|
+
try {
|
|
22115
|
+
|
|
22116
|
+
gl.compressedTexImage3D.apply( gl, arguments );
|
|
22117
|
+
|
|
22118
|
+
} catch ( error ) {
|
|
22119
|
+
|
|
22120
|
+
console.error( 'THREE.WebGLState:', error );
|
|
22121
|
+
|
|
22122
|
+
}
|
|
22123
|
+
|
|
22124
|
+
}
|
|
22125
|
+
|
|
21949
22126
|
function texSubImage2D() {
|
|
21950
22127
|
|
|
21951
22128
|
try {
|
|
@@ -21988,6 +22165,20 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
21988
22165
|
|
|
21989
22166
|
}
|
|
21990
22167
|
|
|
22168
|
+
function compressedTexSubImage3D() {
|
|
22169
|
+
|
|
22170
|
+
try {
|
|
22171
|
+
|
|
22172
|
+
gl.compressedTexSubImage3D.apply( gl, arguments );
|
|
22173
|
+
|
|
22174
|
+
} catch ( error ) {
|
|
22175
|
+
|
|
22176
|
+
console.error( 'THREE.WebGLState:', error );
|
|
22177
|
+
|
|
22178
|
+
}
|
|
22179
|
+
|
|
22180
|
+
}
|
|
22181
|
+
|
|
21991
22182
|
function texStorage2D() {
|
|
21992
22183
|
|
|
21993
22184
|
try {
|
|
@@ -22233,6 +22424,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
22233
22424
|
bindTexture: bindTexture,
|
|
22234
22425
|
unbindTexture: unbindTexture,
|
|
22235
22426
|
compressedTexImage2D: compressedTexImage2D,
|
|
22427
|
+
compressedTexImage3D: compressedTexImage3D,
|
|
22236
22428
|
texImage2D: texImage2D,
|
|
22237
22429
|
texImage3D: texImage3D,
|
|
22238
22430
|
|
|
@@ -22244,6 +22436,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
22244
22436
|
texSubImage2D: texSubImage2D,
|
|
22245
22437
|
texSubImage3D: texSubImage3D,
|
|
22246
22438
|
compressedTexSubImage2D: compressedTexSubImage2D,
|
|
22439
|
+
compressedTexSubImage3D: compressedTexSubImage3D,
|
|
22247
22440
|
|
|
22248
22441
|
scissor: scissor,
|
|
22249
22442
|
viewport: viewport,
|
|
@@ -22262,7 +22455,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
22262
22455
|
const maxTextureSize = capabilities.maxTextureSize;
|
|
22263
22456
|
const maxSamples = capabilities.maxSamples;
|
|
22264
22457
|
const multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null;
|
|
22265
|
-
const supportsInvalidateFramebuffer = /OculusBrowser/g.test( navigator.userAgent );
|
|
22458
|
+
const supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent );
|
|
22266
22459
|
|
|
22267
22460
|
const _videoTextures = new WeakMap();
|
|
22268
22461
|
let _canvas;
|
|
@@ -22666,6 +22859,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
22666
22859
|
|
|
22667
22860
|
array.push( texture.wrapS );
|
|
22668
22861
|
array.push( texture.wrapT );
|
|
22862
|
+
array.push( texture.wrapR || 0 );
|
|
22669
22863
|
array.push( texture.magFilter );
|
|
22670
22864
|
array.push( texture.minFilter );
|
|
22671
22865
|
array.push( texture.anisotropy );
|
|
@@ -22922,7 +23116,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
22922
23116
|
|
|
22923
23117
|
let textureType = 3553;
|
|
22924
23118
|
|
|
22925
|
-
if ( texture.isDataArrayTexture ) textureType = 35866;
|
|
23119
|
+
if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) textureType = 35866;
|
|
22926
23120
|
if ( texture.isData3DTexture ) textureType = 32879;
|
|
22927
23121
|
|
|
22928
23122
|
const forceUpload = initTexture( textureProperties, texture );
|
|
@@ -23104,45 +23298,97 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23104
23298
|
|
|
23105
23299
|
} else if ( texture.isCompressedTexture ) {
|
|
23106
23300
|
|
|
23107
|
-
if (
|
|
23301
|
+
if ( texture.isCompressedArrayTexture ) {
|
|
23108
23302
|
|
|
23109
|
-
|
|
23303
|
+
if ( useTexStorage && allocateMemory ) {
|
|
23110
23304
|
|
|
23111
|
-
|
|
23305
|
+
state.texStorage3D( 35866, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height, image.depth );
|
|
23112
23306
|
|
|
23113
|
-
|
|
23307
|
+
}
|
|
23114
23308
|
|
|
23115
|
-
|
|
23309
|
+
for ( let i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
23116
23310
|
|
|
23117
|
-
|
|
23311
|
+
mipmap = mipmaps[ i ];
|
|
23118
23312
|
|
|
23119
|
-
if (
|
|
23313
|
+
if ( texture.format !== RGBAFormat ) {
|
|
23120
23314
|
|
|
23121
|
-
if (
|
|
23315
|
+
if ( glFormat !== null ) {
|
|
23316
|
+
|
|
23317
|
+
if ( useTexStorage ) {
|
|
23318
|
+
|
|
23319
|
+
state.compressedTexSubImage3D( 35866, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0 );
|
|
23122
23320
|
|
|
23123
|
-
|
|
23321
|
+
} else {
|
|
23322
|
+
|
|
23323
|
+
state.compressedTexImage3D( 35866, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0 );
|
|
23324
|
+
|
|
23325
|
+
}
|
|
23124
23326
|
|
|
23125
23327
|
} else {
|
|
23126
23328
|
|
|
23127
|
-
|
|
23329
|
+
console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );
|
|
23128
23330
|
|
|
23129
23331
|
}
|
|
23130
23332
|
|
|
23131
23333
|
} else {
|
|
23132
23334
|
|
|
23133
|
-
|
|
23335
|
+
if ( useTexStorage ) {
|
|
23336
|
+
|
|
23337
|
+
state.texSubImage3D( 35866, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data );
|
|
23338
|
+
|
|
23339
|
+
} else {
|
|
23340
|
+
|
|
23341
|
+
state.texImage3D( 35866, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data );
|
|
23342
|
+
|
|
23343
|
+
}
|
|
23134
23344
|
|
|
23135
23345
|
}
|
|
23136
23346
|
|
|
23137
|
-
}
|
|
23347
|
+
}
|
|
23138
23348
|
|
|
23139
|
-
|
|
23349
|
+
} else {
|
|
23140
23350
|
|
|
23141
|
-
|
|
23351
|
+
if ( useTexStorage && allocateMemory ) {
|
|
23352
|
+
|
|
23353
|
+
state.texStorage2D( 3553, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );
|
|
23354
|
+
|
|
23355
|
+
}
|
|
23356
|
+
|
|
23357
|
+
for ( let i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
23358
|
+
|
|
23359
|
+
mipmap = mipmaps[ i ];
|
|
23360
|
+
|
|
23361
|
+
if ( texture.format !== RGBAFormat ) {
|
|
23362
|
+
|
|
23363
|
+
if ( glFormat !== null ) {
|
|
23364
|
+
|
|
23365
|
+
if ( useTexStorage ) {
|
|
23366
|
+
|
|
23367
|
+
state.compressedTexSubImage2D( 3553, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data );
|
|
23368
|
+
|
|
23369
|
+
} else {
|
|
23370
|
+
|
|
23371
|
+
state.compressedTexImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );
|
|
23372
|
+
|
|
23373
|
+
}
|
|
23374
|
+
|
|
23375
|
+
} else {
|
|
23376
|
+
|
|
23377
|
+
console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );
|
|
23378
|
+
|
|
23379
|
+
}
|
|
23142
23380
|
|
|
23143
23381
|
} else {
|
|
23144
23382
|
|
|
23145
|
-
|
|
23383
|
+
if ( useTexStorage ) {
|
|
23384
|
+
|
|
23385
|
+
state.texSubImage2D( 3553, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );
|
|
23386
|
+
|
|
23387
|
+
} else {
|
|
23388
|
+
|
|
23389
|
+
state.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
|
|
23390
|
+
|
|
23391
|
+
}
|
|
23146
23392
|
|
|
23147
23393
|
}
|
|
23148
23394
|
|
|
@@ -23520,7 +23766,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23520
23766
|
|
|
23521
23767
|
multisampledRTTExt.framebufferTexture2DMultisampleEXT( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );
|
|
23522
23768
|
|
|
23523
|
-
} else {
|
|
23769
|
+
} else if ( textureTarget === 3553 || ( textureTarget >= 34069 && textureTarget <= 34074 ) ) { // see #24753
|
|
23524
23770
|
|
|
23525
23771
|
_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0 );
|
|
23526
23772
|
|
|
@@ -24235,7 +24481,6 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
24235
24481
|
if ( p === LuminanceAlphaFormat ) return 6410;
|
|
24236
24482
|
if ( p === DepthFormat ) return 6402;
|
|
24237
24483
|
if ( p === DepthStencilFormat ) return 34041;
|
|
24238
|
-
if ( p === RedFormat ) return 6403;
|
|
24239
24484
|
|
|
24240
24485
|
// @deprecated since r137
|
|
24241
24486
|
|
|
@@ -24266,6 +24511,7 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
24266
24511
|
|
|
24267
24512
|
// WebGL2 formats.
|
|
24268
24513
|
|
|
24514
|
+
if ( p === RedFormat ) return 6403;
|
|
24269
24515
|
if ( p === RedIntegerFormat ) return 36244;
|
|
24270
24516
|
if ( p === RGFormat ) return 33319;
|
|
24271
24517
|
if ( p === RGIntegerFormat ) return 33320;
|
|
@@ -24571,6 +24817,31 @@ class WebXRController {
|
|
|
24571
24817
|
|
|
24572
24818
|
}
|
|
24573
24819
|
|
|
24820
|
+
connect( inputSource ) {
|
|
24821
|
+
|
|
24822
|
+
if ( inputSource && inputSource.hand ) {
|
|
24823
|
+
|
|
24824
|
+
const hand = this._hand;
|
|
24825
|
+
|
|
24826
|
+
if ( hand ) {
|
|
24827
|
+
|
|
24828
|
+
for ( const inputjoint of inputSource.hand.values() ) {
|
|
24829
|
+
|
|
24830
|
+
// Initialize hand with joints when connected
|
|
24831
|
+
this._getHandJoint( hand, inputjoint );
|
|
24832
|
+
|
|
24833
|
+
}
|
|
24834
|
+
|
|
24835
|
+
}
|
|
24836
|
+
|
|
24837
|
+
}
|
|
24838
|
+
|
|
24839
|
+
this.dispatchEvent( { type: 'connected', data: inputSource } );
|
|
24840
|
+
|
|
24841
|
+
return this;
|
|
24842
|
+
|
|
24843
|
+
}
|
|
24844
|
+
|
|
24574
24845
|
disconnect( inputSource ) {
|
|
24575
24846
|
|
|
24576
24847
|
this.dispatchEvent( { type: 'disconnected', data: inputSource } );
|
|
@@ -24618,19 +24889,8 @@ class WebXRController {
|
|
|
24618
24889
|
// Update the joints groups with the XRJoint poses
|
|
24619
24890
|
const jointPose = frame.getJointPose( inputjoint, referenceSpace );
|
|
24620
24891
|
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
// The transform of this joint will be updated with the joint pose on each frame
|
|
24624
|
-
const joint = new Group();
|
|
24625
|
-
joint.matrixAutoUpdate = false;
|
|
24626
|
-
joint.visible = false;
|
|
24627
|
-
hand.joints[ inputjoint.jointName ] = joint;
|
|
24628
|
-
// ??
|
|
24629
|
-
hand.add( joint );
|
|
24630
|
-
|
|
24631
|
-
}
|
|
24632
|
-
|
|
24633
|
-
const joint = hand.joints[ inputjoint.jointName ];
|
|
24892
|
+
// The transform of this joint will be updated with the joint pose on each frame
|
|
24893
|
+
const joint = this._getHandJoint( hand, inputjoint );
|
|
24634
24894
|
|
|
24635
24895
|
if ( jointPose !== null ) {
|
|
24636
24896
|
|
|
@@ -24782,6 +25042,25 @@ class WebXRController {
|
|
|
24782
25042
|
|
|
24783
25043
|
}
|
|
24784
25044
|
|
|
25045
|
+
// private method
|
|
25046
|
+
|
|
25047
|
+
_getHandJoint( hand, inputjoint ) {
|
|
25048
|
+
|
|
25049
|
+
if ( hand.joints[ inputjoint.jointName ] === undefined ) {
|
|
25050
|
+
|
|
25051
|
+
const joint = new Group();
|
|
25052
|
+
joint.matrixAutoUpdate = false;
|
|
25053
|
+
joint.visible = false;
|
|
25054
|
+
hand.joints[ inputjoint.jointName ] = joint;
|
|
25055
|
+
|
|
25056
|
+
hand.add( joint );
|
|
25057
|
+
|
|
25058
|
+
}
|
|
25059
|
+
|
|
25060
|
+
return hand.joints[ inputjoint.jointName ];
|
|
25061
|
+
|
|
25062
|
+
}
|
|
25063
|
+
|
|
24785
25064
|
}
|
|
24786
25065
|
|
|
24787
25066
|
class DepthTexture extends Texture {
|
|
@@ -24826,6 +25105,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
24826
25105
|
|
|
24827
25106
|
let session = null;
|
|
24828
25107
|
let framebufferScaleFactor = 1.0;
|
|
25108
|
+
let limitWithNativeFramebufferScaleFactor = false;
|
|
24829
25109
|
|
|
24830
25110
|
let referenceSpace = null;
|
|
24831
25111
|
let referenceSpaceType = 'local-floor';
|
|
@@ -24843,6 +25123,9 @@ class WebXRManager extends EventDispatcher {
|
|
|
24843
25123
|
const controllers = [];
|
|
24844
25124
|
const controllerInputSources = [];
|
|
24845
25125
|
|
|
25126
|
+
const planes = new Set();
|
|
25127
|
+
const planesLastChangedTimes = new Map();
|
|
25128
|
+
|
|
24846
25129
|
//
|
|
24847
25130
|
|
|
24848
25131
|
const cameraL = new PerspectiveCamera();
|
|
@@ -24982,9 +25265,10 @@ class WebXRManager extends EventDispatcher {
|
|
|
24982
25265
|
|
|
24983
25266
|
}
|
|
24984
25267
|
|
|
24985
|
-
this.setFramebufferScaleFactor = function ( value ) {
|
|
25268
|
+
this.setFramebufferScaleFactor = function ( value, limited = false ) {
|
|
24986
25269
|
|
|
24987
25270
|
framebufferScaleFactor = value;
|
|
25271
|
+
limitWithNativeFramebufferScaleFactor = limited;
|
|
24988
25272
|
|
|
24989
25273
|
if ( scope.isPresenting === true ) {
|
|
24990
25274
|
|
|
@@ -25065,6 +25349,18 @@ class WebXRManager extends EventDispatcher {
|
|
|
25065
25349
|
|
|
25066
25350
|
}
|
|
25067
25351
|
|
|
25352
|
+
if ( limitWithNativeFramebufferScaleFactor === true && XRWebGLLayer.getNativeFramebufferScaleFactor ) {
|
|
25353
|
+
|
|
25354
|
+
const nativeFramebufferScaleFactor = XRWebGLLayer.getNativeFramebufferScaleFactor( session );
|
|
25355
|
+
|
|
25356
|
+
if ( nativeFramebufferScaleFactor < framebufferScaleFactor ) {
|
|
25357
|
+
|
|
25358
|
+
framebufferScaleFactor = nativeFramebufferScaleFactor;
|
|
25359
|
+
|
|
25360
|
+
}
|
|
25361
|
+
|
|
25362
|
+
}
|
|
25363
|
+
|
|
25068
25364
|
if ( ( session.renderState.layers === undefined ) || ( renderer.capabilities.isWebGL2 === false ) ) {
|
|
25069
25365
|
|
|
25070
25366
|
const layerInit = {
|
|
@@ -25164,7 +25460,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
25164
25460
|
if ( index >= 0 ) {
|
|
25165
25461
|
|
|
25166
25462
|
controllerInputSources[ index ] = null;
|
|
25167
|
-
controllers[ index ].
|
|
25463
|
+
controllers[ index ].disconnect( inputSource );
|
|
25168
25464
|
|
|
25169
25465
|
}
|
|
25170
25466
|
|
|
@@ -25210,7 +25506,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
25210
25506
|
|
|
25211
25507
|
if ( controller ) {
|
|
25212
25508
|
|
|
25213
|
-
controller.
|
|
25509
|
+
controller.connect( inputSource );
|
|
25214
25510
|
|
|
25215
25511
|
}
|
|
25216
25512
|
|
|
@@ -25400,6 +25696,12 @@ class WebXRManager extends EventDispatcher {
|
|
|
25400
25696
|
|
|
25401
25697
|
};
|
|
25402
25698
|
|
|
25699
|
+
this.getPlanes = function () {
|
|
25700
|
+
|
|
25701
|
+
return planes;
|
|
25702
|
+
|
|
25703
|
+
};
|
|
25704
|
+
|
|
25403
25705
|
// Animation Loop
|
|
25404
25706
|
|
|
25405
25707
|
let onAnimationFrameCallback = null;
|
|
@@ -25508,6 +25810,65 @@ class WebXRManager extends EventDispatcher {
|
|
|
25508
25810
|
|
|
25509
25811
|
if ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );
|
|
25510
25812
|
|
|
25813
|
+
if ( frame.detectedPlanes ) {
|
|
25814
|
+
|
|
25815
|
+
scope.dispatchEvent( { type: 'planesdetected', data: frame.detectedPlanes } );
|
|
25816
|
+
|
|
25817
|
+
let planesToRemove = null;
|
|
25818
|
+
|
|
25819
|
+
for ( const plane of planes ) {
|
|
25820
|
+
|
|
25821
|
+
if ( ! frame.detectedPlanes.has( plane ) ) {
|
|
25822
|
+
|
|
25823
|
+
if ( planesToRemove === null ) {
|
|
25824
|
+
|
|
25825
|
+
planesToRemove = [];
|
|
25826
|
+
|
|
25827
|
+
}
|
|
25828
|
+
|
|
25829
|
+
planesToRemove.push( plane );
|
|
25830
|
+
|
|
25831
|
+
}
|
|
25832
|
+
|
|
25833
|
+
}
|
|
25834
|
+
|
|
25835
|
+
if ( planesToRemove !== null ) {
|
|
25836
|
+
|
|
25837
|
+
for ( const plane of planesToRemove ) {
|
|
25838
|
+
|
|
25839
|
+
planes.delete( plane );
|
|
25840
|
+
planesLastChangedTimes.delete( plane );
|
|
25841
|
+
scope.dispatchEvent( { type: 'planeremoved', data: plane } );
|
|
25842
|
+
|
|
25843
|
+
}
|
|
25844
|
+
|
|
25845
|
+
}
|
|
25846
|
+
|
|
25847
|
+
for ( const plane of frame.detectedPlanes ) {
|
|
25848
|
+
|
|
25849
|
+
if ( ! planes.has( plane ) ) {
|
|
25850
|
+
|
|
25851
|
+
planes.add( plane );
|
|
25852
|
+
planesLastChangedTimes.set( plane, frame.lastChangedTime );
|
|
25853
|
+
scope.dispatchEvent( { type: 'planeadded', data: plane } );
|
|
25854
|
+
|
|
25855
|
+
} else {
|
|
25856
|
+
|
|
25857
|
+
const lastKnownTime = planesLastChangedTimes.get( plane );
|
|
25858
|
+
|
|
25859
|
+
if ( plane.lastChangedTime > lastKnownTime ) {
|
|
25860
|
+
|
|
25861
|
+
planesLastChangedTimes.set( plane, plane.lastChangedTime );
|
|
25862
|
+
scope.dispatchEvent( { type: 'planechanged', data: plane } );
|
|
25863
|
+
|
|
25864
|
+
}
|
|
25865
|
+
|
|
25866
|
+
}
|
|
25867
|
+
|
|
25868
|
+
}
|
|
25869
|
+
|
|
25870
|
+
}
|
|
25871
|
+
|
|
25511
25872
|
xrFrame = null;
|
|
25512
25873
|
|
|
25513
25874
|
}
|
|
@@ -25532,7 +25893,7 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
25532
25893
|
|
|
25533
25894
|
function refreshFogUniforms( uniforms, fog ) {
|
|
25534
25895
|
|
|
25535
|
-
uniforms.fogColor.value
|
|
25896
|
+
fog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) );
|
|
25536
25897
|
|
|
25537
25898
|
if ( fog.isFog ) {
|
|
25538
25899
|
|
|
@@ -26659,28 +27020,6 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
26659
27020
|
this.toneMapping = NoToneMapping;
|
|
26660
27021
|
this.toneMappingExposure = 1.0;
|
|
26661
27022
|
|
|
26662
|
-
//
|
|
26663
|
-
|
|
26664
|
-
Object.defineProperties( this, {
|
|
26665
|
-
|
|
26666
|
-
// @deprecated since r136, 0e21088102b4de7e0a0a33140620b7a3424b9e6d
|
|
26667
|
-
|
|
26668
|
-
gammaFactor: {
|
|
26669
|
-
get: function () {
|
|
26670
|
-
|
|
26671
|
-
console.warn( 'THREE.WebGLRenderer: .gammaFactor has been removed.' );
|
|
26672
|
-
return 2;
|
|
26673
|
-
|
|
26674
|
-
},
|
|
26675
|
-
set: function () {
|
|
26676
|
-
|
|
26677
|
-
console.warn( 'THREE.WebGLRenderer: .gammaFactor has been removed.' );
|
|
26678
|
-
|
|
26679
|
-
}
|
|
26680
|
-
}
|
|
26681
|
-
|
|
26682
|
-
} );
|
|
26683
|
-
|
|
26684
27023
|
// internal properties
|
|
26685
27024
|
|
|
26686
27025
|
const _this = this;
|
|
@@ -26847,7 +27186,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
26847
27186
|
|
|
26848
27187
|
state = new WebGLState( _gl, extensions, capabilities );
|
|
26849
27188
|
|
|
26850
|
-
info = new WebGLInfo(
|
|
27189
|
+
info = new WebGLInfo();
|
|
26851
27190
|
properties = new WebGLProperties();
|
|
26852
27191
|
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
|
|
26853
27192
|
cubemaps = new WebGLCubeMaps( _this );
|
|
@@ -26862,7 +27201,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
26862
27201
|
materials = new WebGLMaterials( _this, properties );
|
|
26863
27202
|
renderLists = new WebGLRenderLists();
|
|
26864
27203
|
renderStates = new WebGLRenderStates( extensions, capabilities );
|
|
26865
|
-
background = new WebGLBackground( _this, cubemaps, state, objects, _alpha, _premultipliedAlpha );
|
|
27204
|
+
background = new WebGLBackground( _this, cubemaps, cubeuvmaps, state, objects, _alpha, _premultipliedAlpha );
|
|
26866
27205
|
shadowMap = new WebGLShadowMap( _this, objects, capabilities );
|
|
26867
27206
|
uniformsGroups = new WebGLUniformsGroups( _gl, info, capabilities, state );
|
|
26868
27207
|
|
|
@@ -27247,31 +27586,48 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
27247
27586
|
//
|
|
27248
27587
|
|
|
27249
27588
|
let index = geometry.index;
|
|
27250
|
-
|
|
27589
|
+
let rangeFactor = 1;
|
|
27590
|
+
|
|
27591
|
+
if ( material.wireframe === true ) {
|
|
27592
|
+
|
|
27593
|
+
index = geometries.getWireframeAttribute( geometry );
|
|
27594
|
+
rangeFactor = 2;
|
|
27595
|
+
|
|
27596
|
+
}
|
|
27251
27597
|
|
|
27252
27598
|
//
|
|
27253
27599
|
|
|
27254
|
-
|
|
27600
|
+
const drawRange = geometry.drawRange;
|
|
27601
|
+
const position = geometry.attributes.position;
|
|
27255
27602
|
|
|
27256
|
-
|
|
27603
|
+
let drawStart = drawRange.start * rangeFactor;
|
|
27604
|
+
let drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor;
|
|
27257
27605
|
|
|
27258
|
-
|
|
27606
|
+
if ( group !== null ) {
|
|
27259
27607
|
|
|
27260
|
-
|
|
27608
|
+
drawStart = Math.max( drawStart, group.start * rangeFactor );
|
|
27609
|
+
drawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor );
|
|
27261
27610
|
|
|
27262
27611
|
}
|
|
27263
27612
|
|
|
27264
|
-
|
|
27613
|
+
if ( index !== null ) {
|
|
27265
27614
|
|
|
27266
|
-
|
|
27615
|
+
drawStart = Math.max( drawStart, 0 );
|
|
27616
|
+
drawEnd = Math.min( drawEnd, index.count );
|
|
27267
27617
|
|
|
27268
|
-
if (
|
|
27618
|
+
} else if ( position !== undefined && position !== null ) {
|
|
27269
27619
|
|
|
27270
|
-
|
|
27271
|
-
|
|
27620
|
+
drawStart = Math.max( drawStart, 0 );
|
|
27621
|
+
drawEnd = Math.min( drawEnd, position.count );
|
|
27272
27622
|
|
|
27273
27623
|
}
|
|
27274
27624
|
|
|
27625
|
+
const drawCount = drawEnd - drawStart;
|
|
27626
|
+
|
|
27627
|
+
if ( drawCount < 0 || drawCount === Infinity ) return;
|
|
27628
|
+
|
|
27629
|
+
//
|
|
27630
|
+
|
|
27275
27631
|
bindingStates.setup( object, material, program, geometry, index );
|
|
27276
27632
|
|
|
27277
27633
|
let attribute;
|
|
@@ -27288,23 +27644,6 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
27288
27644
|
|
|
27289
27645
|
//
|
|
27290
27646
|
|
|
27291
|
-
const dataCount = ( index !== null ) ? index.count : position.count;
|
|
27292
|
-
|
|
27293
|
-
const rangeStart = geometry.drawRange.start * rangeFactor;
|
|
27294
|
-
const rangeCount = geometry.drawRange.count * rangeFactor;
|
|
27295
|
-
|
|
27296
|
-
const groupStart = group !== null ? group.start * rangeFactor : 0;
|
|
27297
|
-
const groupCount = group !== null ? group.count * rangeFactor : Infinity;
|
|
27298
|
-
|
|
27299
|
-
const drawStart = Math.max( rangeStart, groupStart );
|
|
27300
|
-
const drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1;
|
|
27301
|
-
|
|
27302
|
-
const drawCount = Math.max( 0, drawEnd - drawStart + 1 );
|
|
27303
|
-
|
|
27304
|
-
if ( drawCount === 0 ) return;
|
|
27305
|
-
|
|
27306
|
-
//
|
|
27307
|
-
|
|
27308
27647
|
if ( object.isMesh ) {
|
|
27309
27648
|
|
|
27310
27649
|
if ( material.wireframe === true ) {
|
|
@@ -27356,7 +27695,8 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
27356
27695
|
|
|
27357
27696
|
} else if ( geometry.isInstancedBufferGeometry ) {
|
|
27358
27697
|
|
|
27359
|
-
const
|
|
27698
|
+
const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;
|
|
27699
|
+
const instanceCount = Math.min( geometry.instanceCount, maxInstanceCount );
|
|
27360
27700
|
|
|
27361
27701
|
renderer.renderInstances( drawStart, drawCount, instanceCount );
|
|
27362
27702
|
|
|
@@ -28460,6 +28800,9 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
28460
28800
|
_currentActiveMipmapLevel = activeMipmapLevel;
|
|
28461
28801
|
|
|
28462
28802
|
let useDefaultFramebuffer = true;
|
|
28803
|
+
let framebuffer = null;
|
|
28804
|
+
let isCube = false;
|
|
28805
|
+
let isRenderTarget3D = false;
|
|
28463
28806
|
|
|
28464
28807
|
if ( renderTarget ) {
|
|
28465
28808
|
|
|
@@ -28482,17 +28825,9 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
28482
28825
|
|
|
28483
28826
|
}
|
|
28484
28827
|
|
|
28485
|
-
}
|
|
28486
|
-
|
|
28487
|
-
let framebuffer = null;
|
|
28488
|
-
let isCube = false;
|
|
28489
|
-
let isRenderTarget3D = false;
|
|
28490
|
-
|
|
28491
|
-
if ( renderTarget ) {
|
|
28492
|
-
|
|
28493
28828
|
const texture = renderTarget.texture;
|
|
28494
28829
|
|
|
28495
|
-
if ( texture.isData3DTexture || texture.isDataArrayTexture ) {
|
|
28830
|
+
if ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {
|
|
28496
28831
|
|
|
28497
28832
|
isRenderTarget3D = true;
|
|
28498
28833
|
|
|
@@ -28733,7 +29068,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
28733
29068
|
|
|
28734
29069
|
} else {
|
|
28735
29070
|
|
|
28736
|
-
if ( srcTexture.
|
|
29071
|
+
if ( srcTexture.isCompressedArrayTexture ) {
|
|
28737
29072
|
|
|
28738
29073
|
console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );
|
|
28739
29074
|
_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );
|
|
@@ -28769,7 +29104,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
28769
29104
|
|
|
28770
29105
|
textures.setTexture3D( texture, 0 );
|
|
28771
29106
|
|
|
28772
|
-
} else if ( texture.isDataArrayTexture ) {
|
|
29107
|
+
} else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {
|
|
28773
29108
|
|
|
28774
29109
|
textures.setTexture2DArray( texture, 0 );
|
|
28775
29110
|
|
|
@@ -28885,6 +29220,9 @@ class Scene extends Object3D {
|
|
|
28885
29220
|
this.environment = null;
|
|
28886
29221
|
this.fog = null;
|
|
28887
29222
|
|
|
29223
|
+
this.backgroundBlurriness = 0;
|
|
29224
|
+
this.backgroundIntensity = 1;
|
|
29225
|
+
|
|
28888
29226
|
this.overrideMaterial = null;
|
|
28889
29227
|
|
|
28890
29228
|
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
@@ -28903,6 +29241,9 @@ class Scene extends Object3D {
|
|
|
28903
29241
|
if ( source.environment !== null ) this.environment = source.environment.clone();
|
|
28904
29242
|
if ( source.fog !== null ) this.fog = source.fog.clone();
|
|
28905
29243
|
|
|
29244
|
+
this.backgroundBlurriness = source.backgroundBlurriness;
|
|
29245
|
+
this.backgroundIntensity = source.backgroundIntensity;
|
|
29246
|
+
|
|
28906
29247
|
if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();
|
|
28907
29248
|
|
|
28908
29249
|
this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
@@ -28916,6 +29257,8 @@ class Scene extends Object3D {
|
|
|
28916
29257
|
const data = super.toJSON( meta );
|
|
28917
29258
|
|
|
28918
29259
|
if ( this.fog !== null ) data.object.fog = this.fog.toJSON();
|
|
29260
|
+
if ( this.backgroundBlurriness > 0 ) data.backgroundBlurriness = this.backgroundBlurriness;
|
|
29261
|
+
if ( this.backgroundIntensity !== 1 ) data.backgroundIntensity = this.backgroundIntensity;
|
|
28919
29262
|
|
|
28920
29263
|
return data;
|
|
28921
29264
|
|
|
@@ -29662,7 +30005,7 @@ class LOD extends Object3D {
|
|
|
29662
30005
|
|
|
29663
30006
|
const level = levels[ i ];
|
|
29664
30007
|
|
|
29665
|
-
this.addLevel( level.object.clone(), level.distance );
|
|
30008
|
+
this.addLevel( level.object.clone(), level.distance, level.hysteresis );
|
|
29666
30009
|
|
|
29667
30010
|
}
|
|
29668
30011
|
|
|
@@ -29672,7 +30015,7 @@ class LOD extends Object3D {
|
|
|
29672
30015
|
|
|
29673
30016
|
}
|
|
29674
30017
|
|
|
29675
|
-
addLevel( object, distance = 0 ) {
|
|
30018
|
+
addLevel( object, distance = 0, hysteresis = 0 ) {
|
|
29676
30019
|
|
|
29677
30020
|
distance = Math.abs( distance );
|
|
29678
30021
|
|
|
@@ -29690,7 +30033,7 @@ class LOD extends Object3D {
|
|
|
29690
30033
|
|
|
29691
30034
|
}
|
|
29692
30035
|
|
|
29693
|
-
levels.splice( l, 0, { distance: distance, object: object } );
|
|
30036
|
+
levels.splice( l, 0, { distance: distance, hysteresis: hysteresis, object: object } );
|
|
29694
30037
|
|
|
29695
30038
|
this.add( object );
|
|
29696
30039
|
|
|
@@ -29704,6 +30047,8 @@ class LOD extends Object3D {
|
|
|
29704
30047
|
|
|
29705
30048
|
}
|
|
29706
30049
|
|
|
30050
|
+
|
|
30051
|
+
|
|
29707
30052
|
getObjectForDistance( distance ) {
|
|
29708
30053
|
|
|
29709
30054
|
const levels = this.levels;
|
|
@@ -29714,7 +30059,15 @@ class LOD extends Object3D {
|
|
|
29714
30059
|
|
|
29715
30060
|
for ( i = 1, l = levels.length; i < l; i ++ ) {
|
|
29716
30061
|
|
|
29717
|
-
|
|
30062
|
+
let levelDistance = levels[ i ].distance;
|
|
30063
|
+
|
|
30064
|
+
if ( levels[ i ].object.visible ) {
|
|
30065
|
+
|
|
30066
|
+
levelDistance -= levelDistance * levels[ i ].hysteresis;
|
|
30067
|
+
|
|
30068
|
+
}
|
|
30069
|
+
|
|
30070
|
+
if ( distance < levelDistance ) {
|
|
29718
30071
|
|
|
29719
30072
|
break;
|
|
29720
30073
|
|
|
@@ -29763,7 +30116,15 @@ class LOD extends Object3D {
|
|
|
29763
30116
|
|
|
29764
30117
|
for ( i = 1, l = levels.length; i < l; i ++ ) {
|
|
29765
30118
|
|
|
29766
|
-
|
|
30119
|
+
let levelDistance = levels[ i ].distance;
|
|
30120
|
+
|
|
30121
|
+
if ( levels[ i ].object.visible ) {
|
|
30122
|
+
|
|
30123
|
+
levelDistance -= levelDistance * levels[ i ].hysteresis;
|
|
30124
|
+
|
|
30125
|
+
}
|
|
30126
|
+
|
|
30127
|
+
if ( distance >= levelDistance ) {
|
|
29767
30128
|
|
|
29768
30129
|
levels[ i - 1 ].object.visible = false;
|
|
29769
30130
|
levels[ i ].object.visible = true;
|
|
@@ -29804,7 +30165,8 @@ class LOD extends Object3D {
|
|
|
29804
30165
|
|
|
29805
30166
|
data.object.levels.push( {
|
|
29806
30167
|
object: level.object.uuid,
|
|
29807
|
-
distance: level.distance
|
|
30168
|
+
distance: level.distance,
|
|
30169
|
+
hysteresis: level.hysteresis
|
|
29808
30170
|
} );
|
|
29809
30171
|
|
|
29810
30172
|
}
|
|
@@ -30304,6 +30666,7 @@ const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();
|
|
|
30304
30666
|
|
|
30305
30667
|
const _instanceIntersects = [];
|
|
30306
30668
|
|
|
30669
|
+
const _identity = /*@__PURE__*/ new Matrix4();
|
|
30307
30670
|
const _mesh = /*@__PURE__*/ new Mesh();
|
|
30308
30671
|
|
|
30309
30672
|
class InstancedMesh extends Mesh {
|
|
@@ -30321,6 +30684,12 @@ class InstancedMesh extends Mesh {
|
|
|
30321
30684
|
|
|
30322
30685
|
this.frustumCulled = false;
|
|
30323
30686
|
|
|
30687
|
+
for ( let i = 0; i < count; i ++ ) {
|
|
30688
|
+
|
|
30689
|
+
this.setMatrixAt( i, _identity );
|
|
30690
|
+
|
|
30691
|
+
}
|
|
30692
|
+
|
|
30324
30693
|
}
|
|
30325
30694
|
|
|
30326
30695
|
copy( source, recursive ) {
|
|
@@ -31037,6 +31406,20 @@ class CompressedTexture extends Texture {
|
|
|
31037
31406
|
|
|
31038
31407
|
}
|
|
31039
31408
|
|
|
31409
|
+
class CompressedArrayTexture extends CompressedTexture {
|
|
31410
|
+
|
|
31411
|
+
constructor( mipmaps, width, height, depth, format, type ) {
|
|
31412
|
+
|
|
31413
|
+
super( mipmaps, width, height, format, type );
|
|
31414
|
+
|
|
31415
|
+
this.isCompressedArrayTexture = true;
|
|
31416
|
+
this.image.depth = depth;
|
|
31417
|
+
this.wrapR = ClampToEdgeWrapping;
|
|
31418
|
+
|
|
31419
|
+
}
|
|
31420
|
+
|
|
31421
|
+
}
|
|
31422
|
+
|
|
31040
31423
|
class CanvasTexture extends Texture {
|
|
31041
31424
|
|
|
31042
31425
|
constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
|
|
@@ -34116,7 +34499,7 @@ class Shape extends Path {
|
|
|
34116
34499
|
}
|
|
34117
34500
|
|
|
34118
34501
|
/**
|
|
34119
|
-
* Port from https://github.com/mapbox/earcut (v2.2.
|
|
34502
|
+
* Port from https://github.com/mapbox/earcut (v2.2.4)
|
|
34120
34503
|
*/
|
|
34121
34504
|
|
|
34122
34505
|
const Earcut = {
|
|
@@ -34153,11 +34536,11 @@ const Earcut = {
|
|
|
34153
34536
|
|
|
34154
34537
|
// minX, minY and invSize are later used to transform coords into integers for z-order calculation
|
|
34155
34538
|
invSize = Math.max( maxX - minX, maxY - minY );
|
|
34156
|
-
invSize = invSize !== 0 ?
|
|
34539
|
+
invSize = invSize !== 0 ? 32767 / invSize : 0;
|
|
34157
34540
|
|
|
34158
34541
|
}
|
|
34159
34542
|
|
|
34160
|
-
earcutLinked( outerNode, triangles, dim, minX, minY, invSize );
|
|
34543
|
+
earcutLinked( outerNode, triangles, dim, minX, minY, invSize, 0 );
|
|
34161
34544
|
|
|
34162
34545
|
return triangles;
|
|
34163
34546
|
|
|
@@ -34242,9 +34625,9 @@ function earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) {
|
|
|
34242
34625
|
if ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) {
|
|
34243
34626
|
|
|
34244
34627
|
// cut off the triangle
|
|
34245
|
-
triangles.push( prev.i / dim );
|
|
34246
|
-
triangles.push( ear.i / dim );
|
|
34247
|
-
triangles.push( next.i / dim );
|
|
34628
|
+
triangles.push( prev.i / dim | 0 );
|
|
34629
|
+
triangles.push( ear.i / dim | 0 );
|
|
34630
|
+
triangles.push( next.i / dim | 0 );
|
|
34248
34631
|
|
|
34249
34632
|
removeNode( ear );
|
|
34250
34633
|
|
|
@@ -34299,11 +34682,19 @@ function isEar( ear ) {
|
|
|
34299
34682
|
if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear
|
|
34300
34683
|
|
|
34301
34684
|
// now make sure we don't have other points inside the potential ear
|
|
34302
|
-
|
|
34685
|
+
const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
|
|
34303
34686
|
|
|
34304
|
-
|
|
34687
|
+
// triangle bbox; min & max are calculated like this for speed
|
|
34688
|
+
const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),
|
|
34689
|
+
y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),
|
|
34690
|
+
x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),
|
|
34691
|
+
y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );
|
|
34305
34692
|
|
|
34306
|
-
|
|
34693
|
+
let p = c.next;
|
|
34694
|
+
while ( p !== a ) {
|
|
34695
|
+
|
|
34696
|
+
if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&
|
|
34697
|
+
pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) &&
|
|
34307
34698
|
area( p.prev, p, p.next ) >= 0 ) return false;
|
|
34308
34699
|
p = p.next;
|
|
34309
34700
|
|
|
@@ -34321,15 +34712,17 @@ function isEarHashed( ear, minX, minY, invSize ) {
|
|
|
34321
34712
|
|
|
34322
34713
|
if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear
|
|
34323
34714
|
|
|
34715
|
+
const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
|
|
34716
|
+
|
|
34324
34717
|
// triangle bbox; min & max are calculated like this for speed
|
|
34325
|
-
const
|
|
34326
|
-
|
|
34327
|
-
|
|
34328
|
-
|
|
34718
|
+
const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),
|
|
34719
|
+
y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),
|
|
34720
|
+
x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),
|
|
34721
|
+
y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );
|
|
34329
34722
|
|
|
34330
34723
|
// z-order range for the current triangle bbox;
|
|
34331
|
-
const minZ = zOrder(
|
|
34332
|
-
maxZ = zOrder(
|
|
34724
|
+
const minZ = zOrder( x0, y0, minX, minY, invSize ),
|
|
34725
|
+
maxZ = zOrder( x1, y1, minX, minY, invSize );
|
|
34333
34726
|
|
|
34334
34727
|
let p = ear.prevZ,
|
|
34335
34728
|
n = ear.nextZ;
|
|
@@ -34337,14 +34730,12 @@ function isEarHashed( ear, minX, minY, invSize ) {
|
|
|
34337
34730
|
// look for points inside the triangle in both directions
|
|
34338
34731
|
while ( p && p.z >= minZ && n && n.z <= maxZ ) {
|
|
34339
34732
|
|
|
34340
|
-
if ( p
|
|
34341
|
-
pointInTriangle(
|
|
34342
|
-
area( p.prev, p, p.next ) >= 0 ) return false;
|
|
34733
|
+
if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
|
|
34734
|
+
pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;
|
|
34343
34735
|
p = p.prevZ;
|
|
34344
34736
|
|
|
34345
|
-
if ( n
|
|
34346
|
-
pointInTriangle(
|
|
34347
|
-
area( n.prev, n, n.next ) >= 0 ) return false;
|
|
34737
|
+
if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
|
|
34738
|
+
pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;
|
|
34348
34739
|
n = n.nextZ;
|
|
34349
34740
|
|
|
34350
34741
|
}
|
|
@@ -34352,9 +34743,8 @@ function isEarHashed( ear, minX, minY, invSize ) {
|
|
|
34352
34743
|
// look for remaining points in decreasing z-order
|
|
34353
34744
|
while ( p && p.z >= minZ ) {
|
|
34354
34745
|
|
|
34355
|
-
if ( p
|
|
34356
|
-
pointInTriangle(
|
|
34357
|
-
area( p.prev, p, p.next ) >= 0 ) return false;
|
|
34746
|
+
if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
|
|
34747
|
+
pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;
|
|
34358
34748
|
p = p.prevZ;
|
|
34359
34749
|
|
|
34360
34750
|
}
|
|
@@ -34362,9 +34752,8 @@ function isEarHashed( ear, minX, minY, invSize ) {
|
|
|
34362
34752
|
// look for remaining points in increasing z-order
|
|
34363
34753
|
while ( n && n.z <= maxZ ) {
|
|
34364
34754
|
|
|
34365
|
-
if ( n
|
|
34366
|
-
pointInTriangle(
|
|
34367
|
-
area( n.prev, n, n.next ) >= 0 ) return false;
|
|
34755
|
+
if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
|
|
34756
|
+
pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;
|
|
34368
34757
|
n = n.nextZ;
|
|
34369
34758
|
|
|
34370
34759
|
}
|
|
@@ -34384,9 +34773,9 @@ function cureLocalIntersections( start, triangles, dim ) {
|
|
|
34384
34773
|
|
|
34385
34774
|
if ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) {
|
|
34386
34775
|
|
|
34387
|
-
triangles.push( a.i / dim );
|
|
34388
|
-
triangles.push( p.i / dim );
|
|
34389
|
-
triangles.push( b.i / dim );
|
|
34776
|
+
triangles.push( a.i / dim | 0 );
|
|
34777
|
+
triangles.push( p.i / dim | 0 );
|
|
34778
|
+
triangles.push( b.i / dim | 0 );
|
|
34390
34779
|
|
|
34391
34780
|
// remove two nodes involved
|
|
34392
34781
|
removeNode( p );
|
|
@@ -34424,8 +34813,8 @@ function splitEarcut( start, triangles, dim, minX, minY, invSize ) {
|
|
|
34424
34813
|
c = filterPoints( c, c.next );
|
|
34425
34814
|
|
|
34426
34815
|
// run earcut on each half
|
|
34427
|
-
earcutLinked( a, triangles, dim, minX, minY, invSize );
|
|
34428
|
-
earcutLinked( c, triangles, dim, minX, minY, invSize );
|
|
34816
|
+
earcutLinked( a, triangles, dim, minX, minY, invSize, 0 );
|
|
34817
|
+
earcutLinked( c, triangles, dim, minX, minY, invSize, 0 );
|
|
34429
34818
|
return;
|
|
34430
34819
|
|
|
34431
34820
|
}
|
|
@@ -34461,8 +34850,7 @@ function eliminateHoles( data, holeIndices, outerNode, dim ) {
|
|
|
34461
34850
|
// process holes from left to right
|
|
34462
34851
|
for ( i = 0; i < queue.length; i ++ ) {
|
|
34463
34852
|
|
|
34464
|
-
eliminateHole( queue[ i ], outerNode );
|
|
34465
|
-
outerNode = filterPoints( outerNode, outerNode.next );
|
|
34853
|
+
outerNode = eliminateHole( queue[ i ], outerNode );
|
|
34466
34854
|
|
|
34467
34855
|
}
|
|
34468
34856
|
|
|
@@ -34479,26 +34867,29 @@ function compareX( a, b ) {
|
|
|
34479
34867
|
// find a bridge between vertices that connects hole with an outer ring and link it
|
|
34480
34868
|
function eliminateHole( hole, outerNode ) {
|
|
34481
34869
|
|
|
34482
|
-
|
|
34483
|
-
if (
|
|
34484
|
-
|
|
34485
|
-
const b = splitPolygon( outerNode, hole );
|
|
34870
|
+
const bridge = findHoleBridge( hole, outerNode );
|
|
34871
|
+
if ( ! bridge ) {
|
|
34486
34872
|
|
|
34487
|
-
|
|
34488
|
-
filterPoints( outerNode, outerNode.next );
|
|
34489
|
-
filterPoints( b, b.next );
|
|
34873
|
+
return outerNode;
|
|
34490
34874
|
|
|
34491
34875
|
}
|
|
34492
34876
|
|
|
34877
|
+
const bridgeReverse = splitPolygon( bridge, hole );
|
|
34878
|
+
|
|
34879
|
+
// filter collinear points around the cuts
|
|
34880
|
+
filterPoints( bridgeReverse, bridgeReverse.next );
|
|
34881
|
+
return filterPoints( bridge, bridge.next );
|
|
34882
|
+
|
|
34493
34883
|
}
|
|
34494
34884
|
|
|
34495
34885
|
// David Eberly's algorithm for finding a bridge between hole and outer polygon
|
|
34496
34886
|
function findHoleBridge( hole, outerNode ) {
|
|
34497
34887
|
|
|
34498
|
-
let p = outerNode
|
|
34499
|
-
|
|
34500
|
-
|
|
34501
|
-
|
|
34888
|
+
let p = outerNode,
|
|
34889
|
+
qx = - Infinity,
|
|
34890
|
+
m;
|
|
34891
|
+
|
|
34892
|
+
const hx = hole.x, hy = hole.y;
|
|
34502
34893
|
|
|
34503
34894
|
// find a segment intersected by a ray from the hole's leftmost point to the left;
|
|
34504
34895
|
// segment's endpoint with lesser x will be potential connection point
|
|
@@ -34510,14 +34901,8 @@ function findHoleBridge( hole, outerNode ) {
|
|
|
34510
34901
|
if ( x <= hx && x > qx ) {
|
|
34511
34902
|
|
|
34512
34903
|
qx = x;
|
|
34513
|
-
if ( x === hx ) {
|
|
34514
|
-
|
|
34515
|
-
if ( hy === p.y ) return p;
|
|
34516
|
-
if ( hy === p.next.y ) return p.next;
|
|
34517
|
-
|
|
34518
|
-
}
|
|
34519
|
-
|
|
34520
34904
|
m = p.x < p.next.x ? p : p.next;
|
|
34905
|
+
if ( x === hx ) return m; // hole touches outer segment; pick leftmost endpoint
|
|
34521
34906
|
|
|
34522
34907
|
}
|
|
34523
34908
|
|
|
@@ -34529,8 +34914,6 @@ function findHoleBridge( hole, outerNode ) {
|
|
|
34529
34914
|
|
|
34530
34915
|
if ( ! m ) return null;
|
|
34531
34916
|
|
|
34532
|
-
if ( hx === qx ) return m; // hole touches outer segment; pick leftmost endpoint
|
|
34533
|
-
|
|
34534
34917
|
// look for points inside the triangle of hole point, segment intersection and endpoint;
|
|
34535
34918
|
// if there are no points found, we have a valid connection;
|
|
34536
34919
|
// otherwise choose the point of the minimum angle with the ray as connection point
|
|
@@ -34579,7 +34962,7 @@ function indexCurve( start, minX, minY, invSize ) {
|
|
|
34579
34962
|
let p = start;
|
|
34580
34963
|
do {
|
|
34581
34964
|
|
|
34582
|
-
if ( p.z ===
|
|
34965
|
+
if ( p.z === 0 ) p.z = zOrder( p.x, p.y, minX, minY, invSize );
|
|
34583
34966
|
p.prevZ = p.prev;
|
|
34584
34967
|
p.nextZ = p.next;
|
|
34585
34968
|
p = p.next;
|
|
@@ -34663,8 +35046,8 @@ function sortLinked( list ) {
|
|
|
34663
35046
|
function zOrder( x, y, minX, minY, invSize ) {
|
|
34664
35047
|
|
|
34665
35048
|
// coords are transformed into non-negative 15-bit integer range
|
|
34666
|
-
x =
|
|
34667
|
-
y =
|
|
35049
|
+
x = ( x - minX ) * invSize | 0;
|
|
35050
|
+
y = ( y - minY ) * invSize | 0;
|
|
34668
35051
|
|
|
34669
35052
|
x = ( x | ( x << 8 ) ) & 0x00FF00FF;
|
|
34670
35053
|
x = ( x | ( x << 4 ) ) & 0x0F0F0F0F;
|
|
@@ -34699,19 +35082,19 @@ function getLeftmost( start ) {
|
|
|
34699
35082
|
// check if a point lies within a convex triangle
|
|
34700
35083
|
function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {
|
|
34701
35084
|
|
|
34702
|
-
return ( cx - px ) * ( ay - py )
|
|
34703
|
-
|
|
34704
|
-
|
|
35085
|
+
return ( cx - px ) * ( ay - py ) >= ( ax - px ) * ( cy - py ) &&
|
|
35086
|
+
( ax - px ) * ( by - py ) >= ( bx - px ) * ( ay - py ) &&
|
|
35087
|
+
( bx - px ) * ( cy - py ) >= ( cx - px ) * ( by - py );
|
|
34705
35088
|
|
|
34706
35089
|
}
|
|
34707
35090
|
|
|
34708
35091
|
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
|
34709
35092
|
function isValidDiagonal( a, b ) {
|
|
34710
35093
|
|
|
34711
|
-
return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && //
|
|
34712
|
-
|
|
34713
|
-
|
|
34714
|
-
|
|
35094
|
+
return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges
|
|
35095
|
+
( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible
|
|
35096
|
+
( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors
|
|
35097
|
+
equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case
|
|
34715
35098
|
|
|
34716
35099
|
}
|
|
34717
35100
|
|
|
@@ -34768,7 +35151,7 @@ function intersectsPolygon( a, b ) {
|
|
|
34768
35151
|
do {
|
|
34769
35152
|
|
|
34770
35153
|
if ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
|
|
34771
|
-
|
|
35154
|
+
intersects( p, p.next, a, b ) ) return true;
|
|
34772
35155
|
p = p.next;
|
|
34773
35156
|
|
|
34774
35157
|
} while ( p !== a );
|
|
@@ -34796,7 +35179,7 @@ function middleInside( a, b ) {
|
|
|
34796
35179
|
do {
|
|
34797
35180
|
|
|
34798
35181
|
if ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&
|
|
34799
|
-
|
|
35182
|
+
( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) )
|
|
34800
35183
|
inside = ! inside;
|
|
34801
35184
|
p = p.next;
|
|
34802
35185
|
|
|
@@ -34878,7 +35261,7 @@ function Node( i, x, y ) {
|
|
|
34878
35261
|
this.next = null;
|
|
34879
35262
|
|
|
34880
35263
|
// z-order curve value
|
|
34881
|
-
this.z =
|
|
35264
|
+
this.z = 0;
|
|
34882
35265
|
|
|
34883
35266
|
// previous and next nodes in z-order
|
|
34884
35267
|
this.prevZ = null;
|
|
@@ -39903,7 +40286,10 @@ class FileLoader extends Loader {
|
|
|
39903
40286
|
|
|
39904
40287
|
const callbacks = loading[ url ];
|
|
39905
40288
|
const reader = response.body.getReader();
|
|
39906
|
-
|
|
40289
|
+
|
|
40290
|
+
// Nginx needs X-File-Size check
|
|
40291
|
+
// https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content
|
|
40292
|
+
const contentLength = response.headers.get( 'Content-Length' ) || response.headers.get( 'X-File-Size' );
|
|
39907
40293
|
const total = contentLength ? parseInt( contentLength ) : 0;
|
|
39908
40294
|
const lengthComputable = total !== 0;
|
|
39909
40295
|
let loaded = 0;
|
|
@@ -40805,7 +41191,7 @@ class SpotLightShadow extends LightShadow {
|
|
|
40805
41191
|
|
|
40806
41192
|
class SpotLight extends Light {
|
|
40807
41193
|
|
|
40808
|
-
constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay =
|
|
41194
|
+
constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) {
|
|
40809
41195
|
|
|
40810
41196
|
super( color, intensity );
|
|
40811
41197
|
|
|
@@ -40821,7 +41207,7 @@ class SpotLight extends Light {
|
|
|
40821
41207
|
this.distance = distance;
|
|
40822
41208
|
this.angle = angle;
|
|
40823
41209
|
this.penumbra = penumbra;
|
|
40824
|
-
this.decay = decay;
|
|
41210
|
+
this.decay = decay;
|
|
40825
41211
|
|
|
40826
41212
|
this.map = null;
|
|
40827
41213
|
|
|
@@ -40959,7 +41345,7 @@ class PointLightShadow extends LightShadow {
|
|
|
40959
41345
|
|
|
40960
41346
|
class PointLight extends Light {
|
|
40961
41347
|
|
|
40962
|
-
constructor( color, intensity, distance = 0, decay =
|
|
41348
|
+
constructor( color, intensity, distance = 0, decay = 2 ) {
|
|
40963
41349
|
|
|
40964
41350
|
super( color, intensity );
|
|
40965
41351
|
|
|
@@ -40968,7 +41354,7 @@ class PointLight extends Light {
|
|
|
40968
41354
|
this.type = 'PointLight';
|
|
40969
41355
|
|
|
40970
41356
|
this.distance = distance;
|
|
40971
|
-
this.decay = decay;
|
|
41357
|
+
this.decay = decay;
|
|
40972
41358
|
|
|
40973
41359
|
this.shadow = new PointLightShadow();
|
|
40974
41360
|
|
|
@@ -41832,15 +42218,9 @@ class InstancedBufferGeometry extends BufferGeometry {
|
|
|
41832
42218
|
|
|
41833
42219
|
}
|
|
41834
42220
|
|
|
41835
|
-
clone() {
|
|
41836
|
-
|
|
41837
|
-
return new this.constructor().copy( this );
|
|
41838
|
-
|
|
41839
|
-
}
|
|
41840
|
-
|
|
41841
42221
|
toJSON() {
|
|
41842
42222
|
|
|
41843
|
-
const data = super.toJSON(
|
|
42223
|
+
const data = super.toJSON();
|
|
41844
42224
|
|
|
41845
42225
|
data.instanceCount = this.instanceCount;
|
|
41846
42226
|
|
|
@@ -42104,6 +42484,8 @@ class ObjectLoader extends Loader {
|
|
|
42104
42484
|
|
|
42105
42485
|
if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {
|
|
42106
42486
|
|
|
42487
|
+
if ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\'t load ' + url ) );
|
|
42488
|
+
|
|
42107
42489
|
console.error( 'THREE.ObjectLoader: Can\'t load ' + url );
|
|
42108
42490
|
return;
|
|
42109
42491
|
|
|
@@ -42783,6 +43165,8 @@ class ObjectLoader extends Loader {
|
|
|
42783
43165
|
|
|
42784
43166
|
}
|
|
42785
43167
|
|
|
43168
|
+
if ( data.backgroundBlurriness !== undefined ) object.backgroundBlurriness = data.backgroundBlurriness;
|
|
43169
|
+
|
|
42786
43170
|
break;
|
|
42787
43171
|
|
|
42788
43172
|
case 'PerspectiveCamera':
|
|
@@ -43017,7 +43401,7 @@ class ObjectLoader extends Loader {
|
|
|
43017
43401
|
|
|
43018
43402
|
if ( child !== undefined ) {
|
|
43019
43403
|
|
|
43020
|
-
object.addLevel( child, level.distance );
|
|
43404
|
+
object.addLevel( child, level.distance, level.hysteresis );
|
|
43021
43405
|
|
|
43022
43406
|
}
|
|
43023
43407
|
|
|
@@ -43178,9 +43562,9 @@ class ImageBitmapLoader extends Loader {
|
|
|
43178
43562
|
|
|
43179
43563
|
let _context;
|
|
43180
43564
|
|
|
43181
|
-
|
|
43565
|
+
class AudioContext {
|
|
43182
43566
|
|
|
43183
|
-
getContext
|
|
43567
|
+
static getContext() {
|
|
43184
43568
|
|
|
43185
43569
|
if ( _context === undefined ) {
|
|
43186
43570
|
|
|
@@ -43190,15 +43574,15 @@ const AudioContext = {
|
|
|
43190
43574
|
|
|
43191
43575
|
return _context;
|
|
43192
43576
|
|
|
43193
|
-
}
|
|
43577
|
+
}
|
|
43194
43578
|
|
|
43195
|
-
setContext
|
|
43579
|
+
static setContext( value ) {
|
|
43196
43580
|
|
|
43197
43581
|
_context = value;
|
|
43198
43582
|
|
|
43199
43583
|
}
|
|
43200
43584
|
|
|
43201
|
-
}
|
|
43585
|
+
}
|
|
43202
43586
|
|
|
43203
43587
|
class AudioLoader extends Loader {
|
|
43204
43588
|
|
|
@@ -47798,13 +48182,14 @@ class SpotLightHelper extends Object3D {
|
|
|
47798
48182
|
super();
|
|
47799
48183
|
|
|
47800
48184
|
this.light = light;
|
|
47801
|
-
this.light.updateMatrixWorld();
|
|
47802
48185
|
|
|
47803
48186
|
this.matrix = light.matrixWorld;
|
|
47804
48187
|
this.matrixAutoUpdate = false;
|
|
47805
48188
|
|
|
47806
48189
|
this.color = color;
|
|
47807
48190
|
|
|
48191
|
+
this.type = 'SpotLightHelper';
|
|
48192
|
+
|
|
47808
48193
|
const geometry = new BufferGeometry();
|
|
47809
48194
|
|
|
47810
48195
|
const positions = [
|
|
@@ -47847,7 +48232,8 @@ class SpotLightHelper extends Object3D {
|
|
|
47847
48232
|
|
|
47848
48233
|
update() {
|
|
47849
48234
|
|
|
47850
|
-
this.light.
|
|
48235
|
+
this.light.updateWorldMatrix( true, false );
|
|
48236
|
+
this.light.target.updateWorldMatrix( true, false );
|
|
47851
48237
|
|
|
47852
48238
|
const coneLength = this.light.distance ? this.light.distance : 1000;
|
|
47853
48239
|
const coneWidth = coneLength * Math.tan( this.light.angle );
|
|
@@ -48000,7 +48386,6 @@ class PointLightHelper extends Mesh {
|
|
|
48000
48386
|
super( geometry, material );
|
|
48001
48387
|
|
|
48002
48388
|
this.light = light;
|
|
48003
|
-
this.light.updateMatrixWorld();
|
|
48004
48389
|
|
|
48005
48390
|
this.color = color;
|
|
48006
48391
|
|
|
@@ -48046,6 +48431,8 @@ class PointLightHelper extends Mesh {
|
|
|
48046
48431
|
|
|
48047
48432
|
update() {
|
|
48048
48433
|
|
|
48434
|
+
this.light.updateWorldMatrix( true, false );
|
|
48435
|
+
|
|
48049
48436
|
if ( this.color !== undefined ) {
|
|
48050
48437
|
|
|
48051
48438
|
this.material.color.set( this.color );
|
|
@@ -48086,13 +48473,14 @@ class HemisphereLightHelper extends Object3D {
|
|
|
48086
48473
|
super();
|
|
48087
48474
|
|
|
48088
48475
|
this.light = light;
|
|
48089
|
-
this.light.updateMatrixWorld();
|
|
48090
48476
|
|
|
48091
48477
|
this.matrix = light.matrixWorld;
|
|
48092
48478
|
this.matrixAutoUpdate = false;
|
|
48093
48479
|
|
|
48094
48480
|
this.color = color;
|
|
48095
48481
|
|
|
48482
|
+
this.type = 'HemisphereLightHelper';
|
|
48483
|
+
|
|
48096
48484
|
const geometry = new OctahedronGeometry( size );
|
|
48097
48485
|
geometry.rotateY( Math.PI * 0.5 );
|
|
48098
48486
|
|
|
@@ -48144,6 +48532,8 @@ class HemisphereLightHelper extends Object3D {
|
|
|
48144
48532
|
|
|
48145
48533
|
}
|
|
48146
48534
|
|
|
48535
|
+
this.light.updateWorldMatrix( true, false );
|
|
48536
|
+
|
|
48147
48537
|
mesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );
|
|
48148
48538
|
|
|
48149
48539
|
}
|
|
@@ -48297,13 +48687,14 @@ class DirectionalLightHelper extends Object3D {
|
|
|
48297
48687
|
super();
|
|
48298
48688
|
|
|
48299
48689
|
this.light = light;
|
|
48300
|
-
this.light.updateMatrixWorld();
|
|
48301
48690
|
|
|
48302
48691
|
this.matrix = light.matrixWorld;
|
|
48303
48692
|
this.matrixAutoUpdate = false;
|
|
48304
48693
|
|
|
48305
48694
|
this.color = color;
|
|
48306
48695
|
|
|
48696
|
+
this.type = 'DirectionalLightHelper';
|
|
48697
|
+
|
|
48307
48698
|
if ( size === undefined ) size = 1;
|
|
48308
48699
|
|
|
48309
48700
|
let geometry = new BufferGeometry();
|
|
@@ -48341,6 +48732,9 @@ class DirectionalLightHelper extends Object3D {
|
|
|
48341
48732
|
|
|
48342
48733
|
update() {
|
|
48343
48734
|
|
|
48735
|
+
this.light.updateWorldMatrix( true, false );
|
|
48736
|
+
this.light.target.updateWorldMatrix( true, false );
|
|
48737
|
+
|
|
48344
48738
|
_v1.setFromMatrixPosition( this.light.matrixWorld );
|
|
48345
48739
|
_v2.setFromMatrixPosition( this.light.target.matrixWorld );
|
|
48346
48740
|
_v3.subVectors( _v2, _v1 );
|
|
@@ -49769,5 +50163,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
49769
50163
|
|
|
49770
50164
|
}
|
|
49771
50165
|
|
|
49772
|
-
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxBufferGeometry, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleBufferGeometry, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleBufferGeometry, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedTexture, CompressedTextureLoader, ConeBufferGeometry, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderBufferGeometry, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTexture2DArray, DataTexture3D, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronBufferGeometry, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeBufferGeometry, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterDepth, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronBufferGeometry, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, ImmediateRenderObject, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheBufferGeometry, LatheGeometry, Layers, LessDepth, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronBufferGeometry, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneBufferGeometry, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronBufferGeometry, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, 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, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingBufferGeometry, RingGeometry, SRGBColorSpace, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeBufferGeometry, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereBufferGeometry, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronBufferGeometry, TetrahedronGeometry, Texture, TextureLoader, TorusBufferGeometry, TorusGeometry, TorusKnotBufferGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeBufferGeometry, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLMultisampleRenderTarget, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, sRGBEncoding };
|
|
49773
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhyZWUubW9kdWxlLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
50166
|
+
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxBufferGeometry, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleBufferGeometry, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleBufferGeometry, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedTexture, CompressedTextureLoader, ConeBufferGeometry, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderBufferGeometry, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTexture2DArray, DataTexture3D, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronBufferGeometry, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeBufferGeometry, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterDepth, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronBufferGeometry, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, ImmediateRenderObject, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheBufferGeometry, LatheGeometry, Layers, LessDepth, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronBufferGeometry, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneBufferGeometry, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronBufferGeometry, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, 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, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingBufferGeometry, RingGeometry, SRGBColorSpace, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeBufferGeometry, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereBufferGeometry, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronBufferGeometry, TetrahedronGeometry, Texture, TextureLoader, TorusBufferGeometry, TorusGeometry, TorusKnotBufferGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeBufferGeometry, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLMultisampleRenderTarget, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, sRGBEncoding };
|