super-three 0.184.0 → 0.185.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 (366) hide show
  1. package/build/three.cjs +1260 -927
  2. package/build/three.core.js +1104 -829
  3. package/build/three.core.min.js +1 -1
  4. package/build/three.module.js +156 -98
  5. package/build/three.module.min.js +1 -1
  6. package/build/three.tsl.js +11 -4
  7. package/build/three.tsl.min.js +1 -1
  8. package/build/three.webgpu.js +7538 -3367
  9. package/build/three.webgpu.min.js +1 -1
  10. package/build/three.webgpu.nodes.js +7538 -3366
  11. package/build/three.webgpu.nodes.min.js +1 -1
  12. package/examples/jsm/Addons.js +3 -0
  13. package/examples/jsm/controls/ArcballControls.js +6 -2
  14. package/examples/jsm/controls/FirstPersonControls.js +79 -42
  15. package/examples/jsm/controls/TransformControls.js +68 -15
  16. package/examples/jsm/csm/CSMFrustum.js +31 -6
  17. package/examples/jsm/csm/CSMShadowNode.js +4 -1
  18. package/examples/jsm/effects/AsciiEffect.js +14 -1
  19. package/examples/jsm/exporters/DRACOExporter.js +27 -6
  20. package/examples/jsm/exporters/GLTFExporter.js +114 -12
  21. package/examples/jsm/exporters/PLYExporter.js +286 -73
  22. package/examples/jsm/exporters/USDZExporter.js +347 -112
  23. package/examples/jsm/generators/CityGenerator.js +346 -0
  24. package/examples/jsm/generators/ForestGenerator.js +347 -0
  25. package/examples/jsm/generators/TerrainGenerator.js +504 -0
  26. package/examples/jsm/generators/TreeGenerator.js +377 -0
  27. package/examples/jsm/generators/city/SidewalkGenerator.js +253 -0
  28. package/examples/jsm/generators/city/SkyscraperGenerator.js +1357 -0
  29. package/examples/jsm/geometries/LoftGeometry.js +355 -0
  30. package/examples/jsm/helpers/LightProbeGridHelper.js +1 -1
  31. package/examples/jsm/helpers/LightProbeHelper.js +5 -4
  32. package/examples/jsm/helpers/ViewHelper.js +16 -6
  33. package/examples/jsm/inspector/Inspector.js +53 -15
  34. package/examples/jsm/inspector/RendererInspector.js +152 -36
  35. package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.js +1 -1
  36. package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.js +1 -1
  37. package/examples/jsm/inspector/tabs/Console.js +200 -18
  38. package/examples/jsm/inspector/tabs/Memory.js +8 -0
  39. package/examples/jsm/inspector/tabs/Parameters.js +64 -4
  40. package/examples/jsm/inspector/tabs/Performance.js +21 -6
  41. package/examples/jsm/inspector/tabs/Settings.js +51 -9
  42. package/examples/jsm/inspector/tabs/Timeline.js +178 -93
  43. package/examples/jsm/inspector/tabs/Viewer.js +628 -16
  44. package/examples/jsm/inspector/ui/Graph.js +162 -25
  45. package/examples/jsm/inspector/ui/Item.js +92 -13
  46. package/examples/jsm/inspector/ui/List.js +1 -1
  47. package/examples/jsm/inspector/ui/Profiler.js +90 -45
  48. package/examples/jsm/inspector/ui/Style.js +1788 -1401
  49. package/examples/jsm/inspector/ui/Tab.js +5 -3
  50. package/examples/jsm/inspector/ui/Values.js +71 -6
  51. package/examples/jsm/inspector/ui/utils.js +130 -10
  52. package/examples/jsm/libs/basis/README.md +0 -1
  53. package/examples/jsm/libs/demuxer_mp4.js +3 -3
  54. package/examples/jsm/libs/draco/README.md +0 -1
  55. package/examples/jsm/libs/meshopt_clusterizer.module.js +421 -0
  56. package/examples/jsm/libs/meshopt_simplifier.module.js +627 -0
  57. package/examples/jsm/libs/mikktspace.module.js +34 -9
  58. package/examples/jsm/lighting/ClusteredLighting.js +55 -0
  59. package/examples/jsm/lighting/LightProbeGrid.js +106 -76
  60. package/examples/jsm/lines/LineMaterial.js +38 -15
  61. package/examples/jsm/lines/LineSegments2.js +8 -0
  62. package/examples/jsm/lines/webgpu/LineSegments2.js +8 -0
  63. package/examples/jsm/loaders/3DMLoader.js +1 -1
  64. package/examples/jsm/loaders/DRACOLoader.js +46 -13
  65. package/examples/jsm/loaders/EXRLoader.js +27 -55
  66. package/examples/jsm/loaders/HDRLoader.js +6 -28
  67. package/examples/jsm/loaders/KTX2Loader.js +31 -12
  68. package/examples/jsm/loaders/LDrawLoader.js +8 -8
  69. package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
  70. package/examples/jsm/loaders/LUTCubeLoader.js +2 -2
  71. package/examples/jsm/loaders/LWOLoader.js +4 -0
  72. package/examples/jsm/loaders/LottieLoader.js +1 -1
  73. package/examples/jsm/loaders/MaterialXLoader.js +31 -9
  74. package/examples/jsm/loaders/NRRDLoader.js +3 -3
  75. package/examples/jsm/loaders/PCDLoader.js +7 -7
  76. package/examples/jsm/loaders/PLYLoader.js +218 -55
  77. package/examples/jsm/loaders/SVGLoader.js +547 -495
  78. package/examples/jsm/loaders/TTFLoader.js +1 -1
  79. package/examples/jsm/loaders/USDLoader.js +33 -9
  80. package/examples/jsm/loaders/VRMLLoader.js +1 -1
  81. package/examples/jsm/loaders/usd/USDAParser.js +93 -20
  82. package/examples/jsm/loaders/usd/USDCParser.js +1 -1
  83. package/examples/jsm/loaders/usd/USDComposer.js +52 -19
  84. package/examples/jsm/misc/TileCreasedNormalsPlugin.js +270 -0
  85. package/examples/jsm/misc/Volume.js +2 -2
  86. package/examples/jsm/objects/GroundedSkybox.js +1 -1
  87. package/examples/jsm/objects/Reflector.js +2 -3
  88. package/examples/jsm/objects/Water2Mesh.js +1 -1
  89. package/examples/jsm/physics/AmmoPhysics.js +15 -8
  90. package/examples/jsm/physics/RapierPhysics.js +27 -2
  91. package/examples/jsm/shaders/VolumeShader.js +31 -44
  92. package/examples/jsm/transpiler/GLSLDecoder.js +6 -6
  93. package/examples/jsm/transpiler/Linker.js +1 -1
  94. package/examples/jsm/tsl/display/BloomNode.js +59 -19
  95. package/examples/jsm/tsl/display/DepthOfFieldNode.js +2 -2
  96. package/examples/jsm/tsl/display/FXAANode.js +11 -12
  97. package/examples/jsm/tsl/display/GTAONode.js +34 -13
  98. package/examples/jsm/tsl/display/GodraysNode.js +1 -1
  99. package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +560 -0
  100. package/examples/jsm/tsl/display/PixelationPassNode.js +2 -2
  101. package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +912 -0
  102. package/examples/jsm/tsl/display/SSAAPassNode.js +13 -25
  103. package/examples/jsm/tsl/display/SSGINode.js +89 -39
  104. package/examples/jsm/tsl/display/SSRNode.js +829 -132
  105. package/examples/jsm/tsl/display/SSSNode.js +2 -2
  106. package/examples/jsm/tsl/display/TemporalReprojectNode.js +1023 -0
  107. package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +622 -0
  108. package/examples/jsm/tsl/lighting/DynamicLightsNode.js +1 -1
  109. package/examples/jsm/tsl/math/curlNoise.js +107 -0
  110. package/examples/jsm/tsl/shadows/TileShadowNode.js +1 -1
  111. package/examples/jsm/tsl/shadows/TileShadowNodeHelper.js +3 -3
  112. package/examples/jsm/tsl/utils/GroundedSkybox.js +62 -0
  113. package/examples/jsm/tsl/utils/RNoise.js +51 -0
  114. package/examples/jsm/tsl/utils/SpecularHelpers.js +325 -0
  115. package/examples/jsm/utils/BufferGeometryUtils.js +126 -59
  116. package/examples/jsm/utils/GeometryCompressionUtils.js +1 -1
  117. package/examples/jsm/utils/SceneOptimizer.js +1 -1
  118. package/examples/jsm/webxr/ARButton.js +1 -1
  119. package/examples/jsm/webxr/WebGLXRFallback.js +89 -0
  120. package/examples/jsm/webxr/XRControllerModelFactory.js +2 -2
  121. package/package.json +7 -7
  122. package/src/Three.TSL.js +10 -3
  123. package/src/Three.WebGPU.js +4 -0
  124. package/src/animation/AnimationAction.js +15 -11
  125. package/src/animation/AnimationClip.js +0 -139
  126. package/src/animation/KeyframeTrack.js +2 -2
  127. package/src/animation/PropertyBinding.js +2 -2
  128. package/src/cameras/Camera.js +2 -2
  129. package/src/cameras/StereoCamera.js +5 -2
  130. package/src/constants.js +1 -1
  131. package/src/core/BufferGeometry.js +29 -7
  132. package/src/core/Object3D.js +17 -7
  133. package/src/core/Raycaster.js +1 -1
  134. package/src/core/RenderTarget.js +15 -2
  135. package/src/extras/PMREMGenerator.js +6 -4
  136. package/src/extras/TextureUtils.js +1 -1
  137. package/src/extras/core/ShapePath.js +149 -160
  138. package/src/geometries/SphereGeometry.js +8 -3
  139. package/src/helpers/DirectionalLightHelper.js +2 -0
  140. package/src/helpers/HemisphereLightHelper.js +2 -0
  141. package/src/helpers/PointLightHelper.js +2 -0
  142. package/src/helpers/SpotLightHelper.js +1 -1
  143. package/src/loaders/DataTextureLoader.js +69 -38
  144. package/src/loaders/LoadingManager.js +5 -0
  145. package/src/loaders/MaterialLoader.js +36 -266
  146. package/src/loaders/ObjectLoader.js +3 -1
  147. package/src/materials/LineBasicMaterial.js +4 -0
  148. package/src/materials/Material.js +196 -1
  149. package/src/materials/MeshBasicMaterial.js +24 -0
  150. package/src/materials/MeshDepthMaterial.js +10 -0
  151. package/src/materials/MeshDistanceMaterial.js +10 -0
  152. package/src/materials/MeshLambertMaterial.js +40 -1
  153. package/src/materials/MeshMatcapMaterial.js +25 -1
  154. package/src/materials/MeshNormalMaterial.js +9 -1
  155. package/src/materials/MeshPhongMaterial.js +40 -1
  156. package/src/materials/MeshPhysicalMaterial.js +38 -0
  157. package/src/materials/MeshStandardMaterial.js +42 -1
  158. package/src/materials/MeshToonMaterial.js +34 -1
  159. package/src/materials/PointsMaterial.js +7 -0
  160. package/src/materials/ShaderMaterial.js +86 -0
  161. package/src/materials/SpriteMaterial.js +7 -0
  162. package/src/materials/nodes/Line2NodeMaterial.js +378 -322
  163. package/src/materials/nodes/MeshBasicNodeMaterial.js +2 -2
  164. package/src/materials/nodes/MeshNormalNodeMaterial.js +2 -2
  165. package/src/materials/nodes/MeshPhongNodeMaterial.js +0 -9
  166. package/src/materials/nodes/MeshPhysicalNodeMaterial.js +0 -30
  167. package/src/materials/nodes/MeshSSSNodeMaterial.js +0 -13
  168. package/src/materials/nodes/MeshStandardNodeMaterial.js +0 -11
  169. package/src/materials/nodes/NodeMaterial.js +115 -71
  170. package/src/materials/nodes/SpriteNodeMaterial.js +0 -10
  171. package/src/materials/nodes/manager/NodeMaterialObserver.js +49 -20
  172. package/src/math/Box3.js +5 -0
  173. package/src/math/FrustumArray.js +103 -133
  174. package/src/math/Interpolant.js +1 -1
  175. package/src/math/MathUtils.js +2 -2
  176. package/src/math/Matrix3.js +11 -0
  177. package/src/math/Matrix4.js +28 -3
  178. package/src/math/Vector2.js +2 -2
  179. package/src/math/Vector3.js +2 -2
  180. package/src/math/Vector4.js +2 -2
  181. package/src/math/interpolants/BezierInterpolant.js +4 -6
  182. package/src/nodes/Nodes.js +2 -5
  183. package/src/nodes/TSL.js +8 -6
  184. package/src/nodes/accessors/Arrays.js +4 -4
  185. package/src/nodes/accessors/Batch.js +108 -0
  186. package/src/nodes/accessors/Bitangent.js +2 -2
  187. package/src/nodes/accessors/BufferAttributeNode.js +13 -2
  188. package/src/nodes/accessors/Camera.js +7 -7
  189. package/src/nodes/accessors/ClippingNode.js +1 -1
  190. package/src/nodes/accessors/Instance.js +264 -0
  191. package/src/nodes/accessors/MaterialNode.js +18 -2
  192. package/src/nodes/accessors/MaterialProperties.js +4 -3
  193. package/src/nodes/accessors/{MorphNode.js → Morph.js} +99 -112
  194. package/src/nodes/accessors/Normal.js +13 -13
  195. package/src/nodes/accessors/Position.js +5 -1
  196. package/src/nodes/accessors/ReferenceNode.js +1 -0
  197. package/src/nodes/accessors/ReflectVector.js +3 -3
  198. package/src/nodes/accessors/SceneProperties.js +1 -1
  199. package/src/nodes/accessors/Skinning.js +263 -0
  200. package/src/nodes/accessors/StorageBufferNode.js +2 -2
  201. package/src/nodes/accessors/StorageTexture3DNode.js +100 -0
  202. package/src/nodes/accessors/StorageTextureNode.js +39 -7
  203. package/src/nodes/accessors/Tangent.js +4 -4
  204. package/src/nodes/accessors/TextureNode.js +60 -5
  205. package/src/nodes/code/FunctionNode.js +2 -16
  206. package/src/nodes/core/MRTNode.js +7 -2
  207. package/src/nodes/core/Node.js +39 -2
  208. package/src/nodes/core/NodeBuilder.js +201 -41
  209. package/src/nodes/core/NodeUtils.js +13 -13
  210. package/src/nodes/core/OutputStructNode.js +1 -1
  211. package/src/nodes/core/OverrideContextNode.js +153 -0
  212. package/src/nodes/core/PropertyNode.js +51 -5
  213. package/src/nodes/core/StackNode.js +56 -34
  214. package/src/nodes/core/StructNode.js +4 -6
  215. package/src/nodes/core/StructTypeNode.js +6 -6
  216. package/src/nodes/core/VarNode.js +8 -0
  217. package/src/nodes/core/VaryingNode.js +12 -2
  218. package/src/nodes/display/BlendModes.js +1 -41
  219. package/src/nodes/display/BumpMapNode.js +6 -1
  220. package/src/nodes/display/ColorAdjustment.js +10 -9
  221. package/src/nodes/display/FrontFacingNode.js +38 -9
  222. package/src/nodes/display/NormalMapNode.js +2 -2
  223. package/src/nodes/display/PassNode.js +35 -43
  224. package/src/nodes/display/PremultiplyAlphaFunctions.js +39 -0
  225. package/src/nodes/display/RenderOutputNode.js +12 -3
  226. package/src/nodes/functions/VolumetricLightingModel.js +40 -7
  227. package/src/nodes/gpgpu/WorkgroupInfoNode.js +1 -1
  228. package/src/nodes/lighting/EnvironmentNode.js +2 -2
  229. package/src/nodes/lighting/IESSpotLightNode.js +40 -2
  230. package/src/nodes/lighting/LightingContextNode.js +10 -2
  231. package/src/nodes/lighting/LightsNode.js +90 -37
  232. package/src/nodes/lighting/PointShadowNode.js +6 -1
  233. package/src/nodes/lighting/ShadowFilterNode.js +21 -52
  234. package/src/nodes/lighting/ShadowNode.js +34 -14
  235. package/src/nodes/materialx/lib/mx_noise.js +2 -2
  236. package/src/nodes/math/ConditionalNode.js +3 -3
  237. package/src/nodes/math/MathNode.js +39 -11
  238. package/src/nodes/math/OperatorNode.js +23 -23
  239. package/src/nodes/parsers/GLSLNodeFunction.js +1 -1
  240. package/src/nodes/pmrem/PMREMNode.js +33 -2
  241. package/src/nodes/tsl/TSLCore.js +63 -18
  242. package/src/nodes/utils/EquirectUV.js +30 -5
  243. package/src/nodes/utils/FunctionOverloadingNode.js +1 -1
  244. package/src/nodes/utils/Packing.js +35 -4
  245. package/src/nodes/utils/RTTNode.js +40 -24
  246. package/src/nodes/utils/ReflectorNode.js +1 -0
  247. package/src/nodes/utils/StorageArrayElementNode.js +1 -1
  248. package/src/objects/BatchedMesh.js +22 -14
  249. package/src/objects/InstancedMesh.js +0 -11
  250. package/src/objects/Skeleton.js +0 -9
  251. package/src/renderers/WebGLRenderer.js +19 -15
  252. package/src/renderers/common/Backend.js +49 -5
  253. package/src/renderers/common/Bindings.js +114 -45
  254. package/src/renderers/common/Buffer.js +9 -0
  255. package/src/renderers/common/ClippingContext.js +10 -2
  256. package/src/renderers/common/Info.js +63 -22
  257. package/src/renderers/common/Lighting.js +53 -5
  258. package/src/renderers/common/RenderList.js +41 -4
  259. package/src/renderers/common/RenderObject.js +73 -13
  260. package/src/renderers/common/Renderer.js +281 -108
  261. package/src/renderers/common/Sampler.js +16 -48
  262. package/src/renderers/common/Textures.js +32 -5
  263. package/src/renderers/common/TimestampQueryPool.js +1 -1
  264. package/src/renderers/common/UniformsGroup.js +31 -9
  265. package/src/renderers/common/XRManager.js +340 -22
  266. package/src/renderers/common/extras/PMREMGenerator.js +15 -38
  267. package/src/renderers/common/nodes/NodeBuilderState.js +9 -1
  268. package/src/renderers/common/nodes/NodeLibrary.js +4 -4
  269. package/src/renderers/common/nodes/NodeManager.js +63 -14
  270. package/src/renderers/common/nodes/NodeUniformBuffer.js +13 -0
  271. package/src/renderers/shaders/ShaderChunk/common.glsl.js +13 -4
  272. package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +0 -6
  273. package/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js +1 -1
  274. package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +2 -2
  275. package/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.js +1 -1
  276. package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +1 -1
  277. package/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.js +1 -1
  278. package/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.js +2 -2
  279. package/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.js +6 -0
  280. package/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.js +1 -1
  281. package/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js +1 -1
  282. package/src/renderers/shaders/ShaderLib/distance.glsl.js +1 -1
  283. package/src/renderers/webgl/WebGLOutput.js +2 -1
  284. package/src/renderers/webgl/WebGLProgram.js +5 -4
  285. package/src/renderers/webgl/WebGLPrograms.js +12 -5
  286. package/src/renderers/webgl/WebGLRenderLists.js +9 -1
  287. package/src/renderers/webgl/WebGLShaderCache.js +5 -11
  288. package/src/renderers/webgl/WebGLTextures.js +20 -7
  289. package/src/renderers/webgl/WebGLUniformsGroups.js +66 -38
  290. package/src/renderers/webgl-fallback/WebGLBackend.js +84 -25
  291. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +138 -8
  292. package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +1 -1
  293. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +52 -22
  294. package/src/renderers/webgl-fallback/utils/WebGLUtils.js +4 -2
  295. package/src/renderers/webgpu/WebGPUBackend.js +480 -169
  296. package/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.js +48 -0
  297. package/src/renderers/webgpu/descriptors/GPUBufferDescriptor.js +57 -0
  298. package/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.js +30 -0
  299. package/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.js +38 -0
  300. package/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.js +48 -0
  301. package/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.js +47 -0
  302. package/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.js +50 -0
  303. package/src/renderers/webgpu/descriptors/GPUExtent3D.js +51 -0
  304. package/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.js +39 -0
  305. package/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.js +47 -0
  306. package/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.js +74 -0
  307. package/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.js +72 -0
  308. package/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.js +99 -0
  309. package/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.js +72 -0
  310. package/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.js +49 -0
  311. package/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.js +130 -0
  312. package/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.js +119 -0
  313. package/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.js +46 -0
  314. package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.js +57 -0
  315. package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.js +48 -0
  316. package/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.js +61 -0
  317. package/src/renderers/webgpu/descriptors/GPUTextureDescriptor.js +99 -0
  318. package/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.js +108 -0
  319. package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +0 -1
  320. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +164 -7
  321. package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +1 -1
  322. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +98 -38
  323. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +72 -68
  324. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +164 -69
  325. package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +158 -95
  326. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +297 -141
  327. package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +33 -18
  328. package/src/renderers/webgpu/utils/WebGPUUtils.js +38 -3
  329. package/src/textures/DepthTexture.js +1 -1
  330. package/src/textures/ExternalTexture.js +0 -3
  331. package/examples/fonts/LICENSE +0 -13
  332. package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
  333. package/examples/fonts/MPLUSRounded1c/OFL.txt +0 -91
  334. package/examples/fonts/README.md +0 -11
  335. package/examples/fonts/droid/NOTICE +0 -190
  336. package/examples/fonts/droid/README.txt +0 -18
  337. package/examples/fonts/droid/droid_sans_bold.typeface.json +0 -1
  338. package/examples/fonts/droid/droid_sans_mono_regular.typeface.json +0 -1
  339. package/examples/fonts/droid/droid_sans_regular.typeface.json +0 -1
  340. package/examples/fonts/droid/droid_serif_bold.typeface.json +0 -1
  341. package/examples/fonts/droid/droid_serif_regular.typeface.json +0 -1
  342. package/examples/fonts/gentilis_bold.typeface.json +0 -1
  343. package/examples/fonts/gentilis_regular.typeface.json +0 -1
  344. package/examples/fonts/helvetiker_bold.typeface.json +0 -1
  345. package/examples/fonts/helvetiker_regular.typeface.json +0 -1
  346. package/examples/fonts/optimer_bold.typeface.json +0 -1
  347. package/examples/fonts/optimer_regular.typeface.json +0 -1
  348. package/examples/fonts/ttf/README.md +0 -9
  349. package/examples/fonts/ttf/kenpixel.ttf +0 -0
  350. package/examples/jsm/inspector/extensions/extensions.json +0 -6
  351. package/examples/jsm/libs/ammo.wasm.js +0 -822
  352. package/examples/jsm/libs/ammo.wasm.wasm +0 -0
  353. package/examples/jsm/libs/draco/draco_encoder.js +0 -33
  354. package/examples/jsm/libs/draco/gltf/draco_encoder.js +0 -33
  355. package/examples/jsm/libs/lottie_canvas.module.js +0 -14849
  356. package/examples/jsm/libs/opentype.module.js +0 -14506
  357. package/examples/jsm/libs/rhino3dm/rhino3dm.js +0 -21
  358. package/examples/jsm/libs/rhino3dm/rhino3dm.module.js +0 -16
  359. package/examples/jsm/libs/rhino3dm/rhino3dm.wasm +0 -0
  360. package/examples/jsm/lighting/TiledLighting.js +0 -42
  361. package/examples/jsm/tsl/display/AnamorphicNode.js +0 -293
  362. package/examples/jsm/tsl/lighting/TiledLightsNode.js +0 -442
  363. package/src/nodes/accessors/BatchNode.js +0 -163
  364. package/src/nodes/accessors/InstanceNode.js +0 -349
  365. package/src/nodes/accessors/InstancedMeshNode.js +0 -50
  366. package/src/nodes/accessors/SkinningNode.js +0 -328
