ThatOpen / engine_components

MIT License
328 stars 129 forks source link

components.scene.setup() is not a function #112

Closed MiguelG97 closed 1 year ago

MiguelG97 commented 1 year ago

Describe the bug 📝

I see this command being used in the tutorial path for setting up the lights: components.scene.setup() however, the console shows a message telling me that this command is not a function

image

image

It has an easy fix [const light = new THREE.AmbientLight(0x404040); scene.add(light);] from the user side though

Reproduction ▶️

No response

Steps to reproduce 🔢

follow the tutorial path

System Info 💻

openbim-components

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

MiguelG97 commented 1 year ago

same thing with components.renderer.onBeforeUpdate.add() onBeforeUpdate is undefined image

image

which turns to work like this: components.renderer.beforeUpdate.on(...)

MiguelG97 commented 1 year ago

as well as const mainButton = clipper.uiElement.get("main"); why documentation is different from actual npm library: const mainButton = clipper.uiElement.main;

is it due to a new version package release ?

MiguelG97 commented 1 year ago

Apparently those commands were coming from the alpha version. I reinstalled the npm package and now I have access to those commands

VictorTrumpel commented 1 year ago

Screenshot 2023-10-13 at 19 57 42 what version are you using? I reinstalled the packages but it didn't help me

daniel-augusto commented 1 year ago

Screenshot 2023-10-13 at 19 57 42 what version are you using? I reinstalled the packages but it didn't help me

Please, see comment in this issue https://github.com/IFCjs/docs/issues/22