Skip to content

Commit e83aae5

Browse files
committed
Remove options.enableGeminiLive()
It's very confusing why we have enableGeminiLive() and enableAI() This option adds a gemini live text interface to the simulator. It is only used in /demo/aisimulator/.
1 parent ed66f39 commit e83aae5

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

demos/aisimulator/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as xb from 'xrblocks';
66
import {AISimulator} from './AISimulator.js';
77

88
const options = new xb.Options();
9-
options.enableGeminiLive();
9+
options.simulator.geminiLivePanel.enabled = true;
1010
options.depth.enabled = true;
1111
options.depth.depthTexture.enabled = true;
1212
options.depth.occlusion.enabled = true;

src/core/Options.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,6 @@ export class Options {
236236
return this;
237237
}
238238

239-
/**
240-
* Enables the Gemini Live feature.
241-
* @returns The instance for chaining.
242-
*/
243-
enableGeminiLive() {
244-
this.simulator.geminilive = true;
245-
return this;
246-
}
247-
248239
/**
249240
* Enables a standard set of AI features, including Gemini Live.
250241
* @returns The instance for chaining.

src/simulator/SimulatorInterface.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ export class SimulatorInterface {
5757
}
5858

5959
showGeminiLivePanel(simulatorOptions: SimulatorOptions) {
60-
if (simulatorOptions.geminilive) {
61-
const element = document.createElement('xrblocks-simulator-geminilive');
60+
if (simulatorOptions.geminiLivePanel.enabled) {
61+
const element = document.createElement(
62+
simulatorOptions.geminiLivePanel.element
63+
);
6264
document.body.appendChild(element);
6365
this.elements.push(element);
6466
}

src/simulator/SimulatorOptions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export class SimulatorOptions {
4343
enabled: true,
4444
element: 'xrblocks-simulator-hand-pose-panel',
4545
};
46-
geminilive = false;
46+
geminiLivePanel = {
47+
enabled: false,
48+
element: 'xrblocks-simulator-geminilive',
49+
};
4750
stereo = {
4851
enabled: false,
4952
};

0 commit comments

Comments
 (0)