@plastic-software/three 0.182.0 → 0.183.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.
Files changed (298) hide show
  1. package/LICENSE +1 -1
  2. package/build/three.cjs +11520 -10877
  3. package/build/three.core.js +11732 -11340
  4. package/build/three.core.min.js +2 -2
  5. package/build/three.module.js +509 -262
  6. package/build/three.module.min.js +2 -2
  7. package/build/three.tsl.js +7 -11
  8. package/build/three.tsl.min.js +2 -2
  9. package/build/three.webgpu.js +3072 -2607
  10. package/build/three.webgpu.min.js +2 -2
  11. package/build/three.webgpu.nodes.js +3071 -2607
  12. package/build/three.webgpu.nodes.min.js +2 -2
  13. package/examples/jsm/Addons.js +0 -3
  14. package/examples/jsm/animation/CCDIKSolver.js +2 -2
  15. package/examples/jsm/controls/ArcballControls.js +3 -3
  16. package/examples/jsm/controls/OrbitControls.js +103 -0
  17. package/examples/jsm/effects/AnaglyphEffect.js +102 -7
  18. package/examples/jsm/environments/ColorEnvironment.js +59 -0
  19. package/examples/jsm/environments/RoomEnvironment.js +1 -0
  20. package/examples/jsm/exporters/EXRExporter.js +1 -1
  21. package/examples/jsm/exporters/GLTFExporter.js +131 -4
  22. package/examples/jsm/exporters/USDZExporter.js +22 -3
  23. package/examples/jsm/helpers/AnimationPathHelper.js +302 -0
  24. package/examples/jsm/helpers/ViewHelper.js +67 -8
  25. package/examples/jsm/inspector/Inspector.js +21 -5
  26. package/examples/jsm/inspector/tabs/Console.js +39 -5
  27. package/examples/jsm/inspector/tabs/Parameters.js +16 -0
  28. package/examples/jsm/inspector/ui/Style.js +25 -1
  29. package/examples/jsm/libs/meshopt_decoder.module.js +6 -5
  30. package/examples/jsm/lines/LineMaterial.js +6 -0
  31. package/examples/jsm/loaders/3MFLoader.js +2 -2
  32. package/examples/jsm/loaders/AMFLoader.js +2 -2
  33. package/examples/jsm/loaders/ColladaLoader.js +24 -4026
  34. package/examples/jsm/loaders/EXRLoader.js +5 -5
  35. package/examples/jsm/loaders/FBXLoader.js +2 -2
  36. package/examples/jsm/loaders/GCodeLoader.js +34 -8
  37. package/examples/jsm/loaders/GLTFLoader.js +122 -171
  38. package/examples/jsm/loaders/KMZLoader.js +5 -5
  39. package/examples/jsm/loaders/KTX2Loader.js +5 -5
  40. package/examples/jsm/loaders/LWOLoader.js +7 -39
  41. package/examples/jsm/loaders/NRRDLoader.js +2 -2
  42. package/examples/jsm/loaders/PCDLoader.js +3 -2
  43. package/examples/jsm/loaders/USDLoader.js +100 -40
  44. package/examples/jsm/loaders/UltraHDRLoader.js +182 -30
  45. package/examples/jsm/loaders/VRMLLoader.js +77 -0
  46. package/examples/jsm/loaders/VTKLoader.js +37 -24
  47. package/examples/jsm/loaders/collada/ColladaComposer.js +2950 -0
  48. package/examples/jsm/loaders/collada/ColladaParser.js +1962 -0
  49. package/examples/jsm/loaders/usd/USDAParser.js +447 -366
  50. package/examples/jsm/loaders/usd/USDCParser.js +1841 -6
  51. package/examples/jsm/loaders/usd/USDComposer.js +4041 -0
  52. package/examples/jsm/materials/LDrawConditionalLineNodeMaterial.js +2 -2
  53. package/examples/jsm/objects/LensflareMesh.js +1 -1
  54. package/examples/jsm/objects/Sky.js +76 -4
  55. package/examples/jsm/objects/SkyMesh.js +114 -7
  56. package/examples/jsm/objects/Water.js +4 -3
  57. package/examples/jsm/objects/Water2.js +5 -3
  58. package/examples/jsm/objects/WaterMesh.js +5 -7
  59. package/examples/jsm/physics/JoltPhysics.js +7 -5
  60. package/examples/jsm/physics/RapierPhysics.js +6 -4
  61. package/examples/jsm/postprocessing/EffectComposer.js +7 -5
  62. package/examples/jsm/postprocessing/RenderTransitionPass.js +1 -1
  63. package/examples/jsm/renderers/CSS3DRenderer.js +1 -1
  64. package/examples/jsm/renderers/SVGRenderer.js +2 -2
  65. package/examples/jsm/shaders/GTAOShader.js +19 -6
  66. package/examples/jsm/shaders/HalftoneShader.js +12 -1
  67. package/examples/jsm/shaders/PoissonDenoiseShader.js +6 -2
  68. package/examples/jsm/shaders/SAOShader.js +17 -4
  69. package/examples/jsm/shaders/SSAOShader.js +11 -1
  70. package/examples/jsm/shaders/SSRShader.js +6 -5
  71. package/examples/jsm/shaders/VignetteShader.js +1 -1
  72. package/examples/jsm/tsl/display/AfterImageNode.js +1 -1
  73. package/examples/jsm/tsl/display/AnaglyphPassNode.js +456 -16
  74. package/examples/jsm/tsl/display/AnamorphicNode.js +1 -1
  75. package/examples/jsm/tsl/display/BilateralBlurNode.js +364 -0
  76. package/examples/jsm/tsl/display/BloomNode.js +5 -5
  77. package/examples/jsm/tsl/display/CRT.js +150 -0
  78. package/examples/jsm/tsl/display/DenoiseNode.js +1 -1
  79. package/examples/jsm/tsl/display/DepthOfFieldNode.js +1 -1
  80. package/examples/jsm/tsl/display/DotScreenNode.js +1 -1
  81. package/examples/jsm/tsl/display/FXAANode.js +2 -2
  82. package/examples/jsm/tsl/display/GTAONode.js +2 -2
  83. package/examples/jsm/tsl/display/GaussianBlurNode.js +11 -2
  84. package/examples/jsm/tsl/display/GodraysNode.js +624 -0
  85. package/examples/jsm/tsl/display/LensflareNode.js +1 -1
  86. package/examples/jsm/tsl/display/Lut3DNode.js +1 -1
  87. package/examples/jsm/tsl/display/OutlineNode.js +3 -3
  88. package/examples/jsm/tsl/display/ParallaxBarrierPassNode.js +2 -2
  89. package/examples/jsm/tsl/display/PixelationPassNode.js +5 -5
  90. package/examples/jsm/tsl/display/RGBShiftNode.js +2 -2
  91. package/examples/jsm/tsl/display/RetroPassNode.js +263 -0
  92. package/examples/jsm/tsl/display/SMAANode.js +2 -2
  93. package/examples/jsm/tsl/display/SSAAPassNode.js +2 -2
  94. package/examples/jsm/tsl/display/SSGINode.js +2 -2
  95. package/examples/jsm/tsl/display/SSRNode.js +7 -7
  96. package/examples/jsm/tsl/display/SSSNode.js +2 -2
  97. package/examples/jsm/tsl/display/Shape.js +29 -0
  98. package/examples/jsm/tsl/display/SobelOperatorNode.js +2 -2
  99. package/examples/jsm/tsl/display/StereoPassNode.js +1 -2
  100. package/examples/jsm/tsl/display/TRAANode.js +9 -12
  101. package/examples/jsm/tsl/display/TransitionNode.js +1 -1
  102. package/examples/jsm/tsl/display/depthAwareBlend.js +80 -0
  103. package/examples/jsm/tsl/math/Bayer.js +40 -1
  104. package/examples/jsm/utils/LDrawUtils.js +1 -1
  105. package/package.json +11 -19
  106. package/src/Three.Core.js +1 -1
  107. package/src/Three.TSL.js +5 -9
  108. package/src/Three.WebGPU.Nodes.js +2 -0
  109. package/src/Three.WebGPU.js +3 -0
  110. package/src/Three.js +1 -0
  111. package/src/animation/AnimationAction.js +1 -1
  112. package/src/animation/AnimationClip.js +1 -1
  113. package/src/animation/AnimationMixer.js +6 -0
  114. package/src/animation/KeyframeTrack.js +46 -7
  115. package/src/animation/PropertyMixer.js +4 -4
  116. package/src/audio/Audio.js +1 -1
  117. package/src/audio/AudioListener.js +5 -3
  118. package/src/cameras/Camera.js +32 -2
  119. package/src/cameras/CubeCamera.js +20 -0
  120. package/src/constants.js +30 -1
  121. package/src/core/Clock.js +7 -0
  122. package/src/core/Object3D.js +56 -4
  123. package/src/core/RenderTarget.js +3 -4
  124. package/src/extras/PMREMGenerator.js +4 -8
  125. package/src/geometries/TorusGeometry.js +8 -3
  126. package/src/helpers/CameraHelper.js +3 -0
  127. package/src/helpers/DirectionalLightHelper.js +4 -1
  128. package/src/helpers/HemisphereLightHelper.js +3 -0
  129. package/src/helpers/PointLightHelper.js +0 -24
  130. package/src/helpers/SpotLightHelper.js +3 -0
  131. package/src/lights/LightShadow.js +15 -3
  132. package/src/lights/webgpu/IESSpotLight.js +2 -1
  133. package/src/loaders/Cache.js +28 -0
  134. package/src/loaders/FileLoader.js +1 -1
  135. package/src/loaders/ImageBitmapLoader.js +8 -3
  136. package/src/loaders/Loader.js +6 -0
  137. package/src/loaders/ObjectLoader.js +18 -1
  138. package/src/materials/MeshLambertMaterial.js +9 -0
  139. package/src/materials/MeshPhongMaterial.js +9 -0
  140. package/src/materials/nodes/Line2NodeMaterial.js +5 -5
  141. package/src/materials/nodes/MeshPhysicalNodeMaterial.js +2 -0
  142. package/src/materials/nodes/NodeMaterial.js +15 -24
  143. package/src/materials/nodes/manager/NodeMaterialObserver.js +9 -3
  144. package/src/math/Line3.js +3 -5
  145. package/src/math/MathUtils.js +10 -10
  146. package/src/math/Matrix4.js +35 -26
  147. package/src/math/Quaternion.js +3 -29
  148. package/src/math/Vector3.js +3 -3
  149. package/src/math/interpolants/BezierInterpolant.js +108 -0
  150. package/src/nodes/Nodes.js +87 -68
  151. package/src/nodes/TSL.js +2 -5
  152. package/src/nodes/accessors/Arrays.js +1 -1
  153. package/src/nodes/accessors/Bitangent.js +5 -5
  154. package/src/nodes/accessors/BufferAttributeNode.js +1 -1
  155. package/src/nodes/accessors/Camera.js +149 -28
  156. package/src/nodes/accessors/InstanceNode.js +105 -40
  157. package/src/nodes/accessors/Normal.js +9 -9
  158. package/src/nodes/accessors/Position.js +34 -2
  159. package/src/nodes/accessors/SceneProperties.js +53 -0
  160. package/src/nodes/accessors/SkinningNode.js +12 -24
  161. package/src/nodes/accessors/StorageBufferNode.js +0 -19
  162. package/src/nodes/accessors/StorageTextureNode.js +37 -1
  163. package/src/nodes/accessors/Tangent.js +3 -3
  164. package/src/nodes/accessors/Texture3DNode.js +6 -34
  165. package/src/nodes/accessors/TextureNode.js +58 -22
  166. package/src/nodes/accessors/UniformArrayNode.js +2 -0
  167. package/src/nodes/core/MRTNode.js +48 -2
  168. package/src/nodes/core/Node.js +29 -3
  169. package/src/nodes/core/NodeBuilder.js +115 -40
  170. package/src/nodes/core/NodeError.js +28 -0
  171. package/src/nodes/core/NodeUtils.js +5 -3
  172. package/src/nodes/core/OutputStructNode.js +12 -10
  173. package/src/nodes/core/ParameterNode.js +2 -1
  174. package/src/nodes/core/StackNode.js +9 -8
  175. package/src/nodes/core/StackTrace.js +139 -0
  176. package/src/nodes/core/StructNode.js +15 -0
  177. package/src/nodes/core/SubBuildNode.js +1 -1
  178. package/src/nodes/core/UniformNode.js +2 -1
  179. package/src/nodes/core/VarNode.js +1 -1
  180. package/src/nodes/core/VaryingNode.js +1 -18
  181. package/src/nodes/display/BlendModes.js +0 -64
  182. package/src/nodes/display/ColorAdjustment.js +17 -0
  183. package/src/nodes/display/ColorSpaceNode.js +3 -3
  184. package/src/nodes/display/NormalMapNode.js +2 -2
  185. package/src/nodes/display/PassNode.js +21 -2
  186. package/src/nodes/display/RenderOutputNode.js +3 -3
  187. package/src/nodes/display/ScreenNode.js +2 -1
  188. package/src/nodes/display/ToneMappingNode.js +1 -1
  189. package/src/nodes/display/ToonOutlinePassNode.js +2 -2
  190. package/src/nodes/display/ViewportDepthNode.js +52 -4
  191. package/src/nodes/display/ViewportTextureNode.js +21 -4
  192. package/src/nodes/fog/Fog.js +18 -35
  193. package/src/nodes/functions/PhysicalLightingModel.js +25 -3
  194. package/src/nodes/geometry/RangeNode.js +4 -2
  195. package/src/nodes/gpgpu/ComputeNode.js +5 -4
  196. package/src/nodes/gpgpu/WorkgroupInfoNode.js +2 -1
  197. package/src/nodes/lighting/EnvironmentNode.js +28 -3
  198. package/src/nodes/lighting/PointShadowNode.js +24 -12
  199. package/src/nodes/lighting/ShadowFilterNode.js +15 -43
  200. package/src/nodes/lighting/ShadowNode.js +54 -32
  201. package/src/nodes/math/ConditionalNode.js +2 -2
  202. package/src/nodes/math/MathNode.js +3 -40
  203. package/src/nodes/math/OperatorNode.js +2 -1
  204. package/src/nodes/pmrem/PMREMUtils.js +9 -15
  205. package/src/nodes/tsl/TSLCore.js +13 -10
  206. package/src/nodes/utils/DebugNode.js +11 -11
  207. package/src/nodes/utils/JoinNode.js +2 -2
  208. package/src/nodes/utils/LoopNode.js +1 -1
  209. package/src/nodes/utils/MemberNode.js +1 -1
  210. package/src/nodes/utils/RTTNode.js +1 -1
  211. package/src/nodes/utils/ReflectorNode.js +2 -3
  212. package/src/nodes/utils/SpriteSheetUV.js +35 -0
  213. package/src/nodes/utils/UVUtils.js +4 -2
  214. package/src/objects/BatchedMesh.js +22 -12
  215. package/src/objects/InstancedMesh.js +11 -0
  216. package/src/renderers/WebGLRenderer.js +34 -60
  217. package/src/renderers/common/Backend.js +21 -0
  218. package/src/renderers/common/Background.js +7 -4
  219. package/src/renderers/common/BindGroup.js +1 -9
  220. package/src/renderers/common/Bindings.js +20 -5
  221. package/src/renderers/common/BlendMode.js +143 -0
  222. package/src/renderers/common/BundleGroup.js +1 -1
  223. package/src/renderers/common/CubeRenderTarget.js +50 -6
  224. package/src/renderers/common/Geometries.js +17 -3
  225. package/src/renderers/common/Lighting.js +5 -21
  226. package/src/renderers/common/Pipelines.js +4 -4
  227. package/src/renderers/common/PostProcessing.js +8 -206
  228. package/src/renderers/common/RenderBundles.js +2 -1
  229. package/src/renderers/common/RenderContext.js +16 -0
  230. package/src/renderers/common/RenderContexts.js +33 -56
  231. package/src/renderers/common/RenderLists.js +2 -1
  232. package/src/renderers/common/RenderObject.js +2 -3
  233. package/src/renderers/common/RenderObjectPipeline.js +40 -0
  234. package/src/renderers/common/RenderObjects.js +18 -2
  235. package/src/renderers/common/RenderPipeline.js +203 -17
  236. package/src/renderers/common/Renderer.js +207 -40
  237. package/src/renderers/common/Sampler.js +4 -4
  238. package/src/renderers/common/StorageBuffer.js +13 -1
  239. package/src/renderers/common/Textures.js +16 -0
  240. package/src/renderers/common/TimestampQueryPool.js +5 -3
  241. package/src/renderers/common/Uniform.js +8 -0
  242. package/src/renderers/common/UniformsGroup.js +60 -0
  243. package/src/renderers/common/XRManager.js +2 -2
  244. package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
  245. package/src/renderers/common/nodes/{Nodes.js → NodeManager.js} +18 -6
  246. package/src/renderers/common/nodes/NodeStorageBuffer.js +13 -2
  247. package/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.js +2 -2
  248. package/src/renderers/shaders/ShaderChunk/color_fragment.glsl.js +1 -5
  249. package/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.js +1 -5
  250. package/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.js +1 -5
  251. package/src/renderers/shaders/ShaderChunk/color_vertex.glsl.js +8 -10
  252. package/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js +7 -11
  253. package/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.js +6 -0
  254. package/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js +6 -2
  255. package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +23 -1
  256. package/src/renderers/shaders/ShaderChunk/packing.glsl.js +20 -4
  257. package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +55 -24
  258. package/src/renderers/shaders/ShaderLib/meshlambert.glsl.js +2 -0
  259. package/src/renderers/shaders/ShaderLib/meshphong.glsl.js +2 -0
  260. package/src/renderers/shaders/ShaderLib/shadow.glsl.js +1 -0
  261. package/src/renderers/shaders/ShaderLib.js +4 -2
  262. package/src/renderers/shaders/UniformsLib.js +0 -3
  263. package/src/renderers/webgl/WebGLBackground.js +2 -2
  264. package/src/renderers/webgl/WebGLBindingStates.js +99 -27
  265. package/src/renderers/webgl/WebGLEnvironments.js +228 -0
  266. package/src/renderers/webgl/WebGLGeometries.js +10 -7
  267. package/src/renderers/webgl/WebGLMaterials.js +12 -0
  268. package/src/renderers/webgl/WebGLObjects.js +3 -1
  269. package/src/renderers/webgl/WebGLProgram.js +2 -2
  270. package/src/renderers/webgl/WebGLPrograms.js +10 -4
  271. package/src/renderers/webgl/WebGLRenderLists.js +15 -0
  272. package/src/renderers/webgl/WebGLShadowMap.js +5 -4
  273. package/src/renderers/webgl/WebGLState.js +12 -17
  274. package/src/renderers/webgl-fallback/WebGLBackend.js +71 -7
  275. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +98 -29
  276. package/src/renderers/webgl-fallback/utils/WebGLState.js +168 -7
  277. package/src/renderers/webgpu/WebGPUBackend.js +58 -9
  278. package/src/renderers/webgpu/WebGPURenderer.js +1 -0
  279. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +257 -45
  280. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +8 -19
  281. package/src/renderers/webgpu/utils/WebGPUConstants.js +1 -1
  282. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +56 -31
  283. package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +152 -200
  284. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +25 -25
  285. package/src/renderers/webgpu/utils/WebGPUUtils.js +10 -6
  286. package/src/renderers/webxr/WebXRManager.js +2 -2
  287. package/src/textures/Texture.js +2 -2
  288. package/src/utils.js +246 -3
  289. package/examples/jsm/materials/MeshGouraudMaterial.js +0 -433
  290. package/examples/jsm/materials/MeshPostProcessingMaterial.js +0 -167
  291. package/examples/jsm/shaders/GodRaysShader.js +0 -333
  292. package/src/nodes/accessors/SceneNode.js +0 -145
  293. package/src/nodes/code/ScriptableNode.js +0 -726
  294. package/src/nodes/code/ScriptableValueNode.js +0 -253
  295. package/src/nodes/display/PosterizeNode.js +0 -65
  296. package/src/nodes/utils/SpriteSheetUVNode.js +0 -90
  297. package/src/renderers/webgl/WebGLCubeMaps.js +0 -99
  298. package/src/renderers/webgl/WebGLCubeUVMaps.js +0 -134
