mirror of
https://github.com/4ian/GDevelop.git
synced 2026-10-12 02:01:17 +00:00
- 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.
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 globalTHREEnamespace. Three.js stopped providing such a build after r160 (it's now published as ES modules only), so it's built here from thethreenpm package.ThreeAddons.js: a bundle of the Three.js "addons" used by GDevelop (loaders, controls, post-processing...), exposing the globalTHREE_ADDONSnamespace. Its sources undersrc/examplesare 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
threeversion inpackage.json(also update@types/threeinGDJS/package.jsonandthreeinnewIDE/app/package.jsonto keep the editor and the typings in sync). - Update the sources copied in
src/examplesfrom the Three.js repository. - Run
npm run buildand copy the files as explained above. - Adapt the game engine code to any Three.js API change, and run the GDJS
tests (
GDJS/tests).