@inneranimalmedia/agentsam-sdk 2.6.7 → 2.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/README.md +37 -0
  2. package/apps/README.md +25 -0
  3. package/apps/cad-creator/shared/cad/package.json +1 -1
  4. package/apps/client-cms-editor/backend/package.json +4 -6
  5. package/apps/client-cms-editor/frontend/package.json +6 -8
  6. package/apps/client-cms-editor/frontend/tsconfig.json +27 -8
  7. package/apps/client-cms-editor/package.json +1 -1
  8. package/apps/client-cms-editor/shared/cms/package.json +4 -6
  9. package/docs/LOCAL_ENGINE_COMPUTE_AUDIT_PLAN.md +299 -0
  10. package/docs/REPO_FILE_MAP.txt +132 -0
  11. package/migrations/d1/0018_goap_control_plane_remaster.sql +40 -0
  12. package/migrations/d1/0019_agentsam_agent_run_plan_todo.sql +14 -0
  13. package/migrations/d1/README_PORTABLE_CONTROL_PLANE.md +20 -9
  14. package/migrations/runtime/0002_goap_blackboard_v1.sql +15 -0
  15. package/migrations/runtime/0004_agent_run_plan_linkage.sql +8 -0
  16. package/native/agentsam-machine/cli/Cargo.toml +8 -1
  17. package/native/agentsam-machine/cli/README.md +21 -0
  18. package/native/agentsam-machine/core/Cargo.toml +7 -0
  19. package/native/agentsam-machine/core/README.md +14 -0
  20. package/native/agentsam-machine/core/build.rs +33 -0
  21. package/native/agentsam-machine/core/contracts/source-types.v1.json +353 -0
  22. package/native/agentsam-machine/core/src/lib.rs +6 -0
  23. package/native/agentsam-machine/core/src/source_types.rs +2 -2
  24. package/package.json +31 -10
  25. package/packages/agentsam-brand/package.json +1 -1
  26. package/packages/agentsam-contracts/package.json +71 -20
  27. package/packages/agentsam-contracts/scripts/build.mjs +18 -0
  28. package/packages/agentsam-contracts/test/contracts.test.mjs +4 -1
  29. package/packages/agentsam-contracts/test/repository.test.mjs +4 -1
  30. package/packages/agentsam-contracts/tsconfig.build.json +10 -0
  31. package/packages/agentsam-errors/package.json +3 -2
  32. package/packages/agentsam-errors/src/index.js +1 -0
  33. package/packages/agentsam-errors/src/tool.js +56 -0
  34. package/packages/agentsam-errors/test/tool.test.mjs +58 -0
  35. package/packages/agentsam-goap/README.md +52 -0
  36. package/packages/agentsam-goap/package.json +37 -0
  37. package/packages/agentsam-goap/src/adapters/d1-sqlite.js +570 -0
  38. package/packages/agentsam-goap/src/adapters/memory.js +199 -0
  39. package/packages/agentsam-goap/src/contracts.js +226 -0
  40. package/packages/agentsam-goap/src/control-plane.js +112 -0
  41. package/packages/agentsam-goap/src/errors.js +157 -0
  42. package/packages/agentsam-goap/src/index.js +5 -0
  43. package/packages/agentsam-goap/src/world.js +202 -0
  44. package/packages/agentsam-goap/test/goap-control-plane.test.mjs +245 -0
  45. package/packages/agentsam-goap/test/world.test.mjs +79 -0
  46. package/packages/agentsam-knowledge/package.json +3 -2
  47. package/packages/agentsam-nav/package.json +1 -1
  48. package/packages/agentsam-queue-control/package.json +1 -1
  49. package/packages/agentsam-rapid-rust/src/main.rs +1 -0
  50. package/packages/agentsam-repository/package.json +3 -2
  51. package/packages/agentsam-repository/src/goap.js +13 -14
  52. package/packages/agentsam-repository/src/tickets.js +15 -22
  53. package/packages/agentsam-repository/test/goap-tickets-workspace-state.test.mjs +19 -8
  54. package/packages/agentsam-vault/package.json +8 -5
  55. package/packages/agentsam-workbench/package.json +44 -17
  56. package/packages/connectors/cloudflare/package.json +4 -2
  57. package/packages/heuristic-theme/package.json +1 -1
  58. package/packages/identity/package.json +4 -3
  59. package/packages/identity/tests/lane1-packed-consumer.test.mjs +10 -2
  60. package/packages/providers/completeful/package.json +1 -1
  61. package/packages/theme-church-site/README.md +2 -2
  62. package/packages/theme-church-site/package.json +3 -4
  63. package/packages/theme-church-site/src/index.js +1 -1
  64. package/packages/theme-church-site/test/theme.test.mjs +1 -1
  65. package/packages/theme-companions-site/README.md +2 -2
  66. package/packages/theme-companions-site/package.json +3 -4
  67. package/packages/theme-companions-site/src/index.js +1 -1
  68. package/packages/theme-companions-site/test/theme.test.mjs +1 -1
  69. package/packages/theme-floors-site/README.md +2 -2
  70. package/packages/theme-floors-site/package.json +3 -4
  71. package/packages/theme-floors-site/src/index.js +1 -1
  72. package/packages/theme-floors-site/test/theme.test.mjs +1 -1
  73. package/packages/theme-fuelnfree-site/README.md +2 -2
  74. package/packages/theme-fuelnfree-site/package.json +3 -4
  75. package/packages/theme-fuelnfree-site/src/index.js +1 -1
  76. package/packages/theme-fuelnfree-site/test/theme.test.mjs +1 -1
  77. package/packages/theme-handyman-site/README.md +2 -2
  78. package/packages/theme-handyman-site/package.json +3 -4
  79. package/packages/theme-handyman-site/src/index.js +1 -1
  80. package/packages/theme-handyman-site/test/theme.test.mjs +1 -1
  81. package/packages/theme-insurance-site/README.md +2 -2
  82. package/packages/theme-insurance-site/package.json +3 -4
  83. package/packages/theme-insurance-site/src/index.js +1 -1
  84. package/packages/theme-insurance-site/test/theme.test.mjs +1 -1
  85. package/packages/theme-scenes/package.json +1 -1
  86. package/packages/theme-shinshu-site/README.md +2 -2
  87. package/packages/theme-shinshu-site/package.json +3 -4
  88. package/packages/theme-shinshu-site/src/index.js +1 -1
  89. package/packages/theme-shinshu-site/test/theme.test.mjs +1 -1
  90. package/packages/work-graph/package.json +3 -2
  91. package/protocol/local-engine/benchmark.v1.schema.json +14 -0
  92. package/protocol/local-engine/engine.v1.schema.json +17 -0
  93. package/python/agentsam_sdk/repository/intelligence/discovery.py +27 -2
  94. package/python/agentsam_sdk/repository/intelligence/git.py +4 -0
  95. package/python/tests/test_repository_intelligence.py +30 -0
  96. package/src/cli/command-catalog.js +3 -1
  97. package/src/cli.js +20 -1
  98. package/src/commands/app.js +10 -0
  99. package/src/commands/engine.js +10 -0
  100. package/src/commands/goap-world.js +134 -0
  101. package/src/commands/goap.js +11 -4
  102. package/src/commands/machine-binary.js +33 -27
  103. package/src/commands/machine-runtime.js +266 -0
  104. package/src/commands/machine.js +155 -51
  105. package/src/commands/package.js +537 -0
  106. package/src/commands/plan-ledger.js +370 -0
  107. package/src/commands/plan.js +183 -0
  108. package/src/commands/runtime.js +25 -10
  109. package/src/commands/setup.js +30 -6
  110. package/src/commands/skill.js +78 -17
  111. package/src/commands/terminal.js +20 -8
  112. package/src/errors/contract.js +4 -4
  113. package/src/errors/diagnostic.js +1 -1
  114. package/src/errors/index.js +1 -1
  115. package/src/index.js +20 -0
  116. package/src/indexing/ingest/materials.js +237 -30
  117. package/src/knowledge/source.js +1 -1
  118. package/src/lib/setup/runtime.js +4 -2
  119. package/src/lib/slash-commands.js +1 -1
  120. package/src/local/runtime-store.js +24 -2
  121. package/src/local/sqlite.js +17 -0
  122. package/src/local-engine/assets.js +37 -0
  123. package/src/local-engine/audit.js +133 -0
  124. package/src/local-engine/benchmark.js +26 -0
  125. package/src/local-engine/contracts.js +101 -0
  126. package/src/local-engine/engines.js +142 -0
  127. package/src/local-engine/index.js +18 -0
  128. package/src/local-engine/runtime.js +39 -0
  129. package/src/sam/operations/package-audit.js +41 -0
  130. package/src/sam/seed.js +2 -0
  131. package/skills/grok-auth/SKILL.md +0 -110
  132. package/skills/grok-auth/agentsam.skill.json +0 -25
  133. package/skills/grok-auth/references/grok-identity.md +0 -64
  134. package/skills/grok-auth/references/per-user-data.md +0 -49
  135. package/skills/grok-auth/references/prewired-and-env.md +0 -54
  136. package/skills/grok-auth/references/session-ui.md +0 -133
  137. package/skills/grok-auth/references/sign-in-methods.md +0 -55
  138. package/skills/grok-auth/references/wiring.md +0 -71
  139. package/skills/grok-building-games/SKILL.md +0 -213
  140. package/skills/grok-building-games/agentsam.skill.json +0 -25
  141. package/skills/grok-building-games/references/3d-libs.md +0 -64
  142. package/skills/grok-building-games/references/ai-pathfinding.md +0 -122
  143. package/skills/grok-building-games/references/audio.md +0 -129
  144. package/skills/grok-building-games/references/babylon.md +0 -202
  145. package/skills/grok-building-games/references/collision-physics.md +0 -122
  146. package/skills/grok-building-games/references/ecs-architecture.md +0 -111
  147. package/skills/grok-building-games/references/game-feel-juice.md +0 -110
  148. package/skills/grok-building-games/references/genres/board-card-chess.md +0 -89
  149. package/skills/grok-building-games/references/genres/endless-runner.md +0 -83
  150. package/skills/grok-building-games/references/genres/fps.md +0 -105
  151. package/skills/grok-building-games/references/genres/platformer-2d.md +0 -97
  152. package/skills/grok-building-games/references/genres/puzzle-match3-tetris.md +0 -131
  153. package/skills/grok-building-games/references/genres/racing-kart.md +0 -106
  154. package/skills/grok-building-games/references/genres/topdown-twin-stick.md +0 -97
  155. package/skills/grok-building-games/references/genres/tower-defense.md +0 -84
  156. package/skills/grok-building-games/references/genres/voxel-minecraft.md +0 -89
  157. package/skills/grok-building-games/references/input.md +0 -139
  158. package/skills/grok-building-games/references/phaser.md +0 -277
  159. package/skills/grok-building-games/references/procedural-generation.md +0 -141
  160. package/skills/grok-building-games/references/save-persistence.md +0 -108
  161. package/skills/grok-building-games/references/threejs-foundational.md +0 -148
  162. package/skills/grok-controls/SKILL.md +0 -274
  163. package/skills/grok-controls/agentsam.skill.json +0 -25
  164. package/skills/grok-design-ui/SKILL.md +0 -122
  165. package/skills/grok-design-ui/agentsam.skill.json +0 -25
  166. package/skills/grok-design-ui/references/animations.md +0 -379
  167. package/skills/grok-design-ui/references/performance.md +0 -88
  168. package/skills/grok-design-ui/references/refined-ui.md +0 -384
  169. package/skills/grok-design-ui/references/surfaces.md +0 -247
  170. package/skills/grok-design-ui/references/typography.md +0 -123
  171. package/skills/grok-game-animation-frames/SKILL.md +0 -84
  172. package/skills/grok-game-animation-frames/agentsam.skill.json +0 -25
  173. package/skills/grok-game-asset-core/SKILL.md +0 -69
  174. package/skills/grok-game-asset-core/agentsam.skill.json +0 -25
  175. package/skills/grok-game-character-consistency/SKILL.md +0 -69
  176. package/skills/grok-game-character-consistency/agentsam.skill.json +0 -25
  177. package/skills/grok-game-tilesets/SKILL.md +0 -65
  178. package/skills/grok-game-tilesets/agentsam.skill.json +0 -25
  179. package/skills/grok-game-ui-icons/SKILL.md +0 -56
  180. package/skills/grok-game-ui-icons/agentsam.skill.json +0 -25
  181. package/skills/grok-generate2dmap/LICENSE +0 -21
  182. package/skills/grok-generate2dmap/SKILL.md +0 -120
  183. package/skills/grok-generate2dmap/SOURCE.md +0 -6
  184. package/skills/grok-generate2dmap/agentsam.skill.json +0 -25
  185. package/skills/grok-generate2dmap/references/deliverables.md +0 -101
  186. package/skills/grok-generate2dmap/references/layered-map-contract.md +0 -209
  187. package/skills/grok-generate2dmap/references/map-strategies.md +0 -341
  188. package/skills/grok-generate2dmap/references/object-production-gate.md +0 -24
  189. package/skills/grok-generate2dmap/references/pipeline.md +0 -149
  190. package/skills/grok-generate2dmap/references/prop-pack-contract.md +0 -174
  191. package/skills/grok-generate2dmap/references/side-scroll-stages.md +0 -29
  192. package/skills/grok-generate2dmap/scripts/compose_layered_preview.py +0 -157
  193. package/skills/grok-generate2dmap/scripts/extract_prop_pack.py +0 -369
  194. package/skills/grok-generate2dsprite/LICENSE +0 -21
  195. package/skills/grok-generate2dsprite/SKILL.md +0 -313
  196. package/skills/grok-generate2dsprite/SOURCE.md +0 -6
  197. package/skills/grok-generate2dsprite/agentsam.skill.json +0 -25
  198. package/skills/grok-generate2dsprite/references/modes.md +0 -124
  199. package/skills/grok-generate2dsprite/references/prompt-rules.md +0 -315
  200. package/skills/grok-generate2dsprite/scripts/generate2dsprite.py +0 -1031
  201. package/skills/grok-generate2dsprite/scripts/make_layout_guide.py +0 -109
  202. package/skills/grok-imagine/SKILL.md +0 -201
  203. package/skills/grok-imagine/agentsam.skill.json +0 -25
  204. package/skills/grok-multiplayer-p2p/SKILL.md +0 -111
  205. package/skills/grok-multiplayer-p2p/agentsam.skill.json +0 -25
  206. package/skills/grok-multiplayer-p2p/references/react-binding.md +0 -144
  207. package/skills/grok-multiplayer-p2p/references/signaling-relay.md +0 -269
  208. package/skills/grok-neon/SKILL.md +0 -157
  209. package/skills/grok-neon/agentsam.skill.json +0 -25
  210. package/skills/grok-og/SKILL.md +0 -102
  211. package/skills/grok-og/agentsam.skill.json +0 -25
  212. package/skills/grok-og/references/brand-pass.md +0 -53
  213. package/skills/grok-og/references/custom-card.md +0 -107
  214. package/skills/grok-og/references/favicon-and-icons.md +0 -48
  215. package/skills/grok-og/references/og-type-contract.md +0 -18
  216. package/skills/grok-og/references/placeholder-card.md +0 -21
  217. package/skills/grok-og/references/x-banner.md +0 -41
  218. package/skills/grok-threejs/SKILL.md +0 -67
  219. package/skills/grok-threejs/agentsam.skill.json +0 -25
  220. package/skills/grok-threejs/references/llms-full.txt +0 -2780
  221. package/skills/grok-video2dsprite/LICENSE +0 -21
  222. package/skills/grok-video2dsprite/SKILL.md +0 -236
  223. package/skills/grok-video2dsprite/SOURCE.md +0 -6
  224. package/skills/grok-video2dsprite/agentsam.skill.json +0 -25
  225. package/skills/grok-video2dsprite/references/pipeline.md +0 -90
  226. package/skills/grok-video2dsprite/references/prompt-rules.md +0 -63
  227. package/skills/grok-video2dsprite/scripts/video2dsprite.py +0 -490
  228. package/skills/grok-xai-api/SKILL.md +0 -152
  229. package/skills/grok-xai-api/agentsam.skill.json +0 -25
  230. package/test/account-session.test.mjs +0 -101
  231. package/test/agent-capabilities.test.mjs +0 -67
  232. package/test/app-authority-context.test.mjs +0 -32
  233. package/test/app-building-skills.test.mjs +0 -61
  234. package/test/apps-scaffold-contract.test.mjs +0 -115
  235. package/test/blender-cad.test.mjs +0 -146
  236. package/test/cad-docker.test.mjs +0 -96
  237. package/test/capabilities.test.mjs +0 -133
  238. package/test/cli/api-key-env-whoami.test.mjs +0 -129
  239. package/test/cli/catalog-authority.test.mjs +0 -64
  240. package/test/cli/codebaseindex-plan-ux.test.mjs +0 -37
  241. package/test/cli/eval-live.test.mjs +0 -219
  242. package/test/cli/go.test.mjs +0 -128
  243. package/test/cli/local-vault-and-provider-setup.test.mjs +0 -268
  244. package/test/cli/machine-command.test.mjs +0 -34
  245. package/test/cli/mcp-client.test.mjs +0 -256
  246. package/test/cli/preferences-runtime.test.mjs +0 -11
  247. package/test/cli/runtime-persist.test.mjs +0 -56
  248. package/test/cli/runtime-ui.test.mjs +0 -141
  249. package/test/cli/rust-command.test.mjs +0 -21
  250. package/test/cli/skill-npm-and-env.test.mjs +0 -52
  251. package/test/cli/status-actions.test.mjs +0 -88
  252. package/test/cli/wireframes-go-registry.test.mjs +0 -139
  253. package/test/cli-preferences.test.mjs +0 -46
  254. package/test/cloudflare-connector.test.mjs +0 -93
  255. package/test/cloudflare-runtime.test.mjs +0 -82
  256. package/test/context.test.mjs +0 -159
  257. package/test/credentials-audit.test.mjs +0 -113
  258. package/test/deploy-health-scan.test.mjs +0 -95
  259. package/test/deploy-receipt.test.mjs +0 -91
  260. package/test/dockerize.test.mjs +0 -93
  261. package/test/error-diagnostics.test.mjs +0 -124
  262. package/test/eval-context.test.mjs +0 -37
  263. package/test/execution-approvals.test.mjs +0 -27
  264. package/test/fixtures/cad/courtyard-house.json +0 -208
  265. package/test/fixtures/knowledge-rpc-worker.mjs +0 -16
  266. package/test/fixtures/project-authority/customer-app/.agentsam/app.json +0 -5
  267. package/test/fixtures/project-authority/customer-app/apps/my-product/index.ts +0 -1
  268. package/test/fixtures/project-authority/customer-app/wrangler.toml +0 -17
  269. package/test/gcloud-auth.test.mjs +0 -111
  270. package/test/go/build-source-identity.test.mjs +0 -31
  271. package/test/go/cloudflare-probe.test.mjs +0 -317
  272. package/test/go/distribution.test.mjs +0 -28
  273. package/test/google-cloud-connection.test.mjs +0 -83
  274. package/test/google-cloud-inventory.test.mjs +0 -64
  275. package/test/indexing-provider.test.mjs +0 -29
  276. package/test/init-options.test.mjs +0 -35
  277. package/test/integration/ai-access-onboarding.test.mjs +0 -47
  278. package/test/integration/app-command.test.mjs +0 -85
  279. package/test/integration/autorag-project-authority.integration.test.mjs +0 -51
  280. package/test/integration/autorag-runtime-discovery.test.mjs +0 -107
  281. package/test/integration/cad-discovery.test.mjs +0 -158
  282. package/test/integration/cad-docker-executor.test.mjs +0 -249
  283. package/test/integration/cad-execution.test.mjs +0 -184
  284. package/test/integration/cad-project-app.test.mjs +0 -31
  285. package/test/integration/cad-project-d1.test.mjs +0 -25
  286. package/test/integration/cad-project-native.test.mjs +0 -24
  287. package/test/integration/cad-project-workflow.test.mjs +0 -9
  288. package/test/integration/cad-project.test.mjs +0 -85
  289. package/test/integration/cli-help.test.mjs +0 -41
  290. package/test/integration/cms-app-scaffold.test.mjs +0 -77
  291. package/test/integration/cms-site-tenancy-contract.test.mjs +0 -268
  292. package/test/integration/codebaseindex-ingest.test.mjs +0 -255
  293. package/test/integration/core-client.integration.test.mjs +0 -55
  294. package/test/integration/database-hosted-honesty.test.mjs +0 -49
  295. package/test/integration/desktop-keychain-boundary.test.mjs +0 -45
  296. package/test/integration/error-runtime-rpc.test.mjs +0 -71
  297. package/test/integration/features-resolve.test.mjs +0 -147
  298. package/test/integration/hosted-work-host-authority.test.mjs +0 -47
  299. package/test/integration/icon-registry.test.mjs +0 -67
  300. package/test/integration/ingest-discover-models.test.mjs +0 -30
  301. package/test/integration/inspect-path-cli.test.mjs +0 -46
  302. package/test/integration/install-script.test.mjs +0 -110
  303. package/test/integration/inventory-core.test.mjs +0 -53
  304. package/test/integration/inventory-eligibility.test.mjs +0 -59
  305. package/test/integration/inventory-evidence.test.mjs +0 -125
  306. package/test/integration/knowledge-rpc.test.mjs +0 -112
  307. package/test/integration/local-fs.test.mjs +0 -113
  308. package/test/integration/local-provider-bridge.test.mjs +0 -65
  309. package/test/integration/local-studio-settings-production.test.mjs +0 -40
  310. package/test/integration/lockfile-sync.test.mjs +0 -26
  311. package/test/integration/merkle-cli.test.mjs +0 -61
  312. package/test/integration/merkle-persistence-identity.test.mjs +0 -48
  313. package/test/integration/plugins-cloudflare.integration.test.mjs +0 -28
  314. package/test/integration/provider-env-cli.test.mjs +0 -60
  315. package/test/integration/provider-factory.test.mjs +0 -197
  316. package/test/integration/repository-company-graph.test.mjs +0 -90
  317. package/test/integration/runtime-migrations.test.mjs +0 -87
  318. package/test/integration/runtime-status.integration.test.mjs +0 -227
  319. package/test/integration/sam-activity-recovery.test.mjs +0 -147
  320. package/test/integration/sam-decision.test.mjs +0 -584
  321. package/test/integration/sam-kernel.test.mjs +0 -99
  322. package/test/integration/sam-planning-astar.test.mjs +0 -279
  323. package/test/integration/scaffold-cloudflare.test.mjs +0 -46
  324. package/test/integration/skill-runtime.test.mjs +0 -240
  325. package/test/integration/storage-architecture.test.mjs +0 -154
  326. package/test/integration/store-discovery.test.mjs +0 -44
  327. package/test/integration/studio-fs-pty-e2e.test.mjs +0 -294
  328. package/test/integration/terminal-exec.integration.test.mjs +0 -86
  329. package/test/integration/theme-package-registry.test.mjs +0 -31
  330. package/test/integration/tool-runtime.test.mjs +0 -124
  331. package/test/integration/tool-schema.test.mjs +0 -59
  332. package/test/jr-dev-skill.test.mjs +0 -26
  333. package/test/knowledge-context-pack.test.mjs +0 -19
  334. package/test/knowledge-postgres.test.mjs +0 -40
  335. package/test/knowledge-service.test.mjs +0 -110
  336. package/test/knowledge.test.mjs +0 -206
  337. package/test/live/terminal-transport.live.test.mjs +0 -24
  338. package/test/local-sessions.test.mjs +0 -57
  339. package/test/local-studio-deploy.test.mjs +0 -83
  340. package/test/loopback-oauth.test.mjs +0 -53
  341. package/test/merkle-render.test.mjs +0 -31
  342. package/test/mini.test.mjs +0 -140
  343. package/test/model-catalog.test.mjs +0 -70
  344. package/test/models.test.mjs +0 -309
  345. package/test/npm10-lock.test.mjs +0 -29
  346. package/test/ollama.test.mjs +0 -137
  347. package/test/open-url.test.mjs +0 -64
  348. package/test/openai-responses.test.mjs +0 -155
  349. package/test/portable-context.test.mjs +0 -94
  350. package/test/project-config.test.mjs +0 -81
  351. package/test/project-rules.test.mjs +0 -44
  352. package/test/provider-credentials.test.mjs +0 -106
  353. package/test/rehydrate.test.mjs +0 -25
  354. package/test/release-hygiene.test.mjs +0 -42
  355. package/test/repository-snapshot-view.test.mjs +0 -112
  356. package/test/responses-runner.test.mjs +0 -465
  357. package/test/runtime-activity.test.mjs +0 -98
  358. package/test/sdk-worker-contract.test.mjs +0 -72
  359. package/test/security.test.mjs +0 -266
  360. package/test/setup-planner.test.mjs +0 -74
  361. package/test/setup-runtime.test.mjs +0 -51
  362. package/test/shell.test.mjs +0 -281
  363. package/test/skills.test.mjs +0 -22
  364. package/test/smoke.mjs +0 -122
  365. package/test/telemetry.test.mjs +0 -79
  366. package/test/terminal/local-pty.mock.test.mjs +0 -153
  367. package/test/terminal-machine-identity.test.mjs +0 -88
  368. package/test/theme-portability.test.mjs +0 -14
  369. package/test/tools-search.test.mjs +0 -73
  370. package/test/unit/website-assets-bindings.test.mjs +0 -60
  371. package/test/whoami-resume.test.mjs +0 -157