@@ -242,7 +242,8 @@ class Object3D extends EventDispatcher {
242
242
 
243
243
  /**
244
244
  * When set to `true`, the engine automatically computes the local matrix from position,
245
- * rotation and scale every frame.
245
+ * rotation and scale every frame. If set to `false`, the app is responsible for recomputing
246
+ * the local matrix by calling `updateMatrix()`.
246
247
  *
247
248
  * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_AUTO_UPDATE`.
248
249
  *
@@ -253,7 +254,8 @@ class Object3D extends EventDispatcher {
253
254
 
254
255
  /**
255
256
  * When set to `true`, the engine automatically computes the world matrix from the current local
256
- * matrix and the object's transformation hierarchy.
257
+ * matrix and the object's transformation hierarchy. If set to `false`, the app is responsible for
258
+ * recomputing the world matrix by directly updating the `matrixWorld` property.
257
259
  *
258
260
  * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE`.
259
261
  *
@@ -354,6 +356,19 @@ class Object3D extends EventDispatcher {
354
356
  */
355
357
  this.customDistanceMaterial = undefined;
356
358
 
359
+ /**
360
+ * Whether the 3D object is supposed to be static or not. If set to `true`, it means
361
+ * the 3D object is not going to be changed after the initial renderer. This includes
362
+ * geometry and material settings. A static 3D object can be processed by the renderer
363
+ * slightly faster since certain state checks can be bypassed.
364
+ *
365
+ * Only relevant in context of {@link WebGPURenderer}.
366
+ *
367
+ * @type {boolean}
368
+ * @default false
369
+ */
370
+ this.static = false;
371
+
357
372
  /**
358
373
  * An object that can be used to store custom data about the 3D object. It
359
374
  * should not hold references to functions as these will not be cloned.
@@ -362,6 +377,16 @@ class Object3D extends EventDispatcher {
362
377
  */
363
378
  this.userData = {};
364
379
 
380
+ /**
381
+ * The pivot point for rotation and scale transformations.
382
+ * When set, rotation and scale are applied around this point
383
+ * instead of the object's origin.
384
+ *
385
+ * @type {?Vector3}
386
+ * @default null
387
+ */
388
+ this.pivot = null;
389
+
365
390
  }
