Dieterich Posted September 26, 2018 Share Posted September 26, 2018 Hi!, I wanna update parameterized variable when scene is created Example: light.intensity = outsideVariable; In other moment call function to update the variable and scene What best pratic for this? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 26, 2018 Share Posted September 26, 2018 I do not quite get the question, but if you are speaking of what event should you use to detect the scene loaded, you can rely on scene.executeWhenReady https://playground.babylonjs.com/#2FGF7L Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 26, 2018 Author Share Posted September 26, 2018 Sorry for my bit explanation. Well, one example, I want update intensity of light after scene created, updating parameter, now update the light of scene, do you understand now? kind an observable object.. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 26, 2018 Share Posted September 26, 2018 You could then rely on our observables objects: https://playground.babylonjs.com/#2FGF7L#1 Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 26, 2018 Author Share Posted September 26, 2018 @Sebavan Great! helpful this code dude! I'm happy for this answer ? Thanks very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.