Scene Time of FVS Custom Model Component

  • Last update:May 05, 2023
  • Overview

    Application scenarios: If you have installed the FVS plugin, you can view this article to learn about functions related to FVS templates.

    Note: Mobile devices are not supported.

    Version

    Report Server Version

    Plugin Version

    Function Change

    V11.0.9

    V1.13.0

    Scene time was added in the custom model component to achieve the effect of scenes such as Sky Background and Environmental Light changing with time.

    Application Scenarios

    You can use the time system to quickly set desired lighting, sky and other effects. You can also present dynamic effects of scenes changing with time through JS interface.

    1.2.gif

    Function Introduction

    Set Scene > Environment > Scene time in the custom model component editing interface:

    1. The default time is 14:00. You can change it by sliding or clicking the timeline, or directly edit it in the time display box. The input box only supports integers from 0 to 24.

    2. The label 1.3 2).pngin the top right corner of the scene time indicates the scene state is automatic and Sky Background, Environmental Light, and Light Source are the default settings corresponding to the scene time.

    3. If any setting in Sky Background, Environmental Light, Light Source is modified after the scene time is determined, the scene state will become manual, and the top right corner will be changed as 1.3 3).png.

    4. Under the manual scene state, if the scene time is modified again, the scene state will change to the corresponding automatic scene state of the time.

    5. Under the automatic scene state, the animateSceneTime() interface is supported to achieve dynamic changes in scene time.

    1.3.gif

    Example

    The example in this article demonstrates how you can trigger dynamic changes in the custom model component scene by clicking the title component.

    Creating a Template

    Click File > New FVS Report > Create Big Screen From Blank Area, set the template name to FVS Custom Model Scene Dynamic Change, and click Create Template.

    As is shown below:

    2.1.png

    Setting up Custom Model Component

    1. Adding Components and Creating Scenes

    Add a custom model component to the page, click Edit Component to generate an empty scene. The scene state should be automatic. As is shown below:

    2.2.1.gif

    2. Adding the Model

    a. Click to download and decompress the warehouse model: Warehouse.zip

    b. In the custom model component editing interface, click Model > Add Model > Upload New Model. After uploading the Warehouse model, you can select it and click Finish to add it to the scene. As is shown below:

    2..2.2 2).gif

    c. Select Warehouse in the model list, adjust the scaling, position, and visual direction and so on. As is shown below:

    2.2.2 3).png

    d. After the setup, click Return to editor to go back to the canvas page.

    Setting Click Event of the Title

    1. Adding the Title Component

    Click Text > Title, add it to the canvas, and set the title content to Click to trigger a scene state change. As is shown below:

    2.3.1.png

    2. Setting the JavaScript Click Event

    Select the title component, click Interaction > Click > Add Click Event > JavaScript, set the event name and enter the JavaScript in the pop-up box:

    Note: The corresponding numbers after from should be smaller than those after to, and they only support integers.

    duchamp.getWidgetByName("Customize the model1_Page1").animateSceneTime({
         from: 14, //Start at the default 14:00
         to: 38, //Finish at 14:00 the next day
         duration: 3000 //The duration of the change is three seconds 
    });         

    As is shown below:

    2.3.2.png

    Previewing the Effect

    Save the report, click Preview and the effect will be shown as follows:

    2.4.gif

    Template Download

    To download the template, click: FVS Custom Model Scene Dynamic Change.fvs



    Attachment List


    Theme: FineVis Data Visualization
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy