SceneOptions
Settings that control how scene transitions animate in SketchUp.
Access it from model.options.sceneOptions. Use it to read
or update whether scene clicks animate smoothly and how long
the transition takes.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let opts = model.options.sceneOptions;
console.log(opts.showTransition);// => trueconsole.log(opts.transitionTime);// => 2 (seconds)
// Slow down the transitionawait opts.update({ TransitionTime: 5 });let updated = await opts.refresh();console.log(updated.transitionTime);// => 5SDK 1.18.0
Properties
Section titled “Properties”options
Section titled “options”
readonlyoptions:OptionsProvider
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get name():
string
The internal name of this options provider, like
'PageOptions'.
Returns
Section titled “Returns”string
showTransition
Section titled “showTransition”Get Signature
Section titled “Get Signature”get showTransition():
boolean
Whether scene transitions animate when the user clicks a
scene tab. When false, the view jumps instantly.
Returns
Section titled “Returns”boolean
transitionTime
Section titled “transitionTime”Get Signature
Section titled “Get Signature”get transitionTime():
number
The duration of the scene transition animation in seconds,
like 2.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”refresh()
Section titled “refresh()”refresh():
Promise<SceneOptions>
Re-fetches these options from SketchUp to pick up any changes the user has made since this snapshot was taken.
Returns
Section titled “Returns”Promise<SceneOptions>
SDK 1.18.0
toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string
update()
Section titled “update()”update(
updates):Promise<string[]>
Applies updates to the scene animation settings. Returns an array of any keys that were rejected as invalid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
the properties to change |
Returns
Section titled “Returns”Promise<string[]>
rejected keys, or an empty array on success
SDK 1.18.0 protocol 1.15.0