mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-08-25 12:23:58 -04:00
bc1776c59e
Only show in developer changelog
1.5 KiB
1.5 KiB
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).