llms-full.txt 125 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716
  1. # Three.js
  2. > Three.js is a cross-browser JavaScript library for creating 3D graphics using WebGL and WebGPU.
  3. ## Instructions for Large Language Models
  4. When generating Three.js code, follow these guidelines:
  5. ### 1. Use Import Maps (Not Old CDN Patterns)
  6. WRONG - outdated pattern:
  7. ```html
  8. <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
  9. ```
  10. CORRECT - modern pattern (always use latest version):
  11. ```html
  12. <script type="importmap">
  13. {
  14. "imports": {
  15. "three": "https://cdn.jsdelivr.net/npm/three@0.183.1/build/three.module.js",
  16. "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.183.1/examples/jsm/"
  17. }
  18. }
  19. </script>
  20. <script type="module">
  21. import * as THREE from 'three';
  22. import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
  23. </script>
  24. ```
  25. ### 2. Choosing Between WebGLRenderer and WebGPURenderer
  26. Three.js maintains both renderers:
  27. **Use WebGLRenderer** (default, mature):
  28. - Maximum browser compatibility
  29. - Well-established, many years of development
  30. - Most examples and tutorials use this
  31. ```js
  32. import * as THREE from 'three';
  33. const renderer = new THREE.WebGLRenderer();
  34. ```
  35. **Use WebGPURenderer** when you need:
  36. - Custom shaders/materials using TSL (Three.js Shading Language)
  37. - Compute shaders
  38. - Advanced node-based materials
  39. ```js
  40. import * as THREE from 'three/webgpu';
  41. const renderer = new THREE.WebGPURenderer();
  42. await renderer.init();
  43. ```
  44. ### 3. TSL (Three.js Shading Language)
  45. When using WebGPURenderer, use TSL instead of raw GLSL for custom materials:
  46. ```js
  47. import { texture, uv, color } from 'three/tsl';
  48. const material = new THREE.MeshStandardNodeMaterial();
  49. material.colorNode = texture( myTexture ).mul( color( 0xff0000 ) );
  50. ```
  51. TSL benefits:
  52. - Works with both WebGL and WebGPU backends
  53. - No string manipulation or onBeforeCompile hacks
  54. - Type-safe, composable shader nodes
  55. - Automatic optimization
  56. ### 4. NodeMaterial Classes (for WebGPU/TSL)
  57. When using TSL, use node-based materials:
  58. - MeshBasicNodeMaterial
  59. - MeshStandardNodeMaterial
  60. - MeshPhysicalNodeMaterial
  61. - LineBasicNodeMaterial
  62. - SpriteNodeMaterial
  63. ---
  64. ## Complete Code Examples
  65. ### Basic Scene with WebGLRenderer
  66. ```html
  67. <!DOCTYPE html>
  68. <html>
  69. <head>
  70. <meta charset="utf-8">
  71. <title>Three.js Basic Scene</title>
  72. <style>
  73. body { margin: 0; }
  74. </style>
  75. </head>
  76. <body>
  77. <script type="importmap">
  78. {
  79. "imports": {
  80. "three": "https://cdn.jsdelivr.net/npm/three@0.183.1/build/three.module.js",
  81. "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.183.1/examples/jsm/"
  82. }
  83. }
  84. </script>
  85. <script type="module">
  86. import * as THREE from 'three';
  87. import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
  88. // Scene
  89. const scene = new THREE.Scene();
  90. // Camera
  91. const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  92. camera.position.z = 5;
  93. // Renderer
  94. const renderer = new THREE.WebGLRenderer( { antialias: true } );
  95. renderer.setSize( window.innerWidth, window.innerHeight );
  96. renderer.setPixelRatio( window.devicePixelRatio );
  97. document.body.appendChild( renderer.domElement );
  98. // Controls
  99. const controls = new OrbitControls( camera, renderer.domElement );
  100. // Lighting
  101. const ambientLight = new THREE.AmbientLight( 0x404040 );
  102. scene.add( ambientLight );
  103. const directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
  104. directionalLight.position.set( 5, 5, 5 );
  105. scene.add( directionalLight );
  106. // Mesh
  107. const geometry = new THREE.BoxGeometry( 1, 1, 1 );
  108. const material = new THREE.MeshStandardMaterial( { color: 0x00ff00 } );
  109. const cube = new THREE.Mesh( geometry, material );
  110. scene.add( cube );
  111. // Handle resize
  112. window.addEventListener( 'resize', () => {
  113. camera.aspect = window.innerWidth / window.innerHeight;
  114. camera.updateProjectionMatrix();
  115. renderer.setSize( window.innerWidth, window.innerHeight );
  116. } );
  117. // Animation loop
  118. function animate() {
  119. cube.rotation.x += 0.01;
  120. cube.rotation.y += 0.01;
  121. controls.update();
  122. renderer.render( scene, camera );
  123. }
  124. renderer.setAnimationLoop( animate );
  125. </script>
  126. </body>
  127. </html>
  128. ```
  129. ### Basic Scene with WebGPURenderer and TSL
  130. ```html
  131. <!DOCTYPE html>
  132. <html>
  133. <head>
  134. <meta charset="utf-8">
  135. <title>Three.js WebGPU Scene</title>
  136. <style>
  137. body { margin: 0; }
  138. </style>
  139. </head>
  140. <body>
  141. <script type="importmap">
  142. {
  143. "imports": {
  144. "three": "https://cdn.jsdelivr.net/npm/three@0.183.1/build/three.webgpu.js",
  145. "three/tsl": "https://cdn.jsdelivr.net/npm/three@0.183.1/build/three.tsl.js",
  146. "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.183.1/examples/jsm/"
  147. }
  148. }
  149. </script>
  150. <script type="module">
  151. import * as THREE from 'three';
  152. import { color, positionLocal, sin, time } from 'three/tsl';
  153. import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
  154. // Scene
  155. const scene = new THREE.Scene();
  156. // Camera
  157. const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  158. camera.position.z = 5;
  159. // Renderer
  160. const renderer = new THREE.WebGPURenderer( { antialias: true } );
  161. renderer.setSize( window.innerWidth, window.innerHeight );
  162. renderer.setPixelRatio( window.devicePixelRatio );
  163. document.body.appendChild( renderer.domElement );
  164. await renderer.init();
  165. // Controls
  166. const controls = new OrbitControls( camera, renderer.domElement );
  167. // Lighting
  168. const ambientLight = new THREE.AmbientLight( 0x404040 );
  169. scene.add( ambientLight );
  170. const directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
  171. directionalLight.position.set( 5, 5, 5 );
  172. scene.add( directionalLight );
  173. // Custom TSL material
  174. const material = new THREE.MeshStandardNodeMaterial();
  175. material.colorNode = color( 0x00ff00 ).mul( sin( time ).mul( 0.5 ).add( 0.5 ) );
  176. material.positionNode = positionLocal.add( sin( time.add( positionLocal.y ) ).mul( 0.1 ) );
  177. // Mesh
  178. const geometry = new THREE.BoxGeometry( 1, 1, 1 );
  179. const cube = new THREE.Mesh( geometry, material );
  180. scene.add( cube );
  181. // Handle resize
  182. window.addEventListener( 'resize', () => {
  183. camera.aspect = window.innerWidth / window.innerHeight;
  184. camera.updateProjectionMatrix();
  185. renderer.setSize( window.innerWidth, window.innerHeight );
  186. } );
  187. // Animation loop
  188. function animate() {
  189. cube.rotation.x += 0.01;
  190. cube.rotation.y += 0.01;
  191. controls.update();
  192. renderer.render( scene, camera );
  193. }
  194. renderer.setAnimationLoop( animate );
  195. </script>
  196. </body>
  197. </html>
  198. ```
  199. ### Loading a GLTF Model
  200. ```js
  201. import * as THREE from 'three';
  202. import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
  203. const loader = new GLTFLoader();
  204. loader.load(
  205. 'model.glb',
  206. ( gltf ) => {
  207. scene.add( gltf.scene );
  208. },
  209. ( progress ) => {
  210. console.log( ( progress.loaded / progress.total * 100 ) + '% loaded' );
  211. },
  212. ( error ) => {
  213. console.error( 'Error loading model:', error );
  214. }
  215. );
  216. ```
  217. ---
  218. # TSL (Three.js Shading Language) - Complete Reference
  219. ## TSL Specification
  220. An Approach to Productive and Maintainable Shader Creation.
  221. - [Introduction](#introduction)
  222. - [Why TSL?](#why-tsl)
  223. - [Example](#example)
  224. - [Architecture](#architecture)
  225. - [Learning TSL](#learning-tsl)
  226. - [Constants and explicit conversions](#constants-and-explicit-conversions)
  227. - [Conversions](#conversions)
  228. - [Uniform](#uniform)
  229. - [onUpdate](#uniformonupdate)
  230. - [Swizzle](#swizzle)
  231. - [Operators](#operators)
  232. - [Function](#function)
  233. - [Variables](#variables)
  234. - [Array](#array)
  235. - [Uniform](#array-uniform)
  236. - [Varying](#varying)
  237. - [Conditional](#conditional)
  238. - [If-else](#if-else)
  239. - [Switch-case](#switch-case)
  240. - [Ternary](#ternary)
  241. - [Loop](#loop)
  242. - [Math](#math)
  243. - [Method chaining](#method-chaining)
  244. - [Texture](#texture)
  245. - [Attributes](#attributes)
  246. - [Position](#position)
  247. - [Normal](#normal)
  248. - [Tangent](#tangent)
  249. - [Bitangent](#bitangent)
  250. - [Camera](#camera)
  251. - [Model](#model)
  252. - [Screen](#screen)
  253. - [Viewport](#viewport)
  254. - [Blend Modes](#blend-modes)
  255. - [Reflect](#reflect)
  256. - [UV Utils](#uv-utils)
  257. - [Interpolation](#interpolation)
  258. - [Random](#random)
  259. - [Rotate](#rotate)
  260. - [Oscillator](#oscillator)
  261. - [Timer](#timer)
  262. - [Packing](#packing)
  263. - [Render Pipeline](#render-pipeline)
  264. - [Multiple Render Targets](#multiple-render-targets-mrt)
  265. - [Post-Processing](#post-processing)
  266. - [Render Pass](#render-pass)
  267. - [Compute](#compute)
  268. - [Storage](#storage)
  269. - [Struct](#struct)
  270. - [Flow Control](#flow-control)
  271. - [Fog](#fog)
  272. - [Color Adjustments](#color-adjustments)
  273. - [Utilities](#utilities)
  274. - [NodeMaterial](#nodematerial)
  275. - [LineDashedNodeMaterial](#linedashednodematerial)
  276. - [MeshPhongNodeMaterial](#meshphongnodematerial)
  277. - [MeshStandardNodeMaterial](#meshstandardnodematerial)
  278. - [MeshPhysicalNodeMaterial](#meshphysicalnodematerial)
  279. - [SpriteNodeMaterial](#spritenodematerial)
  280. - [Transitioning common GLSL properties to TSL](#transitioning-common-glsl-properties-to-tsl)
  281. ## Introduction
  282. ### Why TSL?
  283. Creating shaders has always been an advanced step for most developers; many game developers have never created GLSL code from scratch. The shader graph solution adopted today by the industry has allowed developers more focused on dynamics to create the necessary graphic effects to meet the demands of their projects.
  284. The aim of the project is to create an easy-to-use environment for shader creation. Even if for this we need to create complexity behind it, this happened initially with `Renderer` and now with the `TSL`.
  285. Other benefits that TSL brings besides simplifying shading creation are keeping the `renderer agnostic`, while all the complexity of a material can be imported into different modules and use `tree shaking` without breaking during the process.
  286. ### Example
  287. A `detail map` makes things look more real in games. It adds tiny details like cracks or bumps to surfaces. In this example we will scale uv to improve details when seen up close and multiply with a base texture.
  288. #### Old
  289. This is how we would achieve that using `.onBeforeCompile()`:
  290. ```js
  291. const material = new THREE.MeshStandardMaterial();
  292. material.map = colorMap;
  293. material.onBeforeCompile = ( shader ) => {
  294. shader.uniforms.detailMap = { value: detailMap };
  295. let token = '#define STANDARD';
  296. let insert = /* glsl */`
  297. uniform sampler2D detailMap;
  298. `;
  299. shader.fragmentShader = shader.fragmentShader.replace( token, token + insert );
  300. token = '#include <map_fragment>';
  301. insert = /* glsl */`
  302. diffuseColor *= texture2D( detailMap, vMapUv * 10.0 );
  303. `;
  304. shader.fragmentShader = shader.fragmentShader.replace( token, token + insert );
  305. };
  306. ```
  307. Any simple change from this makes the code increasingly complicated using `.onBeforeCompile`, the result we have today in the community are countless types of parametric materials that do not communicate with each other, and that need to be updated periodically to be operating, limiting the creativity to create unique materials reusing modules in a simple way.
  308. #### New
  309. With `TSL` the code would look like this:
  310. ```js
  311. import { texture, uv } from 'three/tsl';
  312. const detail = texture( detailMap, uv().mul( 10 ) );
  313. const material = new THREE.MeshStandardNodeMaterial();
  314. material.colorNode = texture( colorMap ).mul( detail );
  315. ```
  316. `TSL` is also capable of encoding code into different outputs such as `WGSL`/`GLSL` - `WebGPU`/`WebGL`, in addition to optimizing the shader graph automatically and through codes that can be inserted within each `Node`. This allows the developer to focus on productivity and leave the graphical management part to the `Node System`.
  317. Another important feature of a graph shader is that we will no longer need to care about the sequence in which components are created, because the `Node System` will only declare and include it once.
  318. Let's say that you import `positionWorld` into your code, even if another component uses it, the calculations performed to obtain `position world` will only be performed once, as is the case with any other node such as: `normalWorld`, `modelPosition`, etc.
  319. ### Architecture
  320. All `TSL` components are extended from `Node` class. The `Node` allows it to communicate with any other, value conversions can be automatic or manual, a `Node` can receive the output value expected by the parent `Node` and modify its own output snippet. It's possible to modulate them using `tree shaking` in the shader construction process, the `Node` will have important information such as `geometry`, `material`, `renderer` as well as the `backend`, which can influence the type and value of output.
  321. The main class responsible for creating the code is `NodeBuilder`. This class can be extended to any output programming language, so you can use TSL for a third language if you wish. Currently `NodeBuilder` has two extended classes, the `WGSLNodeBuilder` aimed at WebGPU and `GLSLNodeBuilder` aimed at WebGL2.
  322. The build process is based on three pillars: `setup`, `analyze` and `generate`.
  323. | | |
  324. | -- | -- |
  325. | `setup` | Use `TSL` to create a completely customized code for the `Node` output. The `Node` can use many others within itself, have countless inputs, but there will always be a single output. |
  326. | `analyze` | This proccess will check the `nodes` that were created in order to create useful information for `generate` the snippet, such as the need to create or not a cache/variable for optimizing a node. |
  327. | `generate` | An output of `string` will be returned from each `node`. Any node will also be able to create code in the flow of shader, supporting multiple lines. |
  328. `Node` also have a native update process invoked by the `update()` function, these events be called by `frame`, `render call` and `object draw`.
  329. It is also possible to serialize or deserialize a `Node` using `serialize()` and `deserialize()` functions.
  330. ## Learning TSL
  331. TSL is a Node-based shader abstraction, written in JavaScript. TSL's functions are inspired by GLSL, but follow a very different concept. WGSL and GLSL are focused on creating GPU programs, in TSL this is one of the features.
  332. ### Seamless Integration with JavaScript/TypeScript
  333. - Unified Code
  334. - Write shader logic directly in JS/TS, eliminating the need to manipulate strings.
  335. - Create and manipulate render objects just like any other JavaScript logic inside a TSL function.
  336. - Advanced events to control a Node before and after the object is rendered.
  337. - JS Ecosystem
  338. - Use native **import/export**, **NPM**, and integrate **JS/TS** components directly into your shader logic.
  339. - Typing
  340. - Benefit from better type checking (especially with **TypeScript** and **[@three-types](https://github.com/three-types/three-ts-types)**), increasing code robustness.
  341. ### Shader-Graph Inspired Structure
  342. - Focus on Intent
  343. - Build materials by connecting nodes through: [positionWorld](#position), [normalWorld](#normal), [screenUV](#screen), [attribute()](#attributes), etc.
  344. More declarative("what") vs. imperative("how").
  345. - Composition & High-Level Concepts
  346. - Work with high-level concepts for Node Material like [colorNode](#basic), [roughnessNode](#standard), [metalnessNode](#standard), [positionNode](#basic), etc. This preserves the integrity of the lighting model while allowing customizations, helping to avoid mistakes from incorrect setups.
  347. - Keeping an eye on software exchange
  348. - Modern 3D authoring software uses Shader-Graph based material composition to exchange between other software. TSL already has its own MaterialX integration.
  349. - Easier Migration
  350. - Many functions are directly inspired by GLSL to smooth the learning curve for those with prior experience.
  351. ### Rendering Manipulation
  352. - Control rendering steps and create new render-passes per individual TSL functions.
  353. - Implement complex effects is easily with nodes using a single function call either in post-processing and in materials allowing the node itself to manage the rendering process as it needs.
  354. - `gaussianBlur()`: Double render-pass gaussian blur node. It can be used in the material or in post-processing through a single function.
  355. - Easy access to renderer buffers using TSL functions like:
  356. - `viewportSharedTexture()`: Accesses the beauty what has already been rendered, preserving the render-order.
  357. - `viewportLinearDepth()`: Accesses the depth what has already been rendered, preserving the render-order.
  358. - Integrated Compute Shaders
  359. - Perform calculations on buffers using compute stage directly during an object's rendering.
  360. - TSL allows dynamic manipulation of renderer functions, which makes it more customizable than intermediate languages ​​that would have to use flags in fixed pipelines for this.
  361. - You just need to use the events of a Node for the renderer manipulations, without needing to modify the core.
  362. ### Automatic Optimization and Workarounds
  363. - Your TSL code automatically benefits from optimizations and workarounds implemented in the Three.js compiler with each new version.
  364. - Simplifications
  365. - Automatic type conversions.
  366. - Execute a block of code in vertex-stage and get it in fragment-stage just using `vertexStage( node )`.
  367. - Automatically choose interpolation method for varyings depending on type.
  368. - Don't worry about collisions of global variables internally when using Nodes.
  369. - Polyfills
  370. - e.g: `textureSample()` function in the vertex shader (not natively supported in WGSL) is correctly transpiled to work.
  371. - e.g: Automatic correction for the `pow()` function, which didn't accept negative bases on Windows/DirectX using WGSL.
  372. - Optimizations
  373. - Repeated expressions: TSL can automatically create temporary variables to avoid redundant calculations.
  374. - Automatic reuse of uniforms and attributes.
  375. - Creating varying only if necessary. Otherwise they are replaced by simple variables.
  376. ### Target audience
  377. - Beginners users
  378. - You only need one line to create your first custom shader.
  379. - Advanced users
  380. - Makes creating shaders simple but not limited. Example: https://www.youtube.com/watch?v=C2gDL9Qk_vo
  381. - If you don't like fixed pipelines and low level, you'll love this.
  382. ### Share everything
  383. #### TSL is based on Nodes, so don’t worry about sharing your **functions** and **uniforms** across materials and post-processing.
  384. ```js
  385. // Shared the same uniform with various materials
  386. const sharedColor = uniform( new THREE.Color() );
  387. materialA.colorNode = sharedColor.div( 2 );
  388. materialB.colorNode = sharedColor.mul( .5 );
  389. materialC.colorNode = sharedColor.add( .5 );
  390. ```
  391. #### Deferred Function: High level of customization, goodby **#defines**
  392. Access **material**, **geometry**, **object**, **camera**, **scene**, **renderer** and more directly from a TSL function. Function calls are only performed at the time of building the shader allowing you to customize the function according to the object's setup.
  393. ```js
  394. // Returns an uniform of the material's custom color if it exists
  395. const customColor = Fn( ( { material, geometry, object } ) => {
  396. if ( material.userData.customColor !== undefined ) {
  397. return uniform( material.userData.customColor );
  398. }
  399. return vec3( 0 );
  400. } );
  401. //
  402. material.colorNode = customColor();
  403. ```
  404. #### Load a texture-based matrix inside a TSL function
  405. This can be used for any other JS and Three.js ecosystem needs. You can manipulate your assets according to the needs of a function. This can work for creating buffers, attributes, uniforms and any other JavaScript operation.
  406. ```js
  407. let bayer16Texture = null;
  408. export const bayer16 = Fn( ( [ uv ] ) => {
  409. if ( bayer16Texture === null ) {
  410. const bayer16Base64 = 'data:image/png;base64,...==';
  411. bayer16Texture = new TextureLoader().load( bayer16Base64 );
  412. }
  413. return textureLoad( bayer16Texture, ivec2( uv ).mod( int( 16 ) ) );
  414. } );
  415. //
  416. material.colorNode = bayer16( screenCoordinate );
  417. ```
  418. #### The node architecture allows the creation of instances of custom attributes and buffers through simple functions.
  419. ```js
  420. // Range values node example
  421. const randomColor = range( new THREE.Color( 0x000000 ), new THREE.Color( 0xFFFFFF ) );
  422. material.colorNode = randomColor;
  423. //...
  424. const mesh = new THREE.InstancedMesh( geometry, material, count );
  425. ```
  426. #### TSL loves JavaScript
  427. TSL syntax follows JavaScript style because they are the same thing, so if you come from GLSL you can explore new possibilities.
  428. ```js
  429. // A simple example of Function closure
  430. const mainTask = Fn( () => {
  431. const task2 = Fn( ( [ a, b ] ) => {
  432. return a.add( b ).mul( 0.5 );
  433. } );
  434. return task2( color( 0x00ff00 ), color( 0x0000ff ) );
  435. } );
  436. //
  437. material.colorNode = mainTask();
  438. ```
  439. #### Simplification
  440. Double render-pass `gaussianBlur()` node. It can be used in the material or in post-processing through a single function.
  441. ```js
  442. // Applies a double render-pass gaussianBlur and then a grayscale filter before the object with the material is rendered.
  443. const myTexture = texture( map );
  444. material.colorNode = grayscale( gaussianBlur( myTexture, 4 ) );
  445. ```
  446. Accesses what has already been rendered, preserving the render-order for easy refraction effects, avoiding multiple render-pass and manual sorts.
  447. ```js
  448. // Leaving the back in grayscale.
  449. material.colorNode = grayscale( viewportSharedTexture( screenUV ) );
  450. material.transparent = true;
  451. ```
  452. #### Extend the TSL
  453. You no longer need to create a Material for each desired effect, instead create Nodes. A Node can have access to the Material and can be used in many ways. Extend the TSL from Nodes and let the user use it in creative ways.
  454. A great example of this is [TSL-Textures](https://boytchev.github.io/tsl-textures/).
  455. ```js
  456. import * as THREE from 'three';
  457. import { simplexNoise } from 'tsl-textures';
  458. material.colorNode = simplexNoise ( {
  459. scale: 2,
  460. balance: 0,
  461. contrast: 0,
  462. color: new THREE.Color(16777215),
  463. background: new THREE.Color(0),
  464. seed: 0
  465. } );
  466. ```
  467. ## Constants and explicit conversions
  468. Input functions can be used to create contants and do explicit conversions.
  469. > Conversions are also performed automatically if the output and input are of different types.
  470. | Name | Returns a constant or convertion of type: |
  471. | -- | -- |
  472. | `float( node\|number )` | `float` |
  473. | `int( node\|number )` | `int` |
  474. | `uint( node\|number )` | `uint` |
  475. | `bool( node\|value )` | `boolean` |
  476. | `color( node\|hex\|r,g,b )` | `color` |
  477. | `vec2( node\|Vector2\|x,y )` | `vec2` |
  478. | `vec3( node\|Vector3\|x,y,z )` | `vec3` |
  479. | `vec4( node\|Vector4\|x,y,z,w )` | `vec4` |
  480. | `mat2( node\|Matrix2\|a,b,c,d )` | `mat2` |
  481. | `mat3( node\|Matrix3\|a,b,c,d,e,f,g,h,i )` | `mat3` |
  482. | `mat4( node\|Matrix4\|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )` | `mat4` |
  483. | `ivec2( node\|x,y )` | `ivec2` |
  484. | `ivec3( node\|x,y,z )` | `ivec3` |
  485. | `ivec4( node\|x,y,z,w )` | `ivec4` |
  486. | `uvec2( node\|x,y )` | `uvec2` |
  487. | `uvec3( node\|x,y,z )` | `uvec3` |
  488. | `uvec4( node\|x,y,z,w )` | `uvec4` |
  489. | `bvec2( node\|x,y )` | `bvec2` |
  490. | `bvec3( node\|x,y,z )` | `bvec3` |
  491. | `bvec4( node\|x,y,z,w )` | `bvec4` |
  492. Example:
  493. ```js
  494. import { color, vec2, positionWorld } from 'three/tsl';
  495. // constant
  496. material.colorNode = color( 0x0066ff );
  497. // conversion
  498. material.colorNode = vec2( positionWorld ); // result positionWorld.xy
  499. ```
  500. ## Conversions
  501. It is also possible to perform conversions using the `method chaining`:
  502. | Name | Returns a constant or conversion of type: |
  503. | -- | -- |
  504. | `.toFloat()` | `float` |
  505. | `.toInt()` | `int` |
  506. | `.toUint()` | `uint` |
  507. | `.toBool()` | `boolean` |
  508. | `.toColor()` | `color` |
  509. | `.toVec2()` | `vec2` |
  510. | `.toVec3()` | `vec3` |
  511. | `.toVec4()` | `vec4` |
  512. | `.toMat2()` | `mat2` |
  513. | `.toMat3()` | `mat3` |
  514. | `.toMat4()` | `mat4` |
  515. | | |
  516. | `.toIVec2()` | `ivec2` |
  517. | `.toIVec3()` | `ivec3` |
  518. | `.toIVec4()` | `ivec4` |
  519. | `.toUVec2()` | `uvec2` |
  520. | `.toUVec3()` | `uvec3` |
  521. | `.toUVec4()` | `uvec4` |
  522. | `.toBVec2()` | `bvec2` |
  523. | `.toBVec3()` | `bvec3` |
  524. | `.toBVec4()` | `bvec4` |
  525. Example:
  526. ```js
  527. import { positionWorld } from 'three/tsl';
  528. // conversion
  529. material.colorNode = positionWorld.toVec2(); // result positionWorld.xy
  530. ```
  531. ## Uniform
  532. Uniforms are useful to update values of variables like colors, lighting, or transformations without having to recreate the shader program. They are the true variables from a GPU's point of view.
  533. | Name | Description |
  534. | -- | -- |
  535. | `uniform( boolean \| number \| Color \| Vector2 \| Vector3 \| Vector4 \| Matrix3 \| Matrix4, type = null )` | Dynamic values. |
  536. Example:
  537. ```js
  538. const myColor = uniform( new THREE.Color( 0x0066FF ) );
  539. material.colorNode = myColor;
  540. ```
  541. ### `uniform.on*Update()`
  542. It is also possible to create update events on `uniforms`, which can be defined by the user:
  543. | Name | Description |
  544. | -- | -- |
  545. | `.onObjectUpdate( function )` | It will be updated every time an object like `Mesh` is rendered with this `node` in `Material`. |
  546. | `.onRenderUpdate( function )` | It will be updated once per render, common and shared materials, fog, tone mapping, etc. |
  547. | `.onFrameUpdate( function )` | It will be updated only once per frame, recommended for values ​​that will be updated only once per frame, regardless of when `render-pass` the frame has, cases like `time` for example. |
  548. Example:
  549. ```js
  550. const posY = uniform( 0 ); // it's possible use uniform( 'float' )
  551. // or using event to be done automatically
  552. // { object } will be the current rendering object
  553. posY.onObjectUpdate( ( { object } ) => object.position.y );
  554. // you can also update manually using the .value property
  555. posY.value = object.position.y;
  556. material.colorNode = posY;
  557. ```
  558. ## Swizzle
  559. Swizzling is the technique that allows you to access, reorder, or duplicate the components of a vector using a specific notation within TSL. This is done by combining the identifiers:
  560. ```js
  561. const original = vec3( 1.0, 2.0, 3.0 ); // (x, y, z)
  562. const swizzled = original.zyx; // swizzled = (3.0, 2.0, 1.0)
  563. ```
  564. It's possible use `xyzw`, `rgba` or `stpq`.
  565. ## Operators
  566. | Name | Description |
  567. | -- | -- |
  568. | `.add( node \| value, ... )` | Return the addition of two or more value. |
  569. | `.sub( node \| value )` | Return the subraction of two or more value. |
  570. | `.mul( node \| value )` | Return the multiplication of two or more value. |
  571. | `.div( node \| value )` | Return the division of two or more value. |
  572. | `.mod( node \| value )` | Computes the remainder of dividing the first node by the second. |
  573. | `.equal( node \| value )` | Checks if two nodes are equal. |
  574. | `.notEqual( node \| value )` | Checks if two nodes are not equal. |
  575. | `.lessThan( node \| value )` | Checks if the first node is less than the second. |
  576. | `.greaterThan( node \| value )` | Checks if the first node is greater than the second. |
  577. | `.lessThanEqual( node \| value )` | Checks if the first node is less than or equal to the second. |
  578. | `.greaterThanEqual( node \| value )` | Checks if the first node is greater than or equal to the second. |
  579. | `.and( node \| value )` | Performs logical AND on two nodes. |
  580. | `.or( node \| value )` | Performs logical OR on two nodes. |
  581. | `.not( node \| value )` | Performs logical NOT on a node. |
  582. | `.xor( node \| value )` | Performs logical XOR on two nodes. |
  583. | `.bitAnd( node \| value )` | Performs bitwise AND on two nodes. |
  584. | `.bitNot( node \| value )` | Performs bitwise NOT on a node. |
  585. | `.bitOr( node \| value )` | Performs bitwise OR on two nodes. |
  586. | `.bitXor( node \| value )` | Performs bitwise XOR on two nodes. |
  587. | `.shiftLeft( node \| value )` | Shifts a node to the left. |
  588. | `.shiftRight( node \| value )` | Shifts a node to the right. |
  589. | | |
  590. | `.assign( node \| value )` | Assign one or more value to a and return the same. |
  591. | `.addAssign( node \| value )` | Adds a value and assigns the result. |
  592. | `.subAssign( node \| value )` | Subtracts a value and assigns the result. |
  593. | `.mulAssign( node \| value )` | Multiplies a value and assigns the result. |
  594. | `.divAssign( node \| value )` | Divides a value and assigns the result. |
  595. ```js
  596. const a = float( 1 );
  597. const b = float( 2 );
  598. const result = a.add( b ); // output: 3
  599. ```
  600. ## Function
  601. ### `Fn( function, layout = null )`
  602. It is possible to use classic JS functions or a `Fn()` interface. The main difference is that `Fn()` creates a controllable environment, allowing the use of `stack` where you can use `assign` and `conditional`, while the classic function only allows inline approaches.
  603. Example:
  604. ```js
  605. // tsl function
  606. const oscSine = Fn( ( [ t = time ] ) => {
  607. return t.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
  608. } );
  609. // inline function
  610. export const oscSine = ( t = time ) => t.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
  611. ```
  612. > Both above can be called with `oscSin( value )`.
  613. TSL allows the entry of parameters as object, this is useful in functions that have many optional arguments.
  614. Example:
  615. ```js
  616. const oscSine = Fn( ( { timer = time } ) => {
  617. return timer.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
  618. } );
  619. const value = oscSine( { timer: value } );
  620. ```
  621. Parameters as object also allows traditional calls as an array, enabling different types of usage.
  622. ```js
  623. const col = Fn( ( { r, g, b } ) => {
  624. return vec3( r, g, b );
  625. } );
  626. // Any of the options below will return a green color.
  627. material.colorNode = col( 0, 1, 0 ); // option 1
  628. material.colorNode = col( { r: 0, g: 1, b: 0 } ); // option 2
  629. ```
  630. If you want to use an export function compatible with `tree shaking`, remember to use `/*@__PURE__*/`
  631. ```js
  632. export const oscSawtooth = /*@__PURE__*/ Fn( ( [ timer = time ] ) => timer.fract() );
  633. ```
  634. The second parameter of the function, if there are any parameters, will always be the first if there are none, and is dedicated to `NodeBuilder`. In `NodeBuilder` you can find out details about the current construction process and also obtain objects related to the shader construction, such as `material`, `geometry`, `object`, `camera`, etc.
  635. [See an example](#deferred-function-high-level-of-customization-goodby-defines)
  636. ## Variables
  637. Functions used to declare variables.
  638. | Name | Description |
  639. | -- | -- |
  640. | `.toVar( node, name = null )` or `Var( node, name = null )` | Converts a node into a reusable variable in the shader. |
  641. | `.toConst( node, name = null )` or `Const( node, name = null )` | Converts a node into an inline constant. |
  642. | `property( type, name = null )` | Declares an property but does not assign an initial value. |
  643. The name is optional; if set to `null`, the node system will generate one automatically.
  644. Creating a variable, constant, or property can help optimize the shader graph manually or assist in debugging.
  645. ```js
  646. const uvScaled = uv().mul( 10 ).toVar();
  647. material.colorNode = texture( map, uvScaled );
  648. ```
  649. ***
  650. ## Array
  651. The array() function in TSL allows creating constant or dynamic value arrays; there are many ways to create arrays in TSL.
  652. #### The standard way
  653. ```js
  654. const colors = array( [
  655. vec3( 1, 0, 0 ),
  656. vec3( 0, 1, 0 ),
  657. vec3( 0, 0, 1 )
  658. ] );
  659. const greenColor = colors.element( 1 );
  660. // greenColor: vec3( 0, 1, 0 )
  661. ```
  662. #### Fixed size
  663. ```js
  664. const a = array( 'vec3', 2 );
  665. // a: [ vec3( 0, 0, 0 ), vec3( 0, 0, 0 ) ]
  666. ```
  667. #### Fill with a default value
  668. ```js
  669. const a = vec3( 0, 0, 1 ).toArray( 2 );
  670. // a: [ vec3( 0, 0, 1 ), vec3( 0, 0, 1 ) ]
  671. ```
  672. #### Define a type explicitly
  673. ```js
  674. const a = array( [ 0, 1, 2 ], 'uint' );
  675. const value = a.element( 1 );
  676. // value: 1u
  677. ```
  678. ### Array Uniform
  679. It is possible to use the same array logic for uniforms using Three.js native components or primitive values.
  680. ```js
  681. const tintColors = uniformArray( [
  682. new Color( 1, 0, 0 ),
  683. new Color( 0, 1, 0 ),
  684. new Color( 0, 0, 1 )
  685. ], 'color' );
  686. const redColor = tintColors.element( 0 );
  687. ```
  688. #### Accessing values
  689. To access the values you can use `a[ 1 ]` or `a.element( 1 )`. The difference is that `a[ 1 ]` only allows constant values, while `a.element( 1 )` allows the use of dynamic values such as `a.element( index )` where index is a node.
  690. ### Array Storage
  691. It is possible to create arrays that can be used in compute shaders and storage operations.
  692. | Name | Description |
  693. | -- | -- |
  694. | `instancedArray( array, type )` | Creates an instanced buffer attribute array. |
  695. | `attributeArray( array, type )` | Creates a buffer attribute array. |
  696. ## Varying
  697. Functions used to declare varying.
  698. | Name | Description |
  699. | -- | -- |
  700. | `vertexStage( node )` | Computes the node in the vertex stage. |
  701. | `varying( node, name = null )` | Computes the node in the vertex stage and passes interpolated values to the fragment shader. |
  702. | `varyingProperty( type, name = null )` | Declares an varying property but does not assign an initial value. |
  703. Let's suppose you want to optimize some calculation in the `vertex stage` but are using it in a slot like `material.colorNode`.
  704. For example:
  705. ```js
  706. // multiplication will be executed in vertex stage
  707. const normalView = vertexStage( modelNormalMatrix.mul( normalLocal ) );
  708. // normalize will be computed in fragment stage while `normalView` is computed on vertex stage
  709. material.colorNode = normalView.normalize();
  710. ```
  711. The first parameter of `vertexStage()` `modelNormalMatrix.mul( normalLocal )` will be computed in `vertex stage`, and the return from `vertexStage()` will be a `varying` as we are used in WGSL/GLSL, this can optimize extra calculations in the `fragment stage`. The second parameter of `varying()` allows you to add a custom name in code generation.
  712. If `varying()` is added only to `material.positionNode`, it will only return a simple variable and varying will not be created because `material.positionNode` is one of the only node material input that are computed at the vertex stage.
  713. ## Conditional
  714. ### If-else
  715. `If-else` conditionals can be used within `Fn()`. Conditionals in `TSL` are built using the `If` function:
  716. ```js
  717. If( conditional, function )
  718. .ElseIf( conditional, function )
  719. .Else( function )
  720. ```
  721. > Notice here the `i` in `If` is capitalized.
  722. Example:
  723. In this example below, we will limit the y position of the geometry to 10.
  724. ```js
  725. const limitPosition = Fn( ( { position } ) => {
  726. const limit = 10;
  727. const result = vec3( position );
  728. If( result.y.greaterThan( limit ), () => {
  729. result.y = limit;
  730. } );
  731. return result;
  732. } );
  733. material.positionNode = limitPosition( { position: positionLocal } );
  734. ```
  735. Example using `elseif`:
  736. ```js
  737. const limitPosition = Fn( ( { position } ) => {
  738. const limit = 10;
  739. const result = vec3( position );
  740. If( result.y.greaterThan( limit ), () => {
  741. result.y = limit;
  742. } ).ElseIf( result.y.lessThan( limit ), () => {
  743. result.y = limit;
  744. } );
  745. return result;
  746. } );
  747. material.positionNode = limitPosition( { position: positionLocal } );
  748. ```
  749. ### Switch-Case
  750. A Switch-Case statement is an alternative way to express conditional logic compared to If-Else.
  751. ```js
  752. const col = color();
  753. Switch( 0 )
  754. .Case( 0, () => {
  755. col.assign( color( 1, 0, 0 ) );
  756. } ).Case( 1, () => {
  757. col.assign( color( 0, 1, 0 ) );
  758. } ).Case( 2, 3, () => {
  759. col.assign( color( 0, 0, 1 ) );
  760. } ).Default( () => {
  761. col.assign( color( 1, 1, 1 ) );
  762. } );
  763. ```
  764. Notice that there are some rules when using this syntax which differentiate TSL from JavaScript:
  765. - There is no fallthrough support. So each `Case()` statement has an implicit break.
  766. - A `Case()` statement can hold multiple values (selectors) for testing.
  767. ### Ternary
  768. Different from `if-else`, a ternary conditional will return a value and can be used outside of `Fn()`.
  769. ```js
  770. const result = select( value.greaterThan( 1 ), 1.0, value );
  771. ```
  772. > Equivalent in JavaScript should be: `value > 1 ? 1.0 : value`
  773. ## Loop
  774. This module offers a variety of ways to implement loops in TSL. In it's basic form it's:
  775. ```js
  776. Loop( count, ( { i } ) => {
  777. } );
  778. ```
  779. However, it is also possible to define a start and end ranges, data types and loop conditions:
  780. ```js
  781. Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<', name: 'i' }, ( { i } ) => {
  782. } );
  783. ```
  784. Nested loops can be defined in a compacted form:
  785. ```js
  786. Loop( 10, 5, ( { i, j } ) => {
  787. } );
  788. ```
  789. Loops that should run backwards can be defined like so:
  790. ```js
  791. Loop( { start: 10 }, () => {} );
  792. ```
  793. It is possible to execute with boolean values, similar to the `while` syntax.
  794. ```js
  795. const value = float( 0 );
  796. Loop( value.lessThan( 10 ), () => {
  797. value.addAssign( 1 );
  798. } );
  799. ```
  800. The module also provides `Break()` and `Continue()` TSL expression for loop control.
  801. ## Math
  802. | Name | Description |
  803. | -- | -- |
  804. | `EPSILON` | A small value used to handle floating-point precision errors. |
  805. | `INFINITY` | Represent infinity. |
  806. | `PI` | The mathematical constant π (pi). |
  807. | `TWO_PI` | Two times π (2π). |
  808. | `HALF_PI` | Half of π (π/2). |
  809. | | |
  810. | `abs( x )` | Return the absolute value of the parameter. |
  811. | `acos( x )` | Return the arccosine of the parameter. |
  812. | `all( x )` | Return true if all components of x are true. |
  813. | `any( x )` | Return true if any component of x is true. |
  814. | `asin( x )` | Return the arcsine of the parameter. |
  815. | `atan( y, x )` | Return the arc-tangent of the parameters. |
  816. | `bitcast( x, y )` | Reinterpret the bits of a value as a different type. |
  817. | `cbrt( x )` | Return the cube root of the parameter. |
  818. | `ceil( x )` | Find the nearest integer that is greater than or equal to the parameter. |
  819. | `clamp( x, min, max )` | Constrain a value to lie between two further values. |
  820. | `cos( x )` | Return the cosine of the parameter. |
  821. | `cross( x, y )` | Calculate the cross product of two vectors. |
  822. | `dFdx( p )` | Return the partial derivative of an argument with respect to x. |
  823. | `dFdy( p )` | Return the partial derivative of an argument with respect to y. |
  824. | `degrees( radians )` | Convert a quantity in radians to degrees. |
  825. | `difference( x, y )` | Calculate the absolute difference between two values. |
  826. | `distance( x, y )` | Calculate the distance between two points. |
  827. | `dot( x, y )` | Calculate the dot product of two vectors. |
  828. | `equals( x, y )` | Return true if x equals y. |
  829. | `exp( x )` | Return the natural exponentiation of the parameter. |
  830. | `exp2( x )` | Return 2 raised to the power of the parameter. |
  831. | `faceforward( N, I, Nref )` | Return a vector pointing in the same direction as another. |
  832. | `floor( x )` | Find the nearest integer less than or equal to the parameter. |
  833. | `fract( x )` | Compute the fractional part of the argument. |
  834. | `fwidth( x )` | Return the sum of the absolute derivatives in x and y. |
  835. | `inverseSqrt( x )` | Return the inverse of the square root of the parameter. |
  836. | `length( x )` | Calculate the length of a vector. |
  837. | `lengthSq( x )` | Calculate the squared length of a vector. |
  838. | `log( x )` | Return the natural logarithm of the parameter. |
  839. | `log2( x )` | Return the base 2 logarithm of the parameter. |
  840. | `max( x, y )` | Return the greater of two values. |
  841. | `min( x, y )` | Return the lesser of two values. |
  842. | `mix( x, y, a )` | Linearly interpolate between two values. |
  843. | `negate( x )` | Negate the value of the parameter ( -x ). |
  844. | `normalize( x )` | Calculate the unit vector in the same direction as the original vector. |
  845. | `oneMinus( x )` | Return 1 minus the parameter. |
  846. | `pow( x, y )` | Return the value of the first parameter raised to the power of the second. |
  847. | `pow2( x )` | Return the square of the parameter. |
  848. | `pow3( x )` | Return the cube of the parameter. |
  849. | `pow4( x )` | Return the fourth power of the parameter. |
  850. | `radians( degrees )` | Convert a quantity in degrees to radians. |
  851. | `reciprocal( x )` | Return the reciprocal of the parameter (1/x). |
  852. | `reflect( I, N )` | Calculate the reflection direction for an incident vector. |
  853. | `refract( I, N, eta )` | Calculate the refraction direction for an incident vector. |
  854. | `round( x )` | Round the parameter to the nearest integer. |
  855. | `saturate( x )` | Constrain a value between 0 and 1. |
  856. | `sign( x )` | Extract the sign of the parameter. |
  857. | `sin( x )` | Return the sine of the parameter. |
  858. | `smoothstep( e0, e1, x )` | Perform Hermite interpolation between two values. |
  859. | `sqrt( x )` | Return the square root of the parameter. |
  860. | `step( edge, x )` | Generate a step function by comparing two values. |
  861. | `tan( x )` | Return the tangent of the parameter. |
  862. | `transformDirection( dir, matrix )` | Transform the direction of a vector by a matrix and then normalize the result. |
  863. | `trunc( x )` | Truncate the parameter, removing the fractional part. |
  864. ```js
  865. const value = float( -1 );
  866. // It's possible use `value.abs()` too.
  867. const positiveValue = abs( value ); // output: 1
  868. ```
  869. ## Method chaining
  870. `Method chaining` will only be including operators, converters, math and some core functions. These functions, however, can be used on any `node`.
  871. Example:
  872. `oneMinus()` is a mathematical function like `abs()`, `sin()`. This example uses `.oneMinus()` as a built-in function in the class that returns a new node instead of classic C function like `oneMinus( texture( map ).rgb )`.
  873. ```js
  874. // it will invert the texture color
  875. material.colorNode = texture( map ).rgb.oneMinus();
  876. ```
  877. You can use mathematical operators on any node, e.g:
  878. ```js
  879. const contrast = .5;
  880. const brightness = .5;
  881. material.colorNode = texture( map ).mul( contrast ).add( brightness );
  882. ```
  883. ## Texture
  884. | Name | Description | Type |
  885. | -- | -- | -- |
  886. | `texture( texture, uv = uv(), level = null )` | Retrieves texels from a texture. | `vec4` |
  887. | `textureLoad( texture, uv, level = null )` | Fetches/loads texels without interpolation. | `vec4` |
  888. | `textureStore( texture, uv, value )` | Stores a value into a storage texture. | `void` |
  889. | `textureSize( texture, level = null )` | Returns the size of a texture. | `ivec2` |
  890. | `textureBicubic( textureNode, strength = null )` | Applies mipped bicubic texture filtering. | `vec4` |
  891. | `cubeTexture( texture, uvw = reflectVector, level = null )` | Retrieves texels from a cube texture. | `vec4` |
  892. | `texture3D( texture, uvw = null, level = null )` | Retrieves texels from a 3D texture. | `vec4` |
  893. | `triplanarTexture( textureX, textureY = null, textureZ = null, scale = float( 1 ), position = positionLocal, normal = normalLocal )` | Computes texture using triplanar mapping based on provided parameters. | `vec4` |
  894. ## Attributes
  895. | Name | Description | Type |
  896. | -- | -- | -- |
  897. | `attribute( name, type = null )` | Getting geometry attribute using name and type. | `any` |
  898. | `uv( index = 0 )` | UV attribute named `uv + index`. | `vec2` |
  899. | `vertexColor( index = 0 )` | Vertex color node for the specified index. | `color` |
  900. | `instanceIndex` | The index of the current instance. | `uint` |
  901. | `vertexIndex` | The index of a vertex within a mesh. | `uint` |
  902. | `drawIndex` | The draw index when using multi-draw. | `uint` |
  903. | `batch( batchMesh )` | Creates a batch node for BatchedMesh. | `BatchNode` |
  904. | `instance( instancedMesh )` | Creates an instance node for InstancedMesh. | `InstanceNode` |
  905. ## Position
  906. The transformed term reflects the modifications applied by processes such as `skinning`, `morphing`, and similar techniques.
  907. | Name | Description | Type |
  908. | -- | -- | -- |
  909. | `positionGeometry` | Position attribute of geometry. | `vec3` |
  910. | `positionLocal` | Transformed local position. | `vec3` |
  911. | `positionWorld` | Transformed world position. | `vec3` |
  912. | `positionWorldDirection` | Normalized world direction. | `vec3` |
  913. | `positionView` | View position. | `vec3` |
  914. | `positionViewDirection` | Normalized view direction. | `vec3` |
  915. ## Normal
  916. The term transformed here also includes following the correct orientation of the face, so that the normals are inverted inside the geometry.
  917. | Name | Description | Type |
  918. | -- | -- | -- |
  919. | `normalGeometry` | Normal attribute of geometry. | `vec3` |
  920. | `normalLocal` | Local variable for normal. | `vec3` |
  921. | `normalView` | Normalized transformed view normal. | `vec3` |
  922. | `normalViewGeometry` | Normalized view normal. | `vec3` |
  923. | `normalWorld` | Normalized transformed world normal. | `vec3` |
  924. | `normalWorldGeometry` | Normalized world normal. | `vec3` |
  925. ## Tangent
  926. | Name | Description | Type |
  927. | -- | -- | -- |
  928. | `tangentGeometry` | Tangent attribute of geometry. | `vec4` |
  929. | `tangentLocal` | Local variable for tangent. | `vec3` |
  930. | `tangentView` | Normalized transformed view tangent. | `vec3` |
  931. | `tangentWorld` | Normalized transformed world tangent. | `vec3` |
  932. ### Bitangent
  933. | Name | Description | Type |
  934. | -- | -- | -- |
  935. | `bitangentGeometry` | Normalized bitangent in geometry space. | `vec3` |
  936. | `bitangentLocal` | Normalized bitangent in local space. | `vec3` |
  937. | `bitangentView` | Normalized transformed bitangent in view space. | `vec3` |
  938. | `bitangentWorld` | Normalized transformed bitangent in world space. | `vec3` |
  939. ## Camera
  940. | Name | Description | Type |
  941. | -- | -- | -- |
  942. | `cameraNear` | Near plane distance of the camera. | `float` |
  943. | `cameraFar` | Far plane distance of the camera. | `float` |
  944. | `cameraProjectionMatrix` | Projection matrix of the camera. | `mat4` |
  945. | `cameraProjectionMatrixInverse` | Inverse projection matrix of the camera. | `mat4` |
  946. | `cameraViewMatrix` | View matrix of the camera. | `mat4` |
  947. | `cameraWorldMatrix` | World matrix of the camera. | `mat4` |
  948. | `cameraNormalMatrix` | Normal matrix of the camera. | `mat3` |
  949. | `cameraPosition` | World position of the camera. | `vec3` |
  950. ## Model
  951. | Name | Description | Type |
  952. | -- | -- | -- |
  953. | `modelDirection` | Direction of the model. | `vec3` |
  954. | `modelViewMatrix` | View-space matrix of the model. | `mat4` |
  955. | `modelNormalMatrix` | View-space matrix of the model. | `mat3` |
  956. | `modelWorldMatrix` | World-space matrix of the model. | `mat4` |
  957. | `modelPosition` | Position of the model. | `vec3` |
  958. | `modelScale` | Scale of the model. | `vec3` |
  959. | `modelViewPosition` | View-space position of the model. | `vec3` |
  960. | `modelWorldMatrixInverse` | Inverse world matrix of the model. | `mat4` |
  961. | | |
  962. | `highpModelViewMatrix` | View-space matrix of the model computed on CPU using 64-bit. | `mat4` |
  963. | `highpModelNormalViewMatrix` | View-space normal matrix of the model computed on CPU using 64-bit. | `mat3` |
  964. ## Screen
  965. Screen nodes will return the values related to the current `frame buffer`, either normalized or in `physical pixel units` considering the current `Pixel Ratio`.
  966. | Variable | Description | Type |
  967. | -- | -- | -- |
  968. | `screenUV` | Returns the normalized frame buffer coordinate. | `vec2` |
  969. | `screenCoordinate` | Returns the frame buffer coordinate in physical pixel units. | `vec2` |
  970. | `screenSize` | Returns the frame buffer size in physical pixel units. | `vec2` |
  971. | `screenDPR` | Returns the device pixel ratio (DPR). | `float` |
  972. ## Viewport
  973. `viewport` is influenced by the area defined in `renderer.setViewport()`, different of the values ​​defined in the renderer that are `logical pixel units`, it use `physical pixel units` considering the current `Pixel Ratio`.
  974. | Variable | Description | Type |
  975. | -- | -- | -- |
  976. | `viewportUV` | Returns the normalized viewport coordinate. | `vec2` |
  977. | `viewport` | Returns the viewport dimension in physical pixel units. | `vec4` |
  978. | `viewportCoordinate` | Returns the viewport coordinate in physical pixel units. | `vec2` |
  979. | `viewportSize` | Returns the viewport size in physical pixel units. | `vec2` |
  980. | `viewportSharedTexture( uvNode = screenUV, levelNode = null )` | Accesses what has already been rendered, preserving render-order. | `vec4` |
  981. | `viewportDepthTexture( uvNode = screenUV, levelNode = null )` | Returns the depth texture of the viewport. | `float` |
  982. | `viewportLinearDepth` | Returns the linear (orthographic) depth value of the current fragment. | `float` |
  983. | `viewportMipTexture( uvNode = screenUV, levelNode = null, framebufferTexture = null )` | Returns a viewport texture with mipmap generation enabled. | `vec4` |
  984. | `viewportSafeUV( uv = screenUV )` | Returns safe UV coordinates for refraction purposes. | `vec2` |
  985. ## Blend Modes
  986. | Variable | Description | Type |
  987. | -- | -- | -- |
  988. | `blendBurn( a, b )` | Returns the burn blend mode. | `color` |
  989. | `blendDodge( a, b )` | Returns the dodge blend mode. | `color` |
  990. | `blendOverlay( a, b )` | Returns the overlay blend mode. | `color` |
  991. | `blendScreen( a, b )` | Returns the screen blend mode. | `color` |
  992. | `blendColor( a, b )` | Returns the (normal) color blend mode. | `color` |
  993. ## Reflect
  994. | Name | Description | Type |
  995. | -- | -- | -- |
  996. | `reflectView` | Computes reflection direction in view space. | `vec3` |
  997. | `reflectVector` | Transforms the reflection direction to world space. | `vec3` |
  998. ## UV Utils
  999. | Name | Description | Type |
  1000. | -- | -- | -- |
  1001. | `matcapUV` | UV coordinates for matcap texture. | `vec2` |
  1002. | `rotateUV( uv, rotation, centerNode = vec2( 0.5 ) )` | Rotates UV coordinates around a center point. | `vec2` |
  1003. | `spherizeUV( uv, strength, centerNode = vec2( 0.5 ) )` | Distorts UV coordinates with a spherical effect around a center point. | `vec2` |
  1004. | `spritesheetUV( count, uv = uv(), frame = float( 0 ) )` | Computes UV coordinates for a sprite sheet based on the number of frames, UV coordinates, and frame index. | `vec2` |
  1005. | `equirectUV( direction = positionWorldDirection )` | Computes UV coordinates for equirectangular mapping based on the direction vector. | `vec2` |
  1006. ```js
  1007. import { texture, matcapUV } from 'three/tsl';
  1008. const matcap = texture( matcapMap, matcapUV );
  1009. ```
  1010. ## Interpolation
  1011. | Variable | Description | Type |
  1012. | -- | -- | -- |
  1013. | `remap( node, inLow, inHigh, outLow = float( 0 ), outHigh = float( 1 ) )` | Remaps a value from one range to another. | `any` |
  1014. | `remapClamp( node, inLow, inHigh, outLow = float( 0 ), outHigh = float( 1 ) )` | Remaps a value from one range to another, with clamping. | `any` |
  1015. ## Random
  1016. | Variable | Description | Type |
  1017. | -- | -- | -- |
  1018. | `hash( seed )` | Generates a hash value in the range [ 0, 1 ] from the given seed. | `float` |
  1019. | `range( min, max )` | Generates a range `attribute` of values between min and max. Attribute randomization is useful when you want to randomize values ​​between instances and not between pixels. | `any` |
  1020. ## Rotate
  1021. | Name | Description | Type |
  1022. | -- | -- | -- |
  1023. | `rotate( position, rotation )` | Applies a rotation to the given position node. Depending on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. | `vec2`, `vec3`
  1024. ## Oscillator
  1025. | Variable | Description | Type |
  1026. | -- | -- | -- |
  1027. | `oscSine( timer = time )` | Generates a sine wave oscillation based on a timer. | `float` |
  1028. | `oscSquare( timer = time )` | Generates a square wave oscillation based on a timer. | `float` |
  1029. | `oscTriangle( timer = time )` | Generates a triangle wave oscillation based on a timer. | `float` |
  1030. | `oscSawtooth( timer = time )` | Generates a sawtooth wave oscillation based on a timer. | `float` |
  1031. ## Timer
  1032. | Variable | Description | Type |
  1033. | -- | -- | -- |
  1034. | `time` | Represents the elapsed time in seconds. | `float` |
  1035. | `deltaTime` | Represents the delta time in seconds. | `float` |
  1036. ## Packing
  1037. | Variable | Description | Type |
  1038. | -- | -- | -- |
  1039. | `directionToColor( value )` | Converts direction vector to color. | `color` |
  1040. | `colorToDirection( value )` | Converts color to direction vector. | `vec3` |
  1041. ## Render Pipeline
  1042. The `RenderPipeline` provides full control over the rendering process. It enables developers to build complex multi-pass rendering pipelines entirely in JavaScript, combining scene rendering, post-processing, and compute operations in a unified, composable workflow.
  1043. #### Basic Usage
  1044. ```js
  1045. import * as THREE from 'three/webgpu';
  1046. import { pass } from 'three/tsl';
  1047. // Create the render pipeline
  1048. const renderPipeline = new THREE.RenderPipeline( renderer );
  1049. // Create a scene pass
  1050. const scenePass = pass( scene, camera );
  1051. // Set the output
  1052. renderPipeline.outputNode = scenePass;
  1053. // In the animation loop
  1054. function animate() {
  1055. renderPipeline.render();
  1056. }
  1057. ```
  1058. ### Multiple Render Targets (MRT)
  1059. MRT allows capturing multiple outputs from a single render pass. Instead of rendering the scene multiple times to get different data (color, normals, depth, velocity), MRT captures all of them in one draw call—significantly improving performance.
  1060. #### Setting up MRT
  1061. Use `setMRT()` with the `mrt()` function to define which outputs to capture:
  1062. ```js
  1063. import { pass, mrt, output, normalView, velocity, directionToColor } from 'three/tsl';
  1064. const scenePass = pass( scene, camera );
  1065. scenePass.setMRT( mrt( {
  1066. output: output, // Final color output
  1067. normal: directionToColor( normalView ), // View-space normals encoded as colors
  1068. velocity: velocity // Motion vectors for temporal effects
  1069. } ) );
  1070. ```
  1071. Each MRT entry accepts any TSL node, allowing you to customize outputs using formulas, encoders, or material accessors. For example, `directionToColor( normalView )` encodes view-space normals into RGB values. You can use any TSL function to transform, combine, or encode data before writing to the render target.
  1072. Within a TSL function `Fn( ( { material, object } ) => { ... } )`, you have complete access to the current material and object being rendered, enabling full customization of outputs.
  1073. #### Accessing MRT Buffers
  1074. Each MRT output becomes available as a texture node via `getTextureNode()`:
  1075. ```js
  1076. // Access individual buffers as texture nodes
  1077. const colorTexture = scenePass.getTextureNode( 'output' );
  1078. const normalTexture = scenePass.getTextureNode( 'normal' );
  1079. const velocityTexture = scenePass.getTextureNode( 'velocity' );
  1080. // Depth is always available, even without MRT
  1081. const depthTexture = scenePass.getTextureNode( 'depth' );
  1082. ```
  1083. These texture nodes can be sampled, transformed, and passed to post-processing effects or other passes.
  1084. #### Optimizing MRT Textures
  1085. You can access the textures to optimize memory usage and bandwidth. Using smaller data types reduces GPU memory transfers, which is critical for performance on bandwidth-limited devices:
  1086. ```js
  1087. // Use 8-bit format for encoded normals, default is 16-bit
  1088. const normalTexture = scenePass.getTexture( 'normal' );
  1089. normalTexture.type = THREE.UnsignedByteType;
  1090. ```
  1091. #### Dynamic Pipeline Updates
  1092. The pipeline can be updated at runtime:
  1093. ```js
  1094. if ( showNormals ) {
  1095. renderPipeline.outputNode = prePass;
  1096. } else {
  1097. renderPipeline.outputNode = traaPass;
  1098. }
  1099. renderPipeline.needsUpdate = true;
  1100. ```
  1101. ### Post-Processing
  1102. TSL utilities for post-processing effects. They can be used in materials or post-processing passes.
  1103. | Name | Description |
  1104. | -- | -- |
  1105. | `afterImage( node, damp = 0.96 )` | Creates an after image effect. |
  1106. | `anamorphic( node, threshold = 0.9, scale = 3, samples = 32 )` | Creates an anamorphic flare effect. |
  1107. | `bloom( node, strength = 1, radius = 0, threshold = 0 )` | Creates a bloom effect. |
  1108. | `boxBlur( textureNode, options = {} )` | Applies a box blur effect. |
  1109. | `chromaticAberration( node, strength = 1.0, center = null, scale = 1.1 )` | Creates a chromatic aberration effect. |
  1110. | `denoise( node, depthNode, normalNode, camera )` | Creates a denoise effect. |
  1111. | `dof( node, viewZNode, focusDistance, focalLength, bokehScale )` | Creates a depth-of-field effect. |
  1112. | `dotScreen( node, angle = 1.57, scale = 1 )` | Creates a dot-screen effect. |
  1113. | `film( inputNode, intensityNode = null, uvNode = null )` | Creates a film grain effect. |
  1114. | `fxaa( node )` | Creates a FXAA anti-aliasing effect. |
  1115. | `gaussianBlur( node, directionNode, sigma, options = {} )` | Creates a gaussian blur effect. |
  1116. | `grayscale( color )` | Converts color to grayscale. |
  1117. | `hashBlur( textureNode, bluramount = float( 0.1 ), options = {} )` | Applies a hash blur effect. |
  1118. | `lut3D( node, lut, size, intensity )` | Creates a LUT color grading effect. |
  1119. | `motionBlur( inputNode, velocity, numSamples = int( 16 ) )` | Creates a motion blur effect. |
  1120. | `outline( scene, camera, params )` | Creates an outline effect around selected objects. |
  1121. | `rgbShift( node, amount = 0.005, angle = 0 )` | Creates an RGB shift effect. |
  1122. | `sepia( color )` | Applies a sepia effect. |
  1123. | `smaa( node )` | Creates a SMAA anti-aliasing effect. |
  1124. | `sobel( node )` | Creates a sobel edge detection effect. |
  1125. | `ssr( colorNode, depthNode, normalNode, metalnessNode, roughnessNode = null, camera = null )` | Creates screen space reflections. |
  1126. | `ssgi( beautyNode, depthNode, normalNode, camera )` | Creates a SSGI effect. |
  1127. | `ao( depthNode, normalNode, camera )` | Creates a Ground Truth Ambient Occlusion (GTAO) effect. |
  1128. | `transition( nodeA, nodeB, mixTextureNode, mixRatio, threshold, useTexture )` | Creates a transition effect between two scenes. |
  1129. | `traa( beautyNode, depthNode, velocityNode, camera )` | Creates a TRAA temporal anti-aliasing effect. |
  1130. | `renderOutput( node, targetColorSpace, targetToneMapping )` | Apply the renderer output settings in the node. |
  1131. Example:
  1132. ```js
  1133. import { grayscale, pass } from 'three/tsl';
  1134. import { gaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
  1135. // Post-processing
  1136. const scenePass = pass( scene, camera );
  1137. const output = scenePass.getTextureNode(); // default parameter is 'output'
  1138. renderPipeline.outputNode = grayscale( gaussianBlur( output, 4 ) );
  1139. ```
  1140. ### Render Pass
  1141. Functions for creating and managing render passes.
  1142. | Name | Description |
  1143. | -- | -- |
  1144. | `pass( scene, camera, options = {} )` | Creates a pass node for rendering a scene. |
  1145. | `mrt( outputNodes )` | Creates a Multiple Render Targets (MRT) node. |
  1146. Example:
  1147. ```js
  1148. import { pass, mrt, output, emissive } from 'three/tsl';
  1149. const scenePass = pass( scene, camera );
  1150. // Setup MRT
  1151. scenePass.setMRT( mrt( {
  1152. output: output,
  1153. emissive: emissive
  1154. } ) );
  1155. const outputNode = scenePass.getTextureNode( 'output' );
  1156. const emissiveNode = scenePass.getTextureNode( 'emissive' );
  1157. ```
  1158. ### Compute
  1159. Compute shaders allow general-purpose GPU computations. TSL provides functions for creating and managing compute operations.
  1160. | Name | Description |
  1161. | -- | -- |
  1162. | `compute( node, count = null, workgroupSize = [ 64 ] )` | Creates a compute node. |
  1163. | `atomicAdd( node, value )` | Performs an atomic addition. |
  1164. | `atomicSub( node, value )` | Performs an atomic subtraction. |
  1165. | `atomicMax( node, value )` | Performs an atomic max operation. |
  1166. | `atomicMin( node, value )` | Performs an atomic min operation. |
  1167. | `atomicAnd( node, value )` | Performs an atomic AND operation. |
  1168. | `atomicOr( node, value )` | Performs an atomic OR operation. |
  1169. | `atomicXor( node, value )` | Performs an atomic XOR operation. |
  1170. | `atomicStore( node, value )` | Stores a value atomically. |
  1171. | `atomicLoad( node )` | Loads a value atomically. |
  1172. | `workgroupBarrier()` | Creates a workgroup barrier. |
  1173. | `storageBarrier()` | Creates a storage barrier. |
  1174. | `textureBarrier()` | Creates a texture barrier. |
  1175. | `barrier()` | Creates a memory barrier. |
  1176. | `workgroupId` | The workgroup ID. |
  1177. | `localId` | The local invocation ID within the workgroup. |
  1178. | `globalId` | The global invocation ID. |
  1179. | `numWorkgroups` | The number of workgroups. |
  1180. | `subgroupSize` | The size of the subgroup. |
  1181. Example:
  1182. ```js
  1183. import { Fn, instancedArray, instanceIndex, deltaTime } from 'three/tsl';
  1184. const count = 1000;
  1185. const positionArray = instancedArray( count, 'vec3' );
  1186. // create a compute function
  1187. const computeShader = Fn( () => {
  1188. const position = positionArray.element( instanceIndex );
  1189. position.x.addAssign( deltaTime );
  1190. } )().compute( count );
  1191. //
  1192. renderer.compute( computeShader );
  1193. ```
  1194. ## Storage
  1195. Storage functions allow reading and writing to GPU buffers.
  1196. | Name | Description |
  1197. | -- | -- |
  1198. | `storage( attribute, type, count )` | Creates a storage buffer. |
  1199. | `storageTexture( texture )` | Creates a storage texture for read/write operations. |
  1200. ## Struct
  1201. Structs allow you to create custom data types with multiple members. They can be used to organize related data in shaders, define structures for attributes and uniforms.
  1202. | Name | Description |
  1203. | -- | -- |
  1204. | `struct( membersLayout, name = null )` | Creates a struct type with the specified member layout. |
  1205. | `outputStruct( ...members )` | Creates an output struct node for returning multiple values. |
  1206. Example:
  1207. ```js
  1208. import { struct, vec3 } from 'three/tsl';
  1209. // Define a custom struct
  1210. const BoundingBox = struct( { min: 'vec3', max: 'vec3' } );
  1211. // Create a new instance of the struct
  1212. const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1
  1213. const bb2 = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2
  1214. // Access the struct members
  1215. const min = bb.get( 'min' );
  1216. // Assign a new value to a member
  1217. min.assign( vec3( -1, -1, -1 ) );
  1218. ```
  1219. ## Flow Control
  1220. Functions for controlling shader flow.
  1221. | Name | Description |
  1222. | -- | -- |
  1223. | `Discard()` | Discards the current fragment. |
  1224. | `Return()` | Returns from the current function. |
  1225. | `Break()` | Breaks out of a loop. |
  1226. | `Continue()` | Continues to the next iteration of a loop. |
  1227. Example:
  1228. ```js
  1229. import { Fn, If, Discard, uv } from 'three/tsl';
  1230. const customFragment = Fn( () => {
  1231. If( uv().x.lessThan( 0.5 ), () => {
  1232. Discard();
  1233. } );
  1234. return vec4( 1, 0, 0, 1 );
  1235. } );
  1236. material.colorNode = customFragment();
  1237. ```
  1238. ## Fog
  1239. Functions for creating fog effects in the scene. Assign the fog node to `scene.fogNode`.
  1240. | Name | Description | Type |
  1241. | -- | -- | -- |
  1242. | `fog( color, factor )` | Creates a fog node with specified color and fog factor. | `FogNode` |
  1243. | `rangeFogFactor( near, far )` | Creates a linear fog factor based on distance from camera. | `float` |
  1244. | `densityFogFactor( density )` | Creates an exponential squared fog factor for denser fog. | `float` |
  1245. Example:
  1246. ```js
  1247. import { fog, rangeFogFactor, densityFogFactor, color } from 'three/tsl';
  1248. // Linear fog (starts at 10 units, fully opaque at 100 units)
  1249. scene.fogNode = fog( color( 0x000000 ), rangeFogFactor( 10, 100 ) );
  1250. // Exponential fog (density-based)
  1251. scene.fogNode = fog( color( 0xcccccc ), densityFogFactor( 0.02 ) );
  1252. ```
  1253. ## Color Adjustments
  1254. Functions for adjusting and manipulating colors.
  1255. | Name | Description | Type |
  1256. | -- | -- | -- |
  1257. | `luminance( node )` | Calculates the luminance (perceived brightness) of a color. | `float` |
  1258. | `saturation( node, adjustment = 1 )` | Adjusts the saturation of a color. Values > 1 increase saturation, < 1 decrease. | `color` |
  1259. | `vibrance( node, adjustment = 1 )` | Selectively enhances less saturated colors while preserving already saturated ones. | `color` |
  1260. | `hue( node, adjustment = 0 )` | Rotates the hue of a color. Value is in radians. | `color` |
  1261. | `posterize( node, steps )` | Reduces the number of color levels, creating a poster-like effect. | `color` |
  1262. Example:
  1263. ```js
  1264. import { texture, saturation, hue, posterize } from 'three/tsl';
  1265. // Increase saturation
  1266. material.colorNode = saturation( texture( map ), 1.5 );
  1267. // Rotate hue by 90 degrees
  1268. material.colorNode = hue( texture( map ), Math.PI / 2 );
  1269. // Posterize to 4 color levels
  1270. material.colorNode = posterize( texture( map ), 4 );
  1271. ```
  1272. ## Utilities
  1273. Utility functions for common shader tasks.
  1274. | Name | Description | Type |
  1275. | -- | -- | -- |
  1276. | `billboarding( { position, horizontal, vertical } )` | Orients flat meshes always towards the camera. `position`: vertex positions in world space (default: `null`). `horizontal`: follow camera horizontally (default: `true`). `vertical`: follow camera vertically (default: `false`). | `vec3` |
  1277. | `checker( coord )` | Creates a 2x2 checkerboard pattern. | `float` |
  1278. Example:
  1279. ```js
  1280. import { billboarding } from 'three/tsl';
  1281. // Full billboarding (like particles) - faces camera in all directions
  1282. material.vertexNode = billboarding();
  1283. // Horizontal only (like trees) - rotates around Y axis only
  1284. material.vertexNode = billboarding( { horizontal: true, vertical: false } );
  1285. ```
  1286. ## NodeMaterial
  1287. Check below for more details about `NodeMaterial` inputs.
  1288. #### Core
  1289. | Name | Description | Type |
  1290. |--|--|--|
  1291. | `.fragmentNode` | Replaces the built-in material logic used in the fragment stage. | `vec4` |
  1292. | `.vertexNode` | Replaces the built-in material logic used in the vertex stage. | `vec4` |
  1293. | `.geometryNode` | Allows you to execute a TSL function to deal with Geometry. | `Fn()` |
  1294. #### Basic
  1295. | Name | Description | Reference | Type |
  1296. |--|--|--|--|
  1297. | `.colorNode` | Replace the logic of `material.color * material.map`. | `materialColor` | `vec4` |
  1298. | `.depthNode` | Customize the `depth` output. | `depth` | `float` |
  1299. | `.opacityNode` | Replace the logic of `material.opacity * material.alphaMap`. | `materialOpacity` | `float` |
  1300. | `.alphaTestNode` | Sets a threshold to discard pixels with low opacity. | `materialAlphaTest` | `float` |
  1301. | `.positionNode` | Represents the vertex positions in local-space. Replace the logic of `material.displacementMap * material.displacementScale + material.displacementBias`. | `positionLocal` | `vec3` |
  1302. #### Lighting
  1303. | Name | Description | Reference | Type |
  1304. |--|--|--|--|
  1305. | `.emissiveNode` | Replace the logic of `material.emissive * material.emissiveIntensity * material.emissiveMap`. | `materialEmissive` | `color` |
  1306. | `.normalNode` | Represents the normals direction in view-space. Replace the logic of `material.normalMap * material.normalScale` and `material.bumpMap * material.bumpScale`. | `materialNormal` | `vec3` |
  1307. | `.lightsNode` | Defines the lights and lighting model that will be used by the material. | | `lights()` |
  1308. | `.envNode` | Replace the logic of `material.envMap * material.envMapRotation * material.envMapIntensity`. | | `color` |
  1309. #### Backdrop
  1310. | Name | Description | Type |
  1311. |--|--|--|
  1312. | `.backdropNode` | Set the current render color to be used before applying `Specular`, useful for `transmission` and `refraction` effects. | `color` |
  1313. | `.backdropAlphaNode` | Define the alpha of `backdropNode`. | `float` |
  1314. #### Shadows
  1315. | Name | Description | Reference | Type |
  1316. |--|--|--|--|
  1317. | `.castShadowNode` | Control the `color` and `opacity` of the shadow that will be projected by the material. | | `vec4` |
  1318. | `.maskShadowNode` | Define a custom mask for the shadow. | | `bool` |
  1319. | `.receivedShadowNode` | Handle the shadow cast on the material. | | `Fn()` |
  1320. | `.receivedShadowPositionNode` | Define the shadow projection position in world-space. | `shadowPositionWorld` | `vec3` |
  1321. | `.aoNode` | Replace the logic of `material.aoMap * aoMapIntensity`. | `materialAO` | `float` |
  1322. #### Output
  1323. | Name | Description | Reference | Type |
  1324. |--|--|--|--|
  1325. | `.maskNode` | Define the material's mask. Unlike opacity, it is discarded at the beginning of rendering, optimizing the process. | | `bool` |
  1326. | `.mrtNode` | Define a different MRT than the one defined in `pass()`. | | `mrt()` |
  1327. | `.outputNode` | Defines the material's final output. | `output` | `vec4` |
  1328. ## LineDashedNodeMaterial
  1329. | Name | Description | Reference | Type |
  1330. |--|--|--|--|
  1331. | `.dashScaleNode` | Replace the logic of `material.scale`. | `materialLineScale` | `float` |
  1332. | `.dashSizeNode` | Replace the logic of `material.dashSize`. | `materialLineDashSize` | `float` |
  1333. | `.gapSizeNode` | Replace the logic of `material.gapSize`. | `materialLineGapSize` | `float` |
  1334. | `.offsetNode` | Replace the logic of `material.dashOffset`. | `materialLineDashOffset` | `float` |
  1335. ## MeshPhongNodeMaterial
  1336. | Name | Description | Reference | Type |
  1337. |--|--|--|--|
  1338. | `.shininessNode` | Replace the logic of `material.shininess`. | `materialShininess` | `float` |
  1339. | `.specularNode` | Replace the logic of `material.specular`. | `materialSpecular` | `color` |
  1340. ## MeshStandardNodeMaterial
  1341. | Name | Description | Reference | Type |
  1342. |--|--|--|--|
  1343. | `.metalnessNode` | Replace the logic of `material.metalness * material.metalnessMap`. | `materialMetalness` | `float` |
  1344. | `.roughnessNode` | Replace the logic of `material.roughness * material.roughnessMap`. | `materialRoughness` | `float` |
  1345. ## MeshPhysicalNodeMaterial
  1346. | Name | Description | Reference | Type |
  1347. |--|--|--|--|
  1348. | `.clearcoatNode` | Replace the logic of `material.clearcoat * material.clearcoatMap`. | `materialClearcoat` | `float` |
  1349. | `.clearcoatRoughnessNode` | Replace the logic of `material.clearcoatRoughness * material.clearcoatRoughnessMap`. | `materialClearcoatRoughness` | `float` |
  1350. | `.clearcoatNormalNode` | Replace the logic of `material.clearcoatNormalMap * material.clearcoatNormalMapScale`. | `materialClearcoatNormal` | `vec3` |
  1351. | `.sheenNode` | Replace the logic of `material.sheenColor * material.sheenColorMap`. | `materialSheen` | `color` |
  1352. | `.iridescenceNode` | Replace the logic of `material.iridescence`. | `materialIridescence` | `float` |
  1353. | `.iridescenceIORNode` | Replace the logic of `material.iridescenceIOR`. | `materialIridescenceIOR` | `float` |
  1354. | `.iridescenceThicknessNode` | Replace the logic of `material.iridescenceThicknessRange * material.iridescenceThicknessMap`. | `materialIridescenceThickness` | `float` |
  1355. | `.specularIntensityNode` | Replace the logic of `material.specularIntensity * material.specularIntensityMap`. | `materialSpecularIntensity` | `float` |
  1356. | `.specularColorNode` | Replace the logic of `material.specularColor * material.specularColorMap`. | `materialSpecularColor` | `color` |
  1357. | `.iorNode` | Replace the logic of `material.ior`. | `materialIOR` | `float` |
  1358. | `.transmissionNode` | Replace the logic of `material.transmission * material.transmissionMap`. | `materialTransmission` | `color` |
  1359. | `.thicknessNode` | Replace the logic of `material.thickness * material.thicknessMap`. | `materialTransmission` | `float` |
  1360. | `.attenuationDistanceNode` | Replace the logic of `material.attenuationDistance`. | `materialAttenuationDistance` | `float` |
  1361. | `.attenuationColorNode` | Replace the logic of `material.attenuationColor`. | `materialAttenuationColor` | `color` |
  1362. | `.dispersionNode` | Replace the logic of `material.dispersion`. | `materialDispersion` | `float` |
  1363. | `.anisotropyNode` | Replace the logic of `material.anisotropy * material.anisotropyMap`. | `materialAnisotropy` | `vec2` |
  1364. ## SpriteNodeMaterial
  1365. | Name | Description | Type |
  1366. |--|--|--|
  1367. | `.positionNode` | Defines the position. | `vec3` |
  1368. | `.rotationNode` | Defines the rotation. | `float` |
  1369. | `.scaleNode` | Defines the scale. | `vec2` |
  1370. ## Transitioning common GLSL properties to TSL
  1371. | GLSL | TSL | Type |
  1372. | -- | -- | -- |
  1373. | `position` | `positionGeometry` | `vec3` |
  1374. | `transformed` | `positionLocal` | `vec3` |
  1375. | `transformedNormal` | `normalLocal` | `vec3` |
  1376. | `vWorldPosition` | `positionWorld` | `vec3` |
  1377. | `vColor` | `vertexColor()` | `vec3` |
  1378. | `vUv` \| `uv` | `uv()` | `vec2` |
  1379. | `vNormal` | `normalView` | `vec3` |
  1380. | `viewMatrix` | `cameraViewMatrix` | `mat4` |
  1381. | `modelMatrix` | `modelWorldMatrix` | `mat4` |
  1382. | `modelViewMatrix` | `modelViewMatrix` | `mat4` |
  1383. | `projectionMatrix` | `cameraProjectionMatrix` | `mat4` |
  1384. | `diffuseColor` | `material.colorNode` | `vec4` |
  1385. | `gl_FragColor` | `material.fragmentNode` | `vec4` |
  1386. ---
  1387. ## Available Documentation
  1388. The following documentation pages are available in markdown format at `https://threejs.org/docs/pages/{Name}.html.md`:
  1389. ### Core
  1390. - [ARButton](https://threejs.org/docs/pages/ARButton.html.md)
  1391. - [AmmoPhysics](https://threejs.org/docs/pages/AmmoPhysics.html.md)
  1392. - [BasicLightingModel](https://threejs.org/docs/pages/BasicLightingModel.html.md)
  1393. - [BatchedMesh](https://threejs.org/docs/pages/BatchedMesh.html.md)
  1394. - [BezierInterpolant](https://threejs.org/docs/pages/BezierInterpolant.html.md)
  1395. - [BitonicSort_BitonicSort](https://threejs.org/docs/pages/BitonicSort_BitonicSort.html.md)
  1396. - [BlendMode](https://threejs.org/docs/pages/BlendMode.html.md)
  1397. - [Bone](https://threejs.org/docs/pages/Bone.html.md)
  1398. - [BooleanKeyframeTrack](https://threejs.org/docs/pages/BooleanKeyframeTrack.html.md)
  1399. - [BufferAttribute](https://threejs.org/docs/pages/BufferAttribute.html.md)
  1400. - [BundleGroup](https://threejs.org/docs/pages/BundleGroup.html.md)
  1401. - [CCDIKSolver](https://threejs.org/docs/pages/CCDIKSolver.html.md)
  1402. - [CSM](https://threejs.org/docs/pages/CSM.html.md)
  1403. - [CSMFrustum](https://threejs.org/docs/pages/CSMFrustum.html.md)
  1404. - [CSS2DObject](https://threejs.org/docs/pages/CSS2DObject.html.md)
  1405. - [CSS2DRenderer](https://threejs.org/docs/pages/CSS2DRenderer.html.md)
  1406. - [CSS3DObject](https://threejs.org/docs/pages/CSS3DObject.html.md)
  1407. - [CSS3DRenderer](https://threejs.org/docs/pages/CSS3DRenderer.html.md)
  1408. - [CSS3DSprite](https://threejs.org/docs/pages/CSS3DSprite.html.md)
  1409. - [Cache](https://threejs.org/docs/pages/Cache.html.md)
  1410. - [CanvasTarget](https://threejs.org/docs/pages/CanvasTarget.html.md)
  1411. - [Capsule](https://threejs.org/docs/pages/Capsule.html.md)
  1412. - [CinquefoilKnot](https://threejs.org/docs/pages/CinquefoilKnot.html.md)
  1413. - [ClippingGroup](https://threejs.org/docs/pages/ClippingGroup.html.md)
  1414. - [Clock](https://threejs.org/docs/pages/Clock.html.md)
  1415. - [ColladaComposer](https://threejs.org/docs/pages/ColladaComposer.html.md)
  1416. - [ColladaParser](https://threejs.org/docs/pages/ColladaParser.html.md)
  1417. - [ColorConverter](https://threejs.org/docs/pages/ColorConverter.html.md)
  1418. - [ColorEnvironment](https://threejs.org/docs/pages/ColorEnvironment.html.md)
  1419. - [ColorKeyframeTrack](https://threejs.org/docs/pages/ColorKeyframeTrack.html.md)
  1420. - [ConvexHull](https://threejs.org/docs/pages/ConvexHull.html.md)
  1421. - [ConvexObjectBreaker](https://threejs.org/docs/pages/ConvexObjectBreaker.html.md)
  1422. - [CubeRenderTarget](https://threejs.org/docs/pages/CubeRenderTarget.html.md)
  1423. - [CubicInterpolant](https://threejs.org/docs/pages/CubicInterpolant.html.md)
  1424. - [Cylindrical](https://threejs.org/docs/pages/Cylindrical.html.md)
  1425. - [DRACOExporter](https://threejs.org/docs/pages/DRACOExporter.html.md)
  1426. - [DataUtils](https://threejs.org/docs/pages/DataUtils.html.md)
  1427. - [DebugEnvironment](https://threejs.org/docs/pages/DebugEnvironment.html.md)
  1428. - [DecoratedTorusKnot4a](https://threejs.org/docs/pages/DecoratedTorusKnot4a.html.md)
  1429. - [DecoratedTorusKnot4b](https://threejs.org/docs/pages/DecoratedTorusKnot4b.html.md)
  1430. - [DecoratedTorusKnot5a](https://threejs.org/docs/pages/DecoratedTorusKnot5a.html.md)
  1431. - [DecoratedTorusKnot5c](https://threejs.org/docs/pages/DecoratedTorusKnot5c.html.md)
  1432. - [DirectionalLightShadow](https://threejs.org/docs/pages/DirectionalLightShadow.html.md)
  1433. - [DiscreteInterpolant](https://threejs.org/docs/pages/DiscreteInterpolant.html.md)
  1434. - [Earcut](https://threejs.org/docs/pages/Earcut.html.md)
  1435. - [EdgeSplitModifier](https://threejs.org/docs/pages/EdgeSplitModifier.html.md)
  1436. - [EffectComposer](https://threejs.org/docs/pages/EffectComposer.html.md)
  1437. - [EventDispatcher](https://threejs.org/docs/pages/EventDispatcher.html.md)
  1438. - [FigureEightPolynomialKnot](https://threejs.org/docs/pages/FigureEightPolynomialKnot.html.md)
  1439. - [Float16BufferAttribute](https://threejs.org/docs/pages/Float16BufferAttribute.html.md)
  1440. - [Float32BufferAttribute](https://threejs.org/docs/pages/Float32BufferAttribute.html.md)
  1441. - [Flow](https://threejs.org/docs/pages/Flow.html.md)
  1442. - [Fog](https://threejs.org/docs/pages/Fog.html.md)
  1443. - [FogExp2](https://threejs.org/docs/pages/FogExp2.html.md)
  1444. - [Font](https://threejs.org/docs/pages/Font.html.md)
  1445. - [FullScreenQuad](https://threejs.org/docs/pages/FullScreenQuad.html.md)
  1446. - [GLBufferAttribute](https://threejs.org/docs/pages/GLBufferAttribute.html.md)
  1447. - [GLSLNodeBuilder](https://threejs.org/docs/pages/GLSLNodeBuilder.html.md)
  1448. - [GLSLNodeFunction](https://threejs.org/docs/pages/GLSLNodeFunction.html.md)
  1449. - [GLSLNodeParser](https://threejs.org/docs/pages/GLSLNodeParser.html.md)
  1450. - [GLTFExporter](https://threejs.org/docs/pages/GLTFExporter.html.md)
  1451. - [GPUComputationRenderer](https://threejs.org/docs/pages/GPUComputationRenderer.html.md)
  1452. - [GrannyKnot](https://threejs.org/docs/pages/GrannyKnot.html.md)
  1453. - [GroundedSkybox](https://threejs.org/docs/pages/GroundedSkybox.html.md)
  1454. - [Group](https://threejs.org/docs/pages/Group.html.md)
  1455. - [Gyroscope](https://threejs.org/docs/pages/Gyroscope.html.md)
  1456. - [HTMLMesh](https://threejs.org/docs/pages/HTMLMesh.html.md)
  1457. - [ImageUtils](https://threejs.org/docs/pages/ImageUtils.html.md)
  1458. - [ImprovedNoise](https://threejs.org/docs/pages/ImprovedNoise.html.md)
  1459. - [IndirectStorageBufferAttribute](https://threejs.org/docs/pages/IndirectStorageBufferAttribute.html.md)
  1460. - [Info](https://threejs.org/docs/pages/Info.html.md)
  1461. - [InspectorBase](https://threejs.org/docs/pages/InspectorBase.html.md)
  1462. - [InstancedBufferAttribute](https://threejs.org/docs/pages/InstancedBufferAttribute.html.md)
  1463. - [InstancedFlow](https://threejs.org/docs/pages/InstancedFlow.html.md)
  1464. - [InstancedInterleavedBuffer](https://threejs.org/docs/pages/InstancedInterleavedBuffer.html.md)
  1465. - [InstancedMesh](https://threejs.org/docs/pages/InstancedMesh.html.md)
  1466. - [Int16BufferAttribute](https://threejs.org/docs/pages/Int16BufferAttribute.html.md)
  1467. - [Int32BufferAttribute](https://threejs.org/docs/pages/Int32BufferAttribute.html.md)
  1468. - [Int8BufferAttribute](https://threejs.org/docs/pages/Int8BufferAttribute.html.md)
  1469. - [InteractiveGroup](https://threejs.org/docs/pages/InteractiveGroup.html.md)
  1470. - [InterleavedBuffer](https://threejs.org/docs/pages/InterleavedBuffer.html.md)
  1471. - [InterleavedBufferAttribute](https://threejs.org/docs/pages/InterleavedBufferAttribute.html.md)
  1472. - [Interpolant](https://threejs.org/docs/pages/Interpolant.html.md)
  1473. - [JoltPhysics](https://threejs.org/docs/pages/JoltPhysics.html.md)
  1474. - [KTX2Exporter](https://threejs.org/docs/pages/KTX2Exporter.html.md)
  1475. - [KeyframeTrack](https://threejs.org/docs/pages/KeyframeTrack.html.md)
  1476. - [LDrawUtils](https://threejs.org/docs/pages/LDrawUtils.html.md)
  1477. - [LOD](https://threejs.org/docs/pages/LOD.html.md)
  1478. - [Layers](https://threejs.org/docs/pages/Layers.html.md)
  1479. - [Lensflare](https://threejs.org/docs/pages/Lensflare.html.md)
  1480. - [LensflareElement](https://threejs.org/docs/pages/LensflareElement.html.md)
  1481. - [LensflareMesh](https://threejs.org/docs/pages/LensflareMesh.html.md)
  1482. - [LightProbe](https://threejs.org/docs/pages/LightProbe.html.md)
  1483. - [LightProbeGenerator](https://threejs.org/docs/pages/LightProbeGenerator.html.md)
  1484. - [LightShadow](https://threejs.org/docs/pages/LightShadow.html.md)
  1485. - [LightingModel](https://threejs.org/docs/pages/LightingModel.html.md)
  1486. - [Line](https://threejs.org/docs/pages/Line.html.md)
  1487. - [Line2](https://threejs.org/docs/pages/Line2.html.md)
  1488. - [Line3](https://threejs.org/docs/pages/Line3.html.md)
  1489. - [LineLoop](https://threejs.org/docs/pages/LineLoop.html.md)
  1490. - [LineSegments](https://threejs.org/docs/pages/LineSegments.html.md)
  1491. - [LineSegments2](https://threejs.org/docs/pages/LineSegments2.html.md)
  1492. - [LinearInterpolant](https://threejs.org/docs/pages/LinearInterpolant.html.md)
  1493. - [LoaderUtils](https://threejs.org/docs/pages/LoaderUtils.html.md)
  1494. - [LoadingManager](https://threejs.org/docs/pages/LoadingManager.html.md)
  1495. - [Lut](https://threejs.org/docs/pages/Lut.html.md)
  1496. - [MD2Character](https://threejs.org/docs/pages/MD2Character.html.md)
  1497. - [MD2CharacterComplex](https://threejs.org/docs/pages/MD2CharacterComplex.html.md)
  1498. - [MarchingCubes](https://threejs.org/docs/pages/MarchingCubes.html.md)
  1499. - [MathUtils](https://threejs.org/docs/pages/MathUtils.html.md)
  1500. - [Mesh](https://threejs.org/docs/pages/Mesh.html.md)
  1501. - [MeshSurfaceSampler](https://threejs.org/docs/pages/MeshSurfaceSampler.html.md)
  1502. - [MorphAnimMesh](https://threejs.org/docs/pages/MorphAnimMesh.html.md)
  1503. - [MorphBlendMesh](https://threejs.org/docs/pages/MorphBlendMesh.html.md)
  1504. - [NURBSSurface](https://threejs.org/docs/pages/NURBSSurface.html.md)
  1505. - [NURBSVolume](https://threejs.org/docs/pages/NURBSVolume.html.md)
  1506. - [NodeAttribute](https://threejs.org/docs/pages/NodeAttribute.html.md)
  1507. - [NodeBuilder](https://threejs.org/docs/pages/NodeBuilder.html.md)
  1508. - [NodeCache](https://threejs.org/docs/pages/NodeCache.html.md)
  1509. - [NodeCode](https://threejs.org/docs/pages/NodeCode.html.md)
  1510. - [NodeError](https://threejs.org/docs/pages/NodeError.html.md)
  1511. - [NodeFrame](https://threejs.org/docs/pages/NodeFrame.html.md)
  1512. - [NodeFunction](https://threejs.org/docs/pages/NodeFunction.html.md)
  1513. - [NodeFunctionInput](https://threejs.org/docs/pages/NodeFunctionInput.html.md)
  1514. - [NodeMaterialObserver](https://threejs.org/docs/pages/NodeMaterialObserver.html.md)
  1515. - [NodeParser](https://threejs.org/docs/pages/NodeParser.html.md)
  1516. - [NodeUniform](https://threejs.org/docs/pages/NodeUniform.html.md)
  1517. - [NodeVar](https://threejs.org/docs/pages/NodeVar.html.md)
  1518. - [NodeVarying](https://threejs.org/docs/pages/NodeVarying.html.md)
  1519. - [NumberKeyframeTrack](https://threejs.org/docs/pages/NumberKeyframeTrack.html.md)
  1520. - [OBB](https://threejs.org/docs/pages/OBB.html.md)
  1521. - [OBJExporter](https://threejs.org/docs/pages/OBJExporter.html.md)
  1522. - [Object3D](https://threejs.org/docs/pages/Object3D.html.md)
  1523. - [Octree](https://threejs.org/docs/pages/Octree.html.md)
  1524. - [OculusHandModel](https://threejs.org/docs/pages/OculusHandModel.html.md)
  1525. - [OculusHandPointerModel](https://threejs.org/docs/pages/OculusHandPointerModel.html.md)
  1526. - [PLYExporter](https://threejs.org/docs/pages/PLYExporter.html.md)
  1527. - [PMREMGenerator](https://threejs.org/docs/pages/PMREMGenerator.html.md)
  1528. - [Path](https://threejs.org/docs/pages/Path.html.md)
  1529. - [PhongLightingModel](https://threejs.org/docs/pages/PhongLightingModel.html.md)
  1530. - [PhysicalLightingModel](https://threejs.org/docs/pages/PhysicalLightingModel.html.md)
  1531. - [PointLightShadow](https://threejs.org/docs/pages/PointLightShadow.html.md)
  1532. - [Points](https://threejs.org/docs/pages/Points.html.md)
  1533. - [PostProcessing](https://threejs.org/docs/pages/PostProcessing.html.md)
  1534. - [ProgressiveLightMap](https://threejs.org/docs/pages/ProgressiveLightMap.html.md)
  1535. - [Projector](https://threejs.org/docs/pages/Projector.html.md)
  1536. - [PropertyBinding](https://threejs.org/docs/pages/PropertyBinding.html.md)
  1537. - [PropertyMixer](https://threejs.org/docs/pages/PropertyMixer.html.md)
  1538. - [QuadMesh](https://threejs.org/docs/pages/QuadMesh.html.md)
  1539. - [RapierPhysics](https://threejs.org/docs/pages/RapierPhysics.html.md)
  1540. - [RectAreaLightTexturesLib](https://threejs.org/docs/pages/RectAreaLightTexturesLib.html.md)
  1541. - [RectAreaLightUniformsLib](https://threejs.org/docs/pages/RectAreaLightUniformsLib.html.md)
  1542. - [Reflector](https://threejs.org/docs/pages/Reflector.html.md)
  1543. - [Refractor](https://threejs.org/docs/pages/Refractor.html.md)
  1544. - [RenderPipeline](https://threejs.org/docs/pages/RenderPipeline.html.md)
  1545. - [RenderTarget](https://threejs.org/docs/pages/RenderTarget.html.md)
  1546. - [RenderTarget3D](https://threejs.org/docs/pages/RenderTarget3D.html.md)
  1547. - [Renderer](https://threejs.org/docs/pages/Renderer.html.md)
  1548. - [RoomEnvironment](https://threejs.org/docs/pages/RoomEnvironment.html.md)
  1549. - [SSSLightingModel](https://threejs.org/docs/pages/SSSLightingModel.html.md)
  1550. - [STLExporter](https://threejs.org/docs/pages/STLExporter.html.md)
  1551. - [SVGObject](https://threejs.org/docs/pages/SVGObject.html.md)
  1552. - [SVGRenderer](https://threejs.org/docs/pages/SVGRenderer.html.md)
  1553. - [Scene](https://threejs.org/docs/pages/Scene.html.md)
  1554. - [SceneOptimizer](https://threejs.org/docs/pages/SceneOptimizer.html.md)
  1555. - [SelectionBox](https://threejs.org/docs/pages/SelectionBox.html.md)
  1556. - [ShadowMapViewer](https://threejs.org/docs/pages/ShadowMapViewer.html.md)
  1557. - [ShadowMaskModel](https://threejs.org/docs/pages/ShadowMaskModel.html.md)
  1558. - [ShadowMesh](https://threejs.org/docs/pages/ShadowMesh.html.md)
  1559. - [Shape](https://threejs.org/docs/pages/Shape.html.md)
  1560. - [ShapePath](https://threejs.org/docs/pages/ShapePath.html.md)
  1561. - [ShapeUtils](https://threejs.org/docs/pages/ShapeUtils.html.md)
  1562. - [SimplexNoise](https://threejs.org/docs/pages/SimplexNoise.html.md)
  1563. - [SimplifyModifier](https://threejs.org/docs/pages/SimplifyModifier.html.md)
  1564. - [Skeleton](https://threejs.org/docs/pages/Skeleton.html.md)
  1565. - [SkinnedMesh](https://threejs.org/docs/pages/SkinnedMesh.html.md)
  1566. - [Sky](https://threejs.org/docs/pages/Sky.html.md)
  1567. - [SkyMesh](https://threejs.org/docs/pages/SkyMesh.html.md)
  1568. - [Source](https://threejs.org/docs/pages/Source.html.md)
  1569. - [Spherical](https://threejs.org/docs/pages/Spherical.html.md)
  1570. - [SphericalHarmonics3](https://threejs.org/docs/pages/SphericalHarmonics3.html.md)
  1571. - [SpotLightShadow](https://threejs.org/docs/pages/SpotLightShadow.html.md)
  1572. - [Sprite](https://threejs.org/docs/pages/Sprite.html.md)
  1573. - [StackTrace](https://threejs.org/docs/pages/StackTrace.html.md)
  1574. - [StorageBufferAttribute](https://threejs.org/docs/pages/StorageBufferAttribute.html.md)
  1575. - [StorageInstancedBufferAttribute](https://threejs.org/docs/pages/StorageInstancedBufferAttribute.html.md)
  1576. - [StringKeyframeTrack](https://threejs.org/docs/pages/StringKeyframeTrack.html.md)
  1577. - [TSL](https://threejs.org/docs/pages/TSL.html.md)
  1578. - [Tab](https://threejs.org/docs/pages/Tab.html.md)
  1579. - [TessellateModifier](https://threejs.org/docs/pages/TessellateModifier.html.md)
  1580. - [TextureUtils](https://threejs.org/docs/pages/TextureUtils.html.md)
  1581. - [TiledLighting](https://threejs.org/docs/pages/TiledLighting.html.md)
  1582. - [Timer](https://threejs.org/docs/pages/Timer.html.md)
  1583. - [TimestampQueryPool](https://threejs.org/docs/pages/TimestampQueryPool.html.md)
  1584. - [ToonLightingModel](https://threejs.org/docs/pages/ToonLightingModel.html.md)
  1585. - [TorusKnot](https://threejs.org/docs/pages/TorusKnot.html.md)
  1586. - [Transpiler](https://threejs.org/docs/pages/Transpiler.html.md)
  1587. - [TrefoilKnot](https://threejs.org/docs/pages/TrefoilKnot.html.md)
  1588. - [TrefoilPolynomialKnot](https://threejs.org/docs/pages/TrefoilPolynomialKnot.html.md)
  1589. - [TubePainter](https://threejs.org/docs/pages/TubePainter.html.md)
  1590. - [USDComposer](https://threejs.org/docs/pages/USDComposer.html.md)
  1591. - [USDZExporter](https://threejs.org/docs/pages/USDZExporter.html.md)
  1592. - [Uint16BufferAttribute](https://threejs.org/docs/pages/Uint16BufferAttribute.html.md)
  1593. - [Uint32BufferAttribute](https://threejs.org/docs/pages/Uint32BufferAttribute.html.md)
  1594. - [Uint8BufferAttribute](https://threejs.org/docs/pages/Uint8BufferAttribute.html.md)
  1595. - [Uint8ClampedBufferAttribute](https://threejs.org/docs/pages/Uint8ClampedBufferAttribute.html.md)
  1596. - [Uniform](https://threejs.org/docs/pages/Uniform.html.md)
  1597. - [UniformsGroup](https://threejs.org/docs/pages/UniformsGroup.html.md)
  1598. - [VRButton](https://threejs.org/docs/pages/VRButton.html.md)
  1599. - [Volume](https://threejs.org/docs/pages/Volume.html.md)
  1600. - [VolumeSlice](https://threejs.org/docs/pages/VolumeSlice.html.md)
  1601. - [VolumetricLightingModel](https://threejs.org/docs/pages/VolumetricLightingModel.html.md)
  1602. - [WGSLNodeBuilder](https://threejs.org/docs/pages/WGSLNodeBuilder.html.md)
  1603. - [WGSLNodeFunction](https://threejs.org/docs/pages/WGSLNodeFunction.html.md)
  1604. - [WGSLNodeParser](https://threejs.org/docs/pages/WGSLNodeParser.html.md)
  1605. - [Water](https://threejs.org/docs/pages/Water.html.md)
  1606. - [WaterMesh](https://threejs.org/docs/pages/WaterMesh.html.md)
  1607. - [WebGL](https://threejs.org/docs/pages/WebGL.html.md)
  1608. - [WebGL3DRenderTarget](https://threejs.org/docs/pages/WebGL3DRenderTarget.html.md)
  1609. - [WebGLArrayRenderTarget](https://threejs.org/docs/pages/WebGLArrayRenderTarget.html.md)
  1610. - [WebGLCubeRenderTarget](https://threejs.org/docs/pages/WebGLCubeRenderTarget.html.md)
  1611. - [WebGLRenderTarget](https://threejs.org/docs/pages/WebGLRenderTarget.html.md)
  1612. - [WebGLRenderer](https://threejs.org/docs/pages/WebGLRenderer.html.md)
  1613. - [WebGLTimestampQueryPool](https://threejs.org/docs/pages/WebGLTimestampQueryPool.html.md)
  1614. - [WebGPU](https://threejs.org/docs/pages/WebGPU.html.md)
  1615. - [WebGPURenderer](https://threejs.org/docs/pages/WebGPURenderer.html.md)
  1616. - [WebGPUTimestampQueryPool](https://threejs.org/docs/pages/WebGPUTimestampQueryPool.html.md)
  1617. - [Wireframe](https://threejs.org/docs/pages/Wireframe.html.md)
  1618. - [WireframeGeometry2](https://threejs.org/docs/pages/WireframeGeometry2.html.md)
  1619. - [WorkerPool](https://threejs.org/docs/pages/WorkerPool.html.md)
  1620. ### Cameras
  1621. - [ArrayCamera](https://threejs.org/docs/pages/ArrayCamera.html.md)
  1622. - [Camera](https://threejs.org/docs/pages/Camera.html.md)
  1623. - [CubeCamera](https://threejs.org/docs/pages/CubeCamera.html.md)
  1624. - [OrthographicCamera](https://threejs.org/docs/pages/OrthographicCamera.html.md)
  1625. - [PerspectiveCamera](https://threejs.org/docs/pages/PerspectiveCamera.html.md)
  1626. - [StereoCamera](https://threejs.org/docs/pages/StereoCamera.html.md)
  1627. ### Lights
  1628. - [AmbientLight](https://threejs.org/docs/pages/AmbientLight.html.md)
  1629. - [DirectionalLight](https://threejs.org/docs/pages/DirectionalLight.html.md)
  1630. - [HemisphereLight](https://threejs.org/docs/pages/HemisphereLight.html.md)
  1631. - [IESSpotLight](https://threejs.org/docs/pages/IESSpotLight.html.md)
  1632. - [Light](https://threejs.org/docs/pages/Light.html.md)
  1633. - [PointLight](https://threejs.org/docs/pages/PointLight.html.md)
  1634. - [ProjectorLight](https://threejs.org/docs/pages/ProjectorLight.html.md)
  1635. - [RectAreaLight](https://threejs.org/docs/pages/RectAreaLight.html.md)
  1636. - [SpotLight](https://threejs.org/docs/pages/SpotLight.html.md)
  1637. - [XREstimatedLight](https://threejs.org/docs/pages/XREstimatedLight.html.md)
  1638. ### Materials
  1639. - [LDrawConditionalLineMaterial](https://threejs.org/docs/pages/LDrawConditionalLineMaterial.html.md)
  1640. - [Line2NodeMaterial](https://threejs.org/docs/pages/Line2NodeMaterial.html.md)
  1641. - [LineBasicMaterial](https://threejs.org/docs/pages/LineBasicMaterial.html.md)
  1642. - [LineBasicNodeMaterial](https://threejs.org/docs/pages/LineBasicNodeMaterial.html.md)
  1643. - [LineDashedMaterial](https://threejs.org/docs/pages/LineDashedMaterial.html.md)
  1644. - [LineDashedNodeMaterial](https://threejs.org/docs/pages/LineDashedNodeMaterial.html.md)
  1645. - [LineMaterial](https://threejs.org/docs/pages/LineMaterial.html.md)
  1646. - [Material](https://threejs.org/docs/pages/Material.html.md)
  1647. - [MeshBasicMaterial](https://threejs.org/docs/pages/MeshBasicMaterial.html.md)
  1648. - [MeshBasicNodeMaterial](https://threejs.org/docs/pages/MeshBasicNodeMaterial.html.md)
  1649. - [MeshDepthMaterial](https://threejs.org/docs/pages/MeshDepthMaterial.html.md)
  1650. - [MeshDistanceMaterial](https://threejs.org/docs/pages/MeshDistanceMaterial.html.md)
  1651. - [MeshLambertMaterial](https://threejs.org/docs/pages/MeshLambertMaterial.html.md)
  1652. - [MeshLambertNodeMaterial](https://threejs.org/docs/pages/MeshLambertNodeMaterial.html.md)
  1653. - [MeshMatcapMaterial](https://threejs.org/docs/pages/MeshMatcapMaterial.html.md)
  1654. - [MeshMatcapNodeMaterial](https://threejs.org/docs/pages/MeshMatcapNodeMaterial.html.md)
  1655. - [MeshNormalMaterial](https://threejs.org/docs/pages/MeshNormalMaterial.html.md)
  1656. - [MeshNormalNodeMaterial](https://threejs.org/docs/pages/MeshNormalNodeMaterial.html.md)
  1657. - [MeshPhongMaterial](https://threejs.org/docs/pages/MeshPhongMaterial.html.md)
  1658. - [MeshPhongNodeMaterial](https://threejs.org/docs/pages/MeshPhongNodeMaterial.html.md)
  1659. - [MeshPhysicalMaterial](https://threejs.org/docs/pages/MeshPhysicalMaterial.html.md)
  1660. - [MeshPhysicalNodeMaterial](https://threejs.org/docs/pages/MeshPhysicalNodeMaterial.html.md)
  1661. - [MeshSSSNodeMaterial](https://threejs.org/docs/pages/MeshSSSNodeMaterial.html.md)
  1662. - [MeshStandardMaterial](https://threejs.org/docs/pages/MeshStandardMaterial.html.md)
  1663. - [MeshStandardNodeMaterial](https://threejs.org/docs/pages/MeshStandardNodeMaterial.html.md)
  1664. - [MeshToonMaterial](https://threejs.org/docs/pages/MeshToonMaterial.html.md)
  1665. - [MeshToonNodeMaterial](https://threejs.org/docs/pages/MeshToonNodeMaterial.html.md)
  1666. - [NodeMaterial](https://threejs.org/docs/pages/NodeMaterial.html.md)
  1667. - [PointsMaterial](https://threejs.org/docs/pages/PointsMaterial.html.md)
  1668. - [PointsNodeMaterial](https://threejs.org/docs/pages/PointsNodeMaterial.html.md)
  1669. - [RawShaderMaterial](https://threejs.org/docs/pages/RawShaderMaterial.html.md)
  1670. - [ShaderMaterial](https://threejs.org/docs/pages/ShaderMaterial.html.md)
  1671. - [ShadowMaterial](https://threejs.org/docs/pages/ShadowMaterial.html.md)
  1672. - [ShadowNodeMaterial](https://threejs.org/docs/pages/ShadowNodeMaterial.html.md)
  1673. - [SpriteMaterial](https://threejs.org/docs/pages/SpriteMaterial.html.md)
  1674. - [SpriteNodeMaterial](https://threejs.org/docs/pages/SpriteNodeMaterial.html.md)
  1675. - [VolumeNodeMaterial](https://threejs.org/docs/pages/VolumeNodeMaterial.html.md)
  1676. - [WoodNodeMaterial](https://threejs.org/docs/pages/WoodNodeMaterial.html.md)
  1677. ### Geometries
  1678. - [BoxGeometry](https://threejs.org/docs/pages/BoxGeometry.html.md)
  1679. - [BoxLineGeometry](https://threejs.org/docs/pages/BoxLineGeometry.html.md)
  1680. - [BufferGeometry](https://threejs.org/docs/pages/BufferGeometry.html.md)
  1681. - [CapsuleGeometry](https://threejs.org/docs/pages/CapsuleGeometry.html.md)
  1682. - [CircleGeometry](https://threejs.org/docs/pages/CircleGeometry.html.md)
  1683. - [ConeGeometry](https://threejs.org/docs/pages/ConeGeometry.html.md)
  1684. - [ConvexGeometry](https://threejs.org/docs/pages/ConvexGeometry.html.md)
  1685. - [CylinderGeometry](https://threejs.org/docs/pages/CylinderGeometry.html.md)
  1686. - [DecalGeometry](https://threejs.org/docs/pages/DecalGeometry.html.md)
  1687. - [DodecahedronGeometry](https://threejs.org/docs/pages/DodecahedronGeometry.html.md)
  1688. - [EdgesGeometry](https://threejs.org/docs/pages/EdgesGeometry.html.md)
  1689. - [ExtrudeGeometry](https://threejs.org/docs/pages/ExtrudeGeometry.html.md)
  1690. - [IcosahedronGeometry](https://threejs.org/docs/pages/IcosahedronGeometry.html.md)
  1691. - [InstancedBufferGeometry](https://threejs.org/docs/pages/InstancedBufferGeometry.html.md)
  1692. - [LatheGeometry](https://threejs.org/docs/pages/LatheGeometry.html.md)
  1693. - [LineGeometry](https://threejs.org/docs/pages/LineGeometry.html.md)
  1694. - [LineSegmentsGeometry](https://threejs.org/docs/pages/LineSegmentsGeometry.html.md)
  1695. - [OctahedronGeometry](https://threejs.org/docs/pages/OctahedronGeometry.html.md)
  1696. - [ParametricGeometry](https://threejs.org/docs/pages/ParametricGeometry.html.md)
  1697. - [PlaneGeometry](https://threejs.org/docs/pages/PlaneGeometry.html.md)
  1698. - [PolyhedronGeometry](https://threejs.org/docs/pages/PolyhedronGeometry.html.md)
  1699. - [RingGeometry](https://threejs.org/docs/pages/RingGeometry.html.md)
  1700. - [RollerCoasterGeometry](https://threejs.org/docs/pages/RollerCoasterGeometry.html.md)
  1701. - [RollerCoasterLiftersGeometry](https://threejs.org/docs/pages/RollerCoasterLiftersGeometry.html.md)
  1702. - [RollerCoasterShadowGeometry](https://threejs.org/docs/pages/RollerCoasterShadowGeometry.html.md)
  1703. - [RoundedBoxGeometry](https://threejs.org/docs/pages/RoundedBoxGeometry.html.md)
  1704. - [ShapeGeometry](https://threejs.org/docs/pages/ShapeGeometry.html.md)
  1705. - [SkyGeometry](https://threejs.org/docs/pages/SkyGeometry.html.md)
  1706. - [SphereGeometry](https://threejs.org/docs/pages/SphereGeometry.html.md)
  1707. - [TeapotGeometry](https://threejs.org/docs/pages/TeapotGeometry.html.md)
  1708. - [TetrahedronGeometry](https://threejs.org/docs/pages/TetrahedronGeometry.html.md)
  1709. - [TextGeometry](https://threejs.org/docs/pages/TextGeometry.html.md)
  1710. - [TorusGeometry](https://threejs.org/docs/pages/TorusGeometry.html.md)
  1711. - [TorusKnotGeometry](https://threejs.org/docs/pages/TorusKnotGeometry.html.md)
  1712. - [TreesGeometry](https://threejs.org/docs/pages/TreesGeometry.html.md)
  1713. - [TubeGeometry](https://threejs.org/docs/pages/TubeGeometry.html.md)
  1714. - [WireframeGeometry](https://threejs.org/docs/pages/WireframeGeometry.html.md)
  1715. ### Textures
  1716. - [CanvasTexture](https://threejs.org/docs/pages/CanvasTexture.html.md)
  1717. - [CompressedArrayTexture](https://threejs.org/docs/pages/CompressedArrayTexture.html.md)
  1718. - [CompressedCubeTexture](https://threejs.org/docs/pages/CompressedCubeTexture.html.md)
  1719. - [CompressedTexture](https://threejs.org/docs/pages/CompressedTexture.html.md)
  1720. - [CubeDepthTexture](https://threejs.org/docs/pages/CubeDepthTexture.html.md)
  1721. - [CubeTexture](https://threejs.org/docs/pages/CubeTexture.html.md)
  1722. - [Data3DTexture](https://threejs.org/docs/pages/Data3DTexture.html.md)
  1723. - [DataArrayTexture](https://threejs.org/docs/pages/DataArrayTexture.html.md)
  1724. - [DataTexture](https://threejs.org/docs/pages/DataTexture.html.md)
  1725. - [DepthTexture](https://threejs.org/docs/pages/DepthTexture.html.md)
  1726. - [ExternalTexture](https://threejs.org/docs/pages/ExternalTexture.html.md)
  1727. - [FlakesTexture](https://threejs.org/docs/pages/FlakesTexture.html.md)
  1728. - [FramebufferTexture](https://threejs.org/docs/pages/FramebufferTexture.html.md)
  1729. - [Storage3DTexture](https://threejs.org/docs/pages/Storage3DTexture.html.md)
  1730. - [StorageArrayTexture](https://threejs.org/docs/pages/StorageArrayTexture.html.md)
  1731. - [StorageTexture](https://threejs.org/docs/pages/StorageTexture.html.md)
  1732. - [Texture](https://threejs.org/docs/pages/Texture.html.md)
  1733. - [VideoFrameTexture](https://threejs.org/docs/pages/VideoFrameTexture.html.md)
  1734. - [VideoTexture](https://threejs.org/docs/pages/VideoTexture.html.md)
  1735. ### Loaders
  1736. - [AMFLoader](https://threejs.org/docs/pages/AMFLoader.html.md)
  1737. - [AnimationLoader](https://threejs.org/docs/pages/AnimationLoader.html.md)
  1738. - [AudioLoader](https://threejs.org/docs/pages/AudioLoader.html.md)
  1739. - [BVHLoader](https://threejs.org/docs/pages/BVHLoader.html.md)
  1740. - [BufferGeometryLoader](https://threejs.org/docs/pages/BufferGeometryLoader.html.md)
  1741. - [ColladaLoader](https://threejs.org/docs/pages/ColladaLoader.html.md)
  1742. - [CompressedTextureLoader](https://threejs.org/docs/pages/CompressedTextureLoader.html.md)
  1743. - [CubeTextureLoader](https://threejs.org/docs/pages/CubeTextureLoader.html.md)
  1744. - [DDSLoader](https://threejs.org/docs/pages/DDSLoader.html.md)
  1745. - [DRACOLoader](https://threejs.org/docs/pages/DRACOLoader.html.md)
  1746. - [DataTextureLoader](https://threejs.org/docs/pages/DataTextureLoader.html.md)
  1747. - [EXRLoader](https://threejs.org/docs/pages/EXRLoader.html.md)
  1748. - [FBXLoader](https://threejs.org/docs/pages/FBXLoader.html.md)
  1749. - [FileLoader](https://threejs.org/docs/pages/FileLoader.html.md)
  1750. - [FontLoader](https://threejs.org/docs/pages/FontLoader.html.md)
  1751. - [GCodeLoader](https://threejs.org/docs/pages/GCodeLoader.html.md)
  1752. - [GLTFLoader](https://threejs.org/docs/pages/GLTFLoader.html.md)
  1753. - [HDRCubeTextureLoader](https://threejs.org/docs/pages/HDRCubeTextureLoader.html.md)
  1754. - [HDRLoader](https://threejs.org/docs/pages/HDRLoader.html.md)
  1755. - [IESLoader](https://threejs.org/docs/pages/IESLoader.html.md)
  1756. - [ImageBitmapLoader](https://threejs.org/docs/pages/ImageBitmapLoader.html.md)
  1757. - [ImageLoader](https://threejs.org/docs/pages/ImageLoader.html.md)
  1758. - [KMZLoader](https://threejs.org/docs/pages/KMZLoader.html.md)
  1759. - [KTX2Loader](https://threejs.org/docs/pages/KTX2Loader.html.md)
  1760. - [KTXLoader](https://threejs.org/docs/pages/KTXLoader.html.md)
  1761. - [LDrawLoader](https://threejs.org/docs/pages/LDrawLoader.html.md)
  1762. - [LUT3dlLoader](https://threejs.org/docs/pages/LUT3dlLoader.html.md)
  1763. - [LUTCubeLoader](https://threejs.org/docs/pages/LUTCubeLoader.html.md)
  1764. - [LUTImageLoader](https://threejs.org/docs/pages/LUTImageLoader.html.md)
  1765. - [LWOLoader](https://threejs.org/docs/pages/LWOLoader.html.md)
  1766. - [Loader](https://threejs.org/docs/pages/Loader.html.md)
  1767. - [LottieLoader](https://threejs.org/docs/pages/LottieLoader.html.md)
  1768. - [MD2Loader](https://threejs.org/docs/pages/MD2Loader.html.md)
  1769. - [MDDLoader](https://threejs.org/docs/pages/MDDLoader.html.md)
  1770. - [MTLLoader](https://threejs.org/docs/pages/MTLLoader.html.md)
  1771. - [MaterialLoader](https://threejs.org/docs/pages/MaterialLoader.html.md)
  1772. - [MaterialXLoader](https://threejs.org/docs/pages/MaterialXLoader.html.md)
  1773. - [NRRDLoader](https://threejs.org/docs/pages/NRRDLoader.html.md)
  1774. - [NodeLoader](https://threejs.org/docs/pages/NodeLoader.html.md)
  1775. - [NodeMaterialLoader](https://threejs.org/docs/pages/NodeMaterialLoader.html.md)
  1776. - [NodeObjectLoader](https://threejs.org/docs/pages/NodeObjectLoader.html.md)
  1777. - [OBJLoader](https://threejs.org/docs/pages/OBJLoader.html.md)
  1778. - [ObjectLoader](https://threejs.org/docs/pages/ObjectLoader.html.md)
  1779. - [PCDLoader](https://threejs.org/docs/pages/PCDLoader.html.md)
  1780. - [PDBLoader](https://threejs.org/docs/pages/PDBLoader.html.md)
  1781. - [PLYLoader](https://threejs.org/docs/pages/PLYLoader.html.md)
  1782. - [PVRLoader](https://threejs.org/docs/pages/PVRLoader.html.md)
  1783. - [Rhino3dmLoader](https://threejs.org/docs/pages/Rhino3dmLoader.html.md)
  1784. - [STLLoader](https://threejs.org/docs/pages/STLLoader.html.md)
  1785. - [SVGLoader](https://threejs.org/docs/pages/SVGLoader.html.md)
  1786. - [TDSLoader](https://threejs.org/docs/pages/TDSLoader.html.md)
  1787. - [TGALoader](https://threejs.org/docs/pages/TGALoader.html.md)
  1788. - [TIFFLoader](https://threejs.org/docs/pages/TIFFLoader.html.md)
  1789. - [TTFLoader](https://threejs.org/docs/pages/TTFLoader.html.md)
  1790. - [TextureLoader](https://threejs.org/docs/pages/TextureLoader.html.md)
  1791. - [ThreeMFLoader](https://threejs.org/docs/pages/ThreeMFLoader.html.md)
  1792. - [USDLoader](https://threejs.org/docs/pages/USDLoader.html.md)
  1793. - [UltraHDRLoader](https://threejs.org/docs/pages/UltraHDRLoader.html.md)
  1794. - [VOXLoader](https://threejs.org/docs/pages/VOXLoader.html.md)
  1795. - [VRMLLoader](https://threejs.org/docs/pages/VRMLLoader.html.md)
  1796. - [VTKLoader](https://threejs.org/docs/pages/VTKLoader.html.md)
  1797. - [XYZLoader](https://threejs.org/docs/pages/XYZLoader.html.md)
  1798. ### Controls
  1799. - [ArcballControls](https://threejs.org/docs/pages/ArcballControls.html.md)
  1800. - [Controls](https://threejs.org/docs/pages/Controls.html.md)
  1801. - [DragControls](https://threejs.org/docs/pages/DragControls.html.md)
  1802. - [FirstPersonControls](https://threejs.org/docs/pages/FirstPersonControls.html.md)
  1803. - [FlyControls](https://threejs.org/docs/pages/FlyControls.html.md)
  1804. - [MapControls](https://threejs.org/docs/pages/MapControls.html.md)
  1805. - [OrbitControls](https://threejs.org/docs/pages/OrbitControls.html.md)
  1806. - [PointerLockControls](https://threejs.org/docs/pages/PointerLockControls.html.md)
  1807. - [TrackballControls](https://threejs.org/docs/pages/TrackballControls.html.md)
  1808. - [TransformControls](https://threejs.org/docs/pages/TransformControls.html.md)
  1809. ### Helpers
  1810. - [AnimationPathHelper](https://threejs.org/docs/pages/AnimationPathHelper.html.md)
  1811. - [ArrowHelper](https://threejs.org/docs/pages/ArrowHelper.html.md)
  1812. - [AxesHelper](https://threejs.org/docs/pages/AxesHelper.html.md)
  1813. - [Box3Helper](https://threejs.org/docs/pages/Box3Helper.html.md)
  1814. - [BoxHelper](https://threejs.org/docs/pages/BoxHelper.html.md)
  1815. - [CCDIKHelper](https://threejs.org/docs/pages/CCDIKHelper.html.md)
  1816. - [CSMHelper](https://threejs.org/docs/pages/CSMHelper.html.md)
  1817. - [CameraHelper](https://threejs.org/docs/pages/CameraHelper.html.md)
  1818. - [DirectionalLightHelper](https://threejs.org/docs/pages/DirectionalLightHelper.html.md)
  1819. - [GridHelper](https://threejs.org/docs/pages/GridHelper.html.md)
  1820. - [HemisphereLightHelper](https://threejs.org/docs/pages/HemisphereLightHelper.html.md)
  1821. - [LightProbeHelper](https://threejs.org/docs/pages/LightProbeHelper.html.md)
  1822. - [OctreeHelper](https://threejs.org/docs/pages/OctreeHelper.html.md)
  1823. - [PlaneHelper](https://threejs.org/docs/pages/PlaneHelper.html.md)
  1824. - [PointLightHelper](https://threejs.org/docs/pages/PointLightHelper.html.md)
  1825. - [PolarGridHelper](https://threejs.org/docs/pages/PolarGridHelper.html.md)
  1826. - [PositionalAudioHelper](https://threejs.org/docs/pages/PositionalAudioHelper.html.md)
  1827. - [RapierHelper](https://threejs.org/docs/pages/RapierHelper.html.md)
  1828. - [RectAreaLightHelper](https://threejs.org/docs/pages/RectAreaLightHelper.html.md)
  1829. - [SelectionHelper](https://threejs.org/docs/pages/SelectionHelper.html.md)
  1830. - [SkeletonHelper](https://threejs.org/docs/pages/SkeletonHelper.html.md)
  1831. - [SpotLightHelper](https://threejs.org/docs/pages/SpotLightHelper.html.md)
  1832. - [TextureHelper](https://threejs.org/docs/pages/TextureHelper.html.md)
  1833. - [TileShadowNodeHelper](https://threejs.org/docs/pages/TileShadowNodeHelper.html.md)
  1834. - [VertexNormalsHelper](https://threejs.org/docs/pages/VertexNormalsHelper.html.md)
  1835. - [VertexTangentsHelper](https://threejs.org/docs/pages/VertexTangentsHelper.html.md)
  1836. - [ViewHelper](https://threejs.org/docs/pages/ViewHelper.html.md)
  1837. ### Animation
  1838. - [AnimationAction](https://threejs.org/docs/pages/AnimationAction.html.md)
  1839. - [AnimationClip](https://threejs.org/docs/pages/AnimationClip.html.md)
  1840. - [AnimationClipCreator](https://threejs.org/docs/pages/AnimationClipCreator.html.md)
  1841. - [AnimationMixer](https://threejs.org/docs/pages/AnimationMixer.html.md)
  1842. - [AnimationObjectGroup](https://threejs.org/docs/pages/AnimationObjectGroup.html.md)
  1843. - [AnimationUtils](https://threejs.org/docs/pages/AnimationUtils.html.md)
  1844. ### Audio
  1845. - [Audio](https://threejs.org/docs/pages/Audio.html.md)
  1846. - [AudioAnalyser](https://threejs.org/docs/pages/AudioAnalyser.html.md)
  1847. - [AudioContext](https://threejs.org/docs/pages/AudioContext.html.md)
  1848. - [AudioListener](https://threejs.org/docs/pages/AudioListener.html.md)
  1849. - [PositionalAudio](https://threejs.org/docs/pages/PositionalAudio.html.md)
  1850. ### Math
  1851. - [Box2](https://threejs.org/docs/pages/Box2.html.md)
  1852. - [Box3](https://threejs.org/docs/pages/Box3.html.md)
  1853. - [Color](https://threejs.org/docs/pages/Color.html.md)
  1854. - [Euler](https://threejs.org/docs/pages/Euler.html.md)
  1855. - [Frustum](https://threejs.org/docs/pages/Frustum.html.md)
  1856. - [FrustumArray](https://threejs.org/docs/pages/FrustumArray.html.md)
  1857. - [Matrix2](https://threejs.org/docs/pages/Matrix2.html.md)
  1858. - [Matrix3](https://threejs.org/docs/pages/Matrix3.html.md)
  1859. - [Matrix4](https://threejs.org/docs/pages/Matrix4.html.md)
  1860. - [Plane](https://threejs.org/docs/pages/Plane.html.md)
  1861. - [Quaternion](https://threejs.org/docs/pages/Quaternion.html.md)
  1862. - [QuaternionKeyframeTrack](https://threejs.org/docs/pages/QuaternionKeyframeTrack.html.md)
  1863. - [QuaternionLinearInterpolant](https://threejs.org/docs/pages/QuaternionLinearInterpolant.html.md)
  1864. - [Ray](https://threejs.org/docs/pages/Ray.html.md)
  1865. - [Raycaster](https://threejs.org/docs/pages/Raycaster.html.md)
  1866. - [Sphere](https://threejs.org/docs/pages/Sphere.html.md)
  1867. - [Triangle](https://threejs.org/docs/pages/Triangle.html.md)
  1868. - [Vector2](https://threejs.org/docs/pages/Vector2.html.md)
  1869. - [Vector3](https://threejs.org/docs/pages/Vector3.html.md)
  1870. - [Vector4](https://threejs.org/docs/pages/Vector4.html.md)
  1871. - [VectorKeyframeTrack](https://threejs.org/docs/pages/VectorKeyframeTrack.html.md)
  1872. ### Curves
  1873. - [ArcCurve](https://threejs.org/docs/pages/ArcCurve.html.md)
  1874. - [CatmullRomCurve3](https://threejs.org/docs/pages/CatmullRomCurve3.html.md)
  1875. - [CubicBezierCurve](https://threejs.org/docs/pages/CubicBezierCurve.html.md)
  1876. - [CubicBezierCurve3](https://threejs.org/docs/pages/CubicBezierCurve3.html.md)
  1877. - [Curve](https://threejs.org/docs/pages/Curve.html.md)
  1878. - [CurvePath](https://threejs.org/docs/pages/CurvePath.html.md)
  1879. - [EllipseCurve](https://threejs.org/docs/pages/EllipseCurve.html.md)
  1880. - [HeartCurve](https://threejs.org/docs/pages/HeartCurve.html.md)
  1881. - [HelixCurve](https://threejs.org/docs/pages/HelixCurve.html.md)
  1882. - [KnotCurve](https://threejs.org/docs/pages/KnotCurve.html.md)
  1883. - [LineCurve](https://threejs.org/docs/pages/LineCurve.html.md)
  1884. - [LineCurve3](https://threejs.org/docs/pages/LineCurve3.html.md)
  1885. - [NURBSCurve](https://threejs.org/docs/pages/NURBSCurve.html.md)
  1886. - [QuadraticBezierCurve](https://threejs.org/docs/pages/QuadraticBezierCurve.html.md)
  1887. - [QuadraticBezierCurve3](https://threejs.org/docs/pages/QuadraticBezierCurve3.html.md)
  1888. - [SplineCurve](https://threejs.org/docs/pages/SplineCurve.html.md)
  1889. - [VivianiCurve](https://threejs.org/docs/pages/VivianiCurve.html.md)
  1890. ### Effects
  1891. - [AnaglyphEffect](https://threejs.org/docs/pages/AnaglyphEffect.html.md)
  1892. - [AsciiEffect](https://threejs.org/docs/pages/AsciiEffect.html.md)
  1893. - [OutlineEffect](https://threejs.org/docs/pages/OutlineEffect.html.md)
  1894. - [ParallaxBarrierEffect](https://threejs.org/docs/pages/ParallaxBarrierEffect.html.md)
  1895. - [StereoEffect](https://threejs.org/docs/pages/StereoEffect.html.md)
  1896. ### Post-Processing
  1897. - [AfterimagePass](https://threejs.org/docs/pages/AfterimagePass.html.md)
  1898. - [AnaglyphPassNode](https://threejs.org/docs/pages/AnaglyphPassNode.html.md)
  1899. - [BloomPass](https://threejs.org/docs/pages/BloomPass.html.md)
  1900. - [BokehPass](https://threejs.org/docs/pages/BokehPass.html.md)
  1901. - [ClearMaskPass](https://threejs.org/docs/pages/ClearMaskPass.html.md)
  1902. - [ClearPass](https://threejs.org/docs/pages/ClearPass.html.md)
  1903. - [CubeTexturePass](https://threejs.org/docs/pages/CubeTexturePass.html.md)
  1904. - [DotScreenPass](https://threejs.org/docs/pages/DotScreenPass.html.md)
  1905. - [FXAAPass](https://threejs.org/docs/pages/FXAAPass.html.md)
  1906. - [FilmPass](https://threejs.org/docs/pages/FilmPass.html.md)
  1907. - [GTAOPass](https://threejs.org/docs/pages/GTAOPass.html.md)
  1908. - [GlitchPass](https://threejs.org/docs/pages/GlitchPass.html.md)
  1909. - [HalftonePass](https://threejs.org/docs/pages/HalftonePass.html.md)
  1910. - [LUTPass](https://threejs.org/docs/pages/LUTPass.html.md)
  1911. - [MaskPass](https://threejs.org/docs/pages/MaskPass.html.md)
  1912. - [OutlinePass](https://threejs.org/docs/pages/OutlinePass.html.md)
  1913. - [OutputPass](https://threejs.org/docs/pages/OutputPass.html.md)
  1914. - [ParallaxBarrierPassNode](https://threejs.org/docs/pages/ParallaxBarrierPassNode.html.md)
  1915. - [Pass](https://threejs.org/docs/pages/Pass.html.md)
  1916. - [PassNode](https://threejs.org/docs/pages/PassNode.html.md)
  1917. - [PixelationPassNode](https://threejs.org/docs/pages/PixelationPassNode.html.md)
  1918. - [ReflectorForSSRPass](https://threejs.org/docs/pages/ReflectorForSSRPass.html.md)
  1919. - [RenderPass](https://threejs.org/docs/pages/RenderPass.html.md)
  1920. - [RenderPixelatedPass](https://threejs.org/docs/pages/RenderPixelatedPass.html.md)
  1921. - [RenderTransitionPass](https://threejs.org/docs/pages/RenderTransitionPass.html.md)
  1922. - [RetroPassNode](https://threejs.org/docs/pages/RetroPassNode.html.md)
  1923. - [SAOPass](https://threejs.org/docs/pages/SAOPass.html.md)
  1924. - [SMAAPass](https://threejs.org/docs/pages/SMAAPass.html.md)
  1925. - [SSAAPassNode](https://threejs.org/docs/pages/SSAAPassNode.html.md)
  1926. - [SSAARenderPass](https://threejs.org/docs/pages/SSAARenderPass.html.md)
  1927. - [SSAOPass](https://threejs.org/docs/pages/SSAOPass.html.md)
  1928. - [SSRPass](https://threejs.org/docs/pages/SSRPass.html.md)
  1929. - [SavePass](https://threejs.org/docs/pages/SavePass.html.md)
  1930. - [ShaderPass](https://threejs.org/docs/pages/ShaderPass.html.md)
  1931. - [StereoCompositePassNode](https://threejs.org/docs/pages/StereoCompositePassNode.html.md)
  1932. - [StereoPassNode](https://threejs.org/docs/pages/StereoPassNode.html.md)
  1933. - [TAARenderPass](https://threejs.org/docs/pages/TAARenderPass.html.md)
  1934. - [TexturePass](https://threejs.org/docs/pages/TexturePass.html.md)
  1935. - [ToonOutlinePassNode](https://threejs.org/docs/pages/ToonOutlinePassNode.html.md)
  1936. - [UnrealBloomPass](https://threejs.org/docs/pages/UnrealBloomPass.html.md)
  1937. ### Nodes (TSL)
  1938. - [AONode](https://threejs.org/docs/pages/AONode.html.md)
  1939. - [AfterImageNode](https://threejs.org/docs/pages/AfterImageNode.html.md)
  1940. - [AmbientLightNode](https://threejs.org/docs/pages/AmbientLightNode.html.md)
  1941. - [AnalyticLightNode](https://threejs.org/docs/pages/AnalyticLightNode.html.md)
  1942. - [AnamorphicNode](https://threejs.org/docs/pages/AnamorphicNode.html.md)
  1943. - [ArrayElementNode](https://threejs.org/docs/pages/ArrayElementNode.html.md)
  1944. - [ArrayNode](https://threejs.org/docs/pages/ArrayNode.html.md)
  1945. - [AssignNode](https://threejs.org/docs/pages/AssignNode.html.md)
  1946. - [AtomicFunctionNode](https://threejs.org/docs/pages/AtomicFunctionNode.html.md)
  1947. - [AttributeNode](https://threejs.org/docs/pages/AttributeNode.html.md)
  1948. - [BarrierNode](https://threejs.org/docs/pages/BarrierNode.html.md)
  1949. - [BasicEnvironmentNode](https://threejs.org/docs/pages/BasicEnvironmentNode.html.md)
  1950. - [BasicLightMapNode](https://threejs.org/docs/pages/BasicLightMapNode.html.md)
  1951. - [BatchNode](https://threejs.org/docs/pages/BatchNode.html.md)
  1952. - [BilateralBlurNode](https://threejs.org/docs/pages/BilateralBlurNode.html.md)
  1953. - [BitcastNode](https://threejs.org/docs/pages/BitcastNode.html.md)
  1954. - [BitcountNode](https://threejs.org/docs/pages/BitcountNode.html.md)
  1955. - [BloomNode](https://threejs.org/docs/pages/BloomNode.html.md)
  1956. - [BufferAttributeNode](https://threejs.org/docs/pages/BufferAttributeNode.html.md)
  1957. - [BufferNode](https://threejs.org/docs/pages/BufferNode.html.md)
  1958. - [BuiltinNode](https://threejs.org/docs/pages/BuiltinNode.html.md)
  1959. - [BumpMapNode](https://threejs.org/docs/pages/BumpMapNode.html.md)
  1960. - [BypassNode](https://threejs.org/docs/pages/BypassNode.html.md)
  1961. - [CSMShadowNode](https://threejs.org/docs/pages/CSMShadowNode.html.md)
  1962. - [ChromaticAberrationNode](https://threejs.org/docs/pages/ChromaticAberrationNode.html.md)
  1963. - [ClippingNode](https://threejs.org/docs/pages/ClippingNode.html.md)
  1964. - [CodeNode](https://threejs.org/docs/pages/CodeNode.html.md)
  1965. - [ColorSpaceNode](https://threejs.org/docs/pages/ColorSpaceNode.html.md)
  1966. - [ComputeBuiltinNode](https://threejs.org/docs/pages/ComputeBuiltinNode.html.md)
  1967. - [ComputeNode](https://threejs.org/docs/pages/ComputeNode.html.md)
  1968. - [ConditionalNode](https://threejs.org/docs/pages/ConditionalNode.html.md)
  1969. - [ConstNode](https://threejs.org/docs/pages/ConstNode.html.md)
  1970. - [ContextNode](https://threejs.org/docs/pages/ContextNode.html.md)
  1971. - [ConvertNode](https://threejs.org/docs/pages/ConvertNode.html.md)
  1972. - [CubeMapNode](https://threejs.org/docs/pages/CubeMapNode.html.md)
  1973. - [CubeTextureNode](https://threejs.org/docs/pages/CubeTextureNode.html.md)
  1974. - [DenoiseNode](https://threejs.org/docs/pages/DenoiseNode.html.md)
  1975. - [DepthOfFieldNode](https://threejs.org/docs/pages/DepthOfFieldNode.html.md)
  1976. - [DirectionalLightNode](https://threejs.org/docs/pages/DirectionalLightNode.html.md)
  1977. - [DotScreenNode](https://threejs.org/docs/pages/DotScreenNode.html.md)
  1978. - [EnvironmentNode](https://threejs.org/docs/pages/EnvironmentNode.html.md)
  1979. - [EventNode](https://threejs.org/docs/pages/EventNode.html.md)
  1980. - [ExpressionNode](https://threejs.org/docs/pages/ExpressionNode.html.md)
  1981. - [FXAANode](https://threejs.org/docs/pages/FXAANode.html.md)
  1982. - [FilmNode](https://threejs.org/docs/pages/FilmNode.html.md)
  1983. - [FlipNode](https://threejs.org/docs/pages/FlipNode.html.md)
  1984. - [FrontFacingNode](https://threejs.org/docs/pages/FrontFacingNode.html.md)
  1985. - [FunctionCallNode](https://threejs.org/docs/pages/FunctionCallNode.html.md)
  1986. - [FunctionNode](https://threejs.org/docs/pages/FunctionNode.html.md)
  1987. - [FunctionOverloadingNode](https://threejs.org/docs/pages/FunctionOverloadingNode.html.md)
  1988. - [GTAONode](https://threejs.org/docs/pages/GTAONode.html.md)
  1989. - [GaussianBlurNode](https://threejs.org/docs/pages/GaussianBlurNode.html.md)
  1990. - [GodraysNode](https://threejs.org/docs/pages/GodraysNode.html.md)
  1991. - [HemisphereLightNode](https://threejs.org/docs/pages/HemisphereLightNode.html.md)
  1992. - [IESSpotLightNode](https://threejs.org/docs/pages/IESSpotLightNode.html.md)
  1993. - [IndexNode](https://threejs.org/docs/pages/IndexNode.html.md)
  1994. - [InputNode](https://threejs.org/docs/pages/InputNode.html.md)
  1995. - [InspectorNode](https://threejs.org/docs/pages/InspectorNode.html.md)
  1996. - [InstanceNode](https://threejs.org/docs/pages/InstanceNode.html.md)
  1997. - [InstancedMeshNode](https://threejs.org/docs/pages/InstancedMeshNode.html.md)
  1998. - [IrradianceNode](https://threejs.org/docs/pages/IrradianceNode.html.md)
  1999. - [IsolateNode](https://threejs.org/docs/pages/IsolateNode.html.md)
  2000. - [JoinNode](https://threejs.org/docs/pages/JoinNode.html.md)
  2001. - [LensflareNode](https://threejs.org/docs/pages/LensflareNode.html.md)
  2002. - [LightProbeNode](https://threejs.org/docs/pages/LightProbeNode.html.md)
  2003. - [LightingContextNode](https://threejs.org/docs/pages/LightingContextNode.html.md)
  2004. - [LightingNode](https://threejs.org/docs/pages/LightingNode.html.md)
  2005. - [LightsNode](https://threejs.org/docs/pages/LightsNode.html.md)
  2006. - [LoopNode](https://threejs.org/docs/pages/LoopNode.html.md)
  2007. - [Lut3DNode](https://threejs.org/docs/pages/Lut3DNode.html.md)
  2008. - [MRTNode](https://threejs.org/docs/pages/MRTNode.html.md)
  2009. - [MaterialNode](https://threejs.org/docs/pages/MaterialNode.html.md)
  2010. - [MaterialReferenceNode](https://threejs.org/docs/pages/MaterialReferenceNode.html.md)
  2011. - [MathNode](https://threejs.org/docs/pages/MathNode.html.md)
  2012. - [MaxMipLevelNode](https://threejs.org/docs/pages/MaxMipLevelNode.html.md)
  2013. - [MemberNode](https://threejs.org/docs/pages/MemberNode.html.md)
  2014. - [ModelNode](https://threejs.org/docs/pages/ModelNode.html.md)
  2015. - [MorphNode](https://threejs.org/docs/pages/MorphNode.html.md)
  2016. - [Node](https://threejs.org/docs/pages/Node.html.md)
  2017. - [NormalMapNode](https://threejs.org/docs/pages/NormalMapNode.html.md)
  2018. - [Object3DNode](https://threejs.org/docs/pages/Object3DNode.html.md)
  2019. - [OperatorNode](https://threejs.org/docs/pages/OperatorNode.html.md)
  2020. - [OutlineNode](https://threejs.org/docs/pages/OutlineNode.html.md)
  2021. - [OutputStructNode](https://threejs.org/docs/pages/OutputStructNode.html.md)
  2022. - [PMREMNode](https://threejs.org/docs/pages/PMREMNode.html.md)
  2023. - [PackFloatNode](https://threejs.org/docs/pages/PackFloatNode.html.md)
  2024. - [ParameterNode](https://threejs.org/docs/pages/ParameterNode.html.md)
  2025. - [PassMultipleTextureNode](https://threejs.org/docs/pages/PassMultipleTextureNode.html.md)
  2026. - [PassTextureNode](https://threejs.org/docs/pages/PassTextureNode.html.md)
  2027. - [PixelationNode](https://threejs.org/docs/pages/PixelationNode.html.md)
  2028. - [PointLightNode](https://threejs.org/docs/pages/PointLightNode.html.md)
  2029. - [PointShadowNode](https://threejs.org/docs/pages/PointShadowNode.html.md)
  2030. - [PointUVNode](https://threejs.org/docs/pages/PointUVNode.html.md)
  2031. - [ProjectorLightNode](https://threejs.org/docs/pages/ProjectorLightNode.html.md)
  2032. - [PropertyNode](https://threejs.org/docs/pages/PropertyNode.html.md)
  2033. - [RGBShiftNode](https://threejs.org/docs/pages/RGBShiftNode.html.md)
  2034. - [RTTNode](https://threejs.org/docs/pages/RTTNode.html.md)
  2035. - [RangeNode](https://threejs.org/docs/pages/RangeNode.html.md)
  2036. - [RectAreaLightNode](https://threejs.org/docs/pages/RectAreaLightNode.html.md)
  2037. - [ReferenceBaseNode](https://threejs.org/docs/pages/ReferenceBaseNode.html.md)
  2038. - [ReferenceElementNode](https://threejs.org/docs/pages/ReferenceElementNode.html.md)
  2039. - [ReferenceNode](https://threejs.org/docs/pages/ReferenceNode.html.md)
  2040. - [ReflectorNode](https://threejs.org/docs/pages/ReflectorNode.html.md)
  2041. - [RemapNode](https://threejs.org/docs/pages/RemapNode.html.md)
  2042. - [RenderOutputNode](https://threejs.org/docs/pages/RenderOutputNode.html.md)
  2043. - [RendererReferenceNode](https://threejs.org/docs/pages/RendererReferenceNode.html.md)
  2044. - [RotateNode](https://threejs.org/docs/pages/RotateNode.html.md)
  2045. - [SMAANode](https://threejs.org/docs/pages/SMAANode.html.md)
  2046. - [SSGINode](https://threejs.org/docs/pages/SSGINode.html.md)
  2047. - [SSRNode](https://threejs.org/docs/pages/SSRNode.html.md)
  2048. - [SSSNode](https://threejs.org/docs/pages/SSSNode.html.md)
  2049. - [SampleNode](https://threejs.org/docs/pages/SampleNode.html.md)
  2050. - [ScreenNode](https://threejs.org/docs/pages/ScreenNode.html.md)
  2051. - [SetNode](https://threejs.org/docs/pages/SetNode.html.md)
  2052. - [ShadowBaseNode](https://threejs.org/docs/pages/ShadowBaseNode.html.md)
  2053. - [ShadowNode](https://threejs.org/docs/pages/ShadowNode.html.md)
  2054. - [SkinningNode](https://threejs.org/docs/pages/SkinningNode.html.md)
  2055. - [SobelOperatorNode](https://threejs.org/docs/pages/SobelOperatorNode.html.md)
  2056. - [SplitNode](https://threejs.org/docs/pages/SplitNode.html.md)
  2057. - [SpotLightNode](https://threejs.org/docs/pages/SpotLightNode.html.md)
  2058. - [StackNode](https://threejs.org/docs/pages/StackNode.html.md)
  2059. - [StorageArrayElementNode](https://threejs.org/docs/pages/StorageArrayElementNode.html.md)
  2060. - [StorageBufferNode](https://threejs.org/docs/pages/StorageBufferNode.html.md)
  2061. - [StorageTextureNode](https://threejs.org/docs/pages/StorageTextureNode.html.md)
  2062. - [StructNode](https://threejs.org/docs/pages/StructNode.html.md)
  2063. - [StructTypeNode](https://threejs.org/docs/pages/StructTypeNode.html.md)
  2064. - [SubBuildNode](https://threejs.org/docs/pages/SubBuildNode.html.md)
  2065. - [SubgroupFunctionNode](https://threejs.org/docs/pages/SubgroupFunctionNode.html.md)
  2066. - [TRAANode](https://threejs.org/docs/pages/TRAANode.html.md)
  2067. - [TempNode](https://threejs.org/docs/pages/TempNode.html.md)
  2068. - [Texture3DNode](https://threejs.org/docs/pages/Texture3DNode.html.md)
  2069. - [TextureNode](https://threejs.org/docs/pages/TextureNode.html.md)
  2070. - [TextureSizeNode](https://threejs.org/docs/pages/TextureSizeNode.html.md)
  2071. - [TileShadowNode](https://threejs.org/docs/pages/TileShadowNode.html.md)
  2072. - [TiledLightsNode](https://threejs.org/docs/pages/TiledLightsNode.html.md)
  2073. - [ToneMappingNode](https://threejs.org/docs/pages/ToneMappingNode.html.md)
  2074. - [TransitionNode](https://threejs.org/docs/pages/TransitionNode.html.md)
  2075. - [UniformArrayElementNode](https://threejs.org/docs/pages/UniformArrayElementNode.html.md)
  2076. - [UniformArrayNode](https://threejs.org/docs/pages/UniformArrayNode.html.md)
  2077. - [UniformGroupNode](https://threejs.org/docs/pages/UniformGroupNode.html.md)
  2078. - [UniformNode](https://threejs.org/docs/pages/UniformNode.html.md)
  2079. - [UnpackFloatNode](https://threejs.org/docs/pages/UnpackFloatNode.html.md)
  2080. - [UserDataNode](https://threejs.org/docs/pages/UserDataNode.html.md)
  2081. - [VarNode](https://threejs.org/docs/pages/VarNode.html.md)
  2082. - [VaryingNode](https://threejs.org/docs/pages/VaryingNode.html.md)
  2083. - [VelocityNode](https://threejs.org/docs/pages/VelocityNode.html.md)
  2084. - [VertexColorNode](https://threejs.org/docs/pages/VertexColorNode.html.md)
  2085. - [ViewportDepthNode](https://threejs.org/docs/pages/ViewportDepthNode.html.md)
  2086. - [ViewportDepthTextureNode](https://threejs.org/docs/pages/ViewportDepthTextureNode.html.md)
  2087. - [ViewportSharedTextureNode](https://threejs.org/docs/pages/ViewportSharedTextureNode.html.md)
  2088. - [ViewportTextureNode](https://threejs.org/docs/pages/ViewportTextureNode.html.md)
  2089. - [WorkgroupInfoElementNode](https://threejs.org/docs/pages/WorkgroupInfoElementNode.html.md)
  2090. - [WorkgroupInfoNode](https://threejs.org/docs/pages/WorkgroupInfoNode.html.md)
  2091. ### WebXR
  2092. - [EXRExporter](https://threejs.org/docs/pages/EXRExporter.html.md)
  2093. - [WebXRDepthSensing](https://threejs.org/docs/pages/WebXRDepthSensing.html.md)
  2094. - [WebXRManager](https://threejs.org/docs/pages/WebXRManager.html.md)
  2095. - [XRButton](https://threejs.org/docs/pages/XRButton.html.md)
  2096. - [XRControllerModel](https://threejs.org/docs/pages/XRControllerModel.html.md)
  2097. - [XRControllerModelFactory](https://threejs.org/docs/pages/XRControllerModelFactory.html.md)
  2098. - [XRHandMeshModel](https://threejs.org/docs/pages/XRHandMeshModel.html.md)
  2099. - [XRHandModel](https://threejs.org/docs/pages/XRHandModel.html.md)
  2100. - [XRHandModelFactory](https://threejs.org/docs/pages/XRHandModelFactory.html.md)
  2101. - [XRHandPrimitiveModel](https://threejs.org/docs/pages/XRHandPrimitiveModel.html.md)
  2102. - [XRManager](https://threejs.org/docs/pages/XRManager.html.md)
  2103. - [XRPlanes](https://threejs.org/docs/pages/XRPlanes.html.md)
  2104. ### Shader Modules
  2105. - [module-ACESFilmicToneMappingShader](https://threejs.org/docs/pages/module-ACESFilmicToneMappingShader.html.md)
  2106. - [module-AfterimageShader](https://threejs.org/docs/pages/module-AfterimageShader.html.md)
  2107. - [module-BasicShader](https://threejs.org/docs/pages/module-BasicShader.html.md)
  2108. - [module-Bayer](https://threejs.org/docs/pages/module-Bayer.html.md)
  2109. - [module-BleachBypassShader](https://threejs.org/docs/pages/module-BleachBypassShader.html.md)
  2110. - [module-BlendShader](https://threejs.org/docs/pages/module-BlendShader.html.md)
  2111. - [module-BokehShader](https://threejs.org/docs/pages/module-BokehShader.html.md)
  2112. - [module-BokehShader2](https://threejs.org/docs/pages/module-BokehShader2.html.md)
  2113. - [module-BrightnessContrastShader](https://threejs.org/docs/pages/module-BrightnessContrastShader.html.md)
  2114. - [module-BufferGeometryUtils](https://threejs.org/docs/pages/module-BufferGeometryUtils.html.md)
  2115. - [module-CSMShader](https://threejs.org/docs/pages/module-CSMShader.html.md)
  2116. - [module-CameraUtils](https://threejs.org/docs/pages/module-CameraUtils.html.md)
  2117. - [module-ColorCorrectionShader](https://threejs.org/docs/pages/module-ColorCorrectionShader.html.md)
  2118. - [module-ColorSpaces](https://threejs.org/docs/pages/module-ColorSpaces.html.md)
  2119. - [module-ColorifyShader](https://threejs.org/docs/pages/module-ColorifyShader.html.md)
  2120. - [module-ConvolutionShader](https://threejs.org/docs/pages/module-ConvolutionShader.html.md)
  2121. - [module-CopyShader](https://threejs.org/docs/pages/module-CopyShader.html.md)
  2122. - [module-DOFMipMapShader](https://threejs.org/docs/pages/module-DOFMipMapShader.html.md)
  2123. - [module-DepthLimitedBlurShader](https://threejs.org/docs/pages/module-DepthLimitedBlurShader.html.md)
  2124. - [module-DigitalGlitch](https://threejs.org/docs/pages/module-DigitalGlitch.html.md)
  2125. - [module-DotScreenShader](https://threejs.org/docs/pages/module-DotScreenShader.html.md)
  2126. - [module-ExposureShader](https://threejs.org/docs/pages/module-ExposureShader.html.md)
  2127. - [module-FXAAShader](https://threejs.org/docs/pages/module-FXAAShader.html.md)
  2128. - [module-FilmShader](https://threejs.org/docs/pages/module-FilmShader.html.md)
  2129. - [module-FocusShader](https://threejs.org/docs/pages/module-FocusShader.html.md)
  2130. - [module-FreiChenShader](https://threejs.org/docs/pages/module-FreiChenShader.html.md)
  2131. - [module-GTAOShader](https://threejs.org/docs/pages/module-GTAOShader.html.md)
  2132. - [module-GammaCorrectionShader](https://threejs.org/docs/pages/module-GammaCorrectionShader.html.md)
  2133. - [module-GeometryCompressionUtils](https://threejs.org/docs/pages/module-GeometryCompressionUtils.html.md)
  2134. - [module-GeometryUtils](https://threejs.org/docs/pages/module-GeometryUtils.html.md)
  2135. - [module-HalftoneShader](https://threejs.org/docs/pages/module-HalftoneShader.html.md)
  2136. - [module-HorizontalBlurShader](https://threejs.org/docs/pages/module-HorizontalBlurShader.html.md)
  2137. - [module-HorizontalTiltShiftShader](https://threejs.org/docs/pages/module-HorizontalTiltShiftShader.html.md)
  2138. - [module-HueSaturationShader](https://threejs.org/docs/pages/module-HueSaturationShader.html.md)
  2139. - [module-Interpolations](https://threejs.org/docs/pages/module-Interpolations.html.md)
  2140. - [module-KaleidoShader](https://threejs.org/docs/pages/module-KaleidoShader.html.md)
  2141. - [module-LuminosityHighPassShader](https://threejs.org/docs/pages/module-LuminosityHighPassShader.html.md)
  2142. - [module-LuminosityShader](https://threejs.org/docs/pages/module-LuminosityShader.html.md)
  2143. - [module-MirrorShader](https://threejs.org/docs/pages/module-MirrorShader.html.md)
  2144. - [module-NURBSUtils](https://threejs.org/docs/pages/module-NURBSUtils.html.md)
  2145. - [module-NormalMapShader](https://threejs.org/docs/pages/module-NormalMapShader.html.md)
  2146. - [module-OutputShader](https://threejs.org/docs/pages/module-OutputShader.html.md)
  2147. - [module-ParametricFunctions](https://threejs.org/docs/pages/module-ParametricFunctions.html.md)
  2148. - [module-PoissonDenoiseShader](https://threejs.org/docs/pages/module-PoissonDenoiseShader.html.md)
  2149. - [module-RGBShiftShader](https://threejs.org/docs/pages/module-RGBShiftShader.html.md)
  2150. - [module-Raymarching](https://threejs.org/docs/pages/module-Raymarching.html.md)
  2151. - [module-SAOShader](https://threejs.org/docs/pages/module-SAOShader.html.md)
  2152. - [module-SMAAShader](https://threejs.org/docs/pages/module-SMAAShader.html.md)
  2153. - [module-SSAOShader](https://threejs.org/docs/pages/module-SSAOShader.html.md)
  2154. - [module-SSRShader](https://threejs.org/docs/pages/module-SSRShader.html.md)
  2155. - [module-SceneUtils](https://threejs.org/docs/pages/module-SceneUtils.html.md)
  2156. - [module-SepiaShader](https://threejs.org/docs/pages/module-SepiaShader.html.md)
  2157. - [module-SkeletonUtils](https://threejs.org/docs/pages/module-SkeletonUtils.html.md)
  2158. - [module-SobelOperatorShader](https://threejs.org/docs/pages/module-SobelOperatorShader.html.md)
  2159. - [module-SortUtils](https://threejs.org/docs/pages/module-SortUtils.html.md)
  2160. - [module-SubsurfaceScatteringShader](https://threejs.org/docs/pages/module-SubsurfaceScatteringShader.html.md)
  2161. - [module-Text2D](https://threejs.org/docs/pages/module-Text2D.html.md)
  2162. - [module-TriangleBlurShader](https://threejs.org/docs/pages/module-TriangleBlurShader.html.md)
  2163. - [module-UVsDebug](https://threejs.org/docs/pages/module-UVsDebug.html.md)
  2164. - [module-UniformsUtils](https://threejs.org/docs/pages/module-UniformsUtils.html.md)
  2165. - [module-UnpackDepthRGBAShader](https://threejs.org/docs/pages/module-UnpackDepthRGBAShader.html.md)
  2166. - [module-VelocityShader](https://threejs.org/docs/pages/module-VelocityShader.html.md)
  2167. - [module-VerticalBlurShader](https://threejs.org/docs/pages/module-VerticalBlurShader.html.md)
  2168. - [module-VerticalTiltShiftShader](https://threejs.org/docs/pages/module-VerticalTiltShiftShader.html.md)
  2169. - [module-VignetteShader](https://threejs.org/docs/pages/module-VignetteShader.html.md)
  2170. - [module-VolumeShader](https://threejs.org/docs/pages/module-VolumeShader.html.md)
  2171. - [module-WaterRefractionShader](https://threejs.org/docs/pages/module-WaterRefractionShader.html.md)
  2172. - [module-WebGLTextureUtils](https://threejs.org/docs/pages/module-WebGLTextureUtils.html.md)
  2173. - [module-WebGPUTextureUtils](https://threejs.org/docs/pages/module-WebGPUTextureUtils.html.md)
粤ICP备19079148号