I am currently working on a basic diffuse lighting shader, and I have encountered an issue where the shading does not update correctly when I apply position or rotation changes to the object. Moving the "Custom Point Light" position seems to work fine, updating the shading on the cube accurately. However, when the cube itself is moved, the shading appears incorrect.
If you uncomment lines 183 and 184 in the code, the rotation is applied, but the shading remains incorrect.
cube.rotation.x += rotSpeed.x;
cube.rotation.y += rotSpeed.y;
Here is the implementation of a PromisedLoad class that handles loading resources asynchronously in JavaScript:
[...]