On my local host the scene is super dark, but server side it is completely overexposed
LocalHost →
Server →
I am using the default values,
const light1 = new THREE.PointLight(0xFFFFFF, 1, 0, 2);
scene.add( light1 );
I’ve tried:
removing the bloom and outline pass
this - physicallyCorrectLights: true, outputEncoding: THREE.sRGBEncoding, gammaOutput: true, gammaFactor: 2.2, useLegacyLights: false
and using ambient light instead of directional lights + point lights.
Any help would be great!
That sounds… Inconceivable!!!
Check:
Any errors in the console… Any warnings in the console…
My guess: There is some difference in THREEJS versions being used in your dev environment vs what it getting uploaded to the server.
One way to check this, would be to load threejs directly from: https://threejs.org/build/three.module.js
OR… perhaps the app is getting initialized twice somehow? and things are getting doubled up?
Very mysterious!
2 Likes
loaded it from https://threejs.org/build/three.module.js and everything works great,
I have spent over a week on this issue and of course it was something stupid.
You are a genius!!
1 Like
A tiny note - do not directly load that URL in deployed apps, that’s only a good idea for testing. Three introduces breaking changes quite often - so if you’ll at all times automatically load the latest build without updating the code of your app, it’ll inevitably start crashing in a few months.
If you’d like to use that file in the final app, be sure to just download it and serve along with the rest of your apps code.
1 Like
Will do that, thanks for letting me know
1 Like