@@ -41,6 +41,10 @@ class MeshDistanceMaterial extends Material {
41
41
  * The color map. May optionally include an alpha channel, typically combined
42
42
  * with {@link Material#transparent} or {@link Material#alphaTest}.
43
43
  *
44
+ * `map` represents color data, and the texture must be assigned a
45
+ * {@link Texture#colorSpace}. Most `map` textures set
46
+ * `texture.colorSpace = SRGBColorSpace`.
47
+ *
44
48
  * @type {?Texture}
45
49
  * @default null
46
50
  */
@@ -56,6 +60,9 @@ class MeshDistanceMaterial extends Material {
56
60
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
57
61
  * luminance/alpha textures will also still work as expected.
58
62
  *
63
+ * `alphaMap` represents non-color data. Any texture assigned must have
64
+ * `texture.colorSpace = NoColorSpace` (default).
65
+ *
59
66
  * @type {?Texture}
60
67
  * @default null
61
68
  */
@@ -69,6 +76,9 @@ class MeshDistanceMaterial extends Material {
69
76
  * of each pixel (white being the highest) is mapped against, and
70
77
  * repositions, the vertices of the mesh.
71
78
  *
79
+ * `displacementMap` represents non-color data. Any texture assigned must have
80
+ * `texture.colorSpace = NoColorSpace` (default).
81
+ *
72
82
  * @type {?Texture}
73
83
  * @default null
74
84
  */
@@ -60,6 +60,10 @@ class MeshLambertMaterial extends Material {
60
60
  * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
61
61
  * color is modulated by the diffuse `color`.
62
62
  *
63
+ * `map` represents color data, and the texture must be assigned a
64
+ * {@link Texture#colorSpace}. Most `map` textures set
65
+ * `texture.colorSpace = SRGBColorSpace`.
66
+ *
63
67
  * @type {?Texture}
64
68
  * @default null
65
69
  */
@@ -68,6 +72,11 @@ class MeshLambertMaterial extends Material {
68
72
  /**
69
73
  * The light map. Requires a second set of UVs.
70
74
  *
75
+ * `lightMap` represents pre-baked illuminance data, and the texture must be assigned
76
+ * a {@link Texture#colorSpace}. Most `lightMap` textures set
77
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
78
+ * such as `.exr` or `.hdr`.
79
+ *
71
80
  * @type {?Texture}
72
81
  * @default null
73
82
  */
@@ -85,6 +94,9 @@ class MeshLambertMaterial extends Material {
85
94
  * The red channel of this texture is used as the ambient occlusion map.
86
95
  * Requires a second set of UVs.
87
96
  *
97
+ * `aoMap` represents non-color data. Any texture assigned must have
98
+ * `texture.colorSpace = NoColorSpace` (default).
99
+ *
88
100
  * @type {?Texture}
89
101
  * @default null
90
102
  */
@@ -122,6 +134,10 @@ class MeshLambertMaterial extends Material {
122
134
  * emissive color and the emissive intensity. If you have an emissive map,
123
135
  * be sure to set the emissive color to something other than black.
124
136
  *
137
+ * `emissiveMap` represents color data, and the texture must be assigned a
138
+ * {@link Texture#colorSpace}. Most `emissiveMap` textures set
139
+ * `texture.colorSpace = SRGBColorSpace`.
140
+ *
125
141
  * @type {?Texture}
126
142
  * @default null
127
143
  */
@@ -133,6 +149,9 @@ class MeshLambertMaterial extends Material {
133
149
  * the geometry of the object, only the lighting. If a normal map is defined
134
150
  * this will be ignored.
135
151
  *
152
+ * `bumpMap` represents non-color data. Any texture assigned must have
153
+ * `texture.colorSpace = NoColorSpace` (default).
154
+ *
136
155
  * @type {?Texture}
137
156
  * @default null
138
157
  */
@@ -154,6 +173,9 @@ class MeshLambertMaterial extends Material {
154
173
  * convention, the `y` component of `normalScale` should be negated to compensate
155
174
  * for the different handedness.
156
175
  *
176
+ * `normalMap` represents non-color data. Any texture assigned must have
177
+ * `texture.colorSpace = NoColorSpace` (default).
178
+ *
157
179
  * @type {?Texture}
158
180
  * @default null
159
181
  */
@@ -181,7 +203,12 @@ class MeshLambertMaterial extends Material {
181
203
  * displaced vertices can cast shadows, block other objects, and otherwise
182
204
  * act as real geometry. The displacement texture is an image where the value
183
205
  * of each pixel (white being the highest) is mapped against, and
184
- * repositions, the vertices of the mesh.
206
+ * repositions, the vertices of the mesh. For best results, pair a
207
+ * displacement map with a matching normal map, since the renderer can
208
+ * not recompute surface normals from the displaced vertices.
209
+ *
210
+ * `displacementMap` represents non-color data. Any texture assigned must have
211
+ * `texture.colorSpace = NoColorSpace` (default).
185
212
  *
186
213
  * @type {?Texture}
187
214
  * @default null
@@ -211,6 +238,10 @@ class MeshLambertMaterial extends Material {
211
238
  /**
212
239
  * Specular map used by the material.
213
240
  *
241
+ * `specularMap` represents color data, and the texture must be assigned a
242
+ * {@link Texture#colorSpace}. Most `specularMap` textures set
243
+ * `texture.colorSpace = SRGBColorSpace`.
244
+ *
214
245
  * @type {?Texture}
215
246
  * @default null
216
247
  */
@@ -226,6 +257,9 @@ class MeshLambertMaterial extends Material {
226
257
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
227
258
  * luminance/alpha textures will also still work as expected.
228
259
  *
260
+ * `alphaMap` represents non-color data. Any texture assigned must have
261
+ * `texture.colorSpace = NoColorSpace` (default).
262
+ *
229
263
  * @type {?Texture}
230
264
  * @default null
231
265
  */
@@ -234,6 +268,11 @@ class MeshLambertMaterial extends Material {
234
268
  /**
235
269
  * The environment map.
236
270
  *
271
+ * `envMap` represents luminance data, and the texture must be assigned
272
+ * a {@link Texture#colorSpace}. Most `envMap` textures set
273
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
274
+ * such as `.exr` or `.hdr`.
275
+ *
237
276
  * @type {?Texture}
238
277
  * @default null
239
278
  */
@@ -54,6 +54,12 @@ class MeshMatcapMaterial extends Material {
54
54
  /**
55
55
  * The matcap map.
56
56
  *
57
+ * `matcap` represents luminance data, and the texture must be assigned
58
+ * a {@link Texture#colorSpace}. HDR `matcap` textures (e.g. `.exr`)
59
+ * typically set `texture.colorSpace = LinearSRGBColorSpace`, while LDR
60
+ * `matcap` textures (e.g. `.png`, `.jpg`, `.webp`) typically set
61
+ * `texture.colorSpace = SRGBColorSpace`.
62
+ *
57
63
  * @type {?Texture}
58
64
  * @default null
59
65
  */
@@ -64,6 +70,10 @@ class MeshMatcapMaterial extends Material {
64
70
  * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
65
71
  * color is modulated by the diffuse `color`.
66
72
  *
73
+ * `map` represents color data, and the texture must be assigned a
74
+ * {@link Texture#colorSpace}. Most `map` textures set
75
+ * `texture.colorSpace = SRGBColorSpace`.
76
+ *
67
77
  * @type {?Texture}
68
78
  * @default null
69
79
  */
@@ -75,6 +85,9 @@ class MeshMatcapMaterial extends Material {
75
85
  * the geometry of the object, only the lighting. If a normal map is defined
76
86
  * this will be ignored.
77
87
  *
88
+ * `bumpMap` represents non-color data. Any texture assigned must have
89
+ * `texture.colorSpace = NoColorSpace` (default).
90
+ *
78
91
  * @type {?Texture}
79
92
  * @default null
80
93
  */
@@ -96,6 +109,9 @@ class MeshMatcapMaterial extends Material {
96
109
  * convention, the `y` component of `normalScale` should be negated to compensate
97
110
  * for the different handedness.
98
111
  *
112
+ * `normalMap` represents non-color data. Any texture assigned must have
113
+ * `texture.colorSpace = NoColorSpace` (default).
114
+ *
99
115
  * @type {?Texture}
100
116
  * @default null
101
117
  */
@@ -123,7 +139,12 @@ class MeshMatcapMaterial extends Material {
123
139
  * displaced vertices can cast shadows, block other objects, and otherwise
124
140
  * act as real geometry. The displacement texture is an image where the value
125
141
  * of each pixel (white being the highest) is mapped against, and
126
- * repositions, the vertices of the mesh.
142
+ * repositions, the vertices of the mesh. For best results, pair a
143
+ * displacement map with a matching normal map, since the renderer can
144
+ * not recompute surface normals from the displaced vertices.
145
+ *
146
+ * `displacementMap` represents non-color data. Any texture assigned must have
147
+ * `texture.colorSpace = NoColorSpace` (default).
127
148
  *
128
149
  * @type {?Texture}
129
150
  * @default null
@@ -160,6 +181,9 @@ class MeshMatcapMaterial extends Material {
160
181
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
161
182
  * luminance/alpha textures will also still work as expected.
162
183
  *
184
+ * `alphaMap` represents non-color data. Any texture assigned must have
185
+ * `texture.colorSpace = NoColorSpace` (default).
186
+ *
163
187
  * @type {?Texture}
164
188
  * @default null
165
189
  */
@@ -40,6 +40,9 @@ class MeshNormalMaterial extends Material {
40
40
  * the geometry of the object, only the lighting. If a normal map is defined
41
41
  * this will be ignored.
42
42
  *
43
+ * `bumpMap` represents non-color data. Any texture assigned must have
44
+ * `texture.colorSpace = NoColorSpace` (default).
45
+ *
43
46
  * @type {?Texture}
44
47
  * @default null
45
48
  */
@@ -61,6 +64,9 @@ class MeshNormalMaterial extends Material {
61
64
  * convention, the `y` component of `normalScale` should be negated to compensate
62
65
  * for the different handedness.
63
66
  *
67
+ * `normalMap` represents non-color data. Any texture assigned must have
68
+ * `texture.colorSpace = NoColorSpace` (default).
69
+ *
64
70
  * @type {?Texture}
65
71
  * @default null
66
72
  */
@@ -88,7 +94,9 @@ class MeshNormalMaterial extends Material {
88
94
  * displaced vertices can cast shadows, block other objects, and otherwise
89
95
  * act as real geometry. The displacement texture is an image where the value
90
96
  * of each pixel (white being the highest) is mapped against, and
91
- * repositions, the vertices of the mesh.
97
+ * repositions, the vertices of the mesh. For best results, pair a
98
+ * displacement map with a matching normal map, since the renderer can
99
+ * not recompute surface normals from the displaced vertices.
92
100
  *
93
101
  * @type {?Texture}
94
102
  * @default null
@@ -75,6 +75,10 @@ class MeshPhongMaterial extends Material {
75
75
  * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
76
76
  * color is modulated by the diffuse `color`.
77
77
  *
78
+ * `map` represents color data, and the texture must be assigned a
79
+ * {@link Texture#colorSpace}. Most `map` textures set
80
+ * `texture.colorSpace = SRGBColorSpace`.
81
+ *
78
82
  * @type {?Texture}
79
83
  * @default null
80
84
  */
@@ -83,6 +87,11 @@ class MeshPhongMaterial extends Material {
83
87
  /**
84
88
  * The light map. Requires a second set of UVs.
85
89
  *
90
+ * `lightMap` represents pre-baked illuminance data, and the texture must be assigned
91
+ * a {@link Texture#colorSpace}. Most `lightMap` textures set
92
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
93
+ * such as `.exr` or `.hdr`.
94
+ *
86
95
  * @type {?Texture}
87
96
  * @default null
88
97
  */
@@ -100,6 +109,9 @@ class MeshPhongMaterial extends Material {
100
109
  * The red channel of this texture is used as the ambient occlusion map.
101
110
  * Requires a second set of UVs.
102
111
  *
112
+ * `aoMap` represents non-color data. Any texture assigned must have
113
+ * `texture.colorSpace = NoColorSpace` (default).
114
+ *
103
115
  * @type {?Texture}
104
116
  * @default null
105
117
  */
@@ -137,6 +149,10 @@ class MeshPhongMaterial extends Material {
137
149
  * emissive color and the emissive intensity. If you have an emissive map,
138
150
  * be sure to set the emissive color to something other than black.
139
151
  *
152
+ * `emissiveMap` represents color data, and the texture must be assigned a
153
+ * {@link Texture#colorSpace}. Most `emissiveMap` textures set
154
+ * `texture.colorSpace = SRGBColorSpace`.
155
+ *
140
156
  * @type {?Texture}
141
157
  * @default null
142
158
  */
@@ -148,6 +164,9 @@ class MeshPhongMaterial extends Material {
148
164
  * the geometry of the object, only the lighting. If a normal map is defined
149
165
  * this will be ignored.
150
166
  *
167
+ * `bumpMap` represents non-color data. Any texture assigned must have
168
+ * `texture.colorSpace = NoColorSpace` (default).
169
+ *
151
170
  * @type {?Texture}
152
171
  * @default null
153
172
  */
@@ -169,6 +188,9 @@ class MeshPhongMaterial extends Material {
169
188
  * convention, the `y` component of `normalScale` should be negated to compensate
170
189
  * for the different handedness.
171
190
  *
191
+ * `normalMap` represents non-color data. Any texture assigned must have
192
+ * `texture.colorSpace = NoColorSpace` (default).
193
+ *
172
194
  * @type {?Texture}
173
195
  * @default null
174
196
  */
@@ -196,7 +218,12 @@ class MeshPhongMaterial extends Material {
196
218
  * displaced vertices can cast shadows, block other objects, and otherwise
197
219
  * act as real geometry. The displacement texture is an image where the value
198
220
  * of each pixel (white being the highest) is mapped against, and
199
- * repositions, the vertices of the mesh.
221
+ * repositions, the vertices of the mesh. For best results, pair a
222
+ * displacement map with a matching normal map, since the renderer can
223
+ * not recompute surface normals from the displaced vertices.
224
+ *
225
+ * `displacementMap` represents non-color data. Any texture assigned must have
226
+ * `texture.colorSpace = NoColorSpace` (default).
200
227
  *
201
228
  * @type {?Texture}
202
229
  * @default null
@@ -228,6 +255,10 @@ class MeshPhongMaterial extends Material {
228
255
  * highlight contributes and how much of the environment map affects the
229
256
  * surface.
230
257
  *
258
+ * `specularMap` represents color data, and the texture must be assigned a
259
+ * {@link Texture#colorSpace}. Most `specularMap` textures set
260
+ * `texture.colorSpace = SRGBColorSpace`.
261
+ *
231
262
  * @type {?Texture}
232
263
  * @default null
233
264
  */
@@ -243,6 +274,9 @@ class MeshPhongMaterial extends Material {
243
274
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
244
275
  * luminance/alpha textures will also still work as expected.
245
276
  *
277
+ * `alphaMap` represents non-color data. Any texture assigned must have
278
+ * `texture.colorSpace = NoColorSpace` (default).
279
+ *
246
280
  * @type {?Texture}
247
281
  * @default null
248
282
  */
@@ -251,6 +285,11 @@ class MeshPhongMaterial extends Material {
251
285
  /**
252
286
  * The environment map.
253
287
  *
288
+ * `envMap` represents luminance data, and the texture must be assigned
289
+ * a {@link Texture#colorSpace}. Most `envMap` textures set
290
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
291
+ * such as `.exr` or `.hdr`.
292
+ *
254
293
  * @type {?Texture}
255
294
  * @default null
256
295
  */
@@ -77,6 +77,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
77
77
  * bitangent space, to be rotated by `anisotropyRotation`. The blue channel
78
78
  * contains strength as `[0, 1]` to be multiplied by `anisotropy`.
79
79
  *
80
+ * `anisotropyMap` represents non-color data. Any texture assigned must have
81
+ * `texture.colorSpace = NoColorSpace` (default).
82
+ *
80
83
  * @type {?Texture}
81
84
  * @default null
82
85
  */
@@ -86,6 +89,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
86
89
  * The red channel of this texture is multiplied against `clearcoat`,
87
90
  * for per-pixel control over a coating's intensity.
88
91
  *
92
+ * `clearcoatMap` represents non-color data. Any texture assigned must have
93
+ * `texture.colorSpace = NoColorSpace` (default).
94
+ *
89
95
  * @type {?Texture}
90
96
  * @default null
91
97
  */
@@ -103,6 +109,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
103
109
  * The green channel of this texture is multiplied against
104
110
  * `clearcoatRoughness`, for per-pixel control over a coating's roughness.
105
111
  *
112
+ * `clearcoatRoughnessMap` represents non-color data. Any texture assigned must have
113
+ * `texture.colorSpace = NoColorSpace` (default).
114
+ *
106
115
  * @type {?Texture}
107
116
  * @default null
108
117
  */
@@ -120,6 +129,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
120
129
  /**
121
130
  * Can be used to enable independent normals for the clear coat layer.
122
131
  *
132
+ * `clearcoatNormalMap` represents non-color data. Any texture assigned must have
133
+ * `texture.colorSpace = NoColorSpace` (default).
134
+ *
123
135
  * @type {?Texture}
124
136
  * @default null
125
137
  */
@@ -161,6 +173,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
161
173
  * The red channel of this texture is multiplied against `iridescence`, for per-pixel
162
174
  * control over iridescence.
163
175
  *
176
+ * `iridescenceMap` represents non-color data. Any texture assigned must have
177
+ * `texture.colorSpace = NoColorSpace` (default).
178
+ *
164
179
  * @type {?Texture}
165
180
  * @default null
166
181
  */
@@ -191,6 +206,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
191
206
  * - `1.0` in the green channel will result in thickness equal to second element of the array.
192
207
  * - Values in-between will linearly interpolate between the elements of the array.
193
208
  *
209
+ * `iridescenceThicknessMap` represents non-color data. Any texture assigned must have
210
+ * `texture.colorSpace = NoColorSpace` (default).
211
+ *
194
212
  * @type {?Texture}
195
213
  * @default null
196
214
  */
@@ -208,6 +226,10 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
208
226
  * The RGB channels of this texture are multiplied against `sheenColor`, for per-pixel control
209
227
  * over sheen tint.
210
228
  *
229
+ * `sheenColorMap` represents color data, and the texture must be assigned a
230
+ * {@link Texture#colorSpace}. Most `sheenColorMap` textures set
231
+ * `texture.colorSpace = SRGBColorSpace`.
232
+ *
211
233
  * @type {?Texture}
212
234
  * @default null
213
235
  */
@@ -225,6 +247,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
225
247
  * The alpha channel of this texture is multiplied against `sheenRoughness`, for per-pixel control
226
248
  * over sheen roughness.
227
249
  *
250
+ * `sheenRoughnessMap` represents non-color data. Any texture assigned must have
251
+ * `texture.colorSpace = NoColorSpace` (default).
252
+ *
228
253
  * @type {?Texture}
229
254
  * @default null
230
255
  */
@@ -234,6 +259,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
234
259
  * The red channel of this texture is multiplied against `transmission`, for per-pixel control over
235
260
  * optical transparency.
236
261
  *
262
+ * `transmissionMap` represents non-color data. Any texture assigned must have
263
+ * `texture.colorSpace = NoColorSpace` (default).
264
+ *
237
265
  * @type {?Texture}
238
266
  * @default null
239
267
  */
@@ -253,6 +281,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
253
281
  * A texture that defines the thickness, stored in the green channel. This will
254
282
  * be multiplied by `thickness`.
255
283
  *
284
+ * `thicknessMap` represents non-color data. Any texture assigned must have
285
+ * `texture.colorSpace = NoColorSpace` (default).
286
+ *
256
287
  * @type {?Texture}
257
288
  * @default null
258
289
  */
@@ -290,6 +321,9 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
290
321
  * The alpha channel of this texture is multiplied against `specularIntensity`,
291
322
  * for per-pixel control over specular intensity.
292
323
  *
324
+ * `specularIntensityMap` represents non-color data. Any texture assigned must have
325
+ * `texture.colorSpace = NoColorSpace` (default).
326
+ *
293
327
  * @type {?Texture}
294
328
  * @default null
295
329
  */
@@ -307,6 +341,10 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
307
341
  * The RGB channels of this texture are multiplied against `specularColor`,
308
342
  * for per-pixel control over specular color.
309
343
  *
344
+ * `specularColorMap` represents color data, and the texture must be assigned a
345
+ * {@link Texture#colorSpace}. Most `specularColorMap` textures set
346
+ * `texture.colorSpace = SRGBColorSpace`.
347
+ *
310
348
  * @type {?Texture}
311
349
  * @default null
312
350
  */
@@ -100,6 +100,10 @@ class MeshStandardMaterial extends Material {
100
100
  * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
101
101
  * color is modulated by the diffuse `color`.
102
102
  *
103
+ * `map` represents color data, and the texture must be assigned a
104
+ * {@link Texture#colorSpace}. Most `map` textures set
105
+ * `texture.colorSpace = SRGBColorSpace`.
106
+ *
103
107
  * @type {?Texture}
104
108
  * @default null
105
109
  */
@@ -108,6 +112,11 @@ class MeshStandardMaterial extends Material {
108
112
  /**
109
113
  * The light map. Requires a second set of UVs.
110
114
  *
115
+ * `lightMap` represents pre-baked illuminance data, and the texture must be assigned
116
+ * a {@link Texture#colorSpace}. Most `lightMap` textures set
117
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
118
+ * such as `.exr` or `.hdr`.
119
+ *
111
120
  * @type {?Texture}
112
121
  * @default null
113
122
  */
@@ -125,6 +134,9 @@ class MeshStandardMaterial extends Material {
125
134
  * The red channel of this texture is used as the ambient occlusion map.
126
135
  * Requires a second set of UVs.
127
136
  *
137
+ * `aoMap` represents non-color data. Any texture assigned must have
138
+ * `texture.colorSpace = NoColorSpace` (default).
139
+ *
128
140
  * @type {?Texture}
129
141
  * @default null
130
142
  */
@@ -162,6 +174,10 @@ class MeshStandardMaterial extends Material {
162
174
  * emissive color and the emissive intensity. If you have an emissive map,
163
175
  * be sure to set the emissive color to something other than black.
164
176
  *
177
+ * `emissiveMap` represents color data, and the texture must be assigned a
178
+ * {@link Texture#colorSpace}. Most `emissiveMap` textures set
179
+ * `texture.colorSpace = SRGBColorSpace`.
180
+ *
165
181
  * @type {?Texture}
166
182
  * @default null
167
183
  */
@@ -173,6 +189,9 @@ class MeshStandardMaterial extends Material {
173
189
  * the geometry of the object, only the lighting. If a normal map is defined
174
190
  * this will be ignored.
175
191
  *
192
+ * `bumpMap` represents non-color data. Any texture assigned must have
193
+ * `texture.colorSpace = NoColorSpace` (default).
194
+ *
176
195
  * @type {?Texture}
177
196
  * @default null
178
197
  */
@@ -194,6 +213,9 @@ class MeshStandardMaterial extends Material {
194
213
  * convention, the `y` component of `normalScale` should be negated to compensate
195
214
  * for the different handedness.
196
215
  *
216
+ * `normalMap` represents non-color data. Any texture assigned must have
217
+ * `texture.colorSpace = NoColorSpace` (default).
218
+ *
197
219
  * @type {?Texture}
198
220
  * @default null
199
221
  */
@@ -221,7 +243,12 @@ class MeshStandardMaterial extends Material {
221
243
  * displaced vertices can cast shadows, block other objects, and otherwise
222
244
  * act as real geometry. The displacement texture is an image where the value
223
245
  * of each pixel (white being the highest) is mapped against, and
224
- * repositions, the vertices of the mesh.
246
+ * repositions, the vertices of the mesh. For best results, pair a
247
+ * displacement map with a matching normal map, since the renderer can
248
+ * not recompute surface normals from the displaced vertices.
249
+ *
250
+ * `displacementMap` represents non-color data. Any texture assigned must have
251
+ * `texture.colorSpace = NoColorSpace` (default).
225
252
  *
226
253
  * @type {?Texture}
227
254
  * @default null
@@ -252,6 +279,9 @@ class MeshStandardMaterial extends Material {
252
279
  * The green channel of this texture is used to alter the roughness of the
253
280
  * material.
254
281
  *
282
+ * `roughnessMap` represents non-color data. Any texture assigned must have
283
+ * `texture.colorSpace = NoColorSpace` (default).
284
+ *
255
285
  * @type {?Texture}
256
286
  * @default null
257
287
  */
@@ -261,6 +291,9 @@ class MeshStandardMaterial extends Material {
261
291
  * The blue channel of this texture is used to alter the metalness of the
262
292
  * material.
263
293
  *
294
+ * `metalnessMap` represents non-color data. Any texture assigned must have
295
+ * `texture.colorSpace = NoColorSpace` (default).
296
+ *
264
297
  * @type {?Texture}
265
298
  * @default null
266
299
  */
@@ -276,6 +309,9 @@ class MeshStandardMaterial extends Material {
276
309
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
277
310
  * luminance/alpha textures will also still work as expected.
278
311
  *
312
+ * `alphaMap` represents non-color data. Any texture assigned must have
313
+ * `texture.colorSpace = NoColorSpace` (default).
314
+ *
279
315
  * @type {?Texture}
280
316
  * @default null
281
317
  */
@@ -285,6 +321,11 @@ class MeshStandardMaterial extends Material {
285
321
  * The environment map. To ensure a physically correct rendering, environment maps
286
322
  * are internally pre-processed with {@link PMREMGenerator}.
287
323
  *
324
+ * `envMap` represents luminance data, and the texture must be assigned
325
+ * a {@link Texture#colorSpace}. Most `envMap` textures set
326
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
327
+ * such as `.exr` or `.hdr`.
328
+ *
288
329
  * @type {?Texture}
289
330
  * @default null
290
331
  */
@@ -50,6 +50,10 @@ class MeshToonMaterial extends Material {
50
50
  * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
51
51
  * color is modulated by the diffuse `color`.
52
52
  *
53
+ * `map` represents color data, and the texture must be assigned a
54
+ * {@link Texture#colorSpace}. Most `map` textures set
55
+ * `texture.colorSpace = SRGBColorSpace`.
56
+ *
53
57
  * @type {?Texture}
54
58
  * @default null
55
59
  */
@@ -60,6 +64,9 @@ class MeshToonMaterial extends Material {
60
64
  * {@link Texture#minFilter} and {@link Texture#magFilter} to {@link NearestFilter}
61
65
  * when using this type of texture.
62
66
  *
67
+ * `gradientMap` represents non-color data. Any texture assigned must have
68
+ * `texture.colorSpace = NoColorSpace` (default).
69
+ *
63
70
  * @type {?Texture}
64
71
  * @default null
65
72
  */
@@ -68,6 +75,11 @@ class MeshToonMaterial extends Material {
68
75
  /**
69
76
  * The light map. Requires a second set of UVs.
70
77
  *
78
+ * `lightMap` represents pre-baked illuminance data, and the texture must be assigned
79
+ * a {@link Texture#colorSpace}. Most `lightMap` textures set
80
+ * `texture.colorSpace = LinearSRGBColorSpace` and use float-type formats
81
+ * such as `.exr` or `.hdr`.
82
+ *
71
83
  * @type {?Texture}
72
84
  * @default null
73
85
  */
@@ -85,6 +97,9 @@ class MeshToonMaterial extends Material {
85
97
  * The red channel of this texture is used as the ambient occlusion map.
86
98
  * Requires a second set of UVs.
87
99
  *
100
+ * `aoMap` represents non-color data. Any texture assigned must have
101
+ * `texture.colorSpace = NoColorSpace` (default).
102
+ *
88
103
  * @type {?Texture}
89
104
  * @default null
90
105
  */
@@ -122,6 +137,10 @@ class MeshToonMaterial extends Material {
122
137
  * emissive color and the emissive intensity. If you have an emissive map,
123
138
  * be sure to set the emissive color to something other than black.
124
139
  *
140
+ * `emissiveMap` represents color data, and the texture must be assigned a
141
+ * {@link Texture#colorSpace}. Most `emissiveMap` textures set
142
+ * `texture.colorSpace = SRGBColorSpace`.
143
+ *
125
144
  * @type {?Texture}
126
145
  * @default null
127
146
  */
@@ -133,6 +152,9 @@ class MeshToonMaterial extends Material {
133
152
  * the geometry of the object, only the lighting. If a normal map is defined
134
153
  * this will be ignored.
135
154
  *
155
+ * `bumpMap` represents non-color data. Any texture assigned must have
156
+ * `texture.colorSpace = NoColorSpace` (default).
157
+ *
136
158
  * @type {?Texture}
137
159
  * @default null
138
160
  */
@@ -154,6 +176,9 @@ class MeshToonMaterial extends Material {
154
176
  * convention, the `y` component of `normalScale` should be negated to compensate
155
177
  * for the different handedness.
156
178
  *
179
+ * `normalMap` represents non-color data. Any texture assigned must have
180
+ * `texture.colorSpace = NoColorSpace` (default).
181
+ *
157
182
  * @type {?Texture}
158
183
  * @default null
159
184
  */
@@ -181,7 +206,12 @@ class MeshToonMaterial extends Material {
181
206
  * displaced vertices can cast shadows, block other objects, and otherwise
182
207
  * act as real geometry. The displacement texture is an image where the value
183
208
  * of each pixel (white being the highest) is mapped against, and
184
- * repositions, the vertices of the mesh.
209
+ * repositions, the vertices of the mesh. For best results, pair a
210
+ * displacement map with a matching normal map, since the renderer can
211
+ * not recompute surface normals from the displaced vertices.
212
+ *
213
+ * `displacementMap` represents non-color data. Any texture assigned must have
214
+ * `texture.colorSpace = NoColorSpace` (default).
185
215
  *
186
216
  * @type {?Texture}
187
217
  * @default null
@@ -218,6 +248,9 @@ class MeshToonMaterial extends Material {
218
248
  * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
219
249
  * luminance/alpha textures will also still work as expected.
220
250
  *
251
+ * `alphaMap` represents non-color data. Any texture assigned must have
252
+ * `texture.colorSpace = NoColorSpace` (default).
253
+ *
221
254
  * @type {?Texture}
222
255
  * @default null
223
256
  */