GDevelop-extensions
GDevelop-extensions copied to clipboard
[Sprite snapshot] Handle 3D layers
Updated the 'RenderLayer' and 'RenderScene' functions to handle 3D objects and camera positioning better.
The initial set of CircleCI tests failed, due to my use of the 'gdjs' global object.
If there's a better global object for me to attach my persisted objects to ('window' maybe?) please let me know.
Thank you for submitting an extension update.
If you need to keep some kind of state, you can add it to gdjs._renderToSprite
. It's the namespace already used by this extension.
https://github.com/GDevelopApp/GDevelop-extensions/blob/e50f0e510ea00ef4d7de8821e31a1c500572b1a3/scripts/lib/ExtensionsValidatorExceptions.js#L399-L414
You may find more details in these documentations:
- https://wiki.gdevelop.io/gdevelop5/events/js-code/javascript-in-extensions/
- https://wiki.gdevelop.io/gdevelop5/extensions/best-practices/#javascript-usage