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 11, 2024
1 parent 4048e20 commit da65627
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 failure 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 failure 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 failure 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();

Check failure on line 38 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined
}

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

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

Check failure on line 148 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

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

Check failure on line 149 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined
}

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

Check failure on line 203 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

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

Check failure on line 204 in tools/spatialSensor/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'languageInterface' is not defined
oldPos = newPos;
}

Expand Down

0 comments on commit da65627

Please sign in to comment.