Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editable signals #170

Open
aarthificial opened this issue Feb 4, 2023 · 2 comments
Open

Editable signals #170

aarthificial opened this issue Feb 4, 2023 · 2 comments
Assignees
Labels
a-core Relates to the core package a-ui Relates to the ui package b-enhancement New feature or request

Comments

@aarthificial
Copy link
Contributor

Description
Aside from time events, it's not possible to edit values through the editor.

Proposed solution
Introduce a new entity representing a value editable via the editor.
The API could be similar to signals:

const name = createProperty('Jacob');
const position = Vector2.createProperty([100, 200]);

All properties would be displayed on a dedicated timeline track, right under time events.
Each property would be represented by a pill, located at the time at which createProperty was called.
Selecting the pill would open up the inspector and allow editing of the property's value. This could be the same inspector as the one implemented in #169.

Certain types such as Vector2 and Rect should have dedicated gizmos displayed as an overlay on top of the canvas.
This would allow for editing them by dragging and resizing them instead of just typing the value in an input (which would be usless, since that's exactly the same as hardcoding a value in the code)

It should be possible to provide the matrix used for displaying the gizmo. For example, having the gizmo relative to a given node would look as follows:

const position = Vector2.createProperty([100, 200], node.worldToLocal());

These properties should be implemented using signals, this way the changes made through the editor could be immediately reflected in the preview, without the need for recalculation, this would provide a smooth dragging experience. After the drag is completed the scene should be recalculated regardless, to make sure that everything is correct.

@aarthificial aarthificial added b-enhancement New feature or request c-accepted The issue is ready to be worked on a-core Relates to the core package a-ui Relates to the ui package labels Feb 4, 2023
@chris-findlay
Copy link

Would the value set in the editor be stored in meta or something for persisting?

@aarthificial aarthificial removed the c-accepted The issue is ready to be worked on label Feb 16, 2023
@aarthificial aarthificial self-assigned this Feb 27, 2023
@Astavie
Copy link
Contributor

Astavie commented Aug 7, 2024

I was thinking of working on this issue, but I see c-accepted has been removed. What is the status on this proposal?

Also, wouldn't createProperty also need a name argument like time events for persistence to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-core Relates to the core package a-ui Relates to the ui package b-enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants