super-three 0.158.0 → 0.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +1719 -379
- package/build/three.js +1719 -379
- package/build/three.min.js +1 -1
- package/build/three.module.js +1718 -380
- package/build/three.module.min.js +1 -1
- package/examples/jsm/Addons.js +2 -1
- package/examples/jsm/controls/OrbitControls.js +50 -40
- package/examples/jsm/csm/CSMShader.js +52 -47
- package/examples/jsm/exporters/GLTFExporter.js +79 -1
- package/examples/jsm/exporters/USDZExporter.js +27 -19
- package/examples/jsm/helpers/TextureHelper.js +237 -0
- package/examples/jsm/interactive/HTMLMesh.js +9 -2
- package/examples/jsm/lines/LineMaterial.js +16 -33
- package/examples/jsm/loaders/ColladaLoader.js +0 -6
- package/examples/jsm/loaders/DRACOLoader.js +4 -3
- package/examples/jsm/loaders/FBXLoader.js +294 -124
- package/examples/jsm/loaders/GLTFLoader.js +71 -3
- package/examples/jsm/loaders/MaterialXLoader.js +73 -54
- package/examples/jsm/loaders/NRRDLoader.js +0 -13
- package/examples/jsm/loaders/SVGLoader.js +4 -4
- package/examples/jsm/loaders/USDZLoader.js +3 -17
- package/examples/jsm/math/Octree.js +15 -4
- package/examples/jsm/misc/Timer.js +119 -0
- package/examples/jsm/misc/TubePainter.js +3 -6
- package/examples/jsm/modifiers/CurveModifier.js +20 -2
- package/examples/jsm/nodes/Nodes.js +11 -7
- package/examples/jsm/nodes/accessors/CameraNode.js +18 -2
- package/examples/jsm/nodes/accessors/CubeTextureNode.js +5 -73
- package/examples/jsm/nodes/accessors/MaterialReferenceNode.js +11 -2
- package/examples/jsm/nodes/accessors/ModelNode.js +1 -1
- package/examples/jsm/nodes/accessors/ModelViewProjectionNode.js +12 -3
- package/examples/jsm/nodes/accessors/MorphNode.js +191 -16
- package/examples/jsm/nodes/accessors/ReferenceNode.js +25 -1
- package/examples/jsm/nodes/accessors/TextureNode.js +122 -36
- package/examples/jsm/nodes/code/CodeNode.js +3 -3
- package/examples/jsm/nodes/core/AttributeNode.js +7 -1
- package/examples/jsm/nodes/core/CacheNode.js +4 -1
- package/examples/jsm/nodes/core/ConstNode.js +1 -1
- package/examples/jsm/nodes/core/Node.js +6 -3
- package/examples/jsm/nodes/core/NodeBuilder.js +84 -27
- package/examples/jsm/nodes/core/NodeFrame.js +10 -8
- package/examples/jsm/nodes/core/NodeUniform.js +12 -0
- package/examples/jsm/nodes/core/NodeUtils.js +3 -7
- package/examples/jsm/nodes/core/OutputStructNode.js +3 -3
- package/examples/jsm/nodes/core/PropertyNode.js +17 -2
- package/examples/jsm/nodes/core/StructTypeNode.js +4 -4
- package/examples/jsm/nodes/core/UniformGroup.js +13 -0
- package/examples/jsm/nodes/core/UniformGroupNode.js +36 -0
- package/examples/jsm/nodes/core/UniformNode.js +17 -0
- package/examples/jsm/nodes/core/VarNode.js +2 -0
- package/examples/jsm/nodes/core/VaryingNode.js +1 -7
- package/examples/jsm/nodes/display/BumpMapNode.js +1 -1
- package/examples/jsm/nodes/display/ColorAdjustmentNode.js +6 -10
- package/examples/jsm/nodes/display/GaussianBlurNode.js +170 -0
- package/examples/jsm/nodes/display/PassNode.js +182 -0
- package/examples/jsm/nodes/display/ViewportDepthNode.js +31 -3
- package/examples/jsm/nodes/display/ViewportDepthTextureNode.js +2 -2
- package/examples/jsm/nodes/display/ViewportNode.js +5 -8
- package/examples/jsm/nodes/functions/PhysicalLightingModel.js +1 -1
- package/examples/jsm/nodes/lighting/AnalyticLightNode.js +52 -17
- package/examples/jsm/nodes/lighting/EnvironmentNode.js +8 -12
- package/examples/jsm/nodes/lighting/LightsNode.js +34 -32
- package/examples/jsm/nodes/materials/InstancedPointsNodeMaterial.js +1 -1
- package/examples/jsm/nodes/materials/Line2NodeMaterial.js +12 -12
- package/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js +1 -0
- package/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js +1 -1
- package/examples/jsm/nodes/materials/NodeMaterial.js +66 -41
- package/examples/jsm/nodes/materials/PointsNodeMaterial.js +0 -10
- package/examples/jsm/nodes/materials/SpriteNodeMaterial.js +0 -7
- package/examples/jsm/nodes/materialx/MaterialXNodes.js +10 -10
- package/examples/jsm/nodes/materialx/lib/mx_hsv.js +128 -54
- package/examples/jsm/nodes/materialx/lib/mx_noise.js +1430 -618
- package/examples/jsm/nodes/materialx/lib/mx_transform_color.js +24 -14
- package/examples/jsm/nodes/math/MathNode.js +2 -0
- package/examples/jsm/nodes/math/OperatorNode.js +19 -6
- package/examples/jsm/nodes/shadernode/ShaderNode.js +32 -3
- package/examples/jsm/nodes/utils/FunctionOverloadingNode.js +95 -0
- package/examples/jsm/nodes/utils/RemapNode.js +2 -2
- package/examples/jsm/nodes/utils/SplitNode.js +8 -2
- package/examples/jsm/nodes/utils/TriplanarTexturesNode.js +3 -3
- package/examples/jsm/objects/QuadMesh.js +60 -0
- package/examples/jsm/postprocessing/GTAOPass.js +572 -0
- package/examples/jsm/postprocessing/OutputPass.js +2 -0
- package/examples/jsm/renderers/common/Animation.js +10 -21
- package/examples/jsm/renderers/common/Backend.js +19 -3
- package/examples/jsm/renderers/common/Background.js +20 -22
- package/examples/jsm/renderers/common/Bindings.js +30 -21
- package/examples/jsm/renderers/common/ChainMap.js +3 -3
- package/examples/jsm/renderers/common/Color4.js +37 -0
- package/examples/jsm/renderers/common/Geometries.js +4 -4
- package/examples/jsm/renderers/common/Info.js +12 -2
- package/examples/jsm/renderers/common/Pipelines.js +3 -51
- package/examples/jsm/renderers/common/PostProcessing.js +25 -0
- package/examples/jsm/renderers/common/RenderContext.js +1 -1
- package/examples/jsm/renderers/common/RenderContexts.js +1 -1
- package/examples/jsm/renderers/common/RenderObject.js +13 -1
- package/examples/jsm/renderers/common/RenderObjects.js +4 -2
- package/examples/jsm/renderers/common/Renderer.js +137 -37
- package/examples/jsm/renderers/common/StorageTexture.js +1 -0
- package/examples/jsm/renderers/common/Textures.js +4 -1
- package/examples/jsm/renderers/common/nodes/NodeBuilderState.js +10 -2
- package/examples/jsm/renderers/common/nodes/NodeUniformsGroup.js +44 -0
- package/examples/jsm/renderers/common/nodes/Nodes.js +74 -7
- package/examples/jsm/renderers/webgl/WebGLBackend.js +91 -33
- package/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js +100 -31
- package/examples/jsm/renderers/webgl/utils/WebGLAttributeUtils.js +57 -5
- package/examples/jsm/renderers/webgl/utils/WebGLCapabilities.js +36 -0
- package/examples/jsm/renderers/webgl/utils/WebGLExtensions.js +11 -1
- package/examples/jsm/renderers/webgl/utils/WebGLTextureUtils.js +71 -2
- package/examples/jsm/renderers/webgl/utils/WebGLUtils.js +42 -0
- package/examples/jsm/renderers/webgl-legacy/nodes/SlotNode.js +1 -1
- package/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodeBuilder.js +33 -3
- package/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.js +4 -14
- package/examples/jsm/renderers/webgpu/WebGPUBackend.js +186 -137
- package/examples/jsm/renderers/webgpu/WebGPURenderer.js +1 -1
- package/examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.js +209 -90
- package/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js +15 -10
- package/examples/jsm/renderers/webgpu/utils/WebGPUBindingUtils.js +11 -3
- package/examples/jsm/renderers/webgpu/utils/WebGPUPipelineUtils.js +2 -3
- package/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js +88 -6
- package/examples/jsm/shaders/FXAAShader.js +133 -133
- package/examples/jsm/shaders/GTAOShader.js +424 -0
- package/examples/jsm/shaders/OutputShader.js +4 -0
- package/examples/jsm/shaders/PoissonDenoiseShader.js +226 -0
- package/examples/jsm/shaders/SAOShader.js +2 -3
- package/examples/jsm/shaders/SSAOShader.js +2 -3
- package/examples/jsm/transpiler/AST.js +40 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +50 -8
- package/examples/jsm/transpiler/ShaderToyDecoder.js +4 -4
- package/examples/jsm/transpiler/TSLEncoder.js +124 -20
- package/examples/jsm/utils/SortUtils.js +158 -0
- package/examples/jsm/utils/TextureUtils.js +33 -21
- package/examples/jsm/webxr/ARButton.js +14 -0
- package/examples/jsm/webxr/VRButton.js +23 -8
- package/examples/jsm/webxr/XRButton.js +25 -11
- package/package.json +5 -6
- package/src/Three.js +1 -0
- package/src/constants.js +2 -1
- package/src/core/BufferAttribute.js +21 -2
- package/src/core/InterleavedBuffer.js +21 -1
- package/src/core/Object3D.js +60 -12
- package/src/core/UniformsGroup.js +7 -1
- package/src/extras/curves/LineCurve3.js +4 -0
- package/src/loaders/AudioLoader.js +1 -1
- package/src/loaders/BufferGeometryLoader.js +0 -7
- package/src/loaders/ImageBitmapLoader.js +25 -1
- package/src/loaders/ObjectLoader.js +49 -0
- package/src/materials/ShaderMaterial.js +2 -1
- package/src/math/ColorManagement.js +0 -16
- package/src/math/Quaternion.js +5 -4
- package/src/math/Sphere.js +2 -0
- package/src/math/Triangle.js +17 -5
- package/src/objects/BatchedMesh.js +1020 -0
- package/src/objects/Skeleton.js +1 -3
- package/src/renderers/WebGL3DRenderTarget.js +2 -2
- package/src/renderers/WebGLArrayRenderTarget.js +2 -2
- package/src/renderers/WebGLRenderer.js +23 -18
- package/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.js +19 -0
- package/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js +0 -5
- package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +31 -4
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +9 -4
- package/src/renderers/shaders/ShaderChunk/project_vertex.glsl.js +6 -0
- package/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.js +9 -17
- package/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.js +84 -0
- package/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.js +6 -0
- package/src/renderers/shaders/ShaderChunk.js +4 -0
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/distanceRGBA.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshbasic.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshlambert.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshmatcap.glsl.js +3 -0
- package/src/renderers/shaders/ShaderLib/meshnormal.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshphong.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/meshtoon.glsl.js +2 -0
- package/src/renderers/shaders/ShaderLib/shadow.glsl.js +3 -0
- package/src/renderers/webgl/WebGLAttributes.js +39 -5
- package/src/renderers/webgl/WebGLBufferRenderer.js +31 -0
- package/src/renderers/webgl/WebGLCubeMaps.js +1 -1
- package/src/renderers/webgl/WebGLExtensions.js +1 -0
- package/src/renderers/webgl/WebGLIndexedBufferRenderer.js +31 -0
- package/src/renderers/webgl/WebGLLights.js +11 -2
- package/src/renderers/webgl/WebGLProgram.js +20 -1
- package/src/renderers/webgl/WebGLPrograms.js +5 -0
- package/src/renderers/webgl/WebGLShadowMap.js +35 -0
- package/src/renderers/webgl/WebGLTextures.js +7 -11
- package/src/renderers/webgl/WebGLUniforms.js +11 -1
- package/src/renderers/webgl/WebGLUniformsGroups.js +72 -93
- package/src/renderers/webxr/WebXRManager.js +16 -0
- package/examples/jsm/objects/BatchedMesh.js +0 -586
package/examples/jsm/Addons.js
CHANGED
|
@@ -60,6 +60,7 @@ export * from './helpers/LightProbeHelper.js';
|
|
|
60
60
|
export * from './helpers/OctreeHelper.js';
|
|
61
61
|
export * from './helpers/PositionalAudioHelper.js';
|
|
62
62
|
export * from './helpers/RectAreaLightHelper.js';
|
|
63
|
+
export * from './helpers/TextureHelper.js';
|
|
63
64
|
export * from './helpers/VertexNormalsHelper.js';
|
|
64
65
|
export * from './helpers/VertexTangentsHelper.js';
|
|
65
66
|
export * from './helpers/ViewHelper.js';
|
|
@@ -159,7 +160,6 @@ export * from './modifiers/EdgeSplitModifier.js';
|
|
|
159
160
|
export * from './modifiers/SimplifyModifier.js';
|
|
160
161
|
export * from './modifiers/TessellateModifier.js';
|
|
161
162
|
|
|
162
|
-
export * from './objects/BatchedMesh.js';
|
|
163
163
|
export * from './objects/GroundProjectedSkybox.js';
|
|
164
164
|
export * from './objects/Lensflare.js';
|
|
165
165
|
export * from './objects/MarchingCubes.js';
|
|
@@ -272,6 +272,7 @@ export * from './utils/PackedPhongMaterial.js';
|
|
|
272
272
|
export * as SceneUtils from './utils/SceneUtils.js';
|
|
273
273
|
export * from './utils/ShadowMapViewer.js';
|
|
274
274
|
export * as SkeletonUtils from './utils/SkeletonUtils.js';
|
|
275
|
+
export * as SortUtils from './utils/SortUtils.js';
|
|
275
276
|
export * from './utils/TextureUtils.js';
|
|
276
277
|
export * from './utils/UVsDebug.js';
|
|
277
278
|
export * from './utils/WorkerPool.js';
|
|
@@ -398,8 +398,6 @@ class OrbitControls extends EventDispatcher {
|
|
|
398
398
|
lastQuaternion.copy( scope.object.quaternion );
|
|
399
399
|
lastTargetPosition.copy( scope.target );
|
|
400
400
|
|
|
401
|
-
zoomChanged = false;
|
|
402
|
-
|
|
403
401
|
return true;
|
|
404
402
|
|
|
405
403
|
}
|
|
@@ -494,9 +492,10 @@ class OrbitControls extends EventDispatcher {
|
|
|
494
492
|
|
|
495
493
|
}
|
|
496
494
|
|
|
497
|
-
function getZoomScale() {
|
|
495
|
+
function getZoomScale( delta ) {
|
|
498
496
|
|
|
499
|
-
|
|
497
|
+
const normalized_delta = Math.abs( delta ) / ( 100 * ( window.devicePixelRatio | 0 ) );
|
|
498
|
+
return Math.pow( 0.95, scope.zoomSpeed * normalized_delta );
|
|
500
499
|
|
|
501
500
|
}
|
|
502
501
|
|
|
@@ -623,7 +622,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
623
622
|
|
|
624
623
|
}
|
|
625
624
|
|
|
626
|
-
function
|
|
625
|
+
function updateZoomParameters( x, y ) {
|
|
627
626
|
|
|
628
627
|
if ( ! scope.zoomToCursor ) {
|
|
629
628
|
|
|
@@ -634,13 +633,13 @@ class OrbitControls extends EventDispatcher {
|
|
|
634
633
|
performCursorZoom = true;
|
|
635
634
|
|
|
636
635
|
const rect = scope.domElement.getBoundingClientRect();
|
|
637
|
-
const
|
|
638
|
-
const
|
|
636
|
+
const dx = x - rect.left;
|
|
637
|
+
const dy = y - rect.top;
|
|
639
638
|
const w = rect.width;
|
|
640
639
|
const h = rect.height;
|
|
641
640
|
|
|
642
|
-
mouse.x = (
|
|
643
|
-
mouse.y = - (
|
|
641
|
+
mouse.x = ( dx / w ) * 2 - 1;
|
|
642
|
+
mouse.y = - ( dy / h ) * 2 + 1;
|
|
644
643
|
|
|
645
644
|
dollyDirection.set( mouse.x, mouse.y, 1 ).unproject( scope.object ).sub( scope.object.position ).normalize();
|
|
646
645
|
|
|
@@ -664,7 +663,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
664
663
|
|
|
665
664
|
function handleMouseDownDolly( event ) {
|
|
666
665
|
|
|
667
|
-
|
|
666
|
+
updateZoomParameters( event.clientX, event.clientX );
|
|
668
667
|
dollyStart.set( event.clientX, event.clientY );
|
|
669
668
|
|
|
670
669
|
}
|
|
@@ -701,11 +700,11 @@ class OrbitControls extends EventDispatcher {
|
|
|
701
700
|
|
|
702
701
|
if ( dollyDelta.y > 0 ) {
|
|
703
702
|
|
|
704
|
-
dollyOut( getZoomScale() );
|
|
703
|
+
dollyOut( getZoomScale( dollyDelta.y ) );
|
|
705
704
|
|
|
706
705
|
} else if ( dollyDelta.y < 0 ) {
|
|
707
706
|
|
|
708
|
-
dollyIn( getZoomScale() );
|
|
707
|
+
dollyIn( getZoomScale( dollyDelta.y ) );
|
|
709
708
|
|
|
710
709
|
}
|
|
711
710
|
|
|
@@ -731,15 +730,15 @@ class OrbitControls extends EventDispatcher {
|
|
|
731
730
|
|
|
732
731
|
function handleMouseWheel( event ) {
|
|
733
732
|
|
|
734
|
-
|
|
733
|
+
updateZoomParameters( event.clientX, event.clientY );
|
|
735
734
|
|
|
736
735
|
if ( event.deltaY < 0 ) {
|
|
737
736
|
|
|
738
|
-
dollyIn( getZoomScale() );
|
|
737
|
+
dollyIn( getZoomScale( event.deltaY ) );
|
|
739
738
|
|
|
740
739
|
} else if ( event.deltaY > 0 ) {
|
|
741
740
|
|
|
742
|
-
dollyOut( getZoomScale() );
|
|
741
|
+
dollyOut( getZoomScale( event.deltaY ) );
|
|
743
742
|
|
|
744
743
|
}
|
|
745
744
|
|
|
@@ -827,16 +826,18 @@ class OrbitControls extends EventDispatcher {
|
|
|
827
826
|
|
|
828
827
|
}
|
|
829
828
|
|
|
830
|
-
function handleTouchStartRotate() {
|
|
829
|
+
function handleTouchStartRotate( event ) {
|
|
831
830
|
|
|
832
831
|
if ( pointers.length === 1 ) {
|
|
833
832
|
|
|
834
|
-
rotateStart.set(
|
|
833
|
+
rotateStart.set( event.pageX, event.pageY );
|
|
835
834
|
|
|
836
835
|
} else {
|
|
837
836
|
|
|
838
|
-
const
|
|
839
|
-
|
|
837
|
+
const position = getSecondPointerPosition( event );
|
|
838
|
+
|
|
839
|
+
const x = 0.5 * ( event.pageX + position.x );
|
|
840
|
+
const y = 0.5 * ( event.pageY + position.y );
|
|
840
841
|
|
|
841
842
|
rotateStart.set( x, y );
|
|
842
843
|
|
|
@@ -844,16 +845,18 @@ class OrbitControls extends EventDispatcher {
|
|
|
844
845
|
|
|
845
846
|
}
|
|
846
847
|
|
|
847
|
-
function handleTouchStartPan() {
|
|
848
|
+
function handleTouchStartPan( event ) {
|
|
848
849
|
|
|
849
850
|
if ( pointers.length === 1 ) {
|
|
850
851
|
|
|
851
|
-
panStart.set(
|
|
852
|
+
panStart.set( event.pageX, event.pageY );
|
|
852
853
|
|
|
853
854
|
} else {
|
|
854
855
|
|
|
855
|
-
const
|
|
856
|
-
|
|
856
|
+
const position = getSecondPointerPosition( event );
|
|
857
|
+
|
|
858
|
+
const x = 0.5 * ( event.pageX + position.x );
|
|
859
|
+
const y = 0.5 * ( event.pageY + position.y );
|
|
857
860
|
|
|
858
861
|
panStart.set( x, y );
|
|
859
862
|
|
|
@@ -861,10 +864,12 @@ class OrbitControls extends EventDispatcher {
|
|
|
861
864
|
|
|
862
865
|
}
|
|
863
866
|
|
|
864
|
-
function handleTouchStartDolly() {
|
|
867
|
+
function handleTouchStartDolly( event ) {
|
|
865
868
|
|
|
866
|
-
const
|
|
867
|
-
|
|
869
|
+
const position = getSecondPointerPosition( event );
|
|
870
|
+
|
|
871
|
+
const dx = event.pageX - position.x;
|
|
872
|
+
const dy = event.pageY - position.y;
|
|
868
873
|
|
|
869
874
|
const distance = Math.sqrt( dx * dx + dy * dy );
|
|
870
875
|
|
|
@@ -872,19 +877,19 @@ class OrbitControls extends EventDispatcher {
|
|
|
872
877
|
|
|
873
878
|
}
|
|
874
879
|
|
|
875
|
-
function handleTouchStartDollyPan() {
|
|
880
|
+
function handleTouchStartDollyPan( event ) {
|
|
876
881
|
|
|
877
|
-
if ( scope.enableZoom ) handleTouchStartDolly();
|
|
882
|
+
if ( scope.enableZoom ) handleTouchStartDolly( event );
|
|
878
883
|
|
|
879
|
-
if ( scope.enablePan ) handleTouchStartPan();
|
|
884
|
+
if ( scope.enablePan ) handleTouchStartPan( event );
|
|
880
885
|
|
|
881
886
|
}
|
|
882
887
|
|
|
883
|
-
function handleTouchStartDollyRotate() {
|
|
888
|
+
function handleTouchStartDollyRotate( event ) {
|
|
884
889
|
|
|
885
|
-
if ( scope.enableZoom ) handleTouchStartDolly();
|
|
890
|
+
if ( scope.enableZoom ) handleTouchStartDolly( event );
|
|
886
891
|
|
|
887
|
-
if ( scope.enableRotate ) handleTouchStartRotate();
|
|
892
|
+
if ( scope.enableRotate ) handleTouchStartRotate( event );
|
|
888
893
|
|
|
889
894
|
}
|
|
890
895
|
|
|
@@ -959,6 +964,11 @@ class OrbitControls extends EventDispatcher {
|
|
|
959
964
|
|
|
960
965
|
dollyStart.copy( dollyEnd );
|
|
961
966
|
|
|
967
|
+
const centerX = ( event.pageX + position.x ) * 0.5;
|
|
968
|
+
const centerY = ( event.pageY + position.y ) * 0.5;
|
|
969
|
+
|
|
970
|
+
updateZoomParameters( centerX, centerY );
|
|
971
|
+
|
|
962
972
|
}
|
|
963
973
|
|
|
964
974
|
function handleTouchMoveDollyPan( event ) {
|
|
@@ -1210,7 +1220,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1210
1220
|
|
|
1211
1221
|
if ( scope.enableRotate === false ) return;
|
|
1212
1222
|
|
|
1213
|
-
handleTouchStartRotate();
|
|
1223
|
+
handleTouchStartRotate( event );
|
|
1214
1224
|
|
|
1215
1225
|
state = STATE.TOUCH_ROTATE;
|
|
1216
1226
|
|
|
@@ -1220,7 +1230,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1220
1230
|
|
|
1221
1231
|
if ( scope.enablePan === false ) return;
|
|
1222
1232
|
|
|
1223
|
-
handleTouchStartPan();
|
|
1233
|
+
handleTouchStartPan( event );
|
|
1224
1234
|
|
|
1225
1235
|
state = STATE.TOUCH_PAN;
|
|
1226
1236
|
|
|
@@ -1242,7 +1252,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1242
1252
|
|
|
1243
1253
|
if ( scope.enableZoom === false && scope.enablePan === false ) return;
|
|
1244
1254
|
|
|
1245
|
-
handleTouchStartDollyPan();
|
|
1255
|
+
handleTouchStartDollyPan( event );
|
|
1246
1256
|
|
|
1247
1257
|
state = STATE.TOUCH_DOLLY_PAN;
|
|
1248
1258
|
|
|
@@ -1252,7 +1262,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1252
1262
|
|
|
1253
1263
|
if ( scope.enableZoom === false && scope.enableRotate === false ) return;
|
|
1254
1264
|
|
|
1255
|
-
handleTouchStartDollyRotate();
|
|
1265
|
+
handleTouchStartDollyRotate( event );
|
|
1256
1266
|
|
|
1257
1267
|
state = STATE.TOUCH_DOLLY_ROTATE;
|
|
1258
1268
|
|
|
@@ -1344,7 +1354,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1344
1354
|
|
|
1345
1355
|
function addPointer( event ) {
|
|
1346
1356
|
|
|
1347
|
-
pointers.push( event );
|
|
1357
|
+
pointers.push( event.pointerId );
|
|
1348
1358
|
|
|
1349
1359
|
}
|
|
1350
1360
|
|
|
@@ -1354,7 +1364,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
1354
1364
|
|
|
1355
1365
|
for ( let i = 0; i < pointers.length; i ++ ) {
|
|
1356
1366
|
|
|
1357
|
-
if ( pointers[ i ]
|
|
1367
|
+
if ( pointers[ i ] == event.pointerId ) {
|
|
1358
1368
|
|
|
1359
1369
|
pointers.splice( i, 1 );
|
|
1360
1370
|
return;
|
|
@@ -1382,9 +1392,9 @@ class OrbitControls extends EventDispatcher {
|
|
|
1382
1392
|
|
|
1383
1393
|
function getSecondPointerPosition( event ) {
|
|
1384
1394
|
|
|
1385
|
-
const
|
|
1395
|
+
const pointerId = ( event.pointerId === pointers[ 0 ] ) ? pointers[ 1 ] : pointers[ 0 ];
|
|
1386
1396
|
|
|
1387
|
-
return pointerPositions[
|
|
1397
|
+
return pointerPositions[ pointerId ];
|
|
1388
1398
|
|
|
1389
1399
|
}
|
|
1390
1400
|
|
|
@@ -62,7 +62,7 @@ IncidentLight directLight;
|
|
|
62
62
|
vec4 spotColor;
|
|
63
63
|
vec3 spotLightCoord;
|
|
64
64
|
bool inSpotLightMap;
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
|
|
67
67
|
SpotLightShadow spotLightShadow;
|
|
68
68
|
#endif
|
|
@@ -112,57 +112,57 @@ IncidentLight directLight;
|
|
|
112
112
|
#endif
|
|
113
113
|
|
|
114
114
|
#if defined( USE_SHADOWMAP ) && defined( CSM_FADE )
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
vec2 cascade;
|
|
116
|
+
float cascadeCenter;
|
|
117
|
+
float closestEdge;
|
|
118
|
+
float margin;
|
|
119
|
+
float csmx;
|
|
120
|
+
float csmy;
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
#pragma unroll_loop_start
|
|
123
|
+
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
directionalLight = directionalLights[ i ];
|
|
126
|
+
getDirectionalLightInfo( directionalLight, directLight );
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
float dist = min( linearDepth - csmx, csmy - linearDepth );
|
|
140
|
-
float ratio = clamp( dist / margin, 0.0, 1.0 );
|
|
141
|
-
|
|
142
|
-
vec3 prevColor = directLight.color;
|
|
143
|
-
directionalLightShadow = directionalLightShadows[ i ];
|
|
144
|
-
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
128
|
+
#if ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
|
|
129
|
+
// NOTE: Depth gets larger away from the camera.
|
|
130
|
+
// cascade.x is closer, cascade.y is further
|
|
131
|
+
cascade = CSM_cascades[ i ];
|
|
132
|
+
cascadeCenter = ( cascade.x + cascade.y ) / 2.0;
|
|
133
|
+
closestEdge = linearDepth < cascadeCenter ? cascade.x : cascade.y;
|
|
134
|
+
margin = 0.25 * pow( closestEdge, 2.0 );
|
|
135
|
+
csmx = cascade.x - margin / 2.0;
|
|
136
|
+
csmy = cascade.y + margin / 2.0;
|
|
137
|
+
if( linearDepth >= csmx && ( linearDepth < csmy || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 ) ) {
|
|
145
138
|
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
float dist = min( linearDepth - csmx, csmy - linearDepth );
|
|
140
|
+
float ratio = clamp( dist / margin, 0.0, 1.0 );
|
|
148
141
|
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
vec3 prevColor = directLight.color;
|
|
143
|
+
directionalLightShadow = directionalLightShadows[ i ];
|
|
144
|
+
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
151
145
|
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
bool shouldFadeLastCascade = UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth > cascadeCenter;
|
|
147
|
+
directLight.color = mix( prevColor, directLight.color, shouldFadeLastCascade ? ratio : 1.0 );
|
|
154
148
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
reflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio );
|
|
158
|
-
reflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio );
|
|
149
|
+
ReflectedLight prevLight = reflectedLight;
|
|
150
|
+
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
159
151
|
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
bool shouldBlend = UNROLLED_LOOP_INDEX != CSM_CASCADES - 1 || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth < cascadeCenter;
|
|
153
|
+
float blendRatio = shouldBlend ? ratio : 1.0;
|
|
162
154
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
reflectedLight.directDiffuse = mix( prevLight.directDiffuse, reflectedLight.directDiffuse, blendRatio );
|
|
156
|
+
reflectedLight.directSpecular = mix( prevLight.directSpecular, reflectedLight.directSpecular, blendRatio );
|
|
157
|
+
reflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio );
|
|
158
|
+
reflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio );
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
#endif
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
#pragma unroll_loop_end
|
|
165
|
+
#elif defined (USE_SHADOWMAP)
|
|
166
166
|
|
|
167
167
|
#pragma unroll_loop_start
|
|
168
168
|
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
@@ -170,18 +170,23 @@ IncidentLight directLight;
|
|
|
170
170
|
directionalLight = directionalLights[ i ];
|
|
171
171
|
getDirectionalLightInfo( directionalLight, directLight );
|
|
172
172
|
|
|
173
|
-
#if
|
|
173
|
+
#if ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
directionalLightShadow = directionalLightShadows[ i ];
|
|
176
|
+
if(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y) directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
if(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && (linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1)) RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
179
179
|
|
|
180
180
|
#endif
|
|
181
181
|
|
|
182
182
|
}
|
|
183
183
|
#pragma unroll_loop_end
|
|
184
184
|
|
|
185
|
+
#elif ( NUM_DIR_LIGHT_SHADOWS > 0 )
|
|
186
|
+
// note: no loop here - all CSM lights are in fact one light only
|
|
187
|
+
getDirectionalLightInfo( directionalLights[0], directLight );
|
|
188
|
+
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
189
|
+
|
|
185
190
|
#endif
|
|
186
191
|
|
|
187
192
|
#if ( NUM_DIR_LIGHTS > NUM_DIR_LIGHT_SHADOWS)
|
|
@@ -135,6 +135,12 @@ class GLTFExporter {
|
|
|
135
135
|
|
|
136
136
|
} );
|
|
137
137
|
|
|
138
|
+
this.register( function ( writer ) {
|
|
139
|
+
|
|
140
|
+
return new GLTFMaterialsBumpExtension( writer );
|
|
141
|
+
|
|
142
|
+
} );
|
|
143
|
+
|
|
138
144
|
this.register( function ( writer ) {
|
|
139
145
|
|
|
140
146
|
return new GLTFMeshGpuInstancing( writer );
|
|
@@ -1829,6 +1835,24 @@ class GLTFWriter {
|
|
|
1829
1835
|
|
|
1830
1836
|
if ( isMultiMaterial && geometry.groups.length === 0 ) return null;
|
|
1831
1837
|
|
|
1838
|
+
let didForceIndices = false;
|
|
1839
|
+
|
|
1840
|
+
if ( isMultiMaterial && geometry.index === null ) {
|
|
1841
|
+
|
|
1842
|
+
const indices = [];
|
|
1843
|
+
|
|
1844
|
+
for ( let i = 0, il = geometry.attributes.position.count; i < il; i ++ ) {
|
|
1845
|
+
|
|
1846
|
+
indices[ i ] = i;
|
|
1847
|
+
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
geometry.setIndex( indices );
|
|
1851
|
+
|
|
1852
|
+
didForceIndices = true;
|
|
1853
|
+
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1832
1856
|
const materials = isMultiMaterial ? mesh.material : [ mesh.material ];
|
|
1833
1857
|
const groups = isMultiMaterial ? geometry.groups : [ { materialIndex: 0, start: undefined, count: undefined } ];
|
|
1834
1858
|
|
|
@@ -1876,6 +1900,12 @@ class GLTFWriter {
|
|
|
1876
1900
|
|
|
1877
1901
|
}
|
|
1878
1902
|
|
|
1903
|
+
if ( didForceIndices === true ) {
|
|
1904
|
+
|
|
1905
|
+
geometry.setIndex( null );
|
|
1906
|
+
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1879
1909
|
meshDef.primitives = primitives;
|
|
1880
1910
|
|
|
1881
1911
|
if ( ! json.meshes ) json.meshes = [];
|
|
@@ -2796,7 +2826,7 @@ class GLTFMaterialsSpecularExtension {
|
|
|
2796
2826
|
|
|
2797
2827
|
if ( ! material.isMeshPhysicalMaterial || ( material.specularIntensity === 1.0 &&
|
|
2798
2828
|
material.specularColor.equals( DEFAULT_SPECULAR_COLOR ) &&
|
|
2799
|
-
! material.specularIntensityMap && ! material.
|
|
2829
|
+
! material.specularIntensityMap && ! material.specularColorMap ) ) return;
|
|
2800
2830
|
|
|
2801
2831
|
const writer = this.writer;
|
|
2802
2832
|
const extensionsUsed = writer.extensionsUsed;
|
|
@@ -2971,6 +3001,54 @@ class GLTFMaterialsEmissiveStrengthExtension {
|
|
|
2971
3001
|
|
|
2972
3002
|
}
|
|
2973
3003
|
|
|
3004
|
+
|
|
3005
|
+
/**
|
|
3006
|
+
* Materials bump Extension
|
|
3007
|
+
*
|
|
3008
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/EXT_materials_bump
|
|
3009
|
+
*/
|
|
3010
|
+
class GLTFMaterialsBumpExtension {
|
|
3011
|
+
|
|
3012
|
+
constructor( writer ) {
|
|
3013
|
+
|
|
3014
|
+
this.writer = writer;
|
|
3015
|
+
this.name = 'EXT_materials_bump';
|
|
3016
|
+
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3019
|
+
writeMaterial( material, materialDef ) {
|
|
3020
|
+
|
|
3021
|
+
if ( ! material.isMeshStandardMaterial || (
|
|
3022
|
+
material.bumpScale === 1 &&
|
|
3023
|
+
! material.bumpMap ) ) return;
|
|
3024
|
+
|
|
3025
|
+
const writer = this.writer;
|
|
3026
|
+
const extensionsUsed = writer.extensionsUsed;
|
|
3027
|
+
|
|
3028
|
+
const extensionDef = {};
|
|
3029
|
+
|
|
3030
|
+
if ( material.bumpMap ) {
|
|
3031
|
+
|
|
3032
|
+
const bumpMapDef = {
|
|
3033
|
+
index: writer.processTexture( material.bumpMap ),
|
|
3034
|
+
texCoord: material.bumpMap.channel
|
|
3035
|
+
};
|
|
3036
|
+
writer.applyTextureTransform( bumpMapDef, material.bumpMap );
|
|
3037
|
+
extensionDef.bumpTexture = bumpMapDef;
|
|
3038
|
+
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
extensionDef.bumpFactor = material.bumpScale;
|
|
3042
|
+
|
|
3043
|
+
materialDef.extensions = materialDef.extensions || {};
|
|
3044
|
+
materialDef.extensions[ this.name ] = extensionDef;
|
|
3045
|
+
|
|
3046
|
+
extensionsUsed[ this.name ] = true;
|
|
3047
|
+
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
}
|
|
3051
|
+
|
|
2974
3052
|
/**
|
|
2975
3053
|
* GPU Instancing Extension
|
|
2976
3054
|
*
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
NoColorSpace,
|
|
3
|
+
DoubleSide,
|
|
4
|
+
} from 'three';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
strToU8,
|
|
8
|
+
zipSync,
|
|
9
|
+
} from '../libs/fflate.module.js';
|
|
10
|
+
|
|
11
|
+
import { decompress } from './../utils/TextureUtils.js';
|
|
3
12
|
|
|
4
13
|
class USDZExporter {
|
|
5
14
|
|
|
@@ -71,12 +80,18 @@ class USDZExporter {
|
|
|
71
80
|
|
|
72
81
|
output += buildMaterials( materials, textures, options.quickLookCompatible );
|
|
73
82
|
|
|
74
|
-
files[ modelFileName ] =
|
|
83
|
+
files[ modelFileName ] = strToU8( output );
|
|
75
84
|
output = null;
|
|
76
85
|
|
|
77
86
|
for ( const id in textures ) {
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
let texture = textures[ id ];
|
|
89
|
+
|
|
90
|
+
if ( texture.isCompressedTexture === true ) {
|
|
91
|
+
|
|
92
|
+
texture = decompress( texture );
|
|
93
|
+
|
|
94
|
+
}
|
|
80
95
|
|
|
81
96
|
const canvas = imageToCanvas( texture.image, texture.flipY );
|
|
82
97
|
const blob = await new Promise( resolve => canvas.toBlob( resolve, 'image/png', 1 ) );
|
|
@@ -112,7 +127,7 @@ class USDZExporter {
|
|
|
112
127
|
|
|
113
128
|
}
|
|
114
129
|
|
|
115
|
-
return
|
|
130
|
+
return zipSync( files, { level: 0 } );
|
|
116
131
|
|
|
117
132
|
}
|
|
118
133
|
|
|
@@ -212,7 +227,7 @@ function buildUSDFileAsString( dataToInsert ) {
|
|
|
212
227
|
|
|
213
228
|
let output = buildHeader();
|
|
214
229
|
output += dataToInsert;
|
|
215
|
-
return
|
|
230
|
+
return strToU8( output );
|
|
216
231
|
|
|
217
232
|
}
|
|
218
233
|
|
|
@@ -287,7 +302,7 @@ function buildMesh( geometry ) {
|
|
|
287
302
|
interpolation = "vertex"
|
|
288
303
|
)
|
|
289
304
|
point3f[] points = [${ buildVector3Array( attributes.position, count )}]
|
|
290
|
-
${ buildPrimvars( attributes
|
|
305
|
+
${ buildPrimvars( attributes ) }
|
|
291
306
|
uniform token subdivisionScheme = "none"
|
|
292
307
|
}
|
|
293
308
|
`;
|
|
@@ -356,14 +371,7 @@ function buildVector3Array( attribute, count ) {
|
|
|
356
371
|
|
|
357
372
|
}
|
|
358
373
|
|
|
359
|
-
function buildVector2Array( attribute
|
|
360
|
-
|
|
361
|
-
if ( attribute === undefined ) {
|
|
362
|
-
|
|
363
|
-
console.warn( 'USDZExporter: UVs missing.' );
|
|
364
|
-
return Array( count ).fill( '(0, 0)' ).join( ', ' );
|
|
365
|
-
|
|
366
|
-
}
|
|
374
|
+
function buildVector2Array( attribute ) {
|
|
367
375
|
|
|
368
376
|
const array = [];
|
|
369
377
|
|
|
@@ -380,7 +388,7 @@ function buildVector2Array( attribute, count ) {
|
|
|
380
388
|
|
|
381
389
|
}
|
|
382
390
|
|
|
383
|
-
function buildPrimvars( attributes
|
|
391
|
+
function buildPrimvars( attributes ) {
|
|
384
392
|
|
|
385
393
|
let string = '';
|
|
386
394
|
|
|
@@ -392,7 +400,7 @@ function buildPrimvars( attributes, count ) {
|
|
|
392
400
|
if ( attribute !== undefined ) {
|
|
393
401
|
|
|
394
402
|
string += `
|
|
395
|
-
texCoord2f[] primvars:st${ id } = [${ buildVector2Array( attribute
|
|
403
|
+
texCoord2f[] primvars:st${ id } = [${ buildVector2Array( attribute )}] (
|
|
396
404
|
interpolation = "vertex"
|
|
397
405
|
)`;
|
|
398
406
|
|
|
@@ -506,7 +514,7 @@ function buildMaterial( material, textures, quickLookCompatible = false ) {
|
|
|
506
514
|
asset inputs:file = @textures/Texture_${ id }.png@
|
|
507
515
|
float2 inputs:st.connect = </Materials/Material_${ material.id }/Transform2d_${ mapType }.outputs:result>
|
|
508
516
|
${ color !== undefined ? 'float4 inputs:scale = ' + buildColor4( color ) : '' }
|
|
509
|
-
token inputs:sourceColorSpace = "${ texture.colorSpace ===
|
|
517
|
+
token inputs:sourceColorSpace = "${ texture.colorSpace === NoColorSpace ? 'raw' : 'sRGB' }"
|
|
510
518
|
token inputs:wrapS = "${ WRAPPINGS[ texture.wrapS ] }"
|
|
511
519
|
token inputs:wrapT = "${ WRAPPINGS[ texture.wrapT ] }"
|
|
512
520
|
float outputs:r
|
|
@@ -519,7 +527,7 @@ function buildMaterial( material, textures, quickLookCompatible = false ) {
|
|
|
519
527
|
}
|
|
520
528
|
|
|
521
529
|
|
|
522
|
-
if ( material.side ===
|
|
530
|
+
if ( material.side === DoubleSide ) {
|
|
523
531
|
|
|
524
532
|
console.warn( 'THREE.USDZExporter: USDZ does not support double sided materials', material );
|
|
525
533
|
|