I am trying to add RoomEnvironment to Bruno’s structured code (lesson 26).
But when I add below line to Environment.js, I met strange error.
this.pmremGenerator = new THREE.PMREMGenerator(this.renderer);
Please help me to solve this matter.
I’ve just bought Bruno’s course lmao
It seems that
Environment doesn’t have
renderer as a property.
However it seems it still can be accessed via
I am feeling too embarrassed to say anything…
I can’t believe I missed something so obvious…
Don’t be embarrassed!
Pro tips: Auto-completion (which comes with VSCode or JetBrains IDE or etc, some extensions might be needed) might help you well since it analyzes your code statically and gives you available options.
For example, when you type
this. it shows all the members and methods belong to the class, like in this case.