Here's a description of how MicroStudio was screaming for 24 hours and I couldn't understand what was happening.
In PIXI3D, the library exports classes and variables. It turns out that there is a variable that has the same name as the class.
PIXI3D.LightingEnvironment.main which contains before the critical call
object renderer = [object] lights = [list] imageBasedLighting = 0 end
The variable is used in the library and its absence or incorrect content causes errors in the graphics display.
There is also a class called
I can refer to a variable and a class from MicroScript - everything works fine.
However, the authors of the library did something that MicroScript cannot do - overwrite the value of
PIXI3D.LightingEnvironment.main with a new object.
app.renderer, new PIXI3D.ImageBasedLighting( resources["diffuse.cubemap"].cubemap, resources["specular.cubemap"].cubemap ) )
PIXI3D.LightingEnvironment class to disappear.
Attempting to write to
PIXI3D.LightingEnvironment.main generates an error that such a variable does not exist.
It took me 24 hours to understand this and I suspected it was a library error or a server error (no graphics).
Due to this error, the entire graphic is black - you can check it by turning off the light (comment the lines