| Index: chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
|
| diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
|
| index 4ed691a93cc894c83b28809237952bf18e246741..1040382a066f676e10f19bc5b0a0957dc2021f22 100644
|
| --- a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
|
| +++ b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
|
| @@ -130,23 +130,41 @@ scene.Scene = class {
|
| }
|
|
|
| /**
|
| - * Set the background color of the scene.
|
| + * Configure scene parameters.
|
| + * @param {api.SceneConfiguration} configuration
|
| + */
|
| + configureScene(configuration) {
|
| + this.commands.push({
|
| + 'type': api.Command.CONFIGURE_SCENE,
|
| + 'data': configuration.getCommandPayload(),
|
| + });
|
| + }
|
| +
|
| + /**
|
| * @param {{r: number, b: number, g: number, a: number}} color
|
| */
|
| setBackgroundColor(color) {
|
| - this.commands.push(
|
| - {'type': api.Command.UPDATE_BACKGROUND, 'data': {'color': color}});
|
| + let configuration = new api.SceneConfiguration();
|
| + configuration.setBackgroundColor(color);
|
| + this.configureScene(configuration);
|
| }
|
|
|
| /**
|
| - * Set the radius of background-bounding sphere.
|
| * @param {number} distance
|
| */
|
| setBackgroundDistance(distance) {
|
| - this.commands.push({
|
| - 'type': api.Command.UPDATE_BACKGROUND,
|
| - 'data': {'distance': distance}
|
| - });
|
| + let configuration = new api.SceneConfiguration();
|
| + configuration.setBackgroundDistance(distance);
|
| + this.configureScene(configuration);
|
| + }
|
| +
|
| + /**
|
| + * @param {boolean} enabled
|
| + */
|
| + setWebVrRenderingModeEnabled(enabled) {
|
| + let configuration = new api.SceneConfiguration();
|
| + configuration.setWebVrRenderingModeEnabled(enabled);
|
| + this.configureScene(configuration);
|
| }
|
|
|
| /**
|
|
|