Skip to content

New extension: Nature Elements#2059

Open
github-actions[bot] wants to merge 1 commit intomainfrom
extension/baldieandbaldie-commits/2058
Open

New extension: Nature Elements#2059
github-actions[bot] wants to merge 1 commit intomainfrom
extension/baldieandbaldie-commits/2058

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 6, 2026

Description

This extension adds wind swaying ability and optional GPU instancing to 3D objects (trees, grass, bushes) with frustum and distance culling.

Image

How to use the extension

How to use:

  1. Import your 3D object (tree, bush, grass...) and add the Foliage swaying behavior to it.

  2. Choose from various object settings and parameters, then add the object to your scene.
    Foliage swaying behavior

  3. Add the Update foliage sway action, choose its parameters, and run it every frame.
    Update foliage sway action

  4. Optionally use the Set wind gust action at the beginning of the scene.
    Set wind gust action

  5. Play your scene.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

Example file

NatureElementsDemo.zip
Please do not redestribute.

Extension file

NatureElements.zip


Extension by @baldieandbaldie-commits

You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type !update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:

!update [MyExtension.zip](https://github.com/GDevelopApp/GDevelop-extensions/files/12709661/MyExtension.zip)

It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!

@github-actions github-actions bot requested a review from a team as a code owner March 6, 2026 20:02
@github-actions github-actions bot added the ✨ New extension A new extension label Mar 6, 2026
@D8H
Copy link
Contributor

D8H commented Mar 9, 2026

Thank you for submitting an extension. The result looks impressive.

The code is quite big. Does it come from a library or did you wrote it specifically for this extension?

  • If it comes from a library, you can add a link to its repository to help maintainers update it in the future.
  • If you wrote it specifically for this extension, it would be great to add type annotations ("JSDoc", using notes like @typedef, @param or @type) to at least functions and global variables (or make it a lib if it's more convenient).
    • The editor doesn't remember type declarations set in one JS-event in other JS events, so you may find it easier to have the whole code in one place (for instance the 3D particle emitter extension has a library + dedicated code inside the DefineHelperClasses function)

A few suggestions from a quick look:

  • gdjs should be use as the global scope instead of window or even runtimeScene if it makes sense to reset the state at scene changes.
  • You don't need to surround your code with a function, this is already part of JS-events.
(function (runtimeScene, eventsFunctionContext) {
})(runtimeScene, eventsFunctionContext);

Let me know if this makes sense and if you can make these changes or part of it. This will help update the extension when new GDevelop versions are released.

@4ian
Copy link
Collaborator

4ian commented Mar 9, 2026

Tried it and it looks very very cool. It's a big extension but let's see if we can get it inside the experimental extensions!

@baldieandbaldie-commits

@D8H @4ian Thanks folks. The code was specifically created for this extension. Your comments make a lot of sense. Give me some time and I'll update as much as possible with your comments in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ New extension A new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants