super-three 0.172.0 → 0.173.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/LICENSE +1 -1
- package/build/three.cjs +439 -380
- package/build/three.core.js +413 -41
- package/build/three.core.min.js +2 -2
- package/build/three.module.js +28 -344
- package/build/three.module.min.js +2 -2
- package/build/three.tsl.js +11 -3
- package/build/three.tsl.min.js +2 -2
- package/build/three.webgpu.js +7550 -1798
- package/build/three.webgpu.min.js +2 -2
- package/build/three.webgpu.nodes.js +7551 -1798
- package/build/three.webgpu.nodes.min.js +2 -2
- package/examples/jsm/animation/CCDIKSolver.js +6 -5
- package/examples/jsm/capabilities/WebGPU.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +23 -21
- package/examples/jsm/exporters/GLTFExporter.js +26 -25
- package/examples/jsm/geometries/TextGeometry.js +1 -12
- package/examples/jsm/interactive/InteractiveGroup.js +108 -51
- package/examples/jsm/libs/demuxer_mp4.js +109 -0
- package/examples/jsm/loaders/GCodeLoader.js +3 -1
- package/examples/jsm/loaders/GLTFLoader.js +0 -2
- package/examples/jsm/loaders/TDSLoader.js +0 -1
- package/examples/jsm/materials/MeshGouraudMaterial.js +2 -0
- package/examples/jsm/misc/GPUComputationRenderer.js +6 -7
- package/examples/jsm/misc/ProgressiveLightMap.js +4 -3
- package/examples/jsm/misc/ProgressiveLightMapGPU.js +4 -3
- package/examples/jsm/misc/Volume.js +7 -5
- package/examples/jsm/misc/VolumeSlice.js +5 -3
- package/examples/jsm/objects/WaterMesh.js +25 -20
- package/examples/jsm/physics/JoltPhysics.js +7 -7
- package/examples/jsm/physics/RapierPhysics.js +4 -4
- package/examples/jsm/postprocessing/EffectComposer.js +23 -2
- package/examples/jsm/postprocessing/OutputPass.js +2 -0
- package/examples/jsm/postprocessing/Pass.js +6 -1
- package/examples/jsm/shaders/OutputShader.js +5 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +2 -2
- package/examples/jsm/transpiler/TSLEncoder.js +2 -0
- package/package.json +1 -1
- package/src/Three.Core.js +2 -0
- package/src/Three.TSL.js +9 -1
- package/src/cameras/ArrayCamera.js +1 -0
- package/src/constants.js +6 -1
- package/src/core/BufferAttribute.js +4 -0
- package/src/core/EventDispatcher.js +8 -6
- package/src/extras/ImageUtils.js +1 -11
- package/src/loaders/nodes/NodeObjectLoader.js +1 -1
- package/src/materials/nodes/MeshBasicNodeMaterial.js +1 -1
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +1 -1
- package/src/materials/nodes/NodeMaterial.js +5 -5
- package/src/materials/nodes/NodeMaterials.js +0 -1
- package/src/materials/nodes/PointsNodeMaterial.js +109 -7
- package/src/materials/nodes/SpriteNodeMaterial.js +1 -1
- package/src/materials/nodes/VolumeNodeMaterial.js +3 -3
- package/src/materials/nodes/manager/NodeMaterialObserver.js +8 -0
- package/src/nodes/Nodes.js +4 -0
- package/src/nodes/TSL.js +4 -0
- package/src/nodes/accessors/Arrays.js +30 -8
- package/src/nodes/accessors/BatchNode.js +3 -3
- package/src/nodes/accessors/BufferAttributeNode.js +1 -1
- package/src/nodes/accessors/Camera.js +64 -3
- package/src/nodes/accessors/InstanceNode.js +1 -1
- package/src/nodes/accessors/MaterialNode.js +9 -9
- package/src/nodes/accessors/ModelViewProjectionNode.js +1 -1
- package/src/nodes/accessors/Normal.js +6 -2
- package/src/nodes/accessors/Object3DNode.js +0 -1
- package/src/nodes/accessors/Position.js +6 -6
- package/src/nodes/accessors/ReferenceBaseNode.js +2 -4
- package/src/nodes/accessors/ReferenceNode.js +2 -3
- package/src/nodes/accessors/StorageBufferNode.js +42 -5
- package/src/nodes/accessors/Tangent.js +2 -2
- package/src/nodes/accessors/Texture3DNode.js +1 -1
- package/src/nodes/accessors/TextureNode.js +12 -5
- package/src/nodes/accessors/UniformArrayNode.js +9 -3
- package/src/nodes/accessors/VelocityNode.js +0 -2
- package/src/nodes/code/ScriptableNode.js +3 -3
- package/src/nodes/core/ArrayNode.js +125 -0
- package/src/nodes/core/ConstNode.js +8 -0
- package/src/nodes/core/Node.js +14 -1
- package/src/nodes/core/NodeBuilder.js +229 -19
- package/src/nodes/core/NodeUtils.js +11 -1
- package/src/nodes/core/NodeVar.js +17 -1
- package/src/nodes/core/OutputStructNode.js +19 -9
- package/src/nodes/core/StackNode.js +20 -1
- package/src/nodes/core/StructNode.js +121 -0
- package/src/nodes/core/StructType.js +13 -0
- package/src/nodes/core/StructTypeNode.js +82 -21
- package/src/nodes/core/TempNode.js +1 -1
- package/src/nodes/core/VarNode.js +94 -7
- package/src/nodes/core/VaryingNode.js +19 -3
- package/src/nodes/display/BlendModes.js +88 -1
- package/src/nodes/display/BumpMapNode.js +6 -6
- package/src/nodes/display/NormalMapNode.js +6 -6
- package/src/nodes/display/PassNode.js +3 -1
- package/src/nodes/display/ScreenNode.js +9 -0
- package/src/nodes/fog/Fog.js +17 -0
- package/src/nodes/gpgpu/AtomicFunctionNode.js +20 -4
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +8 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +1 -1
- package/src/nodes/lighting/ShadowNode.js +1 -1
- package/src/nodes/math/ConditionalNode.js +8 -1
- package/src/nodes/math/MathNode.js +14 -1
- package/src/nodes/math/OperatorNode.js +96 -18
- package/src/nodes/pmrem/PMREMUtils.js +1 -1
- package/src/nodes/shapes/Shapes.js +33 -0
- package/src/nodes/tsl/TSLBase.js +1 -0
- package/src/nodes/tsl/TSLCore.js +22 -2
- package/src/nodes/utils/ArrayElementNode.js +1 -1
- package/src/nodes/utils/LoopNode.js +8 -1
- package/src/nodes/utils/MemberNode.js +68 -0
- package/src/nodes/utils/StorageArrayElementNode.js +14 -0
- package/src/nodes/utils/Timer.js +21 -0
- package/src/objects/BatchedMesh.js +1 -1
- package/src/objects/Line.js +6 -6
- package/src/renderers/WebGLRenderer.js +7 -0
- package/src/renderers/common/Animation.js +23 -1
- package/src/renderers/common/Backend.js +58 -15
- package/src/renderers/common/Background.js +14 -0
- package/src/renderers/common/Binding.js +1 -1
- package/src/renderers/common/BufferUtils.js +1 -1
- package/src/renderers/common/BundleGroup.js +1 -1
- package/src/renderers/common/ChainMap.js +9 -7
- package/src/renderers/common/ClippingContext.js +1 -1
- package/src/renderers/common/Color4.js +7 -3
- package/src/renderers/common/Geometries.js +2 -23
- package/src/renderers/common/Info.js +1 -45
- package/src/renderers/common/Lighting.js +8 -6
- package/src/renderers/common/Pipelines.js +3 -3
- package/src/renderers/common/PostProcessing.js +24 -8
- package/src/renderers/common/QuadMesh.js +1 -1
- package/src/renderers/common/RenderBundles.js +9 -3
- package/src/renderers/common/RenderContext.js +37 -3
- package/src/renderers/common/RenderContexts.js +30 -17
- package/src/renderers/common/RenderList.js +2 -2
- package/src/renderers/common/RenderLists.js +9 -3
- package/src/renderers/common/RenderObject.js +76 -17
- package/src/renderers/common/RenderObjects.js +9 -7
- package/src/renderers/common/Renderer.js +86 -67
- package/src/renderers/common/SampledTexture.js +0 -1
- package/src/renderers/common/StorageBufferAttribute.js +1 -1
- package/src/renderers/common/StorageInstancedBufferAttribute.js +1 -1
- package/src/renderers/common/StorageTexture.js +1 -1
- package/src/renderers/common/Textures.js +14 -7
- package/src/renderers/common/TimestampQueryPool.js +39 -0
- package/src/renderers/common/Uniform.js +37 -1
- package/src/renderers/common/UniformsGroup.js +2 -0
- package/src/renderers/common/XRManager.js +1193 -0
- package/src/renderers/common/XRRenderTarget.js +74 -0
- package/src/renderers/common/extras/PMREMGenerator.js +53 -8
- package/src/renderers/common/nodes/NodeBuilderState.js +4 -4
- package/src/renderers/common/nodes/NodeLibrary.js +5 -5
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -1
- package/src/renderers/common/nodes/NodeUniform.js +54 -2
- package/src/renderers/common/nodes/Nodes.js +25 -18
- package/src/renderers/webgl/WebGLBackground.js +4 -0
- package/src/renderers/webgl-fallback/WebGLBackend.js +295 -110
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +347 -17
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +57 -0
- package/src/renderers/webgl-fallback/utils/WebGLCapabilities.js +28 -0
- package/src/renderers/webgl-fallback/utils/WebGLExtensions.js +45 -0
- package/src/renderers/webgl-fallback/utils/WebGLState.js +323 -11
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +167 -21
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +359 -0
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +43 -0
- package/src/renderers/webgpu/WebGPUBackend.js +132 -149
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +6 -4
- package/src/renderers/webgpu/WebGPURenderer.js +5 -4
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +615 -41
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +85 -6
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +85 -0
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +102 -3
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +98 -1
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +257 -9
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +274 -0
- package/src/renderers/webgpu/utils/WebGPUUtils.js +86 -4
- package/src/renderers/webxr/WebXRManager.js +13 -2
- package/src/textures/VideoFrameTexture.js +35 -0
- package/examples/jsm/geometries/InstancedPointsGeometry.js +0 -176
- package/examples/jsm/objects/InstancedPoints.js +0 -19
- package/src/materials/nodes/InstancedPointsNodeMaterial.js +0 -209
- package/src/nodes/accessors/InstancedPointsMaterialNode.js +0 -37
package/build/three.module.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright 2010-
|
|
3
|
+
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
import { Color, Matrix3, Vector2, mergeUniforms, Vector3, CubeUVReflectionMapping, Mesh, BoxGeometry, ShaderMaterial, cloneUniforms, BackSide, ColorManagement, SRGBTransfer, PlaneGeometry, FrontSide, getUnlitUniformColorSpace, Euler, Matrix4, IntType, RGBAFormat, HalfFloatType, UnsignedByteType, FloatType, Plane, EquirectangularReflectionMapping, EquirectangularRefractionMapping, WebGLCubeRenderTarget, CubeReflectionMapping, CubeRefractionMapping, PerspectiveCamera, NoToneMapping, MeshBasicMaterial, BufferGeometry, BufferAttribute, WebGLRenderTarget, NoBlending, OrthographicCamera, LinearFilter, LinearSRGBColorSpace, warnOnce, arrayNeedsUint32, Uint32BufferAttribute, Uint16BufferAttribute, Vector4, DataArrayTexture, LessEqualCompare, Texture, DepthTexture, Data3DTexture, CubeTexture, GLSL3, CustomToneMapping, NeutralToneMapping, AgXToneMapping, ACESFilmicToneMapping, CineonToneMapping, ReinhardToneMapping, LinearToneMapping, PCFShadowMap, PCFSoftShadowMap, VSMShadowMap, LinearTransfer, AddOperation, MixOperation, MultiplyOperation, ObjectSpaceNormalMap, TangentSpaceNormalMap, NormalBlending, DoubleSide, UniformsUtils, Layers, Frustum, MeshDepthMaterial, RGBADepthPacking, MeshDistanceMaterial, NearestFilter, LessEqualDepth, AddEquation, SubtractEquation, ReverseSubtractEquation, ZeroFactor, OneFactor, SrcColorFactor, SrcAlphaFactor, SrcAlphaSaturateFactor, DstColorFactor, DstAlphaFactor, OneMinusSrcColorFactor, OneMinusSrcAlphaFactor, OneMinusDstColorFactor, OneMinusDstAlphaFactor, ConstantColorFactor, OneMinusConstantColorFactor, ConstantAlphaFactor, OneMinusConstantAlphaFactor, CustomBlending, MultiplyBlending, SubtractiveBlending, AdditiveBlending, CullFaceNone, CullFaceBack, CullFaceFront, NotEqualDepth, GreaterDepth, GreaterEqualDepth, EqualDepth, LessDepth, AlwaysDepth, NeverDepth, MinEquation, MaxEquation, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestMipmapNearestFilter, NearestMipmapLinearFilter, LinearMipmapNearestFilter, LinearMipmapLinearFilter, NeverCompare, AlwaysCompare, LessCompare, EqualCompare, GreaterEqualCompare, GreaterCompare, NotEqualCompare, NoColorSpace, DepthStencilFormat, getByteLength, DepthFormat, UnsignedIntType, UnsignedInt248Type, UnsignedShortType, createElementNS, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt5999Type, ByteType, ShortType, AlphaFormat, RGBFormat, LuminanceFormat, LuminanceAlphaFormat, RedFormat, RedIntegerFormat, RGFormat, RGIntegerFormat, RGBAIntegerFormat, RGB_S3TC_DXT1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_PVRTC_2BPPV1_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGBA_ETC2_EAC_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_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_BPTC_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format,
|
|
7
|
-
export { AdditiveAnimationBlendMode, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, Controls, CubeCamera, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CylinderGeometry, Cylindrical, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualStencilFunc, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Fog, FogExp2, FramebufferTexture, GLBufferAttribute, GLSL1, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NeverStencilFunc, NormalAnimationBlendMode, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, OctahedronGeometry, Path, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBDepthPacking, RGBIntegerFormat, RGDepthPacking, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RenderTarget, RenderTarget3D, RenderTargetArray, ReplaceStencilOp, RingGeometry, Scene, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, ZeroStencilOp } from './three.core.js';
|
|
6
|
+
import { Color, Matrix3, Vector2, mergeUniforms, Vector3, CubeUVReflectionMapping, Mesh, BoxGeometry, ShaderMaterial, cloneUniforms, BackSide, ColorManagement, SRGBTransfer, PlaneGeometry, FrontSide, getUnlitUniformColorSpace, Euler, Matrix4, IntType, RGBAFormat, HalfFloatType, UnsignedByteType, FloatType, Plane, EquirectangularReflectionMapping, EquirectangularRefractionMapping, WebGLCubeRenderTarget, CubeReflectionMapping, CubeRefractionMapping, PerspectiveCamera, NoToneMapping, MeshBasicMaterial, BufferGeometry, BufferAttribute, WebGLRenderTarget, NoBlending, OrthographicCamera, LinearFilter, LinearSRGBColorSpace, warnOnce, arrayNeedsUint32, Uint32BufferAttribute, Uint16BufferAttribute, Vector4, DataArrayTexture, LessEqualCompare, Texture, DepthTexture, Data3DTexture, CubeTexture, GLSL3, CustomToneMapping, NeutralToneMapping, AgXToneMapping, ACESFilmicToneMapping, CineonToneMapping, ReinhardToneMapping, LinearToneMapping, PCFShadowMap, PCFSoftShadowMap, VSMShadowMap, LinearTransfer, AddOperation, MixOperation, MultiplyOperation, ObjectSpaceNormalMap, TangentSpaceNormalMap, NormalBlending, DoubleSide, UniformsUtils, Layers, Frustum, MeshDepthMaterial, RGBADepthPacking, MeshDistanceMaterial, NearestFilter, LessEqualDepth, AddEquation, SubtractEquation, ReverseSubtractEquation, ZeroFactor, OneFactor, SrcColorFactor, SrcAlphaFactor, SrcAlphaSaturateFactor, DstColorFactor, DstAlphaFactor, OneMinusSrcColorFactor, OneMinusSrcAlphaFactor, OneMinusDstColorFactor, OneMinusDstAlphaFactor, ConstantColorFactor, OneMinusConstantColorFactor, ConstantAlphaFactor, OneMinusConstantAlphaFactor, CustomBlending, MultiplyBlending, SubtractiveBlending, AdditiveBlending, CullFaceNone, CullFaceBack, CullFaceFront, NotEqualDepth, GreaterDepth, GreaterEqualDepth, EqualDepth, LessDepth, AlwaysDepth, NeverDepth, MinEquation, MaxEquation, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestMipmapNearestFilter, NearestMipmapLinearFilter, LinearMipmapNearestFilter, LinearMipmapLinearFilter, NeverCompare, AlwaysCompare, LessCompare, EqualCompare, GreaterEqualCompare, GreaterCompare, NotEqualCompare, NoColorSpace, DepthStencilFormat, getByteLength, DepthFormat, UnsignedIntType, UnsignedInt248Type, UnsignedShortType, createElementNS, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt5999Type, ByteType, ShortType, AlphaFormat, RGBFormat, LuminanceFormat, LuminanceAlphaFormat, RedFormat, RedIntegerFormat, RGFormat, RGIntegerFormat, RGBAIntegerFormat, RGB_S3TC_DXT1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_PVRTC_2BPPV1_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGBA_ETC2_EAC_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_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_BPTC_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format, EventDispatcher, ArrayCamera, WebXRController, RAD2DEG, createCanvasElement, SRGBColorSpace, REVISION, toNormalizedProjectionMatrix, toReversedProjectionMatrix, probeAsync, WebGLCoordinateSystem } from './three.core.js';
|
|
7
|
+
export { AdditiveAnimationBlendMode, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, Controls, CubeCamera, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CylinderGeometry, Cylindrical, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualStencilFunc, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Fog, FogExp2, FramebufferTexture, GLBufferAttribute, GLSL1, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NeverStencilFunc, NormalAnimationBlendMode, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, OctahedronGeometry, Path, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBDepthPacking, RGBIntegerFormat, RGDepthPacking, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RenderTarget, RenderTarget3D, RenderTargetArray, ReplaceStencilOp, RingGeometry, Scene, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, ZeroStencilOp } from './three.core.js';
|
|
8
8
|
|
|
9
9
|
function WebGLAnimation() {
|
|
10
10
|
|
|
@@ -1535,6 +1535,8 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
1535
1535
|
boxMesh.geometry.dispose();
|
|
1536
1536
|
boxMesh.material.dispose();
|
|
1537
1537
|
|
|
1538
|
+
boxMesh = undefined;
|
|
1539
|
+
|
|
1538
1540
|
}
|
|
1539
1541
|
|
|
1540
1542
|
if ( planeMesh !== undefined ) {
|
|
@@ -1542,6 +1544,8 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
1542
1544
|
planeMesh.geometry.dispose();
|
|
1543
1545
|
planeMesh.material.dispose();
|
|
1544
1546
|
|
|
1547
|
+
planeMesh = undefined;
|
|
1548
|
+
|
|
1545
1549
|
}
|
|
1546
1550
|
|
|
1547
1551
|
}
|
|
@@ -12842,344 +12846,6 @@ class WebGLMultiviewRenderTarget extends WebGLRenderTarget {
|
|
|
12842
12846
|
|
|
12843
12847
|
WebGLMultiviewRenderTarget.prototype.isWebGLMultiviewRenderTarget = true;
|
|
12844
12848
|
|
|
12845
|
-
const _moveEvent = { type: 'move' };
|
|
12846
|
-
|
|
12847
|
-
class WebXRController {
|
|
12848
|
-
|
|
12849
|
-
constructor() {
|
|
12850
|
-
|
|
12851
|
-
this._targetRay = null;
|
|
12852
|
-
this._grip = null;
|
|
12853
|
-
this._hand = null;
|
|
12854
|
-
|
|
12855
|
-
}
|
|
12856
|
-
|
|
12857
|
-
getHandSpace() {
|
|
12858
|
-
|
|
12859
|
-
if ( this._hand === null ) {
|
|
12860
|
-
|
|
12861
|
-
this._hand = new Group();
|
|
12862
|
-
this._hand.matrixAutoUpdate = false;
|
|
12863
|
-
this._hand.visible = false;
|
|
12864
|
-
|
|
12865
|
-
this._hand.joints = {};
|
|
12866
|
-
this._hand.inputState = { pinching: false };
|
|
12867
|
-
|
|
12868
|
-
}
|
|
12869
|
-
|
|
12870
|
-
return this._hand;
|
|
12871
|
-
|
|
12872
|
-
}
|
|
12873
|
-
|
|
12874
|
-
getTargetRaySpace() {
|
|
12875
|
-
|
|
12876
|
-
if ( this._targetRay === null ) {
|
|
12877
|
-
|
|
12878
|
-
this._targetRay = new Group();
|
|
12879
|
-
this._targetRay.matrixAutoUpdate = false;
|
|
12880
|
-
this._targetRay.visible = false;
|
|
12881
|
-
this._targetRay.hasLinearVelocity = false;
|
|
12882
|
-
this._targetRay.linearVelocity = new Vector3();
|
|
12883
|
-
this._targetRay.hasAngularVelocity = false;
|
|
12884
|
-
this._targetRay.angularVelocity = new Vector3();
|
|
12885
|
-
|
|
12886
|
-
}
|
|
12887
|
-
|
|
12888
|
-
return this._targetRay;
|
|
12889
|
-
|
|
12890
|
-
}
|
|
12891
|
-
|
|
12892
|
-
getGripSpace() {
|
|
12893
|
-
|
|
12894
|
-
if ( this._grip === null ) {
|
|
12895
|
-
|
|
12896
|
-
this._grip = new Group();
|
|
12897
|
-
this._grip.matrixAutoUpdate = false;
|
|
12898
|
-
this._grip.visible = false;
|
|
12899
|
-
this._grip.hasLinearVelocity = false;
|
|
12900
|
-
this._grip.linearVelocity = new Vector3();
|
|
12901
|
-
this._grip.hasAngularVelocity = false;
|
|
12902
|
-
this._grip.angularVelocity = new Vector3();
|
|
12903
|
-
|
|
12904
|
-
}
|
|
12905
|
-
|
|
12906
|
-
return this._grip;
|
|
12907
|
-
|
|
12908
|
-
}
|
|
12909
|
-
|
|
12910
|
-
dispatchEvent( event ) {
|
|
12911
|
-
|
|
12912
|
-
if ( this._targetRay !== null ) {
|
|
12913
|
-
|
|
12914
|
-
this._targetRay.dispatchEvent( event );
|
|
12915
|
-
|
|
12916
|
-
}
|
|
12917
|
-
|
|
12918
|
-
if ( this._grip !== null ) {
|
|
12919
|
-
|
|
12920
|
-
this._grip.dispatchEvent( event );
|
|
12921
|
-
|
|
12922
|
-
}
|
|
12923
|
-
|
|
12924
|
-
if ( this._hand !== null ) {
|
|
12925
|
-
|
|
12926
|
-
this._hand.dispatchEvent( event );
|
|
12927
|
-
|
|
12928
|
-
}
|
|
12929
|
-
|
|
12930
|
-
return this;
|
|
12931
|
-
|
|
12932
|
-
}
|
|
12933
|
-
|
|
12934
|
-
connect( inputSource ) {
|
|
12935
|
-
|
|
12936
|
-
if ( inputSource && inputSource.hand ) {
|
|
12937
|
-
|
|
12938
|
-
const hand = this._hand;
|
|
12939
|
-
|
|
12940
|
-
if ( hand ) {
|
|
12941
|
-
|
|
12942
|
-
for ( const inputjoint of inputSource.hand.values() ) {
|
|
12943
|
-
|
|
12944
|
-
// Initialize hand with joints when connected
|
|
12945
|
-
this._getHandJoint( hand, inputjoint );
|
|
12946
|
-
|
|
12947
|
-
}
|
|
12948
|
-
|
|
12949
|
-
}
|
|
12950
|
-
|
|
12951
|
-
}
|
|
12952
|
-
|
|
12953
|
-
this.dispatchEvent( { type: 'connected', data: inputSource } );
|
|
12954
|
-
|
|
12955
|
-
return this;
|
|
12956
|
-
|
|
12957
|
-
}
|
|
12958
|
-
|
|
12959
|
-
disconnect( inputSource ) {
|
|
12960
|
-
|
|
12961
|
-
this.dispatchEvent( { type: 'disconnected', data: inputSource } );
|
|
12962
|
-
|
|
12963
|
-
if ( this._targetRay !== null ) {
|
|
12964
|
-
|
|
12965
|
-
this._targetRay.visible = false;
|
|
12966
|
-
|
|
12967
|
-
}
|
|
12968
|
-
|
|
12969
|
-
if ( this._grip !== null ) {
|
|
12970
|
-
|
|
12971
|
-
this._grip.visible = false;
|
|
12972
|
-
|
|
12973
|
-
}
|
|
12974
|
-
|
|
12975
|
-
if ( this._hand !== null ) {
|
|
12976
|
-
|
|
12977
|
-
this._hand.visible = false;
|
|
12978
|
-
|
|
12979
|
-
}
|
|
12980
|
-
|
|
12981
|
-
return this;
|
|
12982
|
-
|
|
12983
|
-
}
|
|
12984
|
-
|
|
12985
|
-
update( inputSource, frame, referenceSpace ) {
|
|
12986
|
-
|
|
12987
|
-
let inputPose = null;
|
|
12988
|
-
let gripPose = null;
|
|
12989
|
-
let handPose = null;
|
|
12990
|
-
|
|
12991
|
-
const targetRay = this._targetRay;
|
|
12992
|
-
const grip = this._grip;
|
|
12993
|
-
const hand = this._hand;
|
|
12994
|
-
|
|
12995
|
-
if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {
|
|
12996
|
-
|
|
12997
|
-
if ( hand && inputSource.hand ) {
|
|
12998
|
-
|
|
12999
|
-
handPose = true;
|
|
13000
|
-
|
|
13001
|
-
for ( const inputjoint of inputSource.hand.values() ) {
|
|
13002
|
-
|
|
13003
|
-
// Update the joints groups with the XRJoint poses
|
|
13004
|
-
const jointPose = frame.getJointPose( inputjoint, referenceSpace );
|
|
13005
|
-
|
|
13006
|
-
// The transform of this joint will be updated with the joint pose on each frame
|
|
13007
|
-
const joint = this._getHandJoint( hand, inputjoint );
|
|
13008
|
-
|
|
13009
|
-
if ( jointPose !== null ) {
|
|
13010
|
-
|
|
13011
|
-
joint.matrix.fromArray( jointPose.transform.matrix );
|
|
13012
|
-
joint.matrix.decompose( joint.position, joint.rotation, joint.scale );
|
|
13013
|
-
joint.matrixWorldNeedsUpdate = true;
|
|
13014
|
-
joint.jointRadius = jointPose.radius;
|
|
13015
|
-
|
|
13016
|
-
}
|
|
13017
|
-
|
|
13018
|
-
joint.visible = jointPose !== null;
|
|
13019
|
-
|
|
13020
|
-
}
|
|
13021
|
-
|
|
13022
|
-
// Custom events
|
|
13023
|
-
|
|
13024
|
-
// Check pinchz
|
|
13025
|
-
const indexTip = hand.joints[ 'index-finger-tip' ];
|
|
13026
|
-
const thumbTip = hand.joints[ 'thumb-tip' ];
|
|
13027
|
-
const distance = indexTip.position.distanceTo( thumbTip.position );
|
|
13028
|
-
|
|
13029
|
-
const distanceToPinch = 0.02;
|
|
13030
|
-
const threshold = 0.005;
|
|
13031
|
-
|
|
13032
|
-
if ( hand.inputState.pinching && distance > distanceToPinch + threshold ) {
|
|
13033
|
-
|
|
13034
|
-
hand.inputState.pinching = false;
|
|
13035
|
-
this.dispatchEvent( {
|
|
13036
|
-
type: 'pinchend',
|
|
13037
|
-
handedness: inputSource.handedness,
|
|
13038
|
-
target: this
|
|
13039
|
-
} );
|
|
13040
|
-
|
|
13041
|
-
} else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) {
|
|
13042
|
-
|
|
13043
|
-
hand.inputState.pinching = true;
|
|
13044
|
-
this.dispatchEvent( {
|
|
13045
|
-
type: 'pinchstart',
|
|
13046
|
-
handedness: inputSource.handedness,
|
|
13047
|
-
target: this
|
|
13048
|
-
} );
|
|
13049
|
-
|
|
13050
|
-
}
|
|
13051
|
-
|
|
13052
|
-
} else {
|
|
13053
|
-
|
|
13054
|
-
if ( grip !== null && inputSource.gripSpace ) {
|
|
13055
|
-
|
|
13056
|
-
gripPose = frame.getPose( inputSource.gripSpace, referenceSpace );
|
|
13057
|
-
|
|
13058
|
-
if ( gripPose !== null ) {
|
|
13059
|
-
|
|
13060
|
-
grip.matrix.fromArray( gripPose.transform.matrix );
|
|
13061
|
-
grip.matrix.decompose( grip.position, grip.rotation, grip.scale );
|
|
13062
|
-
grip.matrixWorldNeedsUpdate = true;
|
|
13063
|
-
|
|
13064
|
-
if ( gripPose.linearVelocity ) {
|
|
13065
|
-
|
|
13066
|
-
grip.hasLinearVelocity = true;
|
|
13067
|
-
grip.linearVelocity.copy( gripPose.linearVelocity );
|
|
13068
|
-
|
|
13069
|
-
} else {
|
|
13070
|
-
|
|
13071
|
-
grip.hasLinearVelocity = false;
|
|
13072
|
-
|
|
13073
|
-
}
|
|
13074
|
-
|
|
13075
|
-
if ( gripPose.angularVelocity ) {
|
|
13076
|
-
|
|
13077
|
-
grip.hasAngularVelocity = true;
|
|
13078
|
-
grip.angularVelocity.copy( gripPose.angularVelocity );
|
|
13079
|
-
|
|
13080
|
-
} else {
|
|
13081
|
-
|
|
13082
|
-
grip.hasAngularVelocity = false;
|
|
13083
|
-
|
|
13084
|
-
}
|
|
13085
|
-
|
|
13086
|
-
}
|
|
13087
|
-
|
|
13088
|
-
}
|
|
13089
|
-
|
|
13090
|
-
}
|
|
13091
|
-
|
|
13092
|
-
if ( targetRay !== null ) {
|
|
13093
|
-
|
|
13094
|
-
inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
|
|
13095
|
-
|
|
13096
|
-
// Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it
|
|
13097
|
-
if ( inputPose === null && gripPose !== null ) {
|
|
13098
|
-
|
|
13099
|
-
inputPose = gripPose;
|
|
13100
|
-
|
|
13101
|
-
}
|
|
13102
|
-
|
|
13103
|
-
if ( inputPose !== null ) {
|
|
13104
|
-
|
|
13105
|
-
targetRay.matrix.fromArray( inputPose.transform.matrix );
|
|
13106
|
-
targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
|
|
13107
|
-
targetRay.matrixWorldNeedsUpdate = true;
|
|
13108
|
-
|
|
13109
|
-
if ( inputPose.linearVelocity ) {
|
|
13110
|
-
|
|
13111
|
-
targetRay.hasLinearVelocity = true;
|
|
13112
|
-
targetRay.linearVelocity.copy( inputPose.linearVelocity );
|
|
13113
|
-
|
|
13114
|
-
} else {
|
|
13115
|
-
|
|
13116
|
-
targetRay.hasLinearVelocity = false;
|
|
13117
|
-
|
|
13118
|
-
}
|
|
13119
|
-
|
|
13120
|
-
if ( inputPose.angularVelocity ) {
|
|
13121
|
-
|
|
13122
|
-
targetRay.hasAngularVelocity = true;
|
|
13123
|
-
targetRay.angularVelocity.copy( inputPose.angularVelocity );
|
|
13124
|
-
|
|
13125
|
-
} else {
|
|
13126
|
-
|
|
13127
|
-
targetRay.hasAngularVelocity = false;
|
|
13128
|
-
|
|
13129
|
-
}
|
|
13130
|
-
|
|
13131
|
-
this.dispatchEvent( _moveEvent );
|
|
13132
|
-
|
|
13133
|
-
}
|
|
13134
|
-
|
|
13135
|
-
}
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
}
|
|
13139
|
-
|
|
13140
|
-
if ( targetRay !== null ) {
|
|
13141
|
-
|
|
13142
|
-
targetRay.visible = ( inputPose !== null );
|
|
13143
|
-
|
|
13144
|
-
}
|
|
13145
|
-
|
|
13146
|
-
if ( grip !== null ) {
|
|
13147
|
-
|
|
13148
|
-
grip.visible = ( gripPose !== null );
|
|
13149
|
-
|
|
13150
|
-
}
|
|
13151
|
-
|
|
13152
|
-
if ( hand !== null ) {
|
|
13153
|
-
|
|
13154
|
-
hand.visible = ( handPose !== null );
|
|
13155
|
-
|
|
13156
|
-
}
|
|
13157
|
-
|
|
13158
|
-
return this;
|
|
13159
|
-
|
|
13160
|
-
}
|
|
13161
|
-
|
|
13162
|
-
// private method
|
|
13163
|
-
|
|
13164
|
-
_getHandJoint( hand, inputjoint ) {
|
|
13165
|
-
|
|
13166
|
-
if ( hand.joints[ inputjoint.jointName ] === undefined ) {
|
|
13167
|
-
|
|
13168
|
-
const joint = new Group();
|
|
13169
|
-
joint.matrixAutoUpdate = false;
|
|
13170
|
-
joint.visible = false;
|
|
13171
|
-
hand.joints[ inputjoint.jointName ] = joint;
|
|
13172
|
-
|
|
13173
|
-
hand.add( joint );
|
|
13174
|
-
|
|
13175
|
-
}
|
|
13176
|
-
|
|
13177
|
-
return hand.joints[ inputjoint.jointName ];
|
|
13178
|
-
|
|
13179
|
-
}
|
|
13180
|
-
|
|
13181
|
-
}
|
|
13182
|
-
|
|
13183
12849
|
const _occlusion_vertex = `
|
|
13184
12850
|
void main() {
|
|
13185
12851
|
|
|
@@ -13519,6 +13185,12 @@ class WebXRManager extends EventDispatcher {
|
|
|
13519
13185
|
|
|
13520
13186
|
};
|
|
13521
13187
|
|
|
13188
|
+
this.getRenderTarget = function () {
|
|
13189
|
+
|
|
13190
|
+
return newRenderTarget;
|
|
13191
|
+
|
|
13192
|
+
};
|
|
13193
|
+
|
|
13522
13194
|
this.getFrame = function () {
|
|
13523
13195
|
|
|
13524
13196
|
return xrFrame;
|
|
@@ -13557,7 +13229,9 @@ class WebXRManager extends EventDispatcher {
|
|
|
13557
13229
|
currentPixelRatio = renderer.getPixelRatio();
|
|
13558
13230
|
renderer.getSize( currentSize );
|
|
13559
13231
|
|
|
13560
|
-
|
|
13232
|
+
// Check that the browser implements the necessary APIs to use an
|
|
13233
|
+
// XRProjectionLayer rather than an XRWebGLLayer
|
|
13234
|
+
const useLayers = typeof XRWebGLBinding !== 'undefined' && 'createProjectionLayer' in XRWebGLBinding.prototype;
|
|
13561
13235
|
|
|
13562
13236
|
if ( ! useLayers ) {
|
|
13563
13237
|
|
|
@@ -14116,8 +13790,11 @@ class WebXRManager extends EventDispatcher {
|
|
|
14116
13790
|
//
|
|
14117
13791
|
|
|
14118
13792
|
const enabledFeatures = session.enabledFeatures;
|
|
13793
|
+
const gpuDepthSensingEnabled = enabledFeatures &&
|
|
13794
|
+
enabledFeatures.includes( 'depth-sensing' ) &&
|
|
13795
|
+
session.depthUsage == 'gpu-optimized';
|
|
14119
13796
|
|
|
14120
|
-
if (
|
|
13797
|
+
if ( gpuDepthSensingEnabled && glBinding ) {
|
|
14121
13798
|
|
|
14122
13799
|
const depthData = glBinding.getDepthInformation( views[ 0 ] );
|
|
14123
13800
|
|
|
@@ -17428,6 +17105,13 @@ class WebGLRenderer {
|
|
|
17428
17105
|
const _scratchFrameBuffer = _gl.createFramebuffer();
|
|
17429
17106
|
this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {
|
|
17430
17107
|
|
|
17108
|
+
// Render to base layer instead of canvas in WebXR
|
|
17109
|
+
if ( renderTarget === null && this.xr.isPresenting ) {
|
|
17110
|
+
|
|
17111
|
+
renderTarget = this.xr.getRenderTarget();
|
|
17112
|
+
|
|
17113
|
+
}
|
|
17114
|
+
|
|
17431
17115
|
_currentRenderTarget = renderTarget;
|
|
17432
17116
|
_currentActiveCubeFace = activeCubeFace;
|
|
17433
17117
|
_currentActiveMipmapLevel = activeMipmapLevel;
|
|
@@ -18109,4 +17793,4 @@ class WebGLRenderer {
|
|
|
18109
17793
|
|
|
18110
17794
|
}
|
|
18111
17795
|
|
|
18112
|
-
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, ArrayCamera, BackSide, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, ConstantAlphaFactor, ConstantColorFactor, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CustomToneMapping, Data3DTexture, DataArrayTexture, DepthFormat, DepthStencilFormat, DepthTexture, DoubleSide, DstAlphaFactor, DstColorFactor, EqualCompare, EqualDepth, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, FloatType, FrontSide, Frustum, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth,
|
|
17796
|
+
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, ArrayCamera, BackSide, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, ConstantAlphaFactor, ConstantColorFactor, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CustomToneMapping, Data3DTexture, DataArrayTexture, DepthFormat, DepthStencilFormat, DepthTexture, DoubleSide, DstAlphaFactor, DstColorFactor, EqualCompare, EqualDepth, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, FloatType, FrontSide, Frustum, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, HalfFloatType, IntType, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, LuminanceAlphaFormat, LuminanceFormat, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NoBlending, NoColorSpace, NoToneMapping, NormalBlending, NotEqualCompare, NotEqualDepth, ObjectSpaceNormalMap, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, PerspectiveCamera, Plane, PlaneGeometry, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReverseSubtractEquation, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, ShaderChunk, ShaderLib, ShaderMaterial, ShortType, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, Uint16BufferAttribute, Uint32BufferAttribute, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebXRController, ZeroFactor, createCanvasElement };
|