Skip to content

Commit

Permalink
Add language interface to sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
hobinjk-ptc committed Jun 10, 2024
1 parent 31c08b5 commit 6d9f152
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/spatialSensor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ if (!spatialInterface) {
spatialInterface = new SpatialInterface();
envelopeContents = new EnvelopeContents(spatialInterface, document.getElementById('container'));
spatialInterface.useWebGlWorker();

languageInterface = new LanguageInterface('spatialSensor', spatialObject.object, spatialObject.frame);

Check warning on line 35 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined

Check warning on line 35 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'LanguageInterface' is not defined
languageInterface.updateSummarizedState('occupied', false);

Check warning on line 36 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined
languageInterface.updateSummarizedState('position', {x: 0, y: 0, z: 0});

Check warning on line 37 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined
languageInterface.sendSummarizedStateToParent();
}

let threejsInterface = new ThreejsInterface(spatialInterface);
Expand Down Expand Up @@ -140,6 +145,8 @@ function onHumanPoses(humanPoseObjects) {

setSensorActive(active);
isPlaybackActive = false;
languageInterface.updateSummarizedState('occupied', active);
languageInterface.sendSummarizedStateToParent();
}

function anchoredModelViewCallback(modelViewMatrix, _projectionMatrix) {
Expand Down Expand Up @@ -193,6 +200,8 @@ function updateSensorPosition() {
return;
}
spatialInterface.analyticsSetSensor(newPos);
languageInterface.updateSummarizedState('position', newPos);
languageInterface.sendSummarizedStateToParent();
oldPos = newPos;
}

Expand Down

0 comments on commit 6d9f152

Please sign in to comment.