Git Product home page Git Product logo

Comments (8)

borismoyosa avatar borismoyosa commented on May 28, 2024 1

Hi, I'm curious if there are any updates on this feature? It would really improve the ux of the editor :)

from babylon.js.

borismoyosa avatar borismoyosa commented on May 28, 2024 1

I understand, thanks for the reply!

from babylon.js.

carolhmj avatar carolhmj commented on May 28, 2024

Some forum requests for this:
https://forum.babylonjs.com/t/add-shortcuts-to-undo-and-redo-in-the-gui-editor/42326
https://forum.babylonjs.com/t/nme-improvements/35266
https://forum.babylonjs.com/t/gui-editor-improvements-suggestion-feedback-parts-1-to-6/32704
https://forum.babylonjs.com/t/nodematerial-add-undo/30672/2

from babylon.js.

Pryme8 avatar Pryme8 commented on May 28, 2024

I have a generic script for "Commands" that you could wrap all the existing functionality in pretty easy.

https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Command.ts

Not sure if this would do it for you, but it has worked in every project that I have made that needs undo redo.

You can see how its used by the editor here:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Editor.ts#L295

and then a simple example command would be like this:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Common/DeleteRoomCommand.ts
Normally you just define them inline and not on a separate file like this, here is an example of that:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Gizmos/Gizmos.ts#L91

This can also be tied into a notification system that stacks little popups to the user notifying them when they have ran/undone a command etc.

If you are interested let me know, if not no worries!

from babylon.js.

RaananW avatar RaananW commented on May 28, 2024

This is still on our agenda. It is simply not that trivial with our current architecture. If we want to deliver something, we want to deliver it the best we can.
We have no timeline on this, sadly.

from babylon.js.

Jeggery avatar Jeggery commented on May 28, 2024

https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Command.ts

The link you provided cannot be opened, I would like to refer to it

from babylon.js.

dennemark avatar dennemark commented on May 28, 2024

Since NME etc. are mainly based on JSON it might be very simple to use immer and Json patches?
Immer can generate changes and inverseChanges

Immer however produces immutable data structures. And every change on the json would need to be wrapped by immer then. But it is pretty convenient.

from babylon.js.

github-actions avatar github-actions commented on May 28, 2024

This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".

from babylon.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.