Skip to content

Commit

Permalink
Add patchSetShaderMode API
Browse files Browse the repository at this point in the history
Adjusts display of a spatialPatch tool's associated patch
  • Loading branch information
hobinjk-ptc committed Jul 18, 2023
1 parent aa97327 commit a88cca3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libraries/objectDefaultFiles/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@
this.getOAuthToken = makeSendStub('getOAuthToken');

this.patchHydrate = makeSendStub('patchHydrate');
this.patchSetShaderMode = makeSendStub('patchSetShaderMode');

// deprecated methods
this.sendToBackground = makeSendStub('sendToBackground');
Expand Down Expand Up @@ -1717,6 +1718,18 @@
});
};

/**
* @param {string} shaderMode - Part of ShaderMode enum (see remote operator addon)
*/
this.patchSetShaderMode = function patchSetShaderMode(shaderMode) {
postDataToParent({
patchSetShaderMode: {
frame: spatialObject.frame,
shaderMode,
},
});
};

this.getScreenshotBase64 = function(callback) {
spatialObject.messageCallBacks.screenshotBase64 = function (msgContent) {
if (typeof msgContent.screenshotBase64 !== 'undefined') {
Expand Down

0 comments on commit a88cca3

Please sign in to comment.