Skip to content

WIP dynamic props

jean-emmanuel requested to merge github/fork/MartinHN/pr/wip_dynamic_props into master

Created by: MartinHN

another refactor, (I can't stand the 10 second waiting that all clones refresh) I just tried to use prop-changed events to avoid reconstructing every thing from scratch at every small changes (like moving stuff around)

tests on this sketch LGMLTemplate.json.zip show a vast improvement in reactivity!

Again, it may break things, it's just to start a discussion...

the main problem if we unify property setters and event system is that,when working with clones with dynamic Ids we usually want some property shared even if they have different computed ids (position/colors...), and some not (the ones depending on OSC messages representing state particular to each instance) I choosed arbitrarily to propagate property changes between clones only if they are coming from the editor (moving or using side panel) I think thats a good middle ground, what do you think?

secondly I included also a kind of detection that prevent rebuilding in updatewidget function if only dynamicProps are changed, it may be redundant with the existing reUse flag that I haven't got until now, it may be removed if judged useless at the end

Merge request reports