Skip to content

Commit b78f559

Browse files
feat(EmptyRealityViewer): Added argon.configureStage protocol
1 parent 88e6815 commit b78f559

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/reality-viewers/empty.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ export class EmptyRealityViewer extends RealityViewer {
118118
const internalSession = this.sessionService.createSessionPort(this.uri);
119119
internalSession.suppressErrorOnUnknownTopic = true;
120120

121+
internalSession.on['argon.configureStage.setStageGeolocation'] = ({location:Cartographic}) => {
122+
console.log(`Received argon.configureStage.setStageGeolocation message with location: ${location.toString()}`)
123+
}
124+
121125
internalSession.connectEvent.addEventListener(() => {
122126

123127
const scratchQuaternion = new Quaternion;
@@ -282,7 +286,13 @@ export class EmptyRealityViewer extends RealityViewer {
282286
if (this.sessionService.manager.isClosed) return;
283287
const messageChannel = this.sessionService.createSynchronousMessageChannel();
284288
session.open(messageChannel.port1, this.sessionService.configuration);
285-
internalSession.open(messageChannel.port2, { role: Role.REALITY_VIEWER, uri: this.uri, title: 'Empty', version: this.sessionService.configuration.version });
289+
internalSession.open(messageChannel.port2, {
290+
role: Role.REALITY_VIEWER,
291+
uri: this.uri,
292+
title: 'Empty',
293+
version: this.sessionService.configuration.version,
294+
protocols: ['argon.configureStage@v1']
295+
});
286296
});
287297
}
288298
}

0 commit comments

Comments
 (0)