366
391
 
367
392
  /**
@@ -644,7 +669,7 @@ class Object3D extends EventDispatcher {
644
669
  }
645
670
 
646
671
  /**
647
- * Converts the given vector from this 3D object's word space to local space.
672
+ * Converts the given vector from this 3D object's world space to local space.
648
673
  *
649
674
  * @param {Vector3} vector - The vector to convert.
650
675
  * @return {Vector3} The converted vector.
@@ -1109,6 +1134,19 @@ class Object3D extends EventDispatcher {
1109
1134
 
1110
1135
  this.matrix.compose( this.position, this.quaternion, this.scale );
1111
1136
 
1137
+ const pivot = this.pivot;
1138
+
1139
+ if ( pivot !== null ) {
1140
+
1141
+ const px = pivot.x, py = pivot.y, pz = pivot.z;
1142
+ const te = this.matrix.elements;
1143
+
1144
+ te[ 12 ] += px - te[ 0 ] * px - te[ 4 ] * py - te[ 8 ] * pz;
1145
+ te[ 13 ] += py - te[ 1 ] * px - te[ 5 ] * py - te[ 9 ] * pz;
1146
+ te[ 14 ] += pz - te[ 2 ] * px - te[ 6 ] * py - te[ 10 ] * pz;
1147
+
1148
+ }
1149
+
1112
1150
  this.matrixWorldNeedsUpdate = true;
1113
1151
 
1114
1152
  }
@@ -1122,7 +1160,7 @@ class Object3D extends EventDispatcher {
1122
1160
  * `true` by default. Set these flags to `false` if you need more control over the update matrix process.
1123
1161
  *
1124
1162
  * @param {boolean} [force=false] - When set to `true`, a recomputation of world matrices is forced even
1125
- * when {@link Object3D#matrixWorldAutoUpdate} is set to `false`.
1163
+ * when {@link Object3D#matrixWorldNeedsUpdate} is `false`.
1126
1164
  */
