Closed ghost closed 9 years ago
I just tested the same fiddle with IE11 and Safari. Both produce errors as well.
This is the output from IE:
TypeError: Die Eigenschaft "type" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
at Anonymous function (https://xml3d.cg.uni-saarland.de/xml3d/script/xml3d-4.9.js:13998:13) at LightModel.prototype.fillLightParameters (https://xml3d.cg.uni-saarland.de/xml3d/script/xml3d-4.9.js:13996:9) ...
Whenever I add the exact same lights directly to the html (ie not adding them during runtime) it works in all browsers. Not sure if these errors are related, but since they occur only 2 lines apart I added this as a comment and not as a new issue.
I can confirm this, looks like a bug in the way the "shader" attribute mutation is handled for light elements.
Thanks for the fiddle, we'll take a look at this and release a hotfix for 4.9 together with the fix for #113.
v4.9.1 was just released and should fix this issue.
Dynamically adding multiple lights at once during runtime results in the following message:
followed by
See the following fiddle: https://jsfiddle.net/pz4wpbc9/4/ You won't see any output, there are no objects in the scene. Look at the console instead for the messages mentioned above. Apparently one of the lights added works while the rest produces the error. In a scene with objects you would see that only one of the added lights is actually working (the first?).
This happens in both Chrome and Firefox.