I am using
setMaterial when the events are triggered.
Example here: http://estudio3d.eu/sunglassdesigner
All works fine for Classic render
(DiffuseColor - the sport model sunglasses) but not for PBR render
(DiffusePBR or AlbedoPBR - the art model sunglasses). For the very first time when the 3d model is loaded, AlbedoPBR channel has no color array. You can see it in console.log, where I am listing
materialToUpdate. I am using "incognito mode" in order to simulate the first time 3d model loading.
The error message is
Uncaught TypeError: Cannot set property '0' of undefined. After reloading, all works fine for AlbedoBPR. The color array appears.
I assume that 3d model are completely loaded when the
elementModify event are triggered. Or maybe I didn´t understand how it works
materialToUpdate.channels.AlbedoPBR.enable = false; it is not necessary, even worse.
Another issue, especially in Mozilla Firefox 45.0.1: the automatic refresh doesn´t work. I need to rotate the model and only then change occurs. I tried without success