1127
1165
  updateMatrixWorld( force ) {
1128
1166
 
@@ -1267,14 +1305,20 @@ class Object3D extends EventDispatcher {
1267
1305
  if ( this.visible === false ) object.visible = false;
1268
1306
  if ( this.frustumCulled === false ) object.frustumCulled = false;
1269
1307
  if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;
1308
+ if ( this.static !== false ) object.static = this.static;
1270
1309
  if ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData;
1271
1310
 
1272
1311
  object.layers = this.layers.mask;
1273
1312
  object.matrix = this.matrix.toArray();
1274
1313
  object.up = this.up.toArray();
1275
1314
 
1315
+ if ( this.pivot !== null ) object.pivot = this.pivot.toArray();
1316
+
1276
1317
  if ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false;
1277
1318
 
1319
+ if ( this.morphTargetDictionary !== undefined ) object.morphTargetDictionary = Object.assign( {}, this.morphTargetDictionary );
1320
+ if ( this.morphTargetInfluences !== undefined ) object.morphTargetInfluences = this.morphTargetInfluences.slice();
1321
+
1278
1322
  // object specific properties
1279
1323
 
1280
1324
  if ( this.isInstancedMesh ) {
@@ -1548,6 +1592,12 @@ class Object3D extends EventDispatcher {
1548
1592
  this.quaternion.copy( source.quaternion );
1549
1593
  this.scale.copy( source.scale );
1550
1594
 
1595
+ if ( source.pivot !== null ) {
1596
+
1597
+ this.pivot = source.pivot.clone();
1598
+
1599
+ }
1600
+
1551
1601
  this.matrix.copy( source.matrix );
1552
1602
  this.matrixWorld.copy( source.matrixWorld );
1553
1603
 
@@ -1565,6 +1615,8 @@ class Object3D extends EventDispatcher {
1565
1615
  this.frustumCulled = source.frustumCulled;
1566
1616
  this.renderOrder = source.renderOrder;
1567
1617
 
1618
+ this.static = source.static;
1619
+
1568
1620
  this.animations = source.animations.slice();
1569
1621
 
1570
1622
  this.userData = JSON.parse( JSON.stringify( source.userData ) );
@@ -124,10 +124,6 @@ class RenderTarget extends EventDispatcher {
124
124
  */
125
125
  this.viewport = new Vector4( 0, 0, width, height );
126
126
 
127
- const image = { width: width, height: height, depth: options.depth };
128
-
129
- const texture = new Texture( image );
130
-
131
127
  /**
132
128
  * An array of textures. Each color attachment is represented as a separate texture.
133
129
  * Has at least a single entry for the default color attachment.
@@ -136,6 +132,9 @@ class RenderTarget extends EventDispatcher {
136
132
  */
137
133
  this.textures = [];
138
134
 
135
+ const image = { width: width, height: height, depth: options.depth };
136
+ const texture = new Texture( image );
137
+
139
138
  const count = options.count;
140
139
  for ( let i = 0; i < count; i ++ ) {
141
140
 
@@ -845,24 +845,20 @@ function _getGGXShader( lodMax, width, height ) {
845
845
  vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
846
846
  float alpha = roughness * roughness;
847
847
 
848
- // Section 3.2: Transform view direction to hemisphere configuration
849
- vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));
850
-
851
848
  // Section 4.1: Orthonormal basis
852
- float lensq = Vh.x * Vh.x + Vh.y * Vh.y;
853
- vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);
854
- vec3 T2 = cross(Vh, T1);
849
+ vec3 T1 = vec3(1.0, 0.0, 0.0);
850
+ vec3 T2 = cross(V, T1);
855
851
 
856
852
  // Section 4.2: Parameterization of projected area
857
853
  float r = sqrt(Xi.x);
858
854
  float phi = 2.0 * PI * Xi.y;
859
855
  float t1 = r * cos(phi);
860
856
  float t2 = r * sin(phi);
861
- float s = 0.5 * (1.0 + Vh.z);
857
+ float s = 0.5 * (1.0 + V.z);
862
858
  t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;
863
859
 
864
860
  // Section 4.3: Reprojection onto hemisphere
865
- vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;
861
+ vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V;
866
862
 
867
863
  // Section 3.4: Transform back to ellipsoid configuration
868
864
  return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
@@ -25,8 +25,10 @@ class TorusGeometry extends BufferGeometry {
25
25
  * @param {number} [radialSegments=12] - The number of radial segments.
26
26
  * @param {number} [tubularSegments=48] - The number of tubular segments.
27
27
  * @param {number} [arc=Math.PI*2] - Central angle in radians.
28
+ * @param {number} [thetaStart=0] - Start of the tubular sweep in radians.
29
+ * @param {number} [thetaLength=Math.PI*2] - Length of the tubular sweep in radians.
28
30
  */
29
- constructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) {
31
+ constructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI * 2 ) {
30
32
 
31
33
  super();
32
34
 
@@ -44,7 +46,9 @@ class TorusGeometry extends BufferGeometry {
44
46
  tube: tube,
45
47
  radialSegments: radialSegments,
46
48
  tubularSegments: tubularSegments,
47
- arc: arc
49
+ arc: arc,
50
+ thetaStart: thetaStart,
51
+ thetaLength: thetaLength,
48
52
  };
49
53
 
50
54
  radialSegments = Math.floor( radialSegments );
@@ -67,10 +71,11 @@ class TorusGeometry extends BufferGeometry {
67
71
 
68
72
  for ( let j = 0; j <= radialSegments; j ++ ) {
69
73
 
74
+ const v = thetaStart + ( j / radialSegments ) * thetaLength;
75
+
70
76
  for ( let i = 0; i <= tubularSegments; i ++ ) {
71
77
 
72
78
  const u = i / tubularSegments * arc;
73
- const v = j / radialSegments * Math.PI * 2;
74
79
 
75
80
  // vertex
76
81
 
@@ -18,6 +18,9 @@ const _camera = /*@__PURE__*/ new Camera();
18
18
  *
19
19
  * `CameraHelper` must be a child of the scene.
20
20
  *
21
+ * When the camera is transformed or its projection matrix is changed, it's necessary
22
+ * to call the `update()` method of the respective helper.
23
+ *
21
24
  * ```js
22
25
  * const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
23
26
  * const helper = new THREE.CameraHelper( camera );
@@ -11,9 +11,12 @@ const _v3 = /*@__PURE__*/ new Vector3();
11
11
 
12
12
  /**
13
13
  * Helper object to assist with visualizing a {@link DirectionalLight}'s
14
- * effect on the scene. This consists of plane and a line representing the
14
+ * effect on the scene. This consists of a plane and a line representing the
15
15
  * light's position and direction.
16
16
  *
17
+ * When the directional light or its target are transformed or light properties
18
+ * are changed, it's necessary to call the `update()` method of the respective helper.
19
+ *
17
20
  * ```js
18
21
  * const light = new THREE.DirectionalLight( 0xFFFFFF );
19
22
  * scene.add( light );
@@ -14,6 +14,9 @@ const _color2 = /*@__PURE__*/ new Color();
14
14
  * Creates a visual aid consisting of a spherical mesh for a
15
15
  * given {@link HemisphereLight}.
16
16
  *
17
+ * When the hemisphere light is transformed or its light properties are changed,
18
+ * it's necessary to call the `update()` method of the respective helper.
19
+ *
17
20
  * ```js
18
21
  * const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
19
22
  * const helper = new THREE.HemisphereLightHelper( light, 5 );
@@ -57,30 +57,6 @@ class PointLightHelper extends Mesh {
57
57
 
58
58
  this.update();
59
59
 
60
-
61
- /*
62
- // TODO: delete this comment?
63
- const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
64
- const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
65
-
66
- this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
67
- this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
68
-
69
- const d = light.distance;
70
-
71
- if ( d === 0.0 ) {
72
-
73
- this.lightDistance.visible = false;
74
-
75
- } else {
76
-
77
- this.lightDistance.scale.set( d, d, d );
78
-
79
- }
80
-
81
- this.add( this.lightDistance );
82
- */
83
-
84
60
  }
85
61
 
86
62
  /**
@@ -10,6 +10,9 @@ const _vector = /*@__PURE__*/ new Vector3();
10
10
  /**
11
11
  * This displays a cone shaped helper object for a {@link SpotLight}.
12
12
  *
13
+ * When the spot light or its target are transformed or light properties are
14
+ * changed, it's necessary to call the `update()` method of the respective helper.
15
+ *
13
16
  * ```js
14
17
  * const spotLight = new THREE.SpotLight( 0xffffff );
15
18
  * spotLight.position.set( 10, 10, 10 );
@@ -3,7 +3,7 @@ import { Vector2 } from '../math/Vector2.js';
3
3
  import { Vector3 } from '../math/Vector3.js';
4
4
  import { Vector4 } from '../math/Vector4.js';
5
5
  import { Frustum } from '../math/Frustum.js';
6
- import { UnsignedByteType } from '../constants.js';
6
+ import { UnsignedByteType, WebGPUCoordinateSystem } from '../constants.js';
7
7
 
8
8
  const _projScreenMatrix = /*@__PURE__*/ new Matrix4();
9
9
  const _lightPositionWorld = /*@__PURE__*/ new Vector3();
@@ -52,6 +52,16 @@ class LightShadow {
52
52
  */
53
53
  this.bias = 0;
54
54
 
55
+ /**
56
+ * A node version of `bias`. Only supported with `WebGPURenderer`.
57
+ *
58
+ * If a bias node is defined, `bias` has no effect.
59
+ *
60
+ * @type {?Node<float>}
61
+ * @default null
62
+ */
63
+ this.biasNode = null;
64
+
55
65
  /**
56
66
  * Defines how much the position used to query the shadow map is offset along
57
67
  * the object normal. The default is `0`. Increasing this value can be used to
@@ -203,12 +213,12 @@ class LightShadow {
203
213
  _projScreenMatrix.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );
204
214
  this._frustum.setFromProjectionMatrix( _projScreenMatrix, shadowCamera.coordinateSystem, shadowCamera.reversedDepth );
205
215
 
206
- if ( shadowCamera.reversedDepth ) {
216
+ if ( shadowCamera.coordinateSystem === WebGPUCoordinateSystem || shadowCamera.reversedDepth ) {
207
217
 
208
218
  shadowMatrix.set(
209
219
  0.5, 0.0, 0.0, 0.5,
210
220
  0.0, 0.5, 0.0, 0.5,
211
- 0.0, 0.0, 1.0, 0.0,
221
+ 0.0, 0.0, 1.0, 0.0, // Identity Z (preserving the correct [0, 1] range from the projection matrix)
212
222
  0.0, 0.0, 0.0, 1.0
213
223
  );
214
224
 
@@ -292,6 +302,8 @@ class LightShadow {
292
302
 
293
303
  this.mapSize.copy( source.mapSize );
294
304
 
305
+ this.biasNode = source.biasNode;
306
+
295
307
  return this;
296
308
 
297
309
  }
@@ -22,7 +22,8 @@ class IESSpotLight extends SpotLight {
22
22
  super( color, intensity, distance, angle, penumbra, decay );
23
23
 
24
24
  /**
25
- * TODO
25
+ * The IES map. It's a lookup table that stores normalized attenuation factors
26
+ * (0.0 to 1.0) that represent the light's intensity at a specific angle.
26
27
  *
27
28
  * @type {?Texture}
28
29
  * @default null
@@ -35,6 +35,8 @@ const Cache = {
35
35
 
36
36
  if ( this.enabled === false ) return;
37
37
 
38
+ if ( isBlobURL( key ) ) return;
39
+
38
40
  // log( 'Cache', 'Adding key:', key );
39
41
 
40
42
  this.files[ key ] = file;
@@ -52,6 +54,8 @@ const Cache = {
52
54
 
53
55
  if ( this.enabled === false ) return;
54
56
 
57
+ if ( isBlobURL( key ) ) return;
58
+
55
59
  // log( 'Cache', 'Checking key:', key );
56
60
 
57
61
  return this.files[ key ];
@@ -83,5 +87,29 @@ const Cache = {
83
87
 
84
88
  };
85
89
 
90
+ /**
91
+ * Returns true if the given cache key contains the blob: scheme.
92
+ *
93
+ * @private
94
+ * @param {string} key - The cache key.
95
+ * @return {boolean} Whether the given cache key contains the blob: scheme or not.
96
+ */
97
+ function isBlobURL( key ) {
98
+
99
+ try {
100
+
101
+ const urlString = key.slice( key.indexOf( ':' ) + 1 ); // remove type identifier
102
+
103
+ const url = new URL( urlString );
104
+ return url.protocol === 'blob:';
105
+
106
+ } catch ( e ) {
107
+
108
+ // If the string is not a valid URL, it throws an error
109
+ return false;
110
+
111
+ }
112
+
113
+ }
86
114
 
87
115
  export { Cache };
@@ -43,7 +43,7 @@ class FileLoader extends Loader {
43
43
 
44
44
  /**
45
45
  * The expected mime type. Valid values can be found
46
- * [here](hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype)
46
+ * [here](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype)
47
47
  *
48
48
  * @type {string}
49
49
  */
@@ -10,11 +10,16 @@ const _errorMap = new WeakMap();
10
10
  * textures for rendering.
11
11
  *
12
12
  * Note that {@link Texture#flipY} and {@link Texture#premultiplyAlpha} are ignored with image bitmaps.
13
- * They needs these configuration on bitmap creation unlike regular images need them on uploading to GPU.
13
+ * These options need to be configured via {@link ImageBitmapLoader#setOptions} prior to loading,
14
+ * unlike regular images which can be configured on the Texture to set these options on GPU upload instead.
14
15
  *
15
- * You need to set the equivalent options via {@link ImageBitmapLoader#setOptions} instead.
16
+ * To match the default behaviour of {@link Texture}, the following options are needed:
16
17
  *
17
- * Also note that unlike {@link FileLoader}, this loader avoids multiple concurrent requests to the same URL only if `Cache` is enabled.
18
+ * ```js
19
+ * { imageOrientation: 'flipY', premultiplyAlpha: 'none' }
20
+ * ```
21
+ *
22
+ * Also note that unlike {@link FileLoader}, this loader will only avoid multiple concurrent requests to the same URL if {@link Cache} is enabled.
18
23
  *
19
24
  * ```js
20
25
  * const loader = new THREE.ImageBitmapLoader();
@@ -61,6 +61,12 @@ class Loader {
61
61
  */
62
62
  this.requestHeader = {};
63
63
 
64
+ if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
65
+
66
+ __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
67
+
68
+ }
69
+
64
70
  }
65
71
 
66
72
  /**
@@ -21,6 +21,7 @@ import {
21
21
  } from '../constants.js';
22
22
  import { InstancedBufferAttribute } from '../core/InstancedBufferAttribute.js';
23
23
  import { Color } from '../math/Color.js';
24
+ import { Vector3 } from '../math/Vector3.js';
24
25
  import { Object3D } from '../core/Object3D.js';
25
26
  import { Group } from '../objects/Group.js';
26
27
  import { InstancedMesh } from '../objects/InstancedMesh.js';
@@ -171,7 +172,17 @@ class ObjectLoader extends Loader {
171
172
 
172
173
  const text = await loader.loadAsync( url, onProgress );
173
174
 
174
- const json = JSON.parse( text );
175
+ let json;
176
+
177
+ try {
178
+
179
+ json = JSON.parse( text );
180
+
181
+ } catch ( e ) {
182
+
183
+ throw new Error( 'ObjectLoader: Can\'t parse ' + url + '. ' + e.message );
184
+
185
+ }
175
186
 
176
187
  const metadata = json.metadata;
177
188
 
@@ -1116,6 +1127,11 @@ class ObjectLoader extends Loader {
1116
1127
 
1117
1128
  if ( data.up !== undefined ) object.up.fromArray( data.up );
1118
1129
 
1130
+ if ( data.pivot !== undefined ) object.pivot = new Vector3().fromArray( data.pivot );
1131
+
1132
+ if ( data.morphTargetDictionary !== undefined ) object.morphTargetDictionary = Object.assign( {}, data.morphTargetDictionary );
1133
+ if ( data.morphTargetInfluences !== undefined ) object.morphTargetInfluences = data.morphTargetInfluences.slice();
1134
+
1119
1135
  if ( data.castShadow !== undefined ) object.castShadow = data.castShadow;
1120
1136
  if ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow;
1121
1137
 
@@ -1133,6 +1149,7 @@ class ObjectLoader extends Loader {
1133
1149
  if ( data.visible !== undefined ) object.visible = data.visible;
1134
1150
  if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;
1135
1151
  if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;
1152
+ if ( data.static !== undefined ) object.static = data.static;
1136
1153
  if ( data.userData !== undefined ) object.userData = data.userData;
1137
1154
  if ( data.layers !== undefined ) object.layers.mask = data.layers;
1138
1155
 
@@ -267,6 +267,14 @@ class MeshLambertMaterial extends Material {
267
267
  */
268
268
  this.reflectivity = 1;
269
269
 
270
+ /**
271
+ * Scales the effect of the environment map by multiplying its color.
272
+ *
273
+ * @type {number}
274
+ * @default 1
275
+ */
276
+ this.envMapIntensity = 1.0;
277
+
270
278
  /**
271
279
  * The index of refraction (IOR) of air (approximately 1) divided by the
272
280
  * index of refraction of the material. It is used with environment mapping
@@ -373,6 +381,7 @@ class MeshLambertMaterial extends Material {
373
381
  this.envMapRotation.copy( source.envMapRotation );
374
382
  this.combine = source.combine;
375
383
  this.reflectivity = source.reflectivity;
384
+ this.envMapIntensity = source.envMapIntensity;
376
385
  this.refractionRatio = source.refractionRatio;
377
386
 
378
387
  this.wireframe = source.wireframe;
@@ -284,6 +284,14 @@ class MeshPhongMaterial extends Material {
284
284
  */
285
285
  this.reflectivity = 1;
286
286
 
287
+ /**
288
+ * Scales the effect of the environment map by multiplying its color.
289
+ *
290
+ * @type {number}
291
+ * @default 1
292
+ */
293
+ this.envMapIntensity = 1.0;
294
+
287
295
  /**
288
296
  * The index of refraction (IOR) of air (approximately 1) divided by the
289
297
  * index of refraction of the material. It is used with environment mapping
@@ -392,6 +400,7 @@ class MeshPhongMaterial extends Material {
392
400
  this.envMapRotation.copy( source.envMapRotation );
393
401
  this.combine = source.combine;
394
402
  this.reflectivity = source.reflectivity;
403
+ this.envMapIntensity = source.envMapIntensity;
395
404
  this.refractionRatio = source.refractionRatio;
396
405
 
397
406
  this.wireframe = source.wireframe;
@@ -9,7 +9,7 @@ import { mix, smoothstep } from '../../nodes/math/MathNode.js';
9
9
  import { Fn, float, vec2, vec3, vec4, If } from '../../nodes/tsl/TSLBase.js';
10
10
  import { uv } from '../../nodes/accessors/UV.js';
11
11
  import { screenDPR, viewport } from '../../nodes/display/ScreenNode.js';
12
- import { viewportSharedTexture } from '../../nodes/display/ViewportSharedTextureNode.js';
12
+ import { viewportOpaqueMipTexture } from '../../nodes/display/ViewportTextureNode.js';
13
13
 
14
14
  import { LineDashedMaterial } from '../LineDashedMaterial.js';
15
15
  import { NoBlending } from '../../constants.js';
@@ -56,7 +56,7 @@ class Line2NodeMaterial extends NodeMaterial {
56
56
  * @type {boolean}
57
57
  * @default false
58
58
  */
59
- this.useColor = parameters.vertexColors;
59
+ this.vertexColors = parameters.vertexColors;
60
60
 
61
61
  /**
62
62
  * The dash offset.
@@ -133,7 +133,7 @@ class Line2NodeMaterial extends NodeMaterial {
133
133
  const { renderer } = builder;
134
134
 
135
135
  const useAlphaToCoverage = this._useAlphaToCoverage;
136
- const useColor = this.useColor;
136
+ const vertexColors = this.vertexColors;
137
137
  const useDash = this._useDash;
138
138
  const useWorldUnits = this._useWorldUnits;
139
139
 
@@ -434,7 +434,7 @@ class Line2NodeMaterial extends NodeMaterial {
434
434
 
435
435
  } else {
436
436
 
437
- if ( useColor ) {
437
+ if ( vertexColors ) {
438
438
 
439
439
  const instanceColorStart = attribute( 'instanceColorStart' );
440
440
  const instanceColorEnd = attribute( 'instanceColorEnd' );
@@ -459,7 +459,7 @@ class Line2NodeMaterial extends NodeMaterial {
459
459
 
460
460
  const opacityNode = this.opacityNode ? float( this.opacityNode ) : materialOpacity;
461
461
 
462
- this.outputNode = vec4( this.colorNode.rgb.mul( opacityNode ).add( viewportSharedTexture().rgb.mul( opacityNode.oneMinus() ) ), this.colorNode.a );
462
+ this.outputNode = vec4( this.colorNode.rgb.mul( opacityNode ).add( viewportOpaqueMipTexture().rgb.mul( opacityNode.oneMinus() ) ), this.colorNode.a );
463
463
 
464
464
  }
465
465
 
@@ -502,6 +502,8 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
502
502
  this.specularIntensityNode = source.specularIntensityNode;
503
503
  this.specularColorNode = source.specularColorNode;
504
504
 
505
+ this.iorNode = source.iorNode;
506
+
505
507
  this.transmissionNode = source.transmissionNode;
506
508
  this.thicknessNode = source.thicknessNode;
507
509
  this.attenuationDistanceNode = source.attenuationDistanceNode;