Please be aware there is a known issue with images on the Community. We are working to resolve this issue as quickly as possible. We apologize for the inconvenience. If you need urgent help in the meantime, please reach out to technical support or your Threekit representative.

How we can change Light

Comments

8 comments

  • Ian  Drews
    Ian Drews

    Hi Vikram, You can set a rule on the scene that your stage corresponds to which will change the lighting. In this example the rotation of the light is being set based on a number attribute but you should be able to accomplish anything you'd like with this method.

    After you've done that you can get access to the stage configurator on the frontend like this 

    let s = await window.threekit.player.getStageConfigurator()

    and from there the stage configurator will function essentially the same as the regular player configurator. Call setConfiguration on the stageConfigurator to change the value of the attribute(s) that you have assigned the lighting changes to.

    Hope this is helpful, 
    Ian

    0
  • vikram_s
    vikram_s

    Can you provide me example CODE?

    0
  • Ian  Drews
    Ian Drews

    You will need to modify the stage to add in a configuration attribute, there is no way to achieve this purely with frontend code as far as I am aware. When you've added the attribute to the Stage the code will be:

    let s = await window.threekit.player.getStageConfigurator()
    s.setConfiguration({yourLightingAttribute: newValue})

     

    0
  • vikram_s
    vikram_s

    I am getting this response after calling below method :

    let s = await window.threekit.player.getStageConfigurator()

    0
  • vikram_s
    vikram_s

    How we can get the stage option?

    0
  • Ian  Drews
    Ian Drews

    Hi Vikram,
    You cannot change the active stage without unloading the player and re-initializing with the new stage ID. If you would like to change the lighting in real-time, I would set up attributes & rules to change the active light setup with the stage configurator, either by changing the setup directly or by creating a proxy scene and swapping the active scene based on a rule.
    Ian

    0
  • vikram_s
    vikram_s

    Hi,

    Can we move temperature option under item? If yes, Please give us the assistance on it?

    0
  • Ian  Drews
    Ian Drews

    Hi Vikram,

    I'm sorry it's not possible, you'll have to use the stage configurator

    Ian

    0

Please sign in to leave a comment.

Powered by Zendesk