babylon-runtime / _r

Code Less, Babylon More
https://babylon-runtime.github.io/
Apache License 2.0
8 stars 1 forks source link

_r.load seems to not apply patch (or apply them randomly) #26

Closed Vinc3r closed 4 years ago

Vinc3r commented 4 years ago

see https://codesandbox.io/embed/ancient-bird-wmlcx?codemirror=1&fontsize=12&hidenavigation=1&module=%2Floadfile.js&theme=dark

If you send this patch to the console, you'll be able to see the desired result:

_r.patch([{"cornellBox.red.000:material":{"albedoColor": "yellow"}},{"cornellBox.ground.000:material":{"albedoColor": "blue"}}]);

If you call the patch after addToScene, it works:

_r.select(assets).addToScene();
_r.patch(["cornellBox.patch"]);