AnsweredAssumed Answered

Set realistic environment settings in a SceneView sample code

Question asked by mshukun1 on Apr 27, 2017
Latest reply on Apr 28, 2017 by mshukun1

I would like to show and hide the tool using a button, but I haven't been able to make it work.  The image below displays the problems that I encountered.  The first problem is I am not sure how to reset environment setting (removing shadow),  and the second problem is how to make the clock to work (getting local time and also shadow casting).  I would appreciate your assistance.



    var clock = new Clock({
        el: "clock",
        skin: require.toUrl('./third-party/clock.svg'),
    sceneView.ui.add('clock', 'bottom-right');
    clock.on('time-change', function(time) { = time; = true;

    $('#shadow').on('click', function(){
      var display = $('#clock').css('display');
      if (display == 'block') {
        $('#clock').css('display', 'none');
        // Show shadow with clock;
        sceneView.ui.add('clock', 'bottom-right');
      } else {
        $('#clock').css('display', 'block');
        // Hide shadow and clock