@@ -1,2780 +0,0 @@
1
- # Vendored from https://threejs.org/docs/llms-full.txt
2
- # Pinned for app-builder sandbox offline use. Prefer npm 'three' over CDN importmaps in this stack.
3
- # Retrieved: 2026-07-08
4
-
5
- # Three.js
6
-
7
- > Three.js is a cross-browser JavaScript library for creating 3D graphics using WebGL and WebGPU.
8
-
9
- ## Instructions for Large Language Models
10
-
11
- When generating Three.js code, follow these guidelines:
12
-
13
- ### 1. Use Import Maps (Not Old CDN Patterns)
14
-
15
- WRONG - outdated pattern:
16
- ```html
17
- <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
18
- ```
19
-
20
- CORRECT - modern pattern (always use latest version):
21
- ```html
22
- <script type="importmap">
23
- {
24
- "imports": {
25
- "three": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.module.js",
26
- "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.185.0/examples/jsm/"
27
- }
28
- }
29
- </script>
30
- <script type="module">
31
- import * as THREE from 'three';
32
- import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
33
- </script>
34
- ```
35
-
36
- ### 2. Choosing Between WebGLRenderer and WebGPURenderer
37
-
38
- Three.js maintains both renderers:
39
-
40
- **Use WebGLRenderer** (default, mature):
41
- - Maximum browser compatibility
42
- - Well-established, many years of development
43
- - Most examples and tutorials use this
44
-
45
- ```js
46
- import * as THREE from 'three';
47
- const renderer = new THREE.WebGLRenderer();
48
- ```
49
-
50
- **Use WebGPURenderer** when you need:
51
- - Custom shaders/materials using TSL (Three.js Shading Language)
52
- - Compute shaders
53
- - Advanced node-based materials
54
-
55
- ```js
56
- import * as THREE from 'three/webgpu';
57
- const renderer = new THREE.WebGPURenderer();
58
- await renderer.init();
59
- ```
60
-
61
- ### 3. TSL (Three.js Shading Language)
62
-
63
- When using WebGPURenderer, use TSL instead of raw GLSL for custom materials:
64
-
65
- ```js
66
- import { texture, uv, color } from 'three/tsl';
67
-
68
- const material = new THREE.MeshStandardNodeMaterial();
69
- material.colorNode = texture( myTexture ).mul( color( 0xff0000 ) );
70
- ```
71
-
72
- TSL benefits:
73
- - Works with both WebGL and WebGPU backends
74
- - No string manipulation or onBeforeCompile hacks
75
- - Type-safe, composable shader nodes
76
- - Automatic optimization
77
-
78
- ### 4. NodeMaterial Classes (for WebGPU/TSL)
79
-
80
- When using TSL, use node-based materials:
81
- - MeshBasicNodeMaterial
82
- - MeshStandardNodeMaterial
83
- - MeshPhysicalNodeMaterial
84
- - LineBasicNodeMaterial
85
- - SpriteNodeMaterial
86
-
87
- ---
88
-
89
- ## Complete Code Examples
90
-
91
- ### Basic Scene with WebGLRenderer
92
-
93
- ```html
94
- <!DOCTYPE html>
95
- <html>
96
- <head>
97
- <meta charset="utf-8">
98
- <title>Three.js Basic Scene</title>
99
- <style>
100
- body { margin: 0; }
101
- </style>
102
- </head>
103
- <body>
104
- <script type="importmap">
105
- {
106
- "imports": {
107
- "three": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.module.js",
108
- "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.185.0/examples/jsm/"
109
- }
110
- }
111
- </script>
112
- <script type="module">
113
- import * as THREE from 'three';
114
- import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
115
-
116
- // Scene
117
- const scene = new THREE.Scene();
118
-
119
- // Camera
120
- const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
121
- camera.position.z = 5;
122
-
123
- // Renderer
124
- const renderer = new THREE.WebGLRenderer( { antialias: true } );
125
- renderer.setSize( window.innerWidth, window.innerHeight );
126
- renderer.setPixelRatio( window.devicePixelRatio );
127
- document.body.appendChild( renderer.domElement );
128
-
129
- // Controls
130
- const controls = new OrbitControls( camera, renderer.domElement );
131
-
132
- // Lighting
133
- const ambientLight = new THREE.AmbientLight( 0x404040 );
134
- scene.add( ambientLight );
135
-
136
- const directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
137
- directionalLight.position.set( 5, 5, 5 );
138
- scene.add( directionalLight );
139
-
140
- // Mesh
141
- const geometry = new THREE.BoxGeometry( 1, 1, 1 );
142
- const material = new THREE.MeshStandardMaterial( { color: 0x00ff00 } );
143
- const cube = new THREE.Mesh( geometry, material );
144
- scene.add( cube );
145
-
146
- // Handle resize
147
- window.addEventListener( 'resize', () => {
148
- camera.aspect = window.innerWidth / window.innerHeight;
149
- camera.updateProjectionMatrix();
150
- renderer.setSize( window.innerWidth, window.innerHeight );
151
- } );
152
-
153
- // Animation loop
154
- function animate() {
155
- cube.rotation.x += 0.01;
156
- cube.rotation.y += 0.01;
157
- controls.update();
158
- renderer.render( scene, camera );
159
- }
160
- renderer.setAnimationLoop( animate );
161
- </script>
162
- </body>
163
- </html>
164
- ```
165
-
166
- ### Basic Scene with WebGPURenderer and TSL
167
-
168
- ```html
169
- <!DOCTYPE html>
170
- <html>
171
- <head>
172
- <meta charset="utf-8">
173
- <title>Three.js WebGPU Scene</title>
174
- <style>
175
- body { margin: 0; }
176
- </style>
177
- </head>
178
- <body>
179
- <script type="importmap">
180
- {
181
- "imports": {
182
- "three": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.webgpu.js",
183
- "three/tsl": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.tsl.js",
184
- "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.185.0/examples/jsm/"
185
- }
186
- }
187
- </script>
188
- <script type="module">
189
- import * as THREE from 'three';
190
- import { color, positionLocal, sin, time } from 'three/tsl';
191
- import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
192
-
193
- // Scene
194
- const scene = new THREE.Scene();
195
-
196
- // Camera
197
- const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
198
- camera.position.z = 5;
199
-
200
- // Renderer
201
- const renderer = new THREE.WebGPURenderer( { antialias: true } );
202
- renderer.setSize( window.innerWidth, window.innerHeight );
203
- renderer.setPixelRatio( window.devicePixelRatio );
204
- document.body.appendChild( renderer.domElement );
205
-
206
- await renderer.init();
207
-
208
- // Controls
209
- const controls = new OrbitControls( camera, renderer.domElement );
210
-
211
- // Lighting
212
- const ambientLight = new THREE.AmbientLight( 0x404040 );
213
- scene.add( ambientLight );
214
-
215
- const directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
216
- directionalLight.position.set( 5, 5, 5 );
217
- scene.add( directionalLight );
218
-
219
- // Custom TSL material
220
- const material = new THREE.MeshStandardNodeMaterial();
221
- material.colorNode = color( 0x00ff00 ).mul( sin( time ).mul( 0.5 ).add( 0.5 ) );
222
- material.positionNode = positionLocal.add( sin( time.add( positionLocal.y ) ).mul( 0.1 ) );
223
-
224
- // Mesh
225
- const geometry = new THREE.BoxGeometry( 1, 1, 1 );
226
- const cube = new THREE.Mesh( geometry, material );
227
- scene.add( cube );
228
-
229
- // Handle resize
230
- window.addEventListener( 'resize', () => {
231
- camera.aspect = window.innerWidth / window.innerHeight;
232
- camera.updateProjectionMatrix();
233
- renderer.setSize( window.innerWidth, window.innerHeight );
234
- } );
235
-
236
- // Animation loop
237
- function animate() {
238
- cube.rotation.x += 0.01;
239
- cube.rotation.y += 0.01;
240
- controls.update();
241
- renderer.render( scene, camera );
242
- }
243
- renderer.setAnimationLoop( animate );
244
- </script>
245
- </body>
246
- </html>
247
- ```
248
-
249
- ### Loading a GLTF Model
250
-
251
- ```js
252
- import * as THREE from 'three';
253
- import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
254
-
255
- const loader = new GLTFLoader();
256
-
257
- loader.load(
258
- 'model.glb',
259
- ( gltf ) => {
260
- scene.add( gltf.scene );
261
- },
262
- ( progress ) => {
263
- console.log( ( progress.loaded / progress.total * 100 ) + '% loaded' );
264
- },
265
- ( error ) => {
266
- console.error( 'Error loading model:', error );
267
- }
268
- );
269
- ```
270
-
271
- ---
272
-
273
- # TSL (Three.js Shading Language) - Complete Reference
274
-
275
- ## TSL Specification
276
-
277
- An Approach to Productive and Maintainable Shader Creation.
278
-
279
- - [Introduction](#introduction)
280
- - [Why TSL?](#why-tsl)
281
- - [Example](#example)
282
- - [Architecture](#architecture)
283
- - [Learning TSL](#learning-tsl)
284
- - [Constants and explicit conversions](#constants-and-explicit-conversions)
285
- - [Conversions](#conversions)
286
- - [Uniform](#uniform)
287
- - [onUpdate](#uniformonupdate)
288
- - [Swizzle](#swizzle)
289
- - [Operators](#operators)
290
- - [Function](#function)
291
- - [Variables](#variables)
292
- - [Array](#array)
293
- - [Uniform](#array-uniform)
294
- - [Varying](#varying)
295
- - [Conditional](#conditional)
296
- - [If-else](#if-else)
297
- - [Switch-case](#switch-case)
298
- - [Ternary](#ternary)
299
- - [Loop](#loop)
300
- - [Math](#math)
301
- - [Method chaining](#method-chaining)
302
- - [Texture](#texture)
303
- - [Attributes](#attributes)
304
- - [Position](#position)
305
- - [Normal](#normal)
306
- - [Tangent](#tangent)
307
- - [Bitangent](#bitangent)
308
- - [Camera](#camera)
309
- - [Model](#model)
310
- - [Screen](#screen)
311
- - [Viewport](#viewport)
312
- - [Blend Modes](#blend-modes)
313
- - [Reflect](#reflect)
314
- - [UV Utils](#uv-utils)
315
- - [Interpolation](#interpolation)
316
- - [Random](#random)
317
- - [Rotate](#rotate)
318
- - [Oscillator](#oscillator)
319
- - [Timer](#timer)
320
- - [Packing](#packing)
321
- - [Render Pipeline](#render-pipeline)
322
- - [Multiple Render Targets](#multiple-render-targets-mrt)
323
- - [Post-Processing](#post-processing)
324
- - [Render Pass](#render-pass)
325
- - [Compute](#compute)
326
- - [Storage](#storage)
327
- - [Struct](#struct)
328
- - [Flow Control](#flow-control)
329
- - [Override Node](#override-node)
330
- - [Fog](#fog)
331
- - [Color Adjustments](#color-adjustments)
332
- - [Utilities](#utilities)
333
- - [NodeMaterial](#nodematerial)
334
- - [LineDashedNodeMaterial](#linedashednodematerial)
335
- - [MeshPhongNodeMaterial](#meshphongnodematerial)
336
- - [MeshStandardNodeMaterial](#meshstandardnodematerial)
337
- - [MeshPhysicalNodeMaterial](#meshphysicalnodematerial)
338
- - [SpriteNodeMaterial](#spritenodematerial)
339
- - [Transitioning common GLSL properties to TSL](#transitioning-common-glsl-properties-to-tsl)
340
-
341
- ## Introduction
342
-
343
- ### Why TSL?
344
-
345
- 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.
346
-
347
- 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`.
348
-
349
- 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.
350
-
351
- ### Example
352
-
353
- 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.
354
-
355
- #### Old
356
-
357
- This is how we would achieve that using `.onBeforeCompile()`:
358
-
359
- ```js
360
- const material = new THREE.MeshStandardMaterial();
361
- material.map = colorMap;
362
- material.onBeforeCompile = ( shader ) => {
363
-
364
- shader.uniforms.detailMap = { value: detailMap };
365
-
366
- let token = '#define STANDARD';
367
-
368
- let insert = /* glsl */`
369
- uniform sampler2D detailMap;
370
- `;
371
-
372
- shader.fragmentShader = shader.fragmentShader.replace( token, token + insert );
373
-
374
- token = '#include <map_fragment>';
375
-
376
- insert = /* glsl */`
377
- diffuseColor *= texture2D( detailMap, vMapUv * 10.0 );
378
- `;
379
-
380
- shader.fragmentShader = shader.fragmentShader.replace( token, token + insert );
381
-
382
- };
383
- ```
384
-
385
- 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.
386
-
387
- #### New
388
-
389
- With `TSL` the code would look like this:
390
-
391
- ```js
392
- import { texture, uv } from 'three/tsl';
393
-
394
- const detail = texture( detailMap, uv().mul( 10 ) );
395
-
396
- const material = new THREE.MeshStandardNodeMaterial();
397
- material.colorNode = texture( colorMap ).mul( detail );
398
- ```
399
-
400
- `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`.
401
-
402
- 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.
403
-
404
- 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.
405
-
406
- ### Architecture
407
-
408
- 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.
409
-
410
- 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.
411
-
412
- The build process is based on three pillars: `setup`, `analyze` and `generate`.
413
-
414
- | | |
415
- | -- | -- |
416
- | `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. |
417
- | `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. |
418
- | `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. |
419
-
420
- `Node` also have a native update process invoked by the `update()` function, these events be called by `frame`, `render call` and `object draw`.
421
-
422
- It is also possible to serialize or deserialize a `Node` using `serialize()` and `deserialize()` functions.
423
-
424
- ## Learning TSL
425
-
426
- 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.
427
-
428
- ### Seamless Integration with JavaScript/TypeScript
429
-
430
- - Unified Code
431
- - Write shader logic directly in JS/TS, eliminating the need to manipulate strings.
432
- - Create and manipulate render objects just like any other JavaScript logic inside a TSL function.
433
- - Advanced events to control a Node before and after the object is rendered.
434
- - JS Ecosystem
435
- - Use native **import/export**, **NPM**, and integrate **JS/TS** components directly into your shader logic.
436
- - Typing
437
- - Benefit from better type checking (especially with **TypeScript** and **[@three-types](https://github.com/three-types/three-ts-types)**), increasing code robustness.
438
-
439
- ### Shader-Graph Inspired Structure
440
-
441
- - Focus on Intent
442
- - Build materials by connecting nodes through: [positionWorld](#position), [normalWorld](#normal), [screenUV](#screen), [attribute()](#attributes), etc.
443
- More declarative("what") vs. imperative("how").
444
- - Composition & High-Level Concepts
445
- - 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.
446
- - Keeping an eye on software exchange
447
- - Modern 3D authoring software uses Shader-Graph based material composition to exchange between other software. TSL already has its own MaterialX integration.
448
- - Easier Migration
449
- - Many functions are directly inspired by GLSL to smooth the learning curve for those with prior experience.
450
-
451
- ### Rendering Manipulation
452
-
453
- - Control rendering steps and create new render-passes per individual TSL functions.
454
- - 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.
455
- - `gaussianBlur()`: Double render-pass gaussian blur node. It can be used in the material or in post-processing through a single function.
456
- - Easy access to renderer buffers using TSL functions like:
457
- - `viewportSharedTexture()`: Accesses the beauty what has already been rendered, preserving the render-order.
458
- - `viewportLinearDepth()`: Accesses the depth what has already been rendered, preserving the render-order.
459
- - Integrated Compute Shaders
460
- - Perform calculations on buffers using compute stage directly during an object's rendering.
461
- - 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.
462
- - You just need to use the events of a Node for the renderer manipulations, without needing to modify the core.
463
-
464
- ### Automatic Optimization and Workarounds
465
-
466
- - Your TSL code automatically benefits from optimizations and workarounds implemented in the Three.js compiler with each new version.
467
- - Simplifications
468
- - Automatic type conversions.
469
- - Execute a block of code in vertex-stage and get it in fragment-stage just using `vertexStage( node )`.
470
- - Automatically choose interpolation method for varyings depending on type.
471
- - Don't worry about collisions of global variables internally when using Nodes.
472
- - Polyfills
473
- - e.g: `textureSample()` function in the vertex shader (not natively supported in WGSL) is correctly transpiled to work.
474
- - e.g: Automatic correction for the `pow()` function, which didn't accept negative bases on Windows/DirectX using WGSL.
475
- - Optimizations
476
- - Repeated expressions: TSL can automatically create temporary variables to avoid redundant calculations.
477
- - Automatic reuse of uniforms and attributes.
478
- - Creating varying only if necessary. Otherwise they are replaced by simple variables.
479
-
480
- ### Target audience
481
- - Beginners users
482
- - You only need one line to create your first custom shader.
483
- - Advanced users
484
- - Makes creating shaders simple but not limited. Example: https://www.youtube.com/watch?v=C2gDL9Qk_vo
485
- - If you don't like fixed pipelines and low level, you'll love this.
486
-
487
- ### Share everything
488
-
489
- #### TSL is based on Nodes, so don’t worry about sharing your **functions** and **uniforms** across materials and post-processing.
490
-
491
- ```js
492
- // Shared the same uniform with various materials
493
-
494
- const sharedColor = uniform( new THREE.Color() );
495
-
496
- materialA.colorNode = sharedColor.div( 2 );
497
- materialB.colorNode = sharedColor.mul( .5 );
498
- materialC.colorNode = sharedColor.add( .5 );
499
- ```
500
-
501
- #### Deferred Function: High level of customization, goodby **#defines**
502
-
503
- 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.
504
-
505
- ```js
506
- // Returns an uniform of the material's custom color if it exists
507
-
508
- const customColor = Fn( ( { material, geometry, object } ) => {
509
-
510
- if ( material.userData.customColor !== undefined ) {
511
-
512
- return uniform( material.userData.customColor );
513
-
514
- }
515
-
516
- return vec3( 0 );
517
-
518
- } );
519
-
520
- //
521
-
522
- material.colorNode = customColor();
523
-
524
- ```
525
-
526
- #### Load a texture-based matrix inside a TSL function
527
-
528
- 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.
529
-
530
- ```js
531
- let bayer16Texture = null;
532
-
533
- export const bayer16 = Fn( ( [ uv ] ) => {
534
-
535
- if ( bayer16Texture === null ) {
536
-
537
- const bayer16Base64 = 'data:image/png;base64,...==';
538
-
539
- bayer16Texture = new TextureLoader().load( bayer16Base64 );
540
-
541
- }
542
-
543
- return textureLoad( bayer16Texture, ivec2( uv ).mod( int( 16 ) ) );
544
-
545
- } );
546
-
547
- //
548
-
549
- material.colorNode = bayer16( screenCoordinate );
550
-
551
- ```
552
-
553
- #### The node architecture allows the creation of instances of custom attributes and buffers through simple functions.
554
-
555
- ```js
556
- // Range values node example
557
-
558
- const randomColor = range( new THREE.Color( 0x000000 ), new THREE.Color( 0xFFFFFF ) );
559
-
560
- material.colorNode = randomColor;
561
-
562
- //...
563
-
564
- const mesh = new THREE.InstancedMesh( geometry, material, count );
565
- ```
566
-
567
- #### TSL loves JavaScript
568
-
569
- TSL syntax follows JavaScript style because they are the same thing, so if you come from GLSL you can explore new possibilities.
570
-
571
- ```js
572
- // A simple example of Function closure
573
-
574
- const mainTask = Fn( () => {
575
-
576
- const task2 = Fn( ( [ a, b ] ) => {
577
-
578
- return a.add( b ).mul( 0.5 );
579
-
580
- } );
581
-
582
-
583
- return task2( color( 0x00ff00 ), color( 0x0000ff ) );
584
-
585
- } );
586
-
587
- //
588
-
589
- material.colorNode = mainTask();
590
- ```
591
-
592
- #### Simplification
593
-
594
- Double render-pass `gaussianBlur()` node. It can be used in the material or in post-processing through a single function.
595
-
596
- ```js
597
- // Applies a double render-pass gaussianBlur and then a grayscale filter before the object with the material is rendered.
598
-
599
- const myTexture = texture( map );
600
-
601
- material.colorNode = grayscale( gaussianBlur( myTexture, 4 ) );
602
- ```
603
-
604
- Accesses what has already been rendered, preserving the render-order for easy refraction effects, avoiding multiple render-pass and manual sorts.
605
-
606
- ```js
607
- // Leaving the back in grayscale.
608
-
609
- material.colorNode = grayscale( viewportSharedTexture( screenUV ) );
610
- material.transparent = true;
611
- ```
612
-
613
- #### Extend the TSL
614
-
615
- 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.
616
-
617
- A great example of this is [TSL-Textures](https://boytchev.github.io/tsl-textures/).
618
-
619
- ```js
620
- import * as THREE from 'three';
621
- import { simplexNoise } from 'tsl-textures';
622
-
623
- material.colorNode = simplexNoise ( {
624
- scale: 2,
625
- balance: 0,
626
- contrast: 0,
627
- color: new THREE.Color(16777215),
628
- background: new THREE.Color(0),
629
- seed: 0
630
- } );
631
-
632
- ```
633
-
634
- ## Constants and explicit conversions
635
-
636
- Input functions can be used to create contants and do explicit conversions.
637
- > Conversions are also performed automatically if the output and input are of different types.
638
-
639
- | Name | Returns a constant or convertion of type: |
640
- | -- | -- |
641
- | `float( node\|number )` | `float` |
642
- | `int( node\|number )` | `int` |
643
- | `uint( node\|number )` | `uint` |
644
- | `bool( node\|value )` | `boolean` |
645
- | `color( node\|hex\|r,g,b )` | `color` |
646
- | `vec2( node\|Vector2\|x,y )` | `vec2` |
647
- | `vec3( node\|Vector3\|x,y,z )` | `vec3` |
648
- | `vec4( node\|Vector4\|x,y,z,w )` | `vec4` |
649
- | `mat2( node\|Matrix2\|a,b,c,d )` | `mat2` |
650
- | `mat3( node\|Matrix3\|a,b,c,d,e,f,g,h,i )` | `mat3` |
651
- | `mat4( node\|Matrix4\|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )` | `mat4` |
652
- | `ivec2( node\|x,y )` | `ivec2` |
653
- | `ivec3( node\|x,y,z )` | `ivec3` |
654
- | `ivec4( node\|x,y,z,w )` | `ivec4` |
655
- | `uvec2( node\|x,y )` | `uvec2` |
656
- | `uvec3( node\|x,y,z )` | `uvec3` |
657
- | `uvec4( node\|x,y,z,w )` | `uvec4` |
658
- | `bvec2( node\|x,y )` | `bvec2` |
659
- | `bvec3( node\|x,y,z )` | `bvec3` |
660
- | `bvec4( node\|x,y,z,w )` | `bvec4` |
661
-
662
- Example:
663
-
664
- ```js
665
- import { color, vec2, positionWorld } from 'three/tsl';
666
-
667
- // constant
668
- material.colorNode = color( 0x0066ff );
669
-
670
- // conversion
671
- material.colorNode = vec2( positionWorld ); // result positionWorld.xy
672
- ```
673
-
674
- ## Conversions
675
-
676
- It is also possible to perform conversions using the `method chaining`:
677
-
678
- | Name | Returns a constant or conversion of type: |
679
- | -- | -- |
680
- | `.toFloat()` | `float` |
681
- | `.toInt()` | `int` |
682
- | `.toUint()` | `uint` |
683
- | `.toBool()` | `boolean` |
684
- | `.toColor()` | `color` |
685
- | `.toVec2()` | `vec2` |
686
- | `.toVec3()` | `vec3` |
687
- | `.toVec4()` | `vec4` |
688
- | `.toMat2()` | `mat2` |
689
- | `.toMat3()` | `mat3` |
690
- | `.toMat4()` | `mat4` |
691
- | | |
692
- | `.toIVec2()` | `ivec2` |
693
- | `.toIVec3()` | `ivec3` |
694
- | `.toIVec4()` | `ivec4` |
695
- | `.toUVec2()` | `uvec2` |
696
- | `.toUVec3()` | `uvec3` |
697
- | `.toUVec4()` | `uvec4` |
698
- | `.toBVec2()` | `bvec2` |
699
- | `.toBVec3()` | `bvec3` |
700
- | `.toBVec4()` | `bvec4` |
701
-
702
- Example:
703
-
704
- ```js
705
- import { positionWorld } from 'three/tsl';
706
-
707
- // conversion
708
- material.colorNode = positionWorld.toVec2(); // result positionWorld.xy
709
- ```
710
-
711
- ## Uniform
712
-
713
- 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.
714
-
715
- | Name | Description |
716
- | -- | -- |
717
- | `uniform( boolean \| number \| Color \| Vector2 \| Vector3 \| Vector4 \| Matrix3 \| Matrix4, type = null )` | Dynamic values. |
718
-
719
- Example:
720
-
721
- ```js
722
- const myColor = uniform( new THREE.Color( 0x0066FF ) );
723
-
724
- material.colorNode = myColor;
725
- ```
726
-
727
- ### `uniform.on*Update()`
728
-
729
- It is also possible to create update events on `uniforms`, which can be defined by the user:
730
-
731
- | Name | Description |
732
- | -- | -- |
733
- | `.onObjectUpdate( function )` | It will be updated every time an object like `Mesh` is rendered with this `node` in `Material`. |
734
- | `.onRenderUpdate( function )` | It will be updated once per render, common and shared materials, fog, tone mapping, etc. |
735
- | `.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. |
736
-
737
- Example:
738
-
739
- ```js
740
- const posY = uniform( 0 ); // it's possible use uniform( 'float' )
741
-
742
- // or using event to be done automatically
743
- // { object } will be the current rendering object
744
- posY.onObjectUpdate( ( { object } ) => object.position.y );
745
-
746
- // you can also update manually using the .value property
747
- posY.value = object.position.y;
748
-
749
- material.colorNode = posY;
750
- ```
751
-
752
- ## Swizzle
753
-
754
- 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:
755
-
756
- ```js
757
- const original = vec3( 1.0, 2.0, 3.0 ); // (x, y, z)
758
- const swizzled = original.zyx; // swizzled = (3.0, 2.0, 1.0)
759
- ```
760
-
761
- It's possible use `xyzw`, `rgba` or `stpq`.
762
-
763
- ## Operators
764
-
765
- | Name | Description |
766
- | -- | -- |
767
- | `.add( node \| value, ... )` | Return the addition of two or more value. |
768
- | `.sub( node \| value )` | Return the subtraction of two or more value. |
769
- | `.mul( node \| value )` | Return the multiplication of two or more value. |
770
- | `.div( node \| value )` | Return the division of two or more value. |
771
- | `.mod( node \| value )` | Computes the remainder of dividing the first node by the second. |
772
- | `.equal( node \| value )` | Checks if two nodes are equal. |
773
- | `.notEqual( node \| value )` | Checks if two nodes are not equal. |
774
- | `.lessThan( node \| value )` | Checks if the first node is less than the second. |
775
- | `.greaterThan( node \| value )` | Checks if the first node is greater than the second. |
776
- | `.lessThanEqual( node \| value )` | Checks if the first node is less than or equal to the second. |
777
- | `.greaterThanEqual( node \| value )` | Checks if the first node is greater than or equal to the second. |
778
- | `.and( node \| value )` | Performs logical AND on two nodes. |
779
- | `.or( node \| value )` | Performs logical OR on two nodes. |
780
- | `.not( node \| value )` | Performs logical NOT on a node. |
781
- | `.xor( node \| value )` | Performs logical XOR on two nodes. |
782
- | `.bitAnd( node \| value )` | Performs bitwise AND on two nodes. |
783
- | `.bitNot( node \| value )` | Performs bitwise NOT on a node. |
784
- | `.bitOr( node \| value )` | Performs bitwise OR on two nodes. |
785
- | `.bitXor( node \| value )` | Performs bitwise XOR on two nodes. |
786
- | `.shiftLeft( node \| value )` | Shifts a node to the left. |
787
- | `.shiftRight( node \| value )` | Shifts a node to the right. |
788
- | | |
789
- | `.assign( node \| value )` | Assign one or more value to a and return the same. |
790
- | `.addAssign( node \| value )` | Adds a value and assigns the result. |
791
- | `.subAssign( node \| value )` | Subtracts a value and assigns the result. |
792
- | `.mulAssign( node \| value )` | Multiplies a value and assigns the result. |
793
- | `.divAssign( node \| value )` | Divides a value and assigns the result. |
794
-
795
- ```js
796
- const a = float( 1 );
797
- const b = float( 2 );
798
-
799
- const result = a.add( b ); // output: 3
800
- ```
801
-
802
- ## Function
803
-
804
- ### `Fn( function, layout = null )`
805
-
806
- 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.
807
-
808
- Example:
809
-
810
- ```js
811
- // tsl function
812
- const oscSine = Fn( ( [ t = time ] ) => {
813
-
814
- return t.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
815
-
816
- } );
817
-
818
- // inline function
819
- export const oscSine = ( t = time ) => t.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
820
- ```
821
- > Both above can be called with `oscSin( value )`.
822
-
823
- TSL allows the entry of parameters as object, this is useful in functions that have many optional arguments.
824
-
825
- Example:
826
-
827
- ```js
828
- const oscSine = Fn( ( { timer = time } ) => {
829
-
830
- return timer.add( 0.75 ).mul( Math.PI * 2 ).sin().mul( 0.5 ).add( 0.5 );
831
-
832
- } );
833
-
834
- const value = oscSine( { timer: value } );
835
- ```
836
-
837
- Parameters as object also allows traditional calls as an array, enabling different types of usage.
838
-
839
- ```js
840
- const col = Fn( ( { r, g, b } ) => {
841
-
842
- return vec3( r, g, b );
843
-
844
- } );
845
-
846
-
847
- // Any of the options below will return a green color.
848
-
849
- material.colorNode = col( 0, 1, 0 ); // option 1
850
- material.colorNode = col( { r: 0, g: 1, b: 0 } ); // option 2
851
- ```
852
-
853
- If you want to use an export function compatible with `tree shaking`, remember to use `/*@__PURE__*/`
854
-
855
- ```js
856
- export const oscSawtooth = /*@__PURE__*/ Fn( ( [ timer = time ] ) => timer.fract() );
857
- ```
858
-
859
- 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.
860
-
861
- [See an example](#deferred-function-high-level-of-customization-goodby-defines)
862
-
863
- ## Variables
864
-
865
- Functions used to declare variables.
866
-
867
- | Name | Description |
868
- | -- | -- |
869
- | `.toVar( node, name = null )` or `Var( node, name = null )` | Converts a node into a reusable variable in the shader. |
870
- | `.toConst( node, name = null )` or `Const( node, name = null )` | Converts a node into an inline constant. |
871
- | `property( type, name = null )` | Declares an property but does not assign an initial value. |
872
-
873
- The name is optional; if set to `null`, the node system will generate one automatically.
874
- Creating a variable, constant, or property can help optimize the shader graph manually or assist in debugging.
875
-
876
- ```js
877
- const uvScaled = uv().mul( 10 ).toVar();
878
-
879
- material.colorNode = texture( map, uvScaled );
880
- ```
881
-
882
- ***
883
-
884
- ## Array
885
-
886
- The array() function in TSL allows creating constant or dynamic value arrays; there are many ways to create arrays in TSL.
887
-
888
- #### The standard way
889
-
890
- ```js
891
- const colors = array( [
892
- vec3( 1, 0, 0 ),
893
- vec3( 0, 1, 0 ),
894
- vec3( 0, 0, 1 )
895
- ] );
896
-
897
- const greenColor = colors.element( 1 );
898
-
899
- // greenColor: vec3( 0, 1, 0 )
900
- ```
901
-
902
- #### Fixed size
903
-
904
- ```js
905
- const a = array( 'vec3', 2 );
906
-
907
- // a: [ vec3( 0, 0, 0 ), vec3( 0, 0, 0 ) ]
908
- ```
909
-
910
- #### Fill with a default value
911
-
912
- ```js
913
- const a = vec3( 0, 0, 1 ).toArray( 2 );
914
-
915
- // a: [ vec3( 0, 0, 1 ), vec3( 0, 0, 1 ) ]
916
- ```
917
-
918
- #### Define a type explicitly
919
-
920
- ```js
921
- const a = array( [ 0, 1, 2 ], 'uint' );
922
- const value = a.element( 1 );
923
-
924
- // value: 1u
925
- ```
926
-
927
- ### Array Uniform
928
-
929
- It is possible to use the same array logic for uniforms using Three.js native components or primitive values.
930
-
931
- ```js
932
- const tintColors = uniformArray( [
933
- new Color( 1, 0, 0 ),
934
- new Color( 0, 1, 0 ),
935
- new Color( 0, 0, 1 )
936
- ], 'color' );
937
-
938
- const redColor = tintColors.element( 0 );
939
- ```
940
-
941
- #### Accessing values
942
-
943
- 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.
944
-
945
- ### Array Storage
946
-
947
- It is possible to create arrays that can be used in compute shaders and storage operations.
948
-
949
- | Name | Description |
950
- | -- | -- |
951
- | `instancedArray( array, type )` | Creates an instanced buffer attribute array. |
952
- | `attributeArray( array, type )` | Creates a buffer attribute array. |
953
-
954
- ## Varying
955
-
956
- Functions used to declare varying.
957
-
958
- | Name | Description |
959
- | -- | -- |
960
- | `vertexStage( node )` | Computes the node in the vertex stage. |
961
- | `varying( node, name = null )` | Computes the node in the vertex stage and passes interpolated values to the fragment shader. |
962
- | `varyingProperty( type, name = null )` | Declares an varying property but does not assign an initial value. |
963
-
964
- Let's suppose you want to optimize some calculation in the `vertex stage` but are using it in a slot like `material.colorNode`.
965
-
966
- For example:
967
-
968
- ```js
969
- // multiplication will be executed in vertex stage
970
- const normalView = vertexStage( modelNormalMatrix.mul( normalLocal ) );
971
-
972
- // normalize will be computed in fragment stage while `normalView` is computed on vertex stage
973
- material.colorNode = normalView.normalize();
974
- ```
975
-
976
- 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.
977
-
978
- 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.
979
-
980
- ## Conditional
981
-
982
- ### If-else
983
-
984
- `If-else` conditionals can be used within `Fn()`. Conditionals in `TSL` are built using the `If` function:
985
-
986
- ```js
987
- If( conditional, function )
988
- .ElseIf( conditional, function )
989
- .Else( function )
990
- ```
991
- > Notice here the `i` in `If` is capitalized.
992
-
993
- Example:
994
-
995
- In this example below, we will limit the y position of the geometry to 10.
996
-
997
- ```js
998
- const limitPosition = Fn( ( { position } ) => {
999
-
1000
- const limit = 10;
1001
-
1002
- const result = vec3( position );
1003
-
1004
- If( result.y.greaterThan( limit ), () => {
1005
-
1006
- result.y = limit;
1007
-
1008
- } );
1009
-
1010
- return result;
1011
-
1012
- } );
1013
-
1014
- material.positionNode = limitPosition( { position: positionLocal } );
1015
- ```
1016
-
1017
- Example using `elseif`:
1018
-
1019
- ```js
1020
- const limitPosition = Fn( ( { position } ) => {
1021
-
1022
- const limit = 10;
1023
-
1024
- const result = vec3( position );
1025
-
1026
- If( result.y.greaterThan( limit ), () => {
1027
-
1028
- result.y = limit;
1029
-
1030
- } ).ElseIf( result.y.lessThan( limit ), () => {
1031
-
1032
- result.y = limit;
1033
-
1034
- } );
1035
-
1036
- return result;
1037
-
1038
- } );
1039
-
1040
- material.positionNode = limitPosition( { position: positionLocal } );
1041
- ```
1042
- ### Switch-Case
1043
-
1044
- A Switch-Case statement is an alternative way to express conditional logic compared to If-Else.
1045
-
1046
- ```js
1047
- const col = color();
1048
-
1049
- Switch( 0 )
1050
- .Case( 0, () => {
1051
-
1052
- col.assign( color( 1, 0, 0 ) );
1053
-
1054
- } ).Case( 1, () => {
1055
-
1056
- col.assign( color( 0, 1, 0 ) );
1057
-
1058
- } ).Case( 2, 3, () => {
1059
-
1060
- col.assign( color( 0, 0, 1 ) );
1061
-
1062
- } ).Default( () => {
1063
-
1064
- col.assign( color( 1, 1, 1 ) );
1065
-
1066
- } );
1067
- ```
1068
- Notice that there are some rules when using this syntax which differentiate TSL from JavaScript:
1069
-
1070
- - There is no fallthrough support. So each `Case()` statement has an implicit break.
1071
- - A `Case()` statement can hold multiple values (selectors) for testing.
1072
-
1073
- ### Ternary
1074
-
1075
- Different from `if-else`, a ternary conditional will return a value and can be used outside of `Fn()`.
1076
-
1077
- ```js
1078
- const result = select( value.greaterThan( 1 ), 1.0, value );
1079
- ```
1080
- > Equivalent in JavaScript should be: `value > 1 ? 1.0 : value`
1081
-
1082
- ## Loop
1083
-
1084
- This module offers a variety of ways to implement loops in TSL. In it's basic form it's:
1085
- ```js
1086
- Loop( count, ( { i } ) => {
1087
-
1088
- } );
1089
- ```
1090
- However, it is also possible to define a start and end ranges, data types and loop conditions:
1091
- ```js
1092
- Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<', name: 'i' }, ( { i } ) => {
1093
-
1094
- } );
1095
- ```
1096
- Nested loops can be defined in a compacted form:
1097
- ```js
1098
- Loop( 10, 5, ( { i, j } ) => {
1099
-
1100
- } );
1101
- ```
1102
- Loops that should run backwards can be defined like so:
1103
- ```js
1104
- Loop( { start: 10 }, () => {} );
1105
- ```
1106
- It is possible to execute with boolean values, similar to the `while` syntax.
1107
- ```js
1108
- const value = float( 0 );
1109
-
1110
- Loop( value.lessThan( 10 ), () => {
1111
-
1112
- value.addAssign( 1 );
1113
-
1114
- } );
1115
- ```
1116
- The module also provides `Break()` and `Continue()` TSL expression for loop control.
1117
-
1118
- ## Math
1119
-
1120
- | Name | Description |
1121
- | -- | -- |
1122
- | `EPSILON` | A small value used to handle floating-point precision errors. |
1123
- | `INFINITY` | Represent infinity. |
1124
- | `PI` | The mathematical constant π (pi). |
1125
- | `TWO_PI` | Two times π (2π). |
1126
- | `HALF_PI` | Half of π (π/2). |
1127
- | | |
1128
- | `abs( x )` | Return the absolute value of the parameter. |
1129
- | `acos( x )` | Return the arccosine of the parameter. |
1130
- | `all( x )` | Return true if all components of x are true. |
1131
- | `any( x )` | Return true if any component of x is true. |
1132
- | `asin( x )` | Return the arcsine of the parameter. |
1133
- | `atan( y, x )` | Return the arc-tangent of the parameters. |
1134
- | `bitcast( x, y )` | Reinterpret the bits of a value as a different type. |
1135
- | `cbrt( x )` | Return the cube root of the parameter. |
1136
- | `ceil( x )` | Find the nearest integer that is greater than or equal to the parameter. |
1137
- | `clamp( x, min, max )` | Constrain a value to lie between two further values. |
1138
- | `cos( x )` | Return the cosine of the parameter. |
1139
- | `cross( x, y )` | Calculate the cross product of two vectors. |
1140
- | `dFdx( p )` | Return the partial derivative of an argument with respect to x. |
1141
- | `dFdy( p )` | Return the partial derivative of an argument with respect to y. |
1142
- | `degrees( radians )` | Convert a quantity in radians to degrees. |
1143
- | `difference( x, y )` | Calculate the absolute difference between two values. |
1144
- | `distance( x, y )` | Calculate the distance between two points. |
1145
- | `dot( x, y )` | Calculate the dot product of two vectors. |
1146
- | `equals( x, y )` | Return true if x equals y. |
1147
- | `exp( x )` | Return the natural exponentiation of the parameter. |
1148
- | `exp2( x )` | Return 2 raised to the power of the parameter. |
1149
- | `faceforward( N, I, Nref )` | Return a vector pointing in the same direction as another. |
1150
- | `floor( x )` | Find the nearest integer less than or equal to the parameter. |
1151
- | `fract( x )` | Compute the fractional part of the argument. |
1152
- | `fwidth( x )` | Return the sum of the absolute derivatives in x and y. |
1153
- | `inverseSqrt( x )` | Return the inverse of the square root of the parameter. |
1154
- | `length( x )` | Calculate the length of a vector. |
1155
- | `lengthSq( x )` | Calculate the squared length of a vector. |
1156
- | `log( x )` | Return the natural logarithm of the parameter. |
1157
- | `log2( x )` | Return the base 2 logarithm of the parameter. |
1158
- | `max( x, y )` | Return the greater of two values. |
1159
- | `min( x, y )` | Return the lesser of two values. |
1160
- | `mix( x, y, a )` | Linearly interpolate between two values. |
1161
- | `negate( x )` | Negate the value of the parameter ( -x ). |
1162
- | `normalize( x )` | Calculate the unit vector in the same direction as the original vector. |
1163
- | `oneMinus( x )` | Return 1 minus the parameter. |
1164
- | `pow( x, y )` | Return the value of the first parameter raised to the power of the second. |
1165
- | `pow2( x )` | Return the square of the parameter. |
1166
- | `pow3( x )` | Return the cube of the parameter. |
1167
- | `pow4( x )` | Return the fourth power of the parameter. |
1168
- | `radians( degrees )` | Convert a quantity in degrees to radians. |
1169
- | `reciprocal( x )` | Return the reciprocal of the parameter (1/x). |
1170
- | `reflect( I, N )` | Calculate the reflection direction for an incident vector. |
1171
- | `refract( I, N, eta )` | Calculate the refraction direction for an incident vector. |
1172
- | `round( x )` | Round the parameter to the nearest integer. |
1173
- | `saturate( x )` | Constrain a value between 0 and 1. |
1174
- | `sign( x )` | Extract the sign of the parameter. |
1175
- | `sin( x )` | Return the sine of the parameter. |
1176
- | `smoothstep( e0, e1, x )` | Perform Hermite interpolation between two values. |
1177
- | `sqrt( x )` | Return the square root of the parameter. |
1178
- | `step( edge, x )` | Generate a step function by comparing two values. |
1179
- | `tan( x )` | Return the tangent of the parameter. |
1180
- | `transformDirection( dir, matrix )` | Transform the direction of a vector by a matrix and then normalize the result. |
1181
- | `transformNormalByViewMatrix( normal, viewMatrix )` | Transform a normal vector (given in world space) by the view matrix and normalize the result. |
1182
- | `transformNormalByInverseViewMatrix( normal, viewMatrix )` | Transform a normal vector (given in view space) by the inverse of the view matrix and normalize the result. |
1183
- | `trunc( x )` | Truncate the parameter, removing the fractional part. |
1184
-
1185
- ```js
1186
- const value = float( -1 );
1187
-
1188
- // It's possible use `value.abs()` too.
1189
- const positiveValue = abs( value ); // output: 1
1190
- ```
1191
-
1192
- ## Method chaining
1193
-
1194
- `Method chaining` will only be including operators, converters, math and some core functions. These functions, however, can be used on any `node`.
1195
-
1196
- Example:
1197
-
1198
- `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 )`.
1199
-
1200
- ```js
1201
- // it will invert the texture color
1202
- material.colorNode = texture( map ).rgb.oneMinus();
1203
- ```
1204
-
1205
- You can use mathematical operators on any node, e.g:
1206
-
1207
- ```js
1208
- const contrast = .5;
1209
- const brightness = .5;
1210
-
1211
- material.colorNode = texture( map ).mul( contrast ).add( brightness );
1212
- ```
1213
-
1214
- ## Texture
1215
-
1216
- | Name | Description | Type |
1217
- | -- | -- | -- |
1218
- | `texture( texture, uv = uv(), level = null )` | Retrieves texels from a texture. | `vec4` |
1219
- | `textureLoad( texture, uv, level = null )` | Fetches/loads texels without interpolation. | `vec4` |
1220
- | `textureStore( texture, uv, value )` | Stores a value into a storage texture. | `void` |
1221
- | `textureSize( texture, level = null )` | Returns the size of a texture. | `ivec2` |
1222
- | `textureBicubic( textureNode, strength = null )` | Applies mipped bicubic texture filtering. | `vec4` |
1223
- | `cubeTexture( texture, uvw = reflectVector, level = null )` | Retrieves texels from a cube texture. | `vec4` |
1224
- | `texture3D( texture, uvw = null, level = null )` | Retrieves texels from a 3D texture. | `vec4` |
1225
- | `triplanarTexture( textureX, textureY = null, textureZ = null, scale = float( 1 ), position = positionLocal, normal = normalLocal )` | Computes texture using triplanar mapping based on provided parameters. | `vec4` |
1226
-
1227
- ## Attributes
1228
-
1229
- | Name | Description | Type |
1230
- | -- | -- | -- |
1231
- | `attribute( name, type = null )` | Getting geometry attribute using name and type. | `any` |
1232
- | `uv( index = 0 )` | UV attribute named `uv + index`. | `vec2` |
1233
- | `vertexColor( index = 0 )` | Vertex color node for the specified index. | `color` |
1234
- | `instanceIndex` | The index of the current instance. | `uint` |
1235
- | `vertexIndex` | The index of a vertex within a mesh. | `uint` |
1236
- | `drawIndex` | The draw index when using multi-draw. | `uint` |
1237
- | `batch( batchMesh )` | Creates a batch node for BatchedMesh. | `BatchNode` |
1238
- | `instance( instancedMesh )` | Creates an instance node for InstancedMesh. | `InstanceNode` |
1239
-
1240
- ## Position
1241
-
1242
- The transformed term reflects the modifications applied by processes such as `skinning`, `morphing`, and similar techniques.
1243
-
1244
- | Name | Description | Type |
1245
- | -- | -- | -- |
1246
- | `positionGeometry` | Position attribute of geometry. | `vec3` |
1247
- | `positionLocal` | Transformed local position. | `vec3` |
1248
- | `positionWorld` | Transformed world position. | `vec3` |
1249
- | `positionWorldDirection` | Normalized world direction. | `vec3` |
1250
- | `positionView` | View position. | `vec3` |
1251
- | `positionViewDirection` | Normalized view direction. | `vec3` |
1252
-
1253
- ## Normal
1254
-
1255
- The term transformed here also includes following the correct orientation of the face, so that the normals are inverted inside the geometry.
1256
-
1257
- | Name | Description | Type |
1258
- | -- | -- | -- |
1259
- | `normalGeometry` | Normal attribute of geometry. | `vec3` |
1260
- | `normalLocal` | Local variable for normal. | `vec3` |
1261
- | `normalView` | Normalized transformed view normal. | `vec3` |
1262
- | `normalViewGeometry` | Normalized view normal. | `vec3` |
1263
- | `normalWorld` | Normalized transformed world normal. | `vec3` |
1264
- | `normalWorldGeometry` | Normalized world normal. | `vec3` |
1265
-
1266
- ## Tangent
1267
-
1268
- | Name | Description | Type |
1269
- | -- | -- | -- |
1270
- | `tangentGeometry` | Tangent attribute of geometry. | `vec4` |
1271
- | `tangentLocal` | Local variable for tangent. | `vec3` |
1272
- | `tangentView` | Normalized transformed view tangent. | `vec3` |
1273
- | `tangentWorld` | Normalized transformed world tangent. | `vec3` |
1274
-
1275
- ### Bitangent
1276
-
1277
- | Name | Description | Type |
1278
- | -- | -- | -- |
1279
- | `bitangentGeometry` | Normalized bitangent in geometry space. | `vec3` |
1280
- | `bitangentLocal` | Normalized bitangent in local space. | `vec3` |
1281
- | `bitangentView` | Normalized transformed bitangent in view space. | `vec3` |
1282
- | `bitangentWorld` | Normalized transformed bitangent in world space. | `vec3` |
1283
-
1284
- ## Camera
1285
-
1286
- | Name | Description | Type |
1287
- | -- | -- | -- |
1288
- | `cameraNear` | Near plane distance of the camera. | `float` |
1289
- | `cameraFar` | Far plane distance of the camera. | `float` |
1290
- | `cameraProjectionMatrix` | Projection matrix of the camera. | `mat4` |
1291
- | `cameraProjectionMatrixInverse` | Inverse projection matrix of the camera. | `mat4` |
1292
- | `cameraViewMatrix` | View matrix of the camera. | `mat4` |
1293
- | `cameraWorldMatrix` | World matrix of the camera. | `mat4` |
1294
- | `cameraNormalMatrix` | Normal matrix of the camera. | `mat3` |
1295
- | `cameraPosition` | World position of the camera. | `vec3` |
1296
-
1297
- ## Model
1298
-
1299
- | Name | Description | Type |
1300
- | -- | -- | -- |
1301
- | `modelDirection` | Direction of the model. | `vec3` |
1302
- | `modelViewMatrix` | View-space matrix of the model. | `mat4` |
1303
- | `modelNormalMatrix` | View-space matrix of the model. | `mat3` |
1304
- | `modelWorldMatrix` | World-space matrix of the model. | `mat4` |
1305
- | `modelPosition` | Position of the model. | `vec3` |
1306
- | `modelScale` | Scale of the model. | `vec3` |
1307
- | `modelViewPosition` | View-space position of the model. | `vec3` |
1308
- | `modelWorldMatrixInverse` | Inverse world matrix of the model. | `mat4` |
1309
- | | |
1310
- | `highpModelViewMatrix` | View-space matrix of the model computed on CPU using 64-bit. | `mat4` |
1311
- | `highpModelNormalViewMatrix` | View-space normal matrix of the model computed on CPU using 64-bit. | `mat3` |
1312
-
1313
- ## Screen
1314
-
1315
- Screen nodes will return the values related to the current `frame buffer`, either normalized or in `physical pixel units` considering the current `Pixel Ratio`.
1316
-
1317
- | Variable | Description | Type |
1318
- | -- | -- | -- |
1319
- | `screenUV` | Returns the normalized frame buffer coordinate. | `vec2` |
1320
- | `screenCoordinate` | Returns the frame buffer coordinate in physical pixel units. | `vec2` |
1321
- | `screenSize` | Returns the frame buffer size in physical pixel units. | `vec2` |
1322
- | `screenDPR` | Returns the device pixel ratio (DPR). | `float` |
1323
-
1324
- ## Viewport
1325
-
1326
- `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`.
1327
-
1328
- | Variable | Description | Type |
1329
- | -- | -- | -- |
1330
- | `viewportUV` | Returns the normalized viewport coordinate. | `vec2` |
1331
- | `viewport` | Returns the viewport dimension in physical pixel units. | `vec4` |
1332
- | `viewportCoordinate` | Returns the viewport coordinate in physical pixel units. | `vec2` |
1333
- | `viewportSize` | Returns the viewport size in physical pixel units. | `vec2` |
1334
- | `viewportSharedTexture( uvNode = screenUV, levelNode = null )` | Accesses what has already been rendered, preserving render-order. | `vec4` |
1335
- | `viewportDepthTexture( uvNode = screenUV, levelNode = null )` | Returns the depth texture of the viewport. | `float` |
1336
- | `viewportLinearDepth` | Returns the linear (orthographic) depth value of the current fragment. | `float` |
1337
- | `viewportMipTexture( uvNode = screenUV, levelNode = null, framebufferTexture = null )` | Returns a viewport texture with mipmap generation enabled. | `vec4` |
1338
- | `viewportSafeUV( uv = screenUV )` | Returns safe UV coordinates for refraction purposes. | `vec2` |
1339
-
1340
- ## Blend Modes
1341
-
1342
- | Variable | Description | Type |
1343
- | -- | -- | -- |
1344
- | `blendBurn( a, b )` | Returns the burn blend mode. | `color` |
1345
- | `blendDodge( a, b )` | Returns the dodge blend mode. | `color` |
1346
- | `blendOverlay( a, b )` | Returns the overlay blend mode. | `color` |
1347
- | `blendScreen( a, b )` | Returns the screen blend mode. | `color` |
1348
- | `blendColor( a, b )` | Returns the (normal) color blend mode. | `color` |
1349
-
1350
- ## Reflect
1351
-
1352
- | Name | Description | Type |
1353
- | -- | -- | -- |
1354
- | `reflectView` | Computes reflection direction in view space. | `vec3` |
1355
- | `reflectVector` | Transforms the reflection direction to world space. | `vec3` |
1356
-
1357
- ## UV Utils
1358
-
1359
- | Name | Description | Type |
1360
- | -- | -- | -- |
1361
- | `matcapUV` | UV coordinates for matcap texture. | `vec2` |
1362
- | `rotateUV( uv, rotation, centerNode = vec2( 0.5 ) )` | Rotates UV coordinates around a center point. | `vec2` |
1363
- | `spherizeUV( uv, strength, centerNode = vec2( 0.5 ) )` | Distorts UV coordinates with a spherical effect around a center point. | `vec2` |
1364
- | `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` |
1365
- | `equirectUV( direction = positionWorldDirection )` | Computes UV coordinates for equirectangular mapping based on the direction vector. | `vec2` |
1366
- | `equirectDirection( uv = uv() )` | Computes a direction vector from the given equirectangular UV coordinates (inverse of `equirectUV`). | `vec3` |
1367
-
1368
- ```js
1369
- import { texture, matcapUV } from 'three/tsl';
1370
-
1371
- const matcap = texture( matcapMap, matcapUV );
1372
- ```
1373
-
1374
- ## Interpolation
1375
-
1376
- | Variable | Description | Type |
1377
- | -- | -- | -- |
1378
- | `remap( node, inLow, inHigh, outLow = float( 0 ), outHigh = float( 1 ) )` | Remaps a value from one range to another. | `any` |
1379
- | `remapClamp( node, inLow, inHigh, outLow = float( 0 ), outHigh = float( 1 ) )` | Remaps a value from one range to another, with clamping. | `any` |
1380
-
1381
- ## Random
1382
-
1383
- | Variable | Description | Type |
1384
- | -- | -- | -- |
1385
- | `hash( seed )` | Generates a hash value in the range [ 0, 1 ] from the given seed. | `float` |
1386
- | `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` |
1387
-
1388
- ## Rotate
1389
-
1390
- | Name | Description | Type |
1391
- | -- | -- | -- |
1392
- | `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`
1393
-
1394
- ## Oscillator
1395
-
1396
- | Variable | Description | Type |
1397
- | -- | -- | -- |
1398
- | `oscSine( timer = time )` | Generates a sine wave oscillation based on a timer. | `float` |
1399
- | `oscSquare( timer = time )` | Generates a square wave oscillation based on a timer. | `float` |
1400
- | `oscTriangle( timer = time )` | Generates a triangle wave oscillation based on a timer. | `float` |
1401
- | `oscSawtooth( timer = time )` | Generates a sawtooth wave oscillation based on a timer. | `float` |
1402
-
1403
- ## Timer
1404
-
1405
- | Variable | Description | Type |
1406
- | -- | -- | -- |
1407
- | `time` | Represents the elapsed time in seconds. | `float` |
1408
- | `deltaTime` | Represents the delta time in seconds. | `float` |
1409
-
1410
- ## Packing
1411
-
1412
- | Variable | Description | Type |
1413
- | -- | -- | -- |
1414
- | `packNormalToRGB( value )` | Converts normal vector to color. | `color` |
1415
- | `unpackRGBToNormal( value )` | Converts color to normal vector. | `vec3` |
1416
-
1417
- ## Render Pipeline
1418
-
1419
- 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.
1420
-
1421
- #### Basic Usage
1422
-
1423
- ```js
1424
- import * as THREE from 'three/webgpu';
1425
- import { pass } from 'three/tsl';
1426
-
1427
- // Create the render pipeline
1428
- const renderPipeline = new THREE.RenderPipeline( renderer );
1429
-
1430
- // Create a scene pass
1431
- const scenePass = pass( scene, camera );
1432
-
1433
- // Set the output
1434
- renderPipeline.outputNode = scenePass;
1435
-
1436
- // In the animation loop
1437
- function animate() {
1438
-
1439
- renderPipeline.render();
1440
-
1441
- }
1442
- ```
1443
-
1444
- ### Multiple Render Targets (MRT)
1445
-
1446
- 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.
1447
-
1448
- #### Setting up MRT
1449
-
1450
- Use `setMRT()` with the `mrt()` function to define which outputs to capture:
1451
-
1452
- ```js
1453
- import { pass, mrt, output, normalView, velocity, packNormalToRGB } from 'three/tsl';
1454
-
1455
- const scenePass = pass( scene, camera );
1456
-
1457
- scenePass.setMRT( mrt( {
1458
- output: output, // Final color output
1459
- normal: packNormalToRGB( normalView ), // View-space normals encoded as colors
1460
- velocity: velocity // Motion vectors for temporal effects
1461
- } ) );
1462
- ```
1463
-
1464
- Each MRT entry accepts any TSL node, allowing you to customize outputs using formulas, encoders, or material accessors. For example, `packNormalToRGB( 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.
1465
-
1466
- Within a TSL function `Fn( ( { material, object } ) => { ... } )`, you have complete access to the current material and object being rendered, enabling full customization of outputs.
1467
-
1468
- #### Accessing MRT Buffers
1469
-
1470
- Each MRT output becomes available as a texture node via `getTextureNode()`:
1471
-
1472
- ```js
1473
- // Access individual buffers as texture nodes
1474
- const colorTexture = scenePass.getTextureNode( 'output' );
1475
- const normalTexture = scenePass.getTextureNode( 'normal' );
1476
- const velocityTexture = scenePass.getTextureNode( 'velocity' );
1477
-
1478
- // Depth is always available, even without MRT
1479
- const depthTexture = scenePass.getTextureNode( 'depth' );
1480
- ```
1481
-
1482
- These texture nodes can be sampled, transformed, and passed to post-processing effects or other passes.
1483
-
1484
- #### Optimizing MRT Textures
1485
-
1486
- 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:
1487
-
1488
- ```js
1489
- // Use 8-bit format for encoded normals, default is 16-bit
1490
- const normalTexture = scenePass.getTexture( 'normal' );
1491
- normalTexture.type = THREE.UnsignedByteType;
1492
- ```
1493
-
1494
- #### Dynamic Pipeline Updates
1495
-
1496
- The pipeline can be updated at runtime:
1497
-
1498
- ```js
1499
- if ( showNormals ) {
1500
-
1501
- renderPipeline.outputNode = prePass;
1502
-
1503
- } else {
1504
-
1505
- renderPipeline.outputNode = traaPass;
1506
-
1507
- }
1508
-
1509
- renderPipeline.needsUpdate = true;
1510
- ```
1511
-
1512
- ### Post-Processing
1513
-
1514
- TSL utilities for post-processing effects. They can be used in materials or post-processing passes.
1515
-
1516
- | Name | Description |
1517
- | -- | -- |
1518
- | `afterImage( node, damp = 0.96 )` | Creates an after image effect. |
1519
- | `anamorphic( node, threshold = 0.9, scale = 3, samples = 32 )` | Creates an anamorphic flare effect. |
1520
- | `bloom( node, strength = 1, radius = 0, threshold = 0 )` | Creates a bloom effect. |
1521
- | `boxBlur( textureNode, options = {} )` | Applies a box blur effect. |
1522
- | `chromaticAberration( node, strength = 1.0, center = null, scale = 1.1 )` | Creates a chromatic aberration effect. |
1523
- | `denoise( node, depthNode, normalNode, camera )` | Creates a denoise effect. |
1524
- | `dof( node, viewZNode, focusDistance, focalLength, bokehScale )` | Creates a depth-of-field effect. |
1525
- | `dotScreen( node, angle = 1.57, scale = 1 )` | Creates a dot-screen effect. |
1526
- | `film( inputNode, intensityNode = null, uvNode = null )` | Creates a film grain effect. |
1527
- | `fxaa( node )` | Creates a FXAA anti-aliasing effect. |
1528
- | `gaussianBlur( node, directionNode, sigma, options = {} )` | Creates a gaussian blur effect. |
1529
- | `grayscale( color )` | Converts color to grayscale. |
1530
- | `hashBlur( textureNode, bluramount = float( 0.1 ), options = {} )` | Applies a hash blur effect. |
1531
- | `lut3D( node, lut, size, intensity )` | Creates a LUT color grading effect. |
1532
- | `motionBlur( inputNode, velocity, numSamples = int( 16 ) )` | Creates a motion blur effect. |
1533
- | `outline( scene, camera, params )` | Creates an outline effect around selected objects. |
1534
- | `rgbShift( node, amount = 0.005, angle = 0 )` | Creates an RGB shift effect. |
1535
- | `sepia( color )` | Applies a sepia effect. |
1536
- | `smaa( node )` | Creates a SMAA anti-aliasing effect. |
1537
- | `sobel( node )` | Creates a sobel edge detection effect. |
1538
- | `ssr( colorNode, depthNode, normalNode, metalnessNode, roughnessNode = null, camera = null )` | Creates screen space reflections. |
1539
- | `ssgi( beautyNode, depthNode, normalNode, camera )` | Creates a SSGI effect. |
1540
- | `ao( depthNode, normalNode, camera )` | Creates a Ground Truth Ambient Occlusion (GTAO) effect. |
1541
- | `transition( nodeA, nodeB, mixTextureNode, mixRatio, threshold, useTexture )` | Creates a transition effect between two scenes. |
1542
- | `traa( beautyNode, depthNode, velocityNode, camera )` | Creates a TRAA temporal anti-aliasing effect. |
1543
- | `renderOutput( node, targetColorSpace, targetToneMapping )` | Apply the renderer output settings in the node. |
1544
-
1545
- Example:
1546
-
1547
- ```js
1548
- import { grayscale, pass } from 'three/tsl';
1549
- import { gaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
1550
-
1551
- // Post-processing
1552
- const scenePass = pass( scene, camera );
1553
- const output = scenePass.getTextureNode(); // default parameter is 'output'
1554
-
1555
- renderPipeline.outputNode = grayscale( gaussianBlur( output, 4 ) );
1556
- ```
1557
-
1558
- ### Render Pass
1559
-
1560
- Functions for creating and managing render passes.
1561
-
1562
- | Name | Description |
1563
- | -- | -- |
1564
- | `pass( scene, camera, options = {} )` | Creates a pass node for rendering a scene. |
1565
- | `mrt( outputNodes )` | Creates a Multiple Render Targets (MRT) node. |
1566
-
1567
- Example:
1568
-
1569
- ```js
1570
- import { pass, mrt, output, emissive } from 'three/tsl';
1571
-
1572
- const scenePass = pass( scene, camera );
1573
-
1574
- // Setup MRT
1575
- scenePass.setMRT( mrt( {
1576
- output: output,
1577
- emissive: emissive
1578
- } ) );
1579
-
1580
- const outputNode = scenePass.getTextureNode( 'output' );
1581
- const emissiveNode = scenePass.getTextureNode( 'emissive' );
1582
- ```
1583
-
1584
- ### Compute
1585
-
1586
- Compute shaders allow general-purpose GPU computations. TSL provides functions for creating and managing compute operations.
1587
-
1588
- | Name | Description |
1589
- | -- | -- |
1590
- | `compute( node, count = null, workgroupSize = [ 64 ] )` | Creates a compute node. |
1591
- | `atomicAdd( node, value )` | Performs an atomic addition. |
1592
- | `atomicSub( node, value )` | Performs an atomic subtraction. |
1593
- | `atomicMax( node, value )` | Performs an atomic max operation. |
1594
- | `atomicMin( node, value )` | Performs an atomic min operation. |
1595
- | `atomicAnd( node, value )` | Performs an atomic AND operation. |
1596
- | `atomicOr( node, value )` | Performs an atomic OR operation. |
1597
- | `atomicXor( node, value )` | Performs an atomic XOR operation. |
1598
- | `atomicStore( node, value )` | Stores a value atomically. |
1599
- | `atomicLoad( node )` | Loads a value atomically. |
1600
- | `workgroupBarrier()` | Creates a workgroup barrier. |
1601
- | `storageBarrier()` | Creates a storage barrier. |
1602
- | `textureBarrier()` | Creates a texture barrier. |
1603
- | `barrier()` | Creates a memory barrier. |
1604
- | `workgroupId` | The workgroup ID. |
1605
- | `localId` | The local invocation ID within the workgroup. |
1606
- | `globalId` | The global invocation ID. |
1607
- | `numWorkgroups` | The number of workgroups. |
1608
- | `subgroupSize` | The size of the subgroup. |
1609
-
1610
- Example:
1611
-
1612
- ```js
1613
- import { Fn, instancedArray, instanceIndex, deltaTime } from 'three/tsl';
1614
-
1615
- const count = 1000;
1616
- const positionArray = instancedArray( count, 'vec3' );
1617
-
1618
- // create a compute function
1619
-
1620
- const computeShader = Fn( () => {
1621
-
1622
- const position = positionArray.element( instanceIndex );
1623
-
1624
- position.x.addAssign( deltaTime );
1625
-
1626
- } )().compute( count );
1627
-
1628
- //
1629
-
1630
- renderer.compute( computeShader );
1631
- ```
1632
-
1633
- ## Storage
1634
-
1635
- Storage functions allow reading and writing to GPU buffers.
1636
-
1637
- | Name | Description |
1638
- | -- | -- |
1639
- | `storage( attribute, type, count )` | Creates a storage buffer. |
1640
- | `storageTexture( texture )` | Creates a storage texture for read/write operations. |
1641
-
1642
- ## Struct
1643
-
1644
- 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.
1645
-
1646
- | Name | Description |
1647
- | -- | -- |
1648
- | `struct( membersLayout, name = null )` | Creates a struct type with the specified member layout. |
1649
- | `outputStruct( ...members )` | Creates an output struct node for returning multiple values. |
1650
-
1651
- Example:
1652
-
1653
- ```js
1654
- import { struct, vec3 } from 'three/tsl';
1655
-
1656
- // Define a custom struct
1657
- const BoundingBox = struct( { min: 'vec3', max: 'vec3' } );
1658
-
1659
- // Create a new instance of the struct
1660
- const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1
1661
- const bb2 = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2
1662
-
1663
- // Access the struct members
1664
- const min = bb.get( 'min' );
1665
-
1666
- // Assign a new value to a member
1667
- min.assign( vec3( -1, -1, -1 ) );
1668
- ```
1669
-
1670
- ## Flow Control
1671
-
1672
- Functions for controlling shader flow.
1673
-
1674
- | Name | Description |
1675
- | -- | -- |
1676
- | `Discard()` | Discards the current fragment. |
1677
- | `Return()` | Returns from the current function. |
1678
- | `Break()` | Breaks out of a loop. |
1679
- | `Continue()` | Continues to the next iteration of a loop. |
1680
-
1681
- Example:
1682
-
1683
- ```js
1684
- import { Fn, If, Discard, uv } from 'three/tsl';
1685
-
1686
- const customFragment = Fn( () => {
1687
-
1688
- If( uv().x.lessThan( 0.5 ), () => {
1689
-
1690
- Discard();
1691
-
1692
- } );
1693
-
1694
- return vec4( 1, 0, 0, 1 );
1695
-
1696
- } );
1697
-
1698
- material.colorNode = customFragment();
1699
- ```
1700
-
1701
- ## Override Node
1702
-
1703
- Override nodes allow you to replace specific target nodes within a node sub-graph or flow dynamically during compilation, without having to reconstruct or duplicate the source nodes. This is useful, for example, to inject a custom `positionLocal` or normal into an existing flow through the material's `contextNode`.
1704
-
1705
- | Name | Description |
1706
- | -- | -- |
1707
- | `overrideNode( targetNode, callback = null, flowNode = null )` | Overrides a single target node. `callback` returns the overriding node (receiving the builder as argument) or can be the overriding node itself. |
1708
- | `overrideNodes( overrides, flowNode = null )` | Overrides multiple target nodes at once using a `Map` or an array of `[ targetNode, callback \| node ]` pairs. |
1709
-
1710
- Example:
1711
-
1712
- ```js
1713
- import { overrideNode, overrideNodes, positionLocal, positionView, vec3 } from 'three/tsl';
1714
-
1715
- // Override a single node through the material context
1716
- material.contextNode = overrideNode( positionLocal, () => positionLocal.add( vec3( 1, 0, 0 ) ) );
1717
-
1718
- // Override multiple nodes at once
1719
- material.contextNode = overrideNodes( [
1720
- [ positionView, customPositionView ], // You can use a node directly like customPositionView.
1721
- [ positionLocal, ( builder ) => positionLocal.add( vec3( 1, 0, 0 ) ) ]
1722
- ] );
1723
-
1724
- // Method chaining is also supported
1725
- node.overrideNode( positionLocal, () => positionLocal.add( vec3( 1, 0, 0 ) ) );
1726
- ```
1727
-
1728
- ## Fog
1729
-
1730
- Functions for creating fog effects in the scene. Assign the fog node to `scene.fogNode`.
1731
-
1732
- | Name | Description | Type |
1733
- | -- | -- | -- |
1734
- | `fog( color, factor )` | Creates a fog node with specified color and fog factor. | `FogNode` |
1735
- | `rangeFogFactor( near, far )` | Creates a linear fog factor based on distance from camera. | `float` |
1736
- | `densityFogFactor( density )` | Creates an exponential squared fog factor for denser fog. | `float` |
1737
-
1738
- Example:
1739
-
1740
- ```js
1741
- import { fog, rangeFogFactor, densityFogFactor, color } from 'three/tsl';
1742
-
1743
- // Linear fog (starts at 10 units, fully opaque at 100 units)
1744
- scene.fogNode = fog( color( 0x000000 ), rangeFogFactor( 10, 100 ) );
1745
-
1746
- // Exponential fog (density-based)
1747
- scene.fogNode = fog( color( 0xcccccc ), densityFogFactor( 0.02 ) );
1748
- ```
1749
-
1750
- ## Color Adjustments
1751
-
1752
- Functions for adjusting and manipulating colors.
1753
-
1754
- | Name | Description | Type |
1755
- | -- | -- | -- |
1756
- | `luminance( node )` | Calculates the luminance (perceived brightness) of a color. | `float` |
1757
- | `saturation( node, adjustment = 1 )` | Adjusts the saturation of a color. Values > 1 increase saturation, < 1 decrease. | `color` |
1758
- | `vibrance( node, adjustment = 1 )` | Selectively enhances less saturated colors while preserving already saturated ones. | `color` |
1759
- | `hue( node, adjustment = 0 )` | Rotates the hue of a color. Value is in radians. | `color` |
1760
- | `posterize( node, steps )` | Reduces the number of color levels, creating a poster-like effect. | `color` |
1761
-
1762
- Example:
1763
-
1764
- ```js
1765
- import { texture, saturation, hue, posterize } from 'three/tsl';
1766
-
1767
- // Increase saturation
1768
- material.colorNode = saturation( texture( map ), 1.5 );
1769
-
1770
- // Rotate hue by 90 degrees
1771
- material.colorNode = hue( texture( map ), Math.PI / 2 );
1772
-
1773
- // Posterize to 4 color levels
1774
- material.colorNode = posterize( texture( map ), 4 );
1775
- ```
1776
-
1777
- ## Utilities
1778
-
1779
- Utility functions for common shader tasks.
1780
-
1781
- | Name | Description | Type |
1782
- | -- | -- | -- |
1783
- | `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` |
1784
- | `checker( coord )` | Creates a 2x2 checkerboard pattern. | `float` |
1785
- | `negateOnBackSide( vector )` | Negates a vector when rendering the back side of a face, according to the material's `side` configuration (`BackSide`, `DoubleSide` or `FrontSide`). | `vec3` |
1786
-
1787
- Example:
1788
-
1789
- ```js
1790
- import { billboarding } from 'three/tsl';
1791
-
1792
- // Default: Horizontal only (like trees) - rotates around Y axis only
1793
- material.vertexNode = billboarding();
1794
-
1795
- // Full billboarding (like particles) - faces camera in all directions
1796
- material.vertexNode = billboarding( { horizontal: true, vertical: true } );
1797
- ```
1798
-
1799
- ## NodeMaterial
1800
-
1801
- Check below for more details about `NodeMaterial` inputs.
1802
-
1803
- #### Core
1804
-
1805
- | Name | Description | Type |
1806
- |--|--|--|
1807
- | `.fragmentNode` | Replaces the built-in material logic used in the fragment stage. | `vec4` |
1808
- | `.vertexNode` | Replaces the built-in material logic used in the vertex stage. | `vec4` |
1809
- | `.geometryNode` | Allows you to execute a TSL function to deal with Geometry. | `Fn()` |
1810
-
1811
- #### Basic
1812
-
1813
- | Name | Description | Reference | Type |
1814
- |--|--|--|--|
1815
- | `.colorNode` | Replace the logic of `material.color * material.map`. | `materialColor` | `vec4` |
1816
- | `.depthNode` | Customize the `depth` output. | `depth` | `float` |
1817
- | `.opacityNode` | Replace the logic of `material.opacity * material.alphaMap`. | `materialOpacity` | `float` |
1818
- | `.alphaTestNode` | Sets a threshold to discard pixels with low opacity. | `materialAlphaTest` | `float` |
1819
- | `.positionNode` | Represents the vertex positions in local-space. Replace the logic of `material.displacementMap * material.displacementScale + material.displacementBias`. | `positionLocal` | `vec3` |
1820
-
1821
- #### Lighting
1822
-
1823
- | Name | Description | Reference | Type |
1824
- |--|--|--|--|
1825
- | `.emissiveNode` | Replace the logic of `material.emissive * material.emissiveIntensity * material.emissiveMap`. | `materialEmissive` | `color` |
1826
- | `.normalNode` | Represents the normals direction in view-space. Replace the logic of `material.normalMap * material.normalScale` and `material.bumpMap * material.bumpScale`. | `materialNormal` | `vec3` |
1827
- | `.lightsNode` | Defines the lights and lighting model that will be used by the material. | | `lights()` |
1828
- | `.envNode` | Replace the logic of `material.envMap * material.envMapRotation * material.envMapIntensity`. | | `color` |
1829
-
1830
- #### Backdrop
1831
-
1832
- | Name | Description | Type |
1833
- |--|--|--|
1834
- | `.backdropNode` | Set the current render color to be used before applying `Specular`, useful for `transmission` and `refraction` effects. | `color` |
1835
- | `.backdropAlphaNode` | Define the alpha of `backdropNode`. | `float` |
1836
-
1837
- #### Shadows
1838
-
1839
- | Name | Description | Reference | Type |
1840
- |--|--|--|--|
1841
- | `.castShadowNode` | Control the `color` and `opacity` of the shadow that will be projected by the material. | | `vec4` |
1842
- | `.maskShadowNode` | Define a custom mask for the shadow. | | `bool` |
1843
- | `.receivedShadowNode` | Handle the shadow cast on the material. | | `Fn()` |
1844
- | `.receivedShadowPositionNode` | Define the shadow projection position in world-space. | `shadowPositionWorld` | `vec3` |
1845
- | `.aoNode` | Replace the logic of `material.aoMap * aoMapIntensity`. | `materialAO` | `float` |
1846
-
1847
- #### Output
1848
-
1849
- | Name | Description | Reference | Type |
1850
- |--|--|--|--|
1851
- | `.maskNode` | Define the material's mask. Unlike opacity, it is discarded at the beginning of rendering, optimizing the process. | | `bool` |
1852
- | `.mrtNode` | Define a different MRT than the one defined in `pass()`. | | `mrt()` |
1853
- | `.outputNode` | Defines the material's final output. | `output` | `vec4` |
1854
-
1855
- ## LineDashedNodeMaterial
1856
-
1857
- | Name | Description | Reference | Type |
1858
- |--|--|--|--|
1859
- | `.dashScaleNode` | Replace the logic of `material.scale`. | `materialLineScale` | `float` |
1860
- | `.dashSizeNode` | Replace the logic of `material.dashSize`. | `materialLineDashSize` | `float` |
1861
- | `.gapSizeNode` | Replace the logic of `material.gapSize`. | `materialLineGapSize` | `float` |
1862
- | `.offsetNode` | Replace the logic of `material.dashOffset`. | `materialLineDashOffset` | `float` |
1863
-
1864
- ## MeshPhongNodeMaterial
1865
-
1866
- | Name | Description | Reference | Type |
1867
- |--|--|--|--|
1868
- | `.shininessNode` | Replace the logic of `material.shininess`. | `materialShininess` | `float` |
1869
- | `.specularNode` | Replace the logic of `material.specular`. | `materialSpecular` | `color` |
1870
-
1871
- ## MeshStandardNodeMaterial
1872
-
1873
- | Name | Description | Reference | Type |
1874
- |--|--|--|--|
1875
- | `.metalnessNode` | Replace the logic of `material.metalness * material.metalnessMap`. | `materialMetalness` | `float` |
1876
- | `.roughnessNode` | Replace the logic of `material.roughness * material.roughnessMap`. | `materialRoughness` | `float` |
1877
-
1878
- ## MeshPhysicalNodeMaterial
1879
-
1880
- | Name | Description | Reference | Type |
1881
- |--|--|--|--|
1882
- | `.clearcoatNode` | Replace the logic of `material.clearcoat * material.clearcoatMap`. | `materialClearcoat` | `float` |
1883
- | `.clearcoatRoughnessNode` | Replace the logic of `material.clearcoatRoughness * material.clearcoatRoughnessMap`. | `materialClearcoatRoughness` | `float` |
1884
- | `.clearcoatNormalNode` | Replace the logic of `material.clearcoatNormalMap * material.clearcoatNormalMapScale`. | `materialClearcoatNormal` | `vec3` |
1885
- | `.sheenNode` | Replace the logic of `material.sheenColor * material.sheenColorMap`. | `materialSheen` | `color` |
1886
- | `.iridescenceNode` | Replace the logic of `material.iridescence`. | `materialIridescence` | `float` |
1887
- | `.iridescenceIORNode` | Replace the logic of `material.iridescenceIOR`. | `materialIridescenceIOR` | `float` |
1888
- | `.iridescenceThicknessNode` | Replace the logic of `material.iridescenceThicknessRange * material.iridescenceThicknessMap`. | `materialIridescenceThickness` | `float` |
1889
- | `.specularIntensityNode` | Replace the logic of `material.specularIntensity * material.specularIntensityMap`. | `materialSpecularIntensity` | `float` |
1890
- | `.specularColorNode` | Replace the logic of `material.specularColor * material.specularColorMap`. | `materialSpecularColor` | `color` |
1891
- | `.iorNode` | Replace the logic of `material.ior`. | `materialIOR` | `float` |
1892
- | `.transmissionNode` | Replace the logic of `material.transmission * material.transmissionMap`. | `materialTransmission` | `color` |
1893
- | `.thicknessNode` | Replace the logic of `material.thickness * material.thicknessMap`. | `materialTransmission` | `float` |
1894
- | `.attenuationDistanceNode` | Replace the logic of `material.attenuationDistance`. | `materialAttenuationDistance` | `float` |
1895
- | `.attenuationColorNode` | Replace the logic of `material.attenuationColor`. | `materialAttenuationColor` | `color` |
1896
- | `.dispersionNode` | Replace the logic of `material.dispersion`. | `materialDispersion` | `float` |
1897
- | `.anisotropyNode` | Replace the logic of `material.anisotropy * material.anisotropyMap`. | `materialAnisotropy` | `vec2` |
1898
-
1899
- ## SpriteNodeMaterial
1900
-
1901
- | Name | Description | Type |
1902
- |--|--|--|
1903
- | `.positionNode` | Defines the position. | `vec3` |
1904
- | `.rotationNode` | Defines the rotation. | `float` |
1905
- | `.scaleNode` | Defines the scale. | `vec2` |
1906
-
1907
- ## Transitioning common GLSL properties to TSL
1908
-
1909
- | GLSL | TSL | Type |
1910
- | -- | -- | -- |
1911
- | `position` | `positionGeometry` | `vec3` |
1912
- | `transformed` | `positionLocal` | `vec3` |
1913
- | `transformedNormal` | `normalLocal` | `vec3` |
1914
- | `vWorldPosition` | `positionWorld` | `vec3` |
1915
- | `vColor` | `vertexColor()` | `vec3` |
1916
- | `vUv` \| `uv` | `uv()` | `vec2` |
1917
- | `vNormal` | `normalView` | `vec3` |
1918
- | `viewMatrix` | `cameraViewMatrix` | `mat4` |
1919
- | `modelMatrix` | `modelWorldMatrix` | `mat4` |
1920
- | `modelViewMatrix` | `modelViewMatrix` | `mat4` |
1921
- | `projectionMatrix` | `cameraProjectionMatrix` | `mat4` |
1922
- | `diffuseColor` | `material.colorNode` | `vec4` |
1923
- | `gl_FragColor` | `material.fragmentNode` | `vec4` |
1924
-
1925
-
1926
-
1927
- ---
1928
-
1929
- ## Available Documentation
1930
-
1931
- The following documentation pages are available in markdown format at `https://threejs.org/docs/pages/{Name}.html.md`:
1932
-
1933
- ### Core
1934
-
1935
- - [ARButton](https://threejs.org/docs/pages/ARButton.html.md)
1936
- - [AmmoPhysics](https://threejs.org/docs/pages/AmmoPhysics.html.md)
1937
- - [Backend](https://threejs.org/docs/pages/Backend.html.md)
1938
- - [BasicLightingModel](https://threejs.org/docs/pages/BasicLightingModel.html.md)
1939
- - [BatchedMesh](https://threejs.org/docs/pages/BatchedMesh.html.md)
1940
- - [BezierInterpolant](https://threejs.org/docs/pages/BezierInterpolant.html.md)
1941
- - [BitonicSort_BitonicSort](https://threejs.org/docs/pages/BitonicSort_BitonicSort.html.md)
1942
- - [BlendMode](https://threejs.org/docs/pages/BlendMode.html.md)
1943
- - [Bone](https://threejs.org/docs/pages/Bone.html.md)
1944
- - [BooleanKeyframeTrack](https://threejs.org/docs/pages/BooleanKeyframeTrack.html.md)
1945
- - [BufferAttribute](https://threejs.org/docs/pages/BufferAttribute.html.md)
1946
- - [BundleGroup](https://threejs.org/docs/pages/BundleGroup.html.md)
1947
- - [CCDIKSolver](https://threejs.org/docs/pages/CCDIKSolver.html.md)
1948
- - [CSM](https://threejs.org/docs/pages/CSM.html.md)
1949
- - [CSMFrustum](https://threejs.org/docs/pages/CSMFrustum.html.md)
1950
- - [CSS2DObject](https://threejs.org/docs/pages/CSS2DObject.html.md)
1951
- - [CSS2DRenderer](https://threejs.org/docs/pages/CSS2DRenderer.html.md)
1952
- - [CSS3DObject](https://threejs.org/docs/pages/CSS3DObject.html.md)
1953
- - [CSS3DRenderer](https://threejs.org/docs/pages/CSS3DRenderer.html.md)
1954
- - [CSS3DSprite](https://threejs.org/docs/pages/CSS3DSprite.html.md)
1955
- - [Cache](https://threejs.org/docs/pages/Cache.html.md)
1956
- - [CanvasTarget](https://threejs.org/docs/pages/CanvasTarget.html.md)
1957
- - [Capsule](https://threejs.org/docs/pages/Capsule.html.md)
1958
- - [CinquefoilKnot](https://threejs.org/docs/pages/CinquefoilKnot.html.md)
1959
- - [CityGenerator](https://threejs.org/docs/pages/CityGenerator.html.md)
1960
- - [ClippingGroup](https://threejs.org/docs/pages/ClippingGroup.html.md)
1961
- - [Clock](https://threejs.org/docs/pages/Clock.html.md)
1962
- - [ClusteredLighting](https://threejs.org/docs/pages/ClusteredLighting.html.md)
1963
- - [ColladaComposer](https://threejs.org/docs/pages/ColladaComposer.html.md)
1964
- - [ColladaParser](https://threejs.org/docs/pages/ColladaParser.html.md)
1965
- - [ColorConverter](https://threejs.org/docs/pages/ColorConverter.html.md)
1966
- - [ColorEnvironment](https://threejs.org/docs/pages/ColorEnvironment.html.md)
1967
- - [ColorKeyframeTrack](https://threejs.org/docs/pages/ColorKeyframeTrack.html.md)
1968
- - [ConvexHull](https://threejs.org/docs/pages/ConvexHull.html.md)
1969
- - [ConvexObjectBreaker](https://threejs.org/docs/pages/ConvexObjectBreaker.html.md)
1970
- - [CubeRenderTarget](https://threejs.org/docs/pages/CubeRenderTarget.html.md)
1971
- - [CubicInterpolant](https://threejs.org/docs/pages/CubicInterpolant.html.md)
1972
- - [Cylindrical](https://threejs.org/docs/pages/Cylindrical.html.md)
1973
- - [DRACOExporter](https://threejs.org/docs/pages/DRACOExporter.html.md)
1974
- - [DataUtils](https://threejs.org/docs/pages/DataUtils.html.md)
1975
- - [DebugEnvironment](https://threejs.org/docs/pages/DebugEnvironment.html.md)
1976
- - [DecoratedTorusKnot4a](https://threejs.org/docs/pages/DecoratedTorusKnot4a.html.md)
1977
- - [DecoratedTorusKnot4b](https://threejs.org/docs/pages/DecoratedTorusKnot4b.html.md)
1978
- - [DecoratedTorusKnot5a](https://threejs.org/docs/pages/DecoratedTorusKnot5a.html.md)
1979
- - [DecoratedTorusKnot5c](https://threejs.org/docs/pages/DecoratedTorusKnot5c.html.md)
1980
- - [DirectionalLightShadow](https://threejs.org/docs/pages/DirectionalLightShadow.html.md)
1981
- - [DiscreteInterpolant](https://threejs.org/docs/pages/DiscreteInterpolant.html.md)
1982
- - [DynamicLighting](https://threejs.org/docs/pages/DynamicLighting.html.md)
1983
- - [Earcut](https://threejs.org/docs/pages/Earcut.html.md)
1984
- - [EdgeSplitModifier](https://threejs.org/docs/pages/EdgeSplitModifier.html.md)
1985
- - [EffectComposer](https://threejs.org/docs/pages/EffectComposer.html.md)
1986
- - [EnvMapCDFGenerator](https://threejs.org/docs/pages/EnvMapCDFGenerator.html.md)
1987
- - [EventDispatcher](https://threejs.org/docs/pages/EventDispatcher.html.md)
1988
- - [FaceFrame](https://threejs.org/docs/pages/FaceFrame.html.md)
1989
- - [FigureEightPolynomialKnot](https://threejs.org/docs/pages/FigureEightPolynomialKnot.html.md)
1990
- - [Float16BufferAttribute](https://threejs.org/docs/pages/Float16BufferAttribute.html.md)
1991
- - [Float32BufferAttribute](https://threejs.org/docs/pages/Float32BufferAttribute.html.md)
1992
- - [Flow](https://threejs.org/docs/pages/Flow.html.md)
1993
- - [Fog](https://threejs.org/docs/pages/Fog.html.md)
1994
- - [FogExp2](https://threejs.org/docs/pages/FogExp2.html.md)
1995
- - [Font](https://threejs.org/docs/pages/Font.html.md)
1996
- - [ForestGenerator](https://threejs.org/docs/pages/ForestGenerator.html.md)
1997
- - [FullScreenQuad](https://threejs.org/docs/pages/FullScreenQuad.html.md)
1998
- - [GLBufferAttribute](https://threejs.org/docs/pages/GLBufferAttribute.html.md)
1999
- - [GLSLNodeBuilder](https://threejs.org/docs/pages/GLSLNodeBuilder.html.md)
2000
- - [GLSLNodeFunction](https://threejs.org/docs/pages/GLSLNodeFunction.html.md)
2001
- - [GLSLNodeParser](https://threejs.org/docs/pages/GLSLNodeParser.html.md)
2002
- - [GLTFExporter](https://threejs.org/docs/pages/GLTFExporter.html.md)
2003
- - [GPUComputationRenderer](https://threejs.org/docs/pages/GPUComputationRenderer.html.md)
2004
- - [GrannyKnot](https://threejs.org/docs/pages/GrannyKnot.html.md)
2005
- - [GroundedSkybox](https://threejs.org/docs/pages/GroundedSkybox.html.md)
2006
- - [Group](https://threejs.org/docs/pages/Group.html.md)
2007
- - [Gyroscope](https://threejs.org/docs/pages/Gyroscope.html.md)
2008
- - [HTMLMesh](https://threejs.org/docs/pages/HTMLMesh.html.md)
2009
- - [ImageUtils](https://threejs.org/docs/pages/ImageUtils.html.md)
2010
- - [ImportanceSampledEnvironment](https://threejs.org/docs/pages/ImportanceSampledEnvironment.html.md)
2011
- - [ImprovedNoise](https://threejs.org/docs/pages/ImprovedNoise.html.md)
2012
- - [IndirectStorageBufferAttribute](https://threejs.org/docs/pages/IndirectStorageBufferAttribute.html.md)
2013
- - [Info](https://threejs.org/docs/pages/Info.html.md)
2014
- - [InspectorBase](https://threejs.org/docs/pages/InspectorBase.html.md)
2015
- - [InstancedBufferAttribute](https://threejs.org/docs/pages/InstancedBufferAttribute.html.md)
2016
- - [InstancedFlow](https://threejs.org/docs/pages/InstancedFlow.html.md)
2017
- - [InstancedInterleavedBuffer](https://threejs.org/docs/pages/InstancedInterleavedBuffer.html.md)
2018
- - [InstancedMesh](https://threejs.org/docs/pages/InstancedMesh.html.md)
2019
- - [Int16BufferAttribute](https://threejs.org/docs/pages/Int16BufferAttribute.html.md)
2020
- - [Int32BufferAttribute](https://threejs.org/docs/pages/Int32BufferAttribute.html.md)
2021
- - [Int8BufferAttribute](https://threejs.org/docs/pages/Int8BufferAttribute.html.md)
2022
- - [InteractionManager](https://threejs.org/docs/pages/InteractionManager.html.md)
2023
- - [InteractiveGroup](https://threejs.org/docs/pages/InteractiveGroup.html.md)
2024
- - [InterleavedBuffer](https://threejs.org/docs/pages/InterleavedBuffer.html.md)
2025
- - [InterleavedBufferAttribute](https://threejs.org/docs/pages/InterleavedBufferAttribute.html.md)
2026
- - [Interpolant](https://threejs.org/docs/pages/Interpolant.html.md)
2027
- - [JoltPhysics](https://threejs.org/docs/pages/JoltPhysics.html.md)
2028
- - [KTX2Exporter](https://threejs.org/docs/pages/KTX2Exporter.html.md)
2029
- - [KeyframeTrack](https://threejs.org/docs/pages/KeyframeTrack.html.md)
2030
- - [LDrawUtils](https://threejs.org/docs/pages/LDrawUtils.html.md)
2031
- - [LOD](https://threejs.org/docs/pages/LOD.html.md)
2032
- - [Layers](https://threejs.org/docs/pages/Layers.html.md)
2033
- - [Lensflare](https://threejs.org/docs/pages/Lensflare.html.md)
2034
- - [LensflareElement](https://threejs.org/docs/pages/LensflareElement.html.md)
2035
- - [LensflareMesh](https://threejs.org/docs/pages/LensflareMesh.html.md)
2036
- - [LightProbe](https://threejs.org/docs/pages/LightProbe.html.md)
2037
- - [LightProbeGenerator](https://threejs.org/docs/pages/LightProbeGenerator.html.md)
2038
- - [LightProbeGrid](https://threejs.org/docs/pages/LightProbeGrid.html.md)
2039
- - [LightShadow](https://threejs.org/docs/pages/LightShadow.html.md)
2040
- - [LightingModel](https://threejs.org/docs/pages/LightingModel.html.md)
2041
- - [Line](https://threejs.org/docs/pages/Line.html.md)
2042
- - [Line2](https://threejs.org/docs/pages/Line2.html.md)
2043
- - [Line3](https://threejs.org/docs/pages/Line3.html.md)
2044
- - [LineLoop](https://threejs.org/docs/pages/LineLoop.html.md)
2045
- - [LineSegments](https://threejs.org/docs/pages/LineSegments.html.md)
2046
- - [LineSegments2](https://threejs.org/docs/pages/LineSegments2.html.md)
2047
- - [LinearInterpolant](https://threejs.org/docs/pages/LinearInterpolant.html.md)
2048
- - [LoaderUtils](https://threejs.org/docs/pages/LoaderUtils.html.md)
2049
- - [LoadingManager](https://threejs.org/docs/pages/LoadingManager.html.md)
2050
- - [Lut](https://threejs.org/docs/pages/Lut.html.md)
2051
- - [MD2Character](https://threejs.org/docs/pages/MD2Character.html.md)
2052
- - [MD2CharacterComplex](https://threejs.org/docs/pages/MD2CharacterComplex.html.md)
2053
- - [MarchingCubes](https://threejs.org/docs/pages/MarchingCubes.html.md)
2054
- - [MathUtils](https://threejs.org/docs/pages/MathUtils.html.md)
2055
- - [Mesh](https://threejs.org/docs/pages/Mesh.html.md)
2056
- - [MeshSurfaceSampler](https://threejs.org/docs/pages/MeshSurfaceSampler.html.md)
2057
- - [MorphAnimMesh](https://threejs.org/docs/pages/MorphAnimMesh.html.md)
2058
- - [MorphBlendMesh](https://threejs.org/docs/pages/MorphBlendMesh.html.md)
2059
- - [NURBSSurface](https://threejs.org/docs/pages/NURBSSurface.html.md)
2060
- - [NURBSVolume](https://threejs.org/docs/pages/NURBSVolume.html.md)
2061
- - [NodeAttribute](https://threejs.org/docs/pages/NodeAttribute.html.md)
2062
- - [NodeBuilder](https://threejs.org/docs/pages/NodeBuilder.html.md)
2063
- - [NodeCache](https://threejs.org/docs/pages/NodeCache.html.md)
2064
- - [NodeCode](https://threejs.org/docs/pages/NodeCode.html.md)
2065
- - [NodeError](https://threejs.org/docs/pages/NodeError.html.md)
2066
- - [NodeFrame](https://threejs.org/docs/pages/NodeFrame.html.md)
2067
- - [NodeFunction](https://threejs.org/docs/pages/NodeFunction.html.md)
2068
- - [NodeFunctionInput](https://threejs.org/docs/pages/NodeFunctionInput.html.md)
2069
- - [NodeMaterialObserver](https://threejs.org/docs/pages/NodeMaterialObserver.html.md)
2070
- - [NodeParser](https://threejs.org/docs/pages/NodeParser.html.md)
2071
- - [NodeUniform](https://threejs.org/docs/pages/NodeUniform.html.md)
2072
- - [NodeVar](https://threejs.org/docs/pages/NodeVar.html.md)
2073
- - [NodeVarying](https://threejs.org/docs/pages/NodeVarying.html.md)
2074
- - [NumberKeyframeTrack](https://threejs.org/docs/pages/NumberKeyframeTrack.html.md)
2075
- - [OBB](https://threejs.org/docs/pages/OBB.html.md)
2076
- - [OBJExporter](https://threejs.org/docs/pages/OBJExporter.html.md)
2077
- - [Object3D](https://threejs.org/docs/pages/Object3D.html.md)
2078
- - [Octree](https://threejs.org/docs/pages/Octree.html.md)
2079
- - [OculusHandModel](https://threejs.org/docs/pages/OculusHandModel.html.md)
2080
- - [OculusHandPointerModel](https://threejs.org/docs/pages/OculusHandPointerModel.html.md)
2081
- - [PLYExporter](https://threejs.org/docs/pages/PLYExporter.html.md)
2082
- - [PMREMGenerator](https://threejs.org/docs/pages/PMREMGenerator.html.md)
2083
- - [Path](https://threejs.org/docs/pages/Path.html.md)
2084
- - [PhongLightingModel](https://threejs.org/docs/pages/PhongLightingModel.html.md)
2085
- - [PhysicalLightingModel](https://threejs.org/docs/pages/PhysicalLightingModel.html.md)
2086
- - [PointLightShadow](https://threejs.org/docs/pages/PointLightShadow.html.md)
2087
- - [Points](https://threejs.org/docs/pages/Points.html.md)
2088
- - [PostProcessing](https://threejs.org/docs/pages/PostProcessing.html.md)
2089
- - [ProgressiveLightMap](https://threejs.org/docs/pages/ProgressiveLightMap.html.md)
2090
- - [Projector](https://threejs.org/docs/pages/Projector.html.md)
2091
- - [PropertyBinding](https://threejs.org/docs/pages/PropertyBinding.html.md)
2092
- - [PropertyMixer](https://threejs.org/docs/pages/PropertyMixer.html.md)
2093
- - [QuadMesh](https://threejs.org/docs/pages/QuadMesh.html.md)
2094
- - [RapierPhysics](https://threejs.org/docs/pages/RapierPhysics.html.md)
2095
- - [ReadbackBuffer](https://threejs.org/docs/pages/ReadbackBuffer.html.md)
2096
- - [RectAreaLightTexturesLib](https://threejs.org/docs/pages/RectAreaLightTexturesLib.html.md)
2097
- - [RectAreaLightUniformsLib](https://threejs.org/docs/pages/RectAreaLightUniformsLib.html.md)
2098
- - [Reflector](https://threejs.org/docs/pages/Reflector.html.md)
2099
- - [Refractor](https://threejs.org/docs/pages/Refractor.html.md)
2100
- - [RenderPipeline](https://threejs.org/docs/pages/RenderPipeline.html.md)
2101
- - [RenderTarget](https://threejs.org/docs/pages/RenderTarget.html.md)
2102
- - [RenderTarget3D](https://threejs.org/docs/pages/RenderTarget3D.html.md)
2103
- - [Renderer](https://threejs.org/docs/pages/Renderer.html.md)
2104
- - [RoomEnvironment](https://threejs.org/docs/pages/RoomEnvironment.html.md)
2105
- - [SSSLightingModel](https://threejs.org/docs/pages/SSSLightingModel.html.md)
2106
- - [STLExporter](https://threejs.org/docs/pages/STLExporter.html.md)
2107
- - [SVGObject](https://threejs.org/docs/pages/SVGObject.html.md)
2108
- - [SVGRenderer](https://threejs.org/docs/pages/SVGRenderer.html.md)
2109
- - [Scene](https://threejs.org/docs/pages/Scene.html.md)
2110
- - [SceneOptimizer](https://threejs.org/docs/pages/SceneOptimizer.html.md)
2111
- - [SelectionBox](https://threejs.org/docs/pages/SelectionBox.html.md)
2112
- - [ShadowMapViewer](https://threejs.org/docs/pages/ShadowMapViewer.html.md)
2113
- - [ShadowMaskModel](https://threejs.org/docs/pages/ShadowMaskModel.html.md)
2114
- - [ShadowMesh](https://threejs.org/docs/pages/ShadowMesh.html.md)
2115
- - [Shape](https://threejs.org/docs/pages/Shape.html.md)
2116
- - [ShapePath](https://threejs.org/docs/pages/ShapePath.html.md)
2117
- - [ShapeUtils](https://threejs.org/docs/pages/ShapeUtils.html.md)
2118
- - [SidewalkGenerator](https://threejs.org/docs/pages/SidewalkGenerator.html.md)
2119
- - [SimplexNoise](https://threejs.org/docs/pages/SimplexNoise.html.md)
2120
- - [SimplifyModifier](https://threejs.org/docs/pages/SimplifyModifier.html.md)
2121
- - [Skeleton](https://threejs.org/docs/pages/Skeleton.html.md)
2122
- - [SkinnedMesh](https://threejs.org/docs/pages/SkinnedMesh.html.md)
2123
- - [Sky](https://threejs.org/docs/pages/Sky.html.md)
2124
- - [SkyMesh](https://threejs.org/docs/pages/SkyMesh.html.md)
2125
- - [SkyscraperGenerator](https://threejs.org/docs/pages/SkyscraperGenerator.html.md)
2126
- - [Source](https://threejs.org/docs/pages/Source.html.md)
2127
- - [Spherical](https://threejs.org/docs/pages/Spherical.html.md)
2128
- - [SphericalHarmonics3](https://threejs.org/docs/pages/SphericalHarmonics3.html.md)
2129
- - [SpotLightShadow](https://threejs.org/docs/pages/SpotLightShadow.html.md)
2130
- - [Sprite](https://threejs.org/docs/pages/Sprite.html.md)
2131
- - [StackTrace](https://threejs.org/docs/pages/StackTrace.html.md)
2132
- - [StandardNodeLibrary](https://threejs.org/docs/pages/StandardNodeLibrary.html.md)
2133
- - [StorageBufferAttribute](https://threejs.org/docs/pages/StorageBufferAttribute.html.md)
2134
- - [StorageInstancedBufferAttribute](https://threejs.org/docs/pages/StorageInstancedBufferAttribute.html.md)
2135
- - [StringKeyframeTrack](https://threejs.org/docs/pages/StringKeyframeTrack.html.md)
2136
- - [TSL](https://threejs.org/docs/pages/TSL.html.md)
2137
- - [Tab](https://threejs.org/docs/pages/Tab.html.md)
2138
- - [TerrainGenerator](https://threejs.org/docs/pages/TerrainGenerator.html.md)
2139
- - [TessellateModifier](https://threejs.org/docs/pages/TessellateModifier.html.md)
2140
- - [TextureUtils](https://threejs.org/docs/pages/TextureUtils.html.md)
2141
- - [TileCreasedNormalsPlugin](https://threejs.org/docs/pages/TileCreasedNormalsPlugin.html.md)
2142
- - [Timer](https://threejs.org/docs/pages/Timer.html.md)
2143
- - [TimestampQueryPool](https://threejs.org/docs/pages/TimestampQueryPool.html.md)
2144
- - [ToonLightingModel](https://threejs.org/docs/pages/ToonLightingModel.html.md)
2145
- - [TorusKnot](https://threejs.org/docs/pages/TorusKnot.html.md)
2146
- - [Transpiler](https://threejs.org/docs/pages/Transpiler.html.md)
2147
- - [TreeGenerator](https://threejs.org/docs/pages/TreeGenerator.html.md)
2148
- - [TrefoilKnot](https://threejs.org/docs/pages/TrefoilKnot.html.md)
2149
- - [TrefoilPolynomialKnot](https://threejs.org/docs/pages/TrefoilPolynomialKnot.html.md)
2150
- - [TubePainter](https://threejs.org/docs/pages/TubePainter.html.md)
2151
- - [USDComposer](https://threejs.org/docs/pages/USDComposer.html.md)
2152
- - [USDZExporter](https://threejs.org/docs/pages/USDZExporter.html.md)
2153
- - [Uint16BufferAttribute](https://threejs.org/docs/pages/Uint16BufferAttribute.html.md)
2154
- - [Uint32BufferAttribute](https://threejs.org/docs/pages/Uint32BufferAttribute.html.md)
2155
- - [Uint8BufferAttribute](https://threejs.org/docs/pages/Uint8BufferAttribute.html.md)
2156
- - [Uint8ClampedBufferAttribute](https://threejs.org/docs/pages/Uint8ClampedBufferAttribute.html.md)
2157
- - [Uniform](https://threejs.org/docs/pages/Uniform.html.md)
2158
- - [UniformsGroup](https://threejs.org/docs/pages/UniformsGroup.html.md)
2159
- - [VRButton](https://threejs.org/docs/pages/VRButton.html.md)
2160
- - [Volume](https://threejs.org/docs/pages/Volume.html.md)
2161
- - [VolumeSlice](https://threejs.org/docs/pages/VolumeSlice.html.md)
2162
- - [VolumetricLightingModel](https://threejs.org/docs/pages/VolumetricLightingModel.html.md)
2163
- - [WGSLNodeBuilder](https://threejs.org/docs/pages/WGSLNodeBuilder.html.md)
2164
- - [WGSLNodeFunction](https://threejs.org/docs/pages/WGSLNodeFunction.html.md)
2165
- - [WGSLNodeParser](https://threejs.org/docs/pages/WGSLNodeParser.html.md)
2166
- - [Water](https://threejs.org/docs/pages/Water.html.md)
2167
- - [WaterMesh](https://threejs.org/docs/pages/WaterMesh.html.md)
2168
- - [WebGL](https://threejs.org/docs/pages/WebGL.html.md)
2169
- - [WebGL3DRenderTarget](https://threejs.org/docs/pages/WebGL3DRenderTarget.html.md)
2170
- - [WebGLArrayRenderTarget](https://threejs.org/docs/pages/WebGLArrayRenderTarget.html.md)
2171
- - [WebGLCubeRenderTarget](https://threejs.org/docs/pages/WebGLCubeRenderTarget.html.md)
2172
- - [WebGLNodesHandler](https://threejs.org/docs/pages/WebGLNodesHandler.html.md)
2173
- - [WebGLRenderTarget](https://threejs.org/docs/pages/WebGLRenderTarget.html.md)
2174
- - [WebGLRenderer](https://threejs.org/docs/pages/WebGLRenderer.html.md)
2175
- - [WebGLTimestampQueryPool](https://threejs.org/docs/pages/WebGLTimestampQueryPool.html.md)
2176
- - [WebGPU](https://threejs.org/docs/pages/WebGPU.html.md)
2177
- - [WebGPURenderer](https://threejs.org/docs/pages/WebGPURenderer.html.md)
2178
- - [WebGPUTimestampQueryPool](https://threejs.org/docs/pages/WebGPUTimestampQueryPool.html.md)
2179
- - [Wireframe](https://threejs.org/docs/pages/Wireframe.html.md)
2180
- - [WireframeGeometry2](https://threejs.org/docs/pages/WireframeGeometry2.html.md)
2181
- - [WorkerPool](https://threejs.org/docs/pages/WorkerPool.html.md)
2182
-
2183
- ### Cameras
2184
-
2185
- - [ArrayCamera](https://threejs.org/docs/pages/ArrayCamera.html.md)
2186
- - [Camera](https://threejs.org/docs/pages/Camera.html.md)
2187
- - [CubeCamera](https://threejs.org/docs/pages/CubeCamera.html.md)
2188
- - [OrthographicCamera](https://threejs.org/docs/pages/OrthographicCamera.html.md)
2189
- - [PerspectiveCamera](https://threejs.org/docs/pages/PerspectiveCamera.html.md)
2190
- - [StereoCamera](https://threejs.org/docs/pages/StereoCamera.html.md)
2191
-
2192
- ### Lights
2193
-
2194
- - [AmbientLight](https://threejs.org/docs/pages/AmbientLight.html.md)
2195
- - [DirectionalLight](https://threejs.org/docs/pages/DirectionalLight.html.md)
2196
- - [HemisphereLight](https://threejs.org/docs/pages/HemisphereLight.html.md)
2197
- - [IESSpotLight](https://threejs.org/docs/pages/IESSpotLight.html.md)
2198
- - [Light](https://threejs.org/docs/pages/Light.html.md)
2199
- - [PointLight](https://threejs.org/docs/pages/PointLight.html.md)
2200
- - [ProjectorLight](https://threejs.org/docs/pages/ProjectorLight.html.md)
2201
- - [RectAreaLight](https://threejs.org/docs/pages/RectAreaLight.html.md)
2202
- - [SpotLight](https://threejs.org/docs/pages/SpotLight.html.md)
2203
- - [XREstimatedLight](https://threejs.org/docs/pages/XREstimatedLight.html.md)
2204
-
2205
- ### Materials
2206
-
2207
- - [LDrawConditionalLineMaterial](https://threejs.org/docs/pages/LDrawConditionalLineMaterial.html.md)
2208
- - [Line2NodeMaterial](https://threejs.org/docs/pages/Line2NodeMaterial.html.md)
2209
- - [LineBasicMaterial](https://threejs.org/docs/pages/LineBasicMaterial.html.md)
2210
- - [LineBasicNodeMaterial](https://threejs.org/docs/pages/LineBasicNodeMaterial.html.md)
2211
- - [LineDashedMaterial](https://threejs.org/docs/pages/LineDashedMaterial.html.md)
2212
- - [LineDashedNodeMaterial](https://threejs.org/docs/pages/LineDashedNodeMaterial.html.md)
2213
- - [LineMaterial](https://threejs.org/docs/pages/LineMaterial.html.md)
2214
- - [Material](https://threejs.org/docs/pages/Material.html.md)
2215
- - [MeshBasicMaterial](https://threejs.org/docs/pages/MeshBasicMaterial.html.md)
2216
- - [MeshBasicNodeMaterial](https://threejs.org/docs/pages/MeshBasicNodeMaterial.html.md)
2217
- - [MeshDepthMaterial](https://threejs.org/docs/pages/MeshDepthMaterial.html.md)
2218
- - [MeshDistanceMaterial](https://threejs.org/docs/pages/MeshDistanceMaterial.html.md)
2219
- - [MeshLambertMaterial](https://threejs.org/docs/pages/MeshLambertMaterial.html.md)
2220
- - [MeshLambertNodeMaterial](https://threejs.org/docs/pages/MeshLambertNodeMaterial.html.md)
2221
- - [MeshMatcapMaterial](https://threejs.org/docs/pages/MeshMatcapMaterial.html.md)
2222
- - [MeshMatcapNodeMaterial](https://threejs.org/docs/pages/MeshMatcapNodeMaterial.html.md)
2223
- - [MeshNormalMaterial](https://threejs.org/docs/pages/MeshNormalMaterial.html.md)
2224
- - [MeshNormalNodeMaterial](https://threejs.org/docs/pages/MeshNormalNodeMaterial.html.md)
2225
- - [MeshPhongMaterial](https://threejs.org/docs/pages/MeshPhongMaterial.html.md)
2226
- - [MeshPhongNodeMaterial](https://threejs.org/docs/pages/MeshPhongNodeMaterial.html.md)
2227
- - [MeshPhysicalMaterial](https://threejs.org/docs/pages/MeshPhysicalMaterial.html.md)
2228
- - [MeshPhysicalNodeMaterial](https://threejs.org/docs/pages/MeshPhysicalNodeMaterial.html.md)
2229
- - [MeshSSSNodeMaterial](https://threejs.org/docs/pages/MeshSSSNodeMaterial.html.md)
2230
- - [MeshStandardMaterial](https://threejs.org/docs/pages/MeshStandardMaterial.html.md)
2231
- - [MeshStandardNodeMaterial](https://threejs.org/docs/pages/MeshStandardNodeMaterial.html.md)
2232
- - [MeshToonMaterial](https://threejs.org/docs/pages/MeshToonMaterial.html.md)
2233
- - [MeshToonNodeMaterial](https://threejs.org/docs/pages/MeshToonNodeMaterial.html.md)
2234
- - [NodeMaterial](https://threejs.org/docs/pages/NodeMaterial.html.md)
2235
- - [PointsMaterial](https://threejs.org/docs/pages/PointsMaterial.html.md)
2236
- - [PointsNodeMaterial](https://threejs.org/docs/pages/PointsNodeMaterial.html.md)
2237
- - [RawShaderMaterial](https://threejs.org/docs/pages/RawShaderMaterial.html.md)
2238
- - [ShaderMaterial](https://threejs.org/docs/pages/ShaderMaterial.html.md)
2239
- - [ShadowMaterial](https://threejs.org/docs/pages/ShadowMaterial.html.md)
2240
- - [ShadowNodeMaterial](https://threejs.org/docs/pages/ShadowNodeMaterial.html.md)
2241
- - [SpriteMaterial](https://threejs.org/docs/pages/SpriteMaterial.html.md)
2242
- - [SpriteNodeMaterial](https://threejs.org/docs/pages/SpriteNodeMaterial.html.md)
2243
- - [VolumeNodeMaterial](https://threejs.org/docs/pages/VolumeNodeMaterial.html.md)
2244
- - [WoodNodeMaterial](https://threejs.org/docs/pages/WoodNodeMaterial.html.md)
2245
-
2246
- ### Geometries
2247
-
2248
- - [BoxGeometry](https://threejs.org/docs/pages/BoxGeometry.html.md)
2249
- - [BoxLineGeometry](https://threejs.org/docs/pages/BoxLineGeometry.html.md)
2250
- - [BufferGeometry](https://threejs.org/docs/pages/BufferGeometry.html.md)
2251
- - [CapsuleGeometry](https://threejs.org/docs/pages/CapsuleGeometry.html.md)
2252
- - [CircleGeometry](https://threejs.org/docs/pages/CircleGeometry.html.md)
2253
- - [ConeGeometry](https://threejs.org/docs/pages/ConeGeometry.html.md)
2254
- - [ConvexGeometry](https://threejs.org/docs/pages/ConvexGeometry.html.md)
2255
- - [CylinderGeometry](https://threejs.org/docs/pages/CylinderGeometry.html.md)
2256
- - [DecalGeometry](https://threejs.org/docs/pages/DecalGeometry.html.md)
2257
- - [DodecahedronGeometry](https://threejs.org/docs/pages/DodecahedronGeometry.html.md)
2258
- - [EdgesGeometry](https://threejs.org/docs/pages/EdgesGeometry.html.md)
2259
- - [ExtrudeGeometry](https://threejs.org/docs/pages/ExtrudeGeometry.html.md)
2260
- - [IcosahedronGeometry](https://threejs.org/docs/pages/IcosahedronGeometry.html.md)
2261
- - [InstancedBufferGeometry](https://threejs.org/docs/pages/InstancedBufferGeometry.html.md)
2262
- - [LatheGeometry](https://threejs.org/docs/pages/LatheGeometry.html.md)
2263
- - [LineGeometry](https://threejs.org/docs/pages/LineGeometry.html.md)
2264
- - [LineSegmentsGeometry](https://threejs.org/docs/pages/LineSegmentsGeometry.html.md)
2265
- - [LoftGeometry](https://threejs.org/docs/pages/LoftGeometry.html.md)
2266
- - [OctahedronGeometry](https://threejs.org/docs/pages/OctahedronGeometry.html.md)
2267
- - [ParametricGeometry](https://threejs.org/docs/pages/ParametricGeometry.html.md)
2268
- - [PlaneGeometry](https://threejs.org/docs/pages/PlaneGeometry.html.md)
2269
- - [PolyhedronGeometry](https://threejs.org/docs/pages/PolyhedronGeometry.html.md)
2270
- - [RingGeometry](https://threejs.org/docs/pages/RingGeometry.html.md)
2271
- - [RollerCoasterGeometry](https://threejs.org/docs/pages/RollerCoasterGeometry.html.md)
2272
- - [RollerCoasterLiftersGeometry](https://threejs.org/docs/pages/RollerCoasterLiftersGeometry.html.md)
2273
- - [RollerCoasterShadowGeometry](https://threejs.org/docs/pages/RollerCoasterShadowGeometry.html.md)
2274
- - [RoundedBoxGeometry](https://threejs.org/docs/pages/RoundedBoxGeometry.html.md)
2275
- - [ShapeGeometry](https://threejs.org/docs/pages/ShapeGeometry.html.md)
2276
- - [SkyGeometry](https://threejs.org/docs/pages/SkyGeometry.html.md)
2277
- - [SphereGeometry](https://threejs.org/docs/pages/SphereGeometry.html.md)
2278
- - [TeapotGeometry](https://threejs.org/docs/pages/TeapotGeometry.html.md)
2279
- - [TetrahedronGeometry](https://threejs.org/docs/pages/TetrahedronGeometry.html.md)
2280
- - [TextGeometry](https://threejs.org/docs/pages/TextGeometry.html.md)
2281
- - [TorusGeometry](https://threejs.org/docs/pages/TorusGeometry.html.md)
2282
- - [TorusKnotGeometry](https://threejs.org/docs/pages/TorusKnotGeometry.html.md)
2283
- - [TreesGeometry](https://threejs.org/docs/pages/TreesGeometry.html.md)
2284
- - [TubeGeometry](https://threejs.org/docs/pages/TubeGeometry.html.md)
2285
- - [WireframeGeometry](https://threejs.org/docs/pages/WireframeGeometry.html.md)
2286
-
2287
- ### Textures
2288
-
2289
- - [CanvasTexture](https://threejs.org/docs/pages/CanvasTexture.html.md)
2290
- - [CompressedArrayTexture](https://threejs.org/docs/pages/CompressedArrayTexture.html.md)
2291
- - [CompressedCubeTexture](https://threejs.org/docs/pages/CompressedCubeTexture.html.md)
2292
- - [CompressedTexture](https://threejs.org/docs/pages/CompressedTexture.html.md)
2293
- - [CubeDepthTexture](https://threejs.org/docs/pages/CubeDepthTexture.html.md)
2294
- - [CubeTexture](https://threejs.org/docs/pages/CubeTexture.html.md)
2295
- - [Data3DTexture](https://threejs.org/docs/pages/Data3DTexture.html.md)
2296
- - [DataArrayTexture](https://threejs.org/docs/pages/DataArrayTexture.html.md)
2297
- - [DataTexture](https://threejs.org/docs/pages/DataTexture.html.md)
2298
- - [DepthTexture](https://threejs.org/docs/pages/DepthTexture.html.md)
2299
- - [ExternalTexture](https://threejs.org/docs/pages/ExternalTexture.html.md)
2300
- - [FlakesTexture](https://threejs.org/docs/pages/FlakesTexture.html.md)
2301
- - [FramebufferTexture](https://threejs.org/docs/pages/FramebufferTexture.html.md)
2302
- - [HTMLTexture](https://threejs.org/docs/pages/HTMLTexture.html.md)
2303
- - [Storage3DTexture](https://threejs.org/docs/pages/Storage3DTexture.html.md)
2304
- - [StorageArrayTexture](https://threejs.org/docs/pages/StorageArrayTexture.html.md)
2305
- - [StorageTexture](https://threejs.org/docs/pages/StorageTexture.html.md)
2306
- - [Texture](https://threejs.org/docs/pages/Texture.html.md)
2307
- - [VideoFrameTexture](https://threejs.org/docs/pages/VideoFrameTexture.html.md)
2308
- - [VideoTexture](https://threejs.org/docs/pages/VideoTexture.html.md)
2309
-
2310
- ### Loaders
2311
-
2312
- - [AMFLoader](https://threejs.org/docs/pages/AMFLoader.html.md)
2313
- - [AnimationLoader](https://threejs.org/docs/pages/AnimationLoader.html.md)
2314
- - [AudioLoader](https://threejs.org/docs/pages/AudioLoader.html.md)
2315
- - [BVHLoader](https://threejs.org/docs/pages/BVHLoader.html.md)
2316
- - [BufferGeometryLoader](https://threejs.org/docs/pages/BufferGeometryLoader.html.md)
2317
- - [ColladaLoader](https://threejs.org/docs/pages/ColladaLoader.html.md)
2318
- - [CompressedTextureLoader](https://threejs.org/docs/pages/CompressedTextureLoader.html.md)
2319
- - [CubeTextureLoader](https://threejs.org/docs/pages/CubeTextureLoader.html.md)
2320
- - [DDSLoader](https://threejs.org/docs/pages/DDSLoader.html.md)
2321
- - [DRACOLoader](https://threejs.org/docs/pages/DRACOLoader.html.md)
2322
- - [DataTextureLoader](https://threejs.org/docs/pages/DataTextureLoader.html.md)
2323
- - [EXRLoader](https://threejs.org/docs/pages/EXRLoader.html.md)
2324
- - [FBXLoader](https://threejs.org/docs/pages/FBXLoader.html.md)
2325
- - [FileLoader](https://threejs.org/docs/pages/FileLoader.html.md)
2326
- - [FontLoader](https://threejs.org/docs/pages/FontLoader.html.md)
2327
- - [GCodeLoader](https://threejs.org/docs/pages/GCodeLoader.html.md)
2328
- - [GLTFLoader](https://threejs.org/docs/pages/GLTFLoader.html.md)
2329
- - [HDRCubeTextureLoader](https://threejs.org/docs/pages/HDRCubeTextureLoader.html.md)
2330
- - [HDRLoader](https://threejs.org/docs/pages/HDRLoader.html.md)
2331
- - [IESLoader](https://threejs.org/docs/pages/IESLoader.html.md)
2332
- - [ImageBitmapLoader](https://threejs.org/docs/pages/ImageBitmapLoader.html.md)
2333
- - [ImageLoader](https://threejs.org/docs/pages/ImageLoader.html.md)
2334
- - [KMZLoader](https://threejs.org/docs/pages/KMZLoader.html.md)
2335
- - [KTX2Loader](https://threejs.org/docs/pages/KTX2Loader.html.md)
2336
- - [KTXLoader](https://threejs.org/docs/pages/KTXLoader.html.md)
2337
- - [LDrawLoader](https://threejs.org/docs/pages/LDrawLoader.html.md)
2338
- - [LUT3dlLoader](https://threejs.org/docs/pages/LUT3dlLoader.html.md)
2339
- - [LUTCubeLoader](https://threejs.org/docs/pages/LUTCubeLoader.html.md)
2340
- - [LUTImageLoader](https://threejs.org/docs/pages/LUTImageLoader.html.md)
2341
- - [LWOLoader](https://threejs.org/docs/pages/LWOLoader.html.md)
2342
- - [Loader](https://threejs.org/docs/pages/Loader.html.md)
2343
- - [LottieLoader](https://threejs.org/docs/pages/LottieLoader.html.md)
2344
- - [MD2Loader](https://threejs.org/docs/pages/MD2Loader.html.md)
2345
- - [MDDLoader](https://threejs.org/docs/pages/MDDLoader.html.md)
2346
- - [MTLLoader](https://threejs.org/docs/pages/MTLLoader.html.md)
2347
- - [MaterialLoader](https://threejs.org/docs/pages/MaterialLoader.html.md)
2348
- - [MaterialXLoader](https://threejs.org/docs/pages/MaterialXLoader.html.md)
2349
- - [NRRDLoader](https://threejs.org/docs/pages/NRRDLoader.html.md)
2350
- - [NodeLoader](https://threejs.org/docs/pages/NodeLoader.html.md)
2351
- - [NodeMaterialLoader](https://threejs.org/docs/pages/NodeMaterialLoader.html.md)
2352
- - [NodeObjectLoader](https://threejs.org/docs/pages/NodeObjectLoader.html.md)
2353
- - [OBJLoader](https://threejs.org/docs/pages/OBJLoader.html.md)
2354
- - [ObjectLoader](https://threejs.org/docs/pages/ObjectLoader.html.md)
2355
- - [PCDLoader](https://threejs.org/docs/pages/PCDLoader.html.md)
2356
- - [PDBLoader](https://threejs.org/docs/pages/PDBLoader.html.md)
2357
- - [PLYLoader](https://threejs.org/docs/pages/PLYLoader.html.md)
2358
- - [PVRLoader](https://threejs.org/docs/pages/PVRLoader.html.md)
2359
- - [Rhino3dmLoader](https://threejs.org/docs/pages/Rhino3dmLoader.html.md)
2360
- - [STLLoader](https://threejs.org/docs/pages/STLLoader.html.md)
2361
- - [SVGLoader](https://threejs.org/docs/pages/SVGLoader.html.md)
2362
- - [TDSLoader](https://threejs.org/docs/pages/TDSLoader.html.md)
2363
- - [TGALoader](https://threejs.org/docs/pages/TGALoader.html.md)
2364
- - [TIFFLoader](https://threejs.org/docs/pages/TIFFLoader.html.md)
2365
- - [TTFLoader](https://threejs.org/docs/pages/TTFLoader.html.md)
2366
- - [TextureLoader](https://threejs.org/docs/pages/TextureLoader.html.md)
2367
- - [ThreeMFLoader](https://threejs.org/docs/pages/ThreeMFLoader.html.md)
2368
- - [USDLoader](https://threejs.org/docs/pages/USDLoader.html.md)
2369
- - [UltraHDRLoader](https://threejs.org/docs/pages/UltraHDRLoader.html.md)
2370
- - [VOXLoader](https://threejs.org/docs/pages/VOXLoader.html.md)
2371
- - [VRMLLoader](https://threejs.org/docs/pages/VRMLLoader.html.md)
2372
- - [VTKLoader](https://threejs.org/docs/pages/VTKLoader.html.md)
2373
- - [XYZLoader](https://threejs.org/docs/pages/XYZLoader.html.md)
2374
-
2375
- ### Controls
2376
-
2377
- - [ArcballControls](https://threejs.org/docs/pages/ArcballControls.html.md)
2378
- - [Controls](https://threejs.org/docs/pages/Controls.html.md)
2379
- - [DragControls](https://threejs.org/docs/pages/DragControls.html.md)
2380
- - [FirstPersonControls](https://threejs.org/docs/pages/FirstPersonControls.html.md)
2381
- - [FlyControls](https://threejs.org/docs/pages/FlyControls.html.md)
2382
- - [MapControls](https://threejs.org/docs/pages/MapControls.html.md)
2383
- - [OrbitControls](https://threejs.org/docs/pages/OrbitControls.html.md)
2384
- - [PointerLockControls](https://threejs.org/docs/pages/PointerLockControls.html.md)
2385
- - [TrackballControls](https://threejs.org/docs/pages/TrackballControls.html.md)
2386
- - [TransformControls](https://threejs.org/docs/pages/TransformControls.html.md)
2387
-
2388
- ### Helpers
2389
-
2390
- - [AnimationPathHelper](https://threejs.org/docs/pages/AnimationPathHelper.html.md)
2391
- - [ArrowHelper](https://threejs.org/docs/pages/ArrowHelper.html.md)
2392
- - [AxesHelper](https://threejs.org/docs/pages/AxesHelper.html.md)
2393
- - [Box3Helper](https://threejs.org/docs/pages/Box3Helper.html.md)
2394
- - [BoxHelper](https://threejs.org/docs/pages/BoxHelper.html.md)
2395
- - [CCDIKHelper](https://threejs.org/docs/pages/CCDIKHelper.html.md)
2396
- - [CSMHelper](https://threejs.org/docs/pages/CSMHelper.html.md)
2397
- - [CameraHelper](https://threejs.org/docs/pages/CameraHelper.html.md)
2398
- - [DirectionalLightHelper](https://threejs.org/docs/pages/DirectionalLightHelper.html.md)
2399
- - [GridHelper](https://threejs.org/docs/pages/GridHelper.html.md)
2400
- - [HemisphereLightHelper](https://threejs.org/docs/pages/HemisphereLightHelper.html.md)
2401
- - [LightProbeGridHelper](https://threejs.org/docs/pages/LightProbeGridHelper.html.md)
2402
- - [LightProbeHelper](https://threejs.org/docs/pages/LightProbeHelper.html.md)
2403
- - [OctreeHelper](https://threejs.org/docs/pages/OctreeHelper.html.md)
2404
- - [PlaneHelper](https://threejs.org/docs/pages/PlaneHelper.html.md)
2405
- - [PointLightHelper](https://threejs.org/docs/pages/PointLightHelper.html.md)
2406
- - [PolarGridHelper](https://threejs.org/docs/pages/PolarGridHelper.html.md)
2407
- - [PositionalAudioHelper](https://threejs.org/docs/pages/PositionalAudioHelper.html.md)
2408
- - [RapierHelper](https://threejs.org/docs/pages/RapierHelper.html.md)
2409
- - [RectAreaLightHelper](https://threejs.org/docs/pages/RectAreaLightHelper.html.md)
2410
- - [SelectionHelper](https://threejs.org/docs/pages/SelectionHelper.html.md)
2411
- - [SkeletonHelper](https://threejs.org/docs/pages/SkeletonHelper.html.md)
2412
- - [SpotLightHelper](https://threejs.org/docs/pages/SpotLightHelper.html.md)
2413
- - [TextureHelper](https://threejs.org/docs/pages/TextureHelper.html.md)
2414
- - [TileShadowNodeHelper](https://threejs.org/docs/pages/TileShadowNodeHelper.html.md)
2415
- - [VertexNormalsHelper](https://threejs.org/docs/pages/VertexNormalsHelper.html.md)
2416
- - [VertexTangentsHelper](https://threejs.org/docs/pages/VertexTangentsHelper.html.md)
2417
- - [ViewHelper](https://threejs.org/docs/pages/ViewHelper.html.md)
2418
-
2419
- ### Animation
2420
-
2421
- - [AnimationAction](https://threejs.org/docs/pages/AnimationAction.html.md)
2422
- - [AnimationClip](https://threejs.org/docs/pages/AnimationClip.html.md)
2423
- - [AnimationClipCreator](https://threejs.org/docs/pages/AnimationClipCreator.html.md)
2424
- - [AnimationMixer](https://threejs.org/docs/pages/AnimationMixer.html.md)
2425
- - [AnimationObjectGroup](https://threejs.org/docs/pages/AnimationObjectGroup.html.md)
2426
- - [AnimationUtils](https://threejs.org/docs/pages/AnimationUtils.html.md)
2427
-
2428
- ### Audio
2429
-
2430
- - [Audio](https://threejs.org/docs/pages/Audio.html.md)
2431
- - [AudioAnalyser](https://threejs.org/docs/pages/AudioAnalyser.html.md)
2432
- - [AudioContext](https://threejs.org/docs/pages/AudioContext.html.md)
2433
- - [AudioListener](https://threejs.org/docs/pages/AudioListener.html.md)
2434
- - [PositionalAudio](https://threejs.org/docs/pages/PositionalAudio.html.md)
2435
-
2436
- ### Math
2437
-
2438
- - [Box2](https://threejs.org/docs/pages/Box2.html.md)
2439
- - [Box3](https://threejs.org/docs/pages/Box3.html.md)
2440
- - [Color](https://threejs.org/docs/pages/Color.html.md)
2441
- - [Euler](https://threejs.org/docs/pages/Euler.html.md)
2442
- - [Frustum](https://threejs.org/docs/pages/Frustum.html.md)
2443
- - [FrustumArray](https://threejs.org/docs/pages/FrustumArray.html.md)
2444
- - [Matrix2](https://threejs.org/docs/pages/Matrix2.html.md)
2445
- - [Matrix3](https://threejs.org/docs/pages/Matrix3.html.md)
2446
- - [Matrix4](https://threejs.org/docs/pages/Matrix4.html.md)
2447
- - [Plane](https://threejs.org/docs/pages/Plane.html.md)
2448
- - [Quaternion](https://threejs.org/docs/pages/Quaternion.html.md)
2449
- - [QuaternionKeyframeTrack](https://threejs.org/docs/pages/QuaternionKeyframeTrack.html.md)
2450
- - [QuaternionLinearInterpolant](https://threejs.org/docs/pages/QuaternionLinearInterpolant.html.md)
2451
- - [Ray](https://threejs.org/docs/pages/Ray.html.md)
2452
- - [Raycaster](https://threejs.org/docs/pages/Raycaster.html.md)
2453
- - [Sphere](https://threejs.org/docs/pages/Sphere.html.md)
2454
- - [Triangle](https://threejs.org/docs/pages/Triangle.html.md)
2455
- - [Vector2](https://threejs.org/docs/pages/Vector2.html.md)
2456
- - [Vector3](https://threejs.org/docs/pages/Vector3.html.md)
2457
- - [Vector4](https://threejs.org/docs/pages/Vector4.html.md)
2458
- - [VectorKeyframeTrack](https://threejs.org/docs/pages/VectorKeyframeTrack.html.md)
2459
-
2460
- ### Curves
2461
-
2462
- - [ArcCurve](https://threejs.org/docs/pages/ArcCurve.html.md)
2463
- - [CatmullRomCurve3](https://threejs.org/docs/pages/CatmullRomCurve3.html.md)
2464
- - [CubicBezierCurve](https://threejs.org/docs/pages/CubicBezierCurve.html.md)
2465
- - [CubicBezierCurve3](https://threejs.org/docs/pages/CubicBezierCurve3.html.md)
2466
- - [Curve](https://threejs.org/docs/pages/Curve.html.md)
2467
- - [CurvePath](https://threejs.org/docs/pages/CurvePath.html.md)
2468
- - [EllipseCurve](https://threejs.org/docs/pages/EllipseCurve.html.md)
2469
- - [HeartCurve](https://threejs.org/docs/pages/HeartCurve.html.md)
2470
- - [HelixCurve](https://threejs.org/docs/pages/HelixCurve.html.md)
2471
- - [KnotCurve](https://threejs.org/docs/pages/KnotCurve.html.md)
2472
- - [LineCurve](https://threejs.org/docs/pages/LineCurve.html.md)
2473
- - [LineCurve3](https://threejs.org/docs/pages/LineCurve3.html.md)
2474
- - [NURBSCurve](https://threejs.org/docs/pages/NURBSCurve.html.md)
2475
- - [QuadraticBezierCurve](https://threejs.org/docs/pages/QuadraticBezierCurve.html.md)
2476
- - [QuadraticBezierCurve3](https://threejs.org/docs/pages/QuadraticBezierCurve3.html.md)
2477
- - [SplineCurve](https://threejs.org/docs/pages/SplineCurve.html.md)
2478
- - [VivianiCurve](https://threejs.org/docs/pages/VivianiCurve.html.md)
2479
-
2480
- ### Effects
2481
-
2482
- - [AnaglyphEffect](https://threejs.org/docs/pages/AnaglyphEffect.html.md)
2483
- - [AsciiEffect](https://threejs.org/docs/pages/AsciiEffect.html.md)
2484
- - [OutlineEffect](https://threejs.org/docs/pages/OutlineEffect.html.md)
2485
- - [ParallaxBarrierEffect](https://threejs.org/docs/pages/ParallaxBarrierEffect.html.md)
2486
- - [StereoEffect](https://threejs.org/docs/pages/StereoEffect.html.md)
2487
-
2488
- ### Post-Processing
2489
-
2490
- - [AfterimagePass](https://threejs.org/docs/pages/AfterimagePass.html.md)
2491
- - [AnaglyphPassNode](https://threejs.org/docs/pages/AnaglyphPassNode.html.md)
2492
- - [BloomPass](https://threejs.org/docs/pages/BloomPass.html.md)
2493
- - [BokehPass](https://threejs.org/docs/pages/BokehPass.html.md)
2494
- - [ClearMaskPass](https://threejs.org/docs/pages/ClearMaskPass.html.md)
2495
- - [ClearPass](https://threejs.org/docs/pages/ClearPass.html.md)
2496
- - [CubeTexturePass](https://threejs.org/docs/pages/CubeTexturePass.html.md)
2497
- - [DotScreenPass](https://threejs.org/docs/pages/DotScreenPass.html.md)
2498
- - [FXAAPass](https://threejs.org/docs/pages/FXAAPass.html.md)
2499
- - [FilmPass](https://threejs.org/docs/pages/FilmPass.html.md)
2500
- - [GTAOPass](https://threejs.org/docs/pages/GTAOPass.html.md)
2501
- - [GlitchPass](https://threejs.org/docs/pages/GlitchPass.html.md)
2502
- - [HalftonePass](https://threejs.org/docs/pages/HalftonePass.html.md)
2503
- - [LUTPass](https://threejs.org/docs/pages/LUTPass.html.md)
2504
- - [MaskPass](https://threejs.org/docs/pages/MaskPass.html.md)
2505
- - [OutlinePass](https://threejs.org/docs/pages/OutlinePass.html.md)
2506
- - [OutputPass](https://threejs.org/docs/pages/OutputPass.html.md)
2507
- - [ParallaxBarrierPassNode](https://threejs.org/docs/pages/ParallaxBarrierPassNode.html.md)
2508
- - [Pass](https://threejs.org/docs/pages/Pass.html.md)
2509
- - [PassNode](https://threejs.org/docs/pages/PassNode.html.md)
2510
- - [PixelationPassNode](https://threejs.org/docs/pages/PixelationPassNode.html.md)
2511
- - [ReflectorForSSRPass](https://threejs.org/docs/pages/ReflectorForSSRPass.html.md)
2512
- - [RenderPass](https://threejs.org/docs/pages/RenderPass.html.md)
2513
- - [RenderPixelatedPass](https://threejs.org/docs/pages/RenderPixelatedPass.html.md)
2514
- - [RenderTransitionPass](https://threejs.org/docs/pages/RenderTransitionPass.html.md)
2515
- - [RetroPassNode](https://threejs.org/docs/pages/RetroPassNode.html.md)
2516
- - [SAOPass](https://threejs.org/docs/pages/SAOPass.html.md)
2517
- - [SMAAPass](https://threejs.org/docs/pages/SMAAPass.html.md)
2518
- - [SSAAPassNode](https://threejs.org/docs/pages/SSAAPassNode.html.md)
2519
- - [SSAARenderPass](https://threejs.org/docs/pages/SSAARenderPass.html.md)
2520
- - [SSAOPass](https://threejs.org/docs/pages/SSAOPass.html.md)
2521
- - [SSRPass](https://threejs.org/docs/pages/SSRPass.html.md)
2522
- - [SavePass](https://threejs.org/docs/pages/SavePass.html.md)
2523
- - [ShaderPass](https://threejs.org/docs/pages/ShaderPass.html.md)
2524
- - [StereoCompositePassNode](https://threejs.org/docs/pages/StereoCompositePassNode.html.md)
2525
- - [StereoPassNode](https://threejs.org/docs/pages/StereoPassNode.html.md)
2526
- - [TAARenderPass](https://threejs.org/docs/pages/TAARenderPass.html.md)
2527
- - [TexturePass](https://threejs.org/docs/pages/TexturePass.html.md)
2528
- - [ToonOutlinePassNode](https://threejs.org/docs/pages/ToonOutlinePassNode.html.md)
2529
- - [UnrealBloomPass](https://threejs.org/docs/pages/UnrealBloomPass.html.md)
2530
-
2531
- ### Nodes (TSL)
2532
-
2533
- - [AONode](https://threejs.org/docs/pages/AONode.html.md)
2534
- - [AfterImageNode](https://threejs.org/docs/pages/AfterImageNode.html.md)
2535
- - [AmbientLightDataNode](https://threejs.org/docs/pages/AmbientLightDataNode.html.md)
2536
- - [AmbientLightNode](https://threejs.org/docs/pages/AmbientLightNode.html.md)
2537
- - [AnalyticLightNode](https://threejs.org/docs/pages/AnalyticLightNode.html.md)
2538
- - [ArrayElementNode](https://threejs.org/docs/pages/ArrayElementNode.html.md)
2539
- - [ArrayNode](https://threejs.org/docs/pages/ArrayNode.html.md)
2540
- - [AssignNode](https://threejs.org/docs/pages/AssignNode.html.md)
2541
- - [AtomicFunctionNode](https://threejs.org/docs/pages/AtomicFunctionNode.html.md)
2542
- - [AttributeNode](https://threejs.org/docs/pages/AttributeNode.html.md)
2543
- - [BarrierNode](https://threejs.org/docs/pages/BarrierNode.html.md)
2544
- - [BasicEnvironmentNode](https://threejs.org/docs/pages/BasicEnvironmentNode.html.md)
2545
- - [BasicLightMapNode](https://threejs.org/docs/pages/BasicLightMapNode.html.md)
2546
- - [BilateralBlurNode](https://threejs.org/docs/pages/BilateralBlurNode.html.md)
2547
- - [BitcastNode](https://threejs.org/docs/pages/BitcastNode.html.md)
2548
- - [BitcountNode](https://threejs.org/docs/pages/BitcountNode.html.md)
2549
- - [BloomNode](https://threejs.org/docs/pages/BloomNode.html.md)
2550
- - [BufferAttributeNode](https://threejs.org/docs/pages/BufferAttributeNode.html.md)
2551
- - [BufferNode](https://threejs.org/docs/pages/BufferNode.html.md)
2552
- - [BuiltinNode](https://threejs.org/docs/pages/BuiltinNode.html.md)
2553
- - [BumpMapNode](https://threejs.org/docs/pages/BumpMapNode.html.md)
2554
- - [BypassNode](https://threejs.org/docs/pages/BypassNode.html.md)
2555
- - [CSMShadowNode](https://threejs.org/docs/pages/CSMShadowNode.html.md)
2556
- - [ChromaticAberrationNode](https://threejs.org/docs/pages/ChromaticAberrationNode.html.md)
2557
- - [ClippingNode](https://threejs.org/docs/pages/ClippingNode.html.md)
2558
- - [ClusteredLightsNode](https://threejs.org/docs/pages/ClusteredLightsNode.html.md)
2559
- - [CodeNode](https://threejs.org/docs/pages/CodeNode.html.md)
2560
- - [ColorSpaceNode](https://threejs.org/docs/pages/ColorSpaceNode.html.md)
2561
- - [ComputeBuiltinNode](https://threejs.org/docs/pages/ComputeBuiltinNode.html.md)
2562
- - [ComputeNode](https://threejs.org/docs/pages/ComputeNode.html.md)
2563
- - [ConditionalNode](https://threejs.org/docs/pages/ConditionalNode.html.md)
2564
- - [ConstNode](https://threejs.org/docs/pages/ConstNode.html.md)
2565
- - [ContextNode](https://threejs.org/docs/pages/ContextNode.html.md)
2566
- - [ConvertNode](https://threejs.org/docs/pages/ConvertNode.html.md)
2567
- - [CubeMapNode](https://threejs.org/docs/pages/CubeMapNode.html.md)
2568
- - [CubeTextureNode](https://threejs.org/docs/pages/CubeTextureNode.html.md)
2569
- - [DenoiseNode](https://threejs.org/docs/pages/DenoiseNode.html.md)
2570
- - [DepthOfFieldNode](https://threejs.org/docs/pages/DepthOfFieldNode.html.md)
2571
- - [DirectionalLightDataNode](https://threejs.org/docs/pages/DirectionalLightDataNode.html.md)
2572
- - [DirectionalLightNode](https://threejs.org/docs/pages/DirectionalLightNode.html.md)
2573
- - [DotScreenNode](https://threejs.org/docs/pages/DotScreenNode.html.md)
2574
- - [DynamicLightsNode](https://threejs.org/docs/pages/DynamicLightsNode.html.md)
2575
- - [EnvironmentNode](https://threejs.org/docs/pages/EnvironmentNode.html.md)
2576
- - [EventNode](https://threejs.org/docs/pages/EventNode.html.md)
2577
- - [ExpressionNode](https://threejs.org/docs/pages/ExpressionNode.html.md)
2578
- - [FSR1Node](https://threejs.org/docs/pages/FSR1Node.html.md)
2579
- - [FXAANode](https://threejs.org/docs/pages/FXAANode.html.md)
2580
- - [FilmNode](https://threejs.org/docs/pages/FilmNode.html.md)
2581
- - [FlipNode](https://threejs.org/docs/pages/FlipNode.html.md)
2582
- - [FrontFacingNode](https://threejs.org/docs/pages/FrontFacingNode.html.md)
2583
- - [FunctionCallNode](https://threejs.org/docs/pages/FunctionCallNode.html.md)
2584
- - [FunctionNode](https://threejs.org/docs/pages/FunctionNode.html.md)
2585
- - [FunctionOverloadingNode](https://threejs.org/docs/pages/FunctionOverloadingNode.html.md)
2586
- - [GTAONode](https://threejs.org/docs/pages/GTAONode.html.md)
2587
- - [GaussianBlurNode](https://threejs.org/docs/pages/GaussianBlurNode.html.md)
2588
- - [GodraysNode](https://threejs.org/docs/pages/GodraysNode.html.md)
2589
- - [HemisphereLightDataNode](https://threejs.org/docs/pages/HemisphereLightDataNode.html.md)
2590
- - [HemisphereLightNode](https://threejs.org/docs/pages/HemisphereLightNode.html.md)
2591
- - [IESSpotLightNode](https://threejs.org/docs/pages/IESSpotLightNode.html.md)
2592
- - [IndexNode](https://threejs.org/docs/pages/IndexNode.html.md)
2593
- - [InputNode](https://threejs.org/docs/pages/InputNode.html.md)
2594
- - [InspectorNode](https://threejs.org/docs/pages/InspectorNode.html.md)
2595
- - [IrradianceNode](https://threejs.org/docs/pages/IrradianceNode.html.md)
2596
- - [IsolateNode](https://threejs.org/docs/pages/IsolateNode.html.md)
2597
- - [JoinNode](https://threejs.org/docs/pages/JoinNode.html.md)
2598
- - [LensflareNode](https://threejs.org/docs/pages/LensflareNode.html.md)
2599
- - [LightProbeNode](https://threejs.org/docs/pages/LightProbeNode.html.md)
2600
- - [LightingContextNode](https://threejs.org/docs/pages/LightingContextNode.html.md)
2601
- - [LightingNode](https://threejs.org/docs/pages/LightingNode.html.md)
2602
- - [LightsNode](https://threejs.org/docs/pages/LightsNode.html.md)
2603
- - [LoopNode](https://threejs.org/docs/pages/LoopNode.html.md)
2604
- - [Lut3DNode](https://threejs.org/docs/pages/Lut3DNode.html.md)
2605
- - [MRTNode](https://threejs.org/docs/pages/MRTNode.html.md)
2606
- - [MaterialNode](https://threejs.org/docs/pages/MaterialNode.html.md)
2607
- - [MaterialReferenceNode](https://threejs.org/docs/pages/MaterialReferenceNode.html.md)
2608
- - [MathNode](https://threejs.org/docs/pages/MathNode.html.md)
2609
- - [MaxMipLevelNode](https://threejs.org/docs/pages/MaxMipLevelNode.html.md)
2610
- - [MemberNode](https://threejs.org/docs/pages/MemberNode.html.md)
2611
- - [ModelNode](https://threejs.org/docs/pages/ModelNode.html.md)
2612
- - [Node](https://threejs.org/docs/pages/Node.html.md)
2613
- - [NormalMapNode](https://threejs.org/docs/pages/NormalMapNode.html.md)
2614
- - [Object3DNode](https://threejs.org/docs/pages/Object3DNode.html.md)
2615
- - [OperatorNode](https://threejs.org/docs/pages/OperatorNode.html.md)
2616
- - [OutlineNode](https://threejs.org/docs/pages/OutlineNode.html.md)
2617
- - [OutputStructNode](https://threejs.org/docs/pages/OutputStructNode.html.md)
2618
- - [OverrideContextNode](https://threejs.org/docs/pages/OverrideContextNode.html.md)
2619
- - [PMREMNode](https://threejs.org/docs/pages/PMREMNode.html.md)
2620
- - [PackFloatNode](https://threejs.org/docs/pages/PackFloatNode.html.md)
2621
- - [ParameterNode](https://threejs.org/docs/pages/ParameterNode.html.md)
2622
- - [PassMultipleTextureNode](https://threejs.org/docs/pages/PassMultipleTextureNode.html.md)
2623
- - [PassTextureNode](https://threejs.org/docs/pages/PassTextureNode.html.md)
2624
- - [PixelationNode](https://threejs.org/docs/pages/PixelationNode.html.md)
2625
- - [PointLightDataNode](https://threejs.org/docs/pages/PointLightDataNode.html.md)
2626
- - [PointLightNode](https://threejs.org/docs/pages/PointLightNode.html.md)
2627
- - [PointShadowNode](https://threejs.org/docs/pages/PointShadowNode.html.md)
2628
- - [PointUVNode](https://threejs.org/docs/pages/PointUVNode.html.md)
2629
- - [ProjectorLightNode](https://threejs.org/docs/pages/ProjectorLightNode.html.md)
2630
- - [PropertyNode](https://threejs.org/docs/pages/PropertyNode.html.md)
2631
- - [RGBShiftNode](https://threejs.org/docs/pages/RGBShiftNode.html.md)
2632
- - [RTTNode](https://threejs.org/docs/pages/RTTNode.html.md)
2633
- - [RangeNode](https://threejs.org/docs/pages/RangeNode.html.md)
2634
- - [RectAreaLightNode](https://threejs.org/docs/pages/RectAreaLightNode.html.md)
2635
- - [RecurrentDenoiseNode](https://threejs.org/docs/pages/RecurrentDenoiseNode.html.md)
2636
- - [ReferenceBaseNode](https://threejs.org/docs/pages/ReferenceBaseNode.html.md)
2637
- - [ReferenceElementNode](https://threejs.org/docs/pages/ReferenceElementNode.html.md)
2638
- - [ReferenceNode](https://threejs.org/docs/pages/ReferenceNode.html.md)
2639
- - [ReflectorNode](https://threejs.org/docs/pages/ReflectorNode.html.md)
2640
- - [RenderOutputNode](https://threejs.org/docs/pages/RenderOutputNode.html.md)
2641
- - [RendererReferenceNode](https://threejs.org/docs/pages/RendererReferenceNode.html.md)
2642
- - [RotateNode](https://threejs.org/docs/pages/RotateNode.html.md)
2643
- - [SMAANode](https://threejs.org/docs/pages/SMAANode.html.md)
2644
- - [SSGINode](https://threejs.org/docs/pages/SSGINode.html.md)
2645
- - [SSRNode](https://threejs.org/docs/pages/SSRNode.html.md)
2646
- - [SSSNode](https://threejs.org/docs/pages/SSSNode.html.md)
2647
- - [SampleNode](https://threejs.org/docs/pages/SampleNode.html.md)
2648
- - [ScreenNode](https://threejs.org/docs/pages/ScreenNode.html.md)
2649
- - [SetNode](https://threejs.org/docs/pages/SetNode.html.md)
2650
- - [ShadowBaseNode](https://threejs.org/docs/pages/ShadowBaseNode.html.md)
2651
- - [ShadowNode](https://threejs.org/docs/pages/ShadowNode.html.md)
2652
- - [SharpenNode](https://threejs.org/docs/pages/SharpenNode.html.md)
2653
- - [SobelOperatorNode](https://threejs.org/docs/pages/SobelOperatorNode.html.md)
2654
- - [SplitNode](https://threejs.org/docs/pages/SplitNode.html.md)
2655
- - [SpotLightDataNode](https://threejs.org/docs/pages/SpotLightDataNode.html.md)
2656
- - [SpotLightNode](https://threejs.org/docs/pages/SpotLightNode.html.md)
2657
- - [StackNode](https://threejs.org/docs/pages/StackNode.html.md)
2658
- - [StorageArrayElementNode](https://threejs.org/docs/pages/StorageArrayElementNode.html.md)
2659
- - [StorageBufferNode](https://threejs.org/docs/pages/StorageBufferNode.html.md)
2660
- - [StorageTexture3DNode](https://threejs.org/docs/pages/StorageTexture3DNode.html.md)
2661
- - [StorageTextureNode](https://threejs.org/docs/pages/StorageTextureNode.html.md)
2662
- - [StructNode](https://threejs.org/docs/pages/StructNode.html.md)
2663
- - [StructTypeNode](https://threejs.org/docs/pages/StructTypeNode.html.md)
2664
- - [SubBuildNode](https://threejs.org/docs/pages/SubBuildNode.html.md)
2665
- - [SubgroupFunctionNode](https://threejs.org/docs/pages/SubgroupFunctionNode.html.md)
2666
- - [TAAUNode](https://threejs.org/docs/pages/TAAUNode.html.md)
2667
- - [TRAANode](https://threejs.org/docs/pages/TRAANode.html.md)
2668
- - [TempNode](https://threejs.org/docs/pages/TempNode.html.md)
2669
- - [TemporalReprojectNode](https://threejs.org/docs/pages/TemporalReprojectNode.html.md)
2670
- - [Texture3DNode](https://threejs.org/docs/pages/Texture3DNode.html.md)
2671
- - [TextureNode](https://threejs.org/docs/pages/TextureNode.html.md)
2672
- - [TextureSizeNode](https://threejs.org/docs/pages/TextureSizeNode.html.md)
2673
- - [TileShadowNode](https://threejs.org/docs/pages/TileShadowNode.html.md)
2674
- - [ToneMappingNode](https://threejs.org/docs/pages/ToneMappingNode.html.md)
2675
- - [TransitionNode](https://threejs.org/docs/pages/TransitionNode.html.md)
2676
- - [UniformArrayElementNode](https://threejs.org/docs/pages/UniformArrayElementNode.html.md)
2677
- - [UniformArrayNode](https://threejs.org/docs/pages/UniformArrayNode.html.md)
2678
- - [UniformGroupNode](https://threejs.org/docs/pages/UniformGroupNode.html.md)
2679
- - [UniformNode](https://threejs.org/docs/pages/UniformNode.html.md)
2680
- - [UnpackFloatNode](https://threejs.org/docs/pages/UnpackFloatNode.html.md)
2681
- - [UserDataNode](https://threejs.org/docs/pages/UserDataNode.html.md)
2682
- - [VarNode](https://threejs.org/docs/pages/VarNode.html.md)
2683
- - [VaryingNode](https://threejs.org/docs/pages/VaryingNode.html.md)
2684
- - [VelocityNode](https://threejs.org/docs/pages/VelocityNode.html.md)
2685
- - [VertexColorNode](https://threejs.org/docs/pages/VertexColorNode.html.md)
2686
- - [ViewportDepthNode](https://threejs.org/docs/pages/ViewportDepthNode.html.md)
2687
- - [ViewportDepthTextureNode](https://threejs.org/docs/pages/ViewportDepthTextureNode.html.md)
2688
- - [ViewportSharedTextureNode](https://threejs.org/docs/pages/ViewportSharedTextureNode.html.md)
2689
- - [ViewportTextureNode](https://threejs.org/docs/pages/ViewportTextureNode.html.md)
2690
- - [WorkgroupInfoElementNode](https://threejs.org/docs/pages/WorkgroupInfoElementNode.html.md)
2691
- - [WorkgroupInfoNode](https://threejs.org/docs/pages/WorkgroupInfoNode.html.md)
2692
-
2693
- ### WebXR
2694
-
2695
- - [EXRExporter](https://threejs.org/docs/pages/EXRExporter.html.md)
2696
- - [WebXRDepthSensing](https://threejs.org/docs/pages/WebXRDepthSensing.html.md)
2697
- - [WebXRManager](https://threejs.org/docs/pages/WebXRManager.html.md)
2698
- - [XRButton](https://threejs.org/docs/pages/XRButton.html.md)
2699
- - [XRControllerModel](https://threejs.org/docs/pages/XRControllerModel.html.md)
2700
- - [XRControllerModelFactory](https://threejs.org/docs/pages/XRControllerModelFactory.html.md)
2701
- - [XRHandMeshModel](https://threejs.org/docs/pages/XRHandMeshModel.html.md)
2702
- - [XRHandModel](https://threejs.org/docs/pages/XRHandModel.html.md)
2703
- - [XRHandModelFactory](https://threejs.org/docs/pages/XRHandModelFactory.html.md)
2704
- - [XRHandPrimitiveModel](https://threejs.org/docs/pages/XRHandPrimitiveModel.html.md)
2705
- - [XRManager](https://threejs.org/docs/pages/XRManager.html.md)
2706
- - [XRPlanes](https://threejs.org/docs/pages/XRPlanes.html.md)
2707
-
2708
- ### Shader Modules
2709
-
2710
- - [module-ACESFilmicToneMappingShader](https://threejs.org/docs/pages/module-ACESFilmicToneMappingShader.html.md)
2711
- - [module-AfterimageShader](https://threejs.org/docs/pages/module-AfterimageShader.html.md)
2712
- - [module-BasicShader](https://threejs.org/docs/pages/module-BasicShader.html.md)
2713
- - [module-Bayer](https://threejs.org/docs/pages/module-Bayer.html.md)
2714
- - [module-BleachBypassShader](https://threejs.org/docs/pages/module-BleachBypassShader.html.md)
2715
- - [module-BlendShader](https://threejs.org/docs/pages/module-BlendShader.html.md)
2716
- - [module-BokehShader](https://threejs.org/docs/pages/module-BokehShader.html.md)
2717
- - [module-BokehShader2](https://threejs.org/docs/pages/module-BokehShader2.html.md)
2718
- - [module-BrightnessContrastShader](https://threejs.org/docs/pages/module-BrightnessContrastShader.html.md)
2719
- - [module-BufferGeometryUtils](https://threejs.org/docs/pages/module-BufferGeometryUtils.html.md)
2720
- - [module-CSMShader](https://threejs.org/docs/pages/module-CSMShader.html.md)
2721
- - [module-CameraUtils](https://threejs.org/docs/pages/module-CameraUtils.html.md)
2722
- - [module-ColorCorrectionShader](https://threejs.org/docs/pages/module-ColorCorrectionShader.html.md)
2723
- - [module-ColorSpaces](https://threejs.org/docs/pages/module-ColorSpaces.html.md)
2724
- - [module-ColorUtils](https://threejs.org/docs/pages/module-ColorUtils.html.md)
2725
- - [module-ColorifyShader](https://threejs.org/docs/pages/module-ColorifyShader.html.md)
2726
- - [module-ConvolutionShader](https://threejs.org/docs/pages/module-ConvolutionShader.html.md)
2727
- - [module-CopyShader](https://threejs.org/docs/pages/module-CopyShader.html.md)
2728
- - [module-DOFMipMapShader](https://threejs.org/docs/pages/module-DOFMipMapShader.html.md)
2729
- - [module-DepthLimitedBlurShader](https://threejs.org/docs/pages/module-DepthLimitedBlurShader.html.md)
2730
- - [module-DigitalGlitch](https://threejs.org/docs/pages/module-DigitalGlitch.html.md)
2731
- - [module-DotScreenShader](https://threejs.org/docs/pages/module-DotScreenShader.html.md)
2732
- - [module-ExposureShader](https://threejs.org/docs/pages/module-ExposureShader.html.md)
2733
- - [module-FXAAShader](https://threejs.org/docs/pages/module-FXAAShader.html.md)
2734
- - [module-FilmShader](https://threejs.org/docs/pages/module-FilmShader.html.md)
2735
- - [module-FocusShader](https://threejs.org/docs/pages/module-FocusShader.html.md)
2736
- - [module-FreiChenShader](https://threejs.org/docs/pages/module-FreiChenShader.html.md)
2737
- - [module-GTAOShader](https://threejs.org/docs/pages/module-GTAOShader.html.md)
2738
- - [module-GammaCorrectionShader](https://threejs.org/docs/pages/module-GammaCorrectionShader.html.md)
2739
- - [module-GeometryCompressionUtils](https://threejs.org/docs/pages/module-GeometryCompressionUtils.html.md)
2740
- - [module-GeometryUtils](https://threejs.org/docs/pages/module-GeometryUtils.html.md)
2741
- - [module-GroundedSkybox](https://threejs.org/docs/pages/module-GroundedSkybox.html.md)
2742
- - [module-HalftoneShader](https://threejs.org/docs/pages/module-HalftoneShader.html.md)
2743
- - [module-HorizontalBlurShader](https://threejs.org/docs/pages/module-HorizontalBlurShader.html.md)
2744
- - [module-HorizontalTiltShiftShader](https://threejs.org/docs/pages/module-HorizontalTiltShiftShader.html.md)
2745
- - [module-HueSaturationShader](https://threejs.org/docs/pages/module-HueSaturationShader.html.md)
2746
- - [module-Interpolations](https://threejs.org/docs/pages/module-Interpolations.html.md)
2747
- - [module-KaleidoShader](https://threejs.org/docs/pages/module-KaleidoShader.html.md)
2748
- - [module-LuminosityHighPassShader](https://threejs.org/docs/pages/module-LuminosityHighPassShader.html.md)
2749
- - [module-LuminosityShader](https://threejs.org/docs/pages/module-LuminosityShader.html.md)
2750
- - [module-MirrorShader](https://threejs.org/docs/pages/module-MirrorShader.html.md)
2751
- - [module-NURBSUtils](https://threejs.org/docs/pages/module-NURBSUtils.html.md)
2752
- - [module-NormalMapShader](https://threejs.org/docs/pages/module-NormalMapShader.html.md)
2753
- - [module-OutputShader](https://threejs.org/docs/pages/module-OutputShader.html.md)
2754
- - [module-ParametricFunctions](https://threejs.org/docs/pages/module-ParametricFunctions.html.md)
2755
- - [module-PoissonDenoiseShader](https://threejs.org/docs/pages/module-PoissonDenoiseShader.html.md)
2756
- - [module-RGBShiftShader](https://threejs.org/docs/pages/module-RGBShiftShader.html.md)
2757
- - [module-Raymarching](https://threejs.org/docs/pages/module-Raymarching.html.md)
2758
- - [module-SAOShader](https://threejs.org/docs/pages/module-SAOShader.html.md)
2759
- - [module-SMAAShader](https://threejs.org/docs/pages/module-SMAAShader.html.md)
2760
- - [module-SSAOShader](https://threejs.org/docs/pages/module-SSAOShader.html.md)
2761
- - [module-SSRShader](https://threejs.org/docs/pages/module-SSRShader.html.md)
2762
- - [module-SceneUtils](https://threejs.org/docs/pages/module-SceneUtils.html.md)
2763
- - [module-SepiaShader](https://threejs.org/docs/pages/module-SepiaShader.html.md)
2764
- - [module-SkeletonUtils](https://threejs.org/docs/pages/module-SkeletonUtils.html.md)
2765
- - [module-SobelOperatorShader](https://threejs.org/docs/pages/module-SobelOperatorShader.html.md)
2766
- - [module-SortUtils](https://threejs.org/docs/pages/module-SortUtils.html.md)
2767
- - [module-SubsurfaceScatteringShader](https://threejs.org/docs/pages/module-SubsurfaceScatteringShader.html.md)
2768
- - [module-Text2D](https://threejs.org/docs/pages/module-Text2D.html.md)
2769
- - [module-TriangleBlurShader](https://threejs.org/docs/pages/module-TriangleBlurShader.html.md)
2770
- - [module-UVsDebug](https://threejs.org/docs/pages/module-UVsDebug.html.md)
2771
- - [module-UniformsUtils](https://threejs.org/docs/pages/module-UniformsUtils.html.md)
2772
- - [module-UnpackDepthRGBAShader](https://threejs.org/docs/pages/module-UnpackDepthRGBAShader.html.md)
2773
- - [module-VelocityShader](https://threejs.org/docs/pages/module-VelocityShader.html.md)
2774
- - [module-VerticalBlurShader](https://threejs.org/docs/pages/module-VerticalBlurShader.html.md)
2775
- - [module-VerticalTiltShiftShader](https://threejs.org/docs/pages/module-VerticalTiltShiftShader.html.md)
2776
- - [module-VignetteShader](https://threejs.org/docs/pages/module-VignetteShader.html.md)
2777
- - [module-VolumeShader](https://threejs.org/docs/pages/module-VolumeShader.html.md)
2778
- - [module-WaterRefractionShader](https://threejs.org/docs/pages/module-WaterRefractionShader.html.md)
2779
- - [module-WebGLTextureUtils](https://threejs.org/docs/pages/module-WebGLTextureUtils.html.md)
2780
- - [module-WebGPUTextureUtils](https://threejs.org/docs/pages/module-WebGPUTextureUtils.html.md)