Back to the Shapespark home page

Is there a way to switch the viewpoint when there is a picture gradient process?

As the title said. Is there a way to switch the viewpoint when there is a picture gradient process?
For example, there are two views: view1 and view2.When I click a button,Viewpoint 1 is switched to viewpoint 2, and the scene darkens at the same time. When viewpoint 2 switching is completed, the scene picture returns to brightness, and the scene of viewpoint 2 is displayed.

And here are other questions:

  1. The parameter of Camera Tab such as Exposure,Gamma,Field of view etc. can be changed by javascript?
  2. I found that some shapespark built-in functions are not introduced in the API document such as WALK.getViewer().anchorsVisible. So does every parameters of tab in ShapeSpark can be changed by javascript?
  3. I suggest listing all shapespark built-in function and their functions in API documents

Shapespark doesn’t have such function. If you are using JavaScript customizations you could use onViewSwitchStarted onViewSwitchDone to be notified when views are changed. Then you could perhaps apply some CSS based filter on top of the Shapespark canvas to achieve the darkening effect, but it is something that you would need to experiment with.

Only functions document at https://github.com/shapespark/shapespark-viewer-api are part of the API, and we ensure they will continue to work across Shapespark updates in order not to break scenes that use them. Other functions/properties are internal and can change in new releases.

Thanks for your answer. The problom has solved by JQuery. And I have another question: WALK.TELEPORT_TO_VIEW_ACCELERATION can be set zero to let the camera move at a constant speed?If not, does there have some ways to do it?
So far, I saw that the camera moved at a slow fast slow speed.Even WALK.TELEPORT_TO_VIEW_ACCELERATION equals zero.

You can set WALK.TELEPORT_TO_VIEW_MAX_TIME to 0.

Well,if set WALK.TELEPORT_TO_VIEW_MAX_TIME to 0 , animation of camera movement will be canceled.
So animation of camera movement is necessary.
Is there any other way to make the camera move at a constant speed, not switch the view instantaneously?

Sorry, I intially misunderstood what you were trying to achieve. Looking at how teleport is implemented it is not possible to achieve the constant speed. The only variables available for controlling the movement are WALK.TELEPORT_TO_VIEW_MAX_TIME and WALK.TELEPORT_TO_VIEW_ACCELERATION, but no combination of values will give constant speed. The movement always has two phases, acceleration in the first half and slowing down in the second.