Files
D8H 7dd4d13a7a Upgrade to Three.js 0.185.1 (#8853)
- Point lights and spot lights now uses a realistic decay. It's not possible to find the exact same result as before, but you can tweak the intensity and the decay properties. Hemisphere lights, directional lights and ambient lights still work the same as before.
- The 3D particle emitter must be updated to the last version to handle the new 3D renderer world scale property.
- Ensure any 3D extension you use is also updated to the latest version.
2026-10-03 13:55:50 +02:00
..
2026-10-03 13:55:50 +02:00

This package builds the Three.js related files used by the game engine (Runtime), as classic scripts exposing globals - as expected by the engine scripts, which are not ES modules:

  • three.js: the whole Three.js library, exposing the global THREE namespace. Three.js stopped providing such a build after r160 (it's now published as ES modules only), so it's built here from the three npm package.
  • ThreeAddons.js: a bundle of the Three.js "addons" used by GDevelop (loaders, controls, post-processing...), exposing the global THREE_ADDONS namespace. Its sources under src/examples are copied from the Three.js repository (examples/jsm), which is licensed under MIT.

How to build and update the files used by the game engine

npm install
npm run build

This regenerates GDJS/Runtime/pixi-renderers/three.js directly, and dist/ThreeAddons.js - to be copied manually to GDJS/Runtime/pixi-renderers/ThreeAddons.js if the addons changed.

How to upgrade Three.js

  • Bump the three version in package.json (also update @types/three in GDJS/package.json and three in newIDE/app/package.json to keep the editor and the typings in sync).
  • Update the sources copied in src/examples from the Three.js repository.
  • Run npm run build and copy the files as explained above.
  • Adapt the game engine code to any Three.js API change, and run the GDJS tests (GDJS/tests).