Description
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.