You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, resizing the scene by external means (f.e. resizing the container of a <motor-scene> element) does not cause necessary re-rendering to happen. This causes the problem that if something is proportionally sized (which can ultimately depend on the size of the root <motor-scene> element), then mountPoint calculations will fail because the thing who's mountPoint is being set will not have an updated size, so the mountPoint offset will be incorrect.
There is currently no way to do this reliably except with polling (though that will change soon with the ResizeObserver coming to the web soon). So, we'll poll for now.
We need a good way to do this without simply traversing the entire tree and re-rendering everything. We need a way to listen to size changes (and hence why I'm working on issue #54), in order to re-render only specific nodes that depend on the size updates.
This depends on #54 being completed first. This will also solve #19.
The text was updated successfully, but these errors were encountered:
trusktr
added this to the
Initial API, then time for demos. milestone
Oct 9, 2016
trusktr
changed the title
Listen to size changes on the scene, then re-render child nodes as needed.
Children should listen to size changes on parents and re-render as needed.
Oct 11, 2016
I increased the scope of this issue so that size change events are fired for any node whose size changes, not just the scene. It's really nice, and it's synchronized with the browser's animation loop, so resizing is sharp and smooth (rather than laggy like when re-rendering on window resize events).
Currently, resizing the scene by external means (f.e. resizing the container of a
<motor-scene>
element) does not cause necessary re-rendering to happen. This causes the problem that if something is proportionally sized (which can ultimately depend on the size of the root<motor-scene>
element), thenmountPoint
calculations will fail because the thing who's mountPoint is being set will not have an updated size, so the mountPoint offset will be incorrect.There is currently no way to do this reliably except with polling (though that will change soon with the ResizeObserver coming to the web soon). So, we'll poll for now.
We need a good way to do this without simply traversing the entire tree and re-rendering everything. We need a way to listen to size changes (and hence why I'm working on issue #54), in order to re-render only specific nodes that depend on the size updates.
This depends on #54 being completed first. This will also solve #19.
The text was updated successfully, but these errors were encountered: