I see there is this function in visual_logic.js
// updateTextObject puzzle
function updateTextObj(objSelector, text) {
var objNames = retrieveObjectNames(objSelector);
for (var i = 0; i < objNames.length; i++) {
var objName = objNames;
if (!objName) continue;
var obj = getObjectByName(objName);
if (!obj || !obj.geometry || !obj.geometry.cloneWithText)
continue;
obj.geometry = obj.geometry.cloneWithText(String(text));
}
}
Is there a way I can call this function in an external function in my main.js file?
`updateLeaderboardRanks = () => {
if(progress){
// Progress for teams comes sorted from the websocket
const score = progress[0].score
v3d.puzzles.updateTextObj(“LDRB_RANK_SCORE_01”, score)
}
}`
-
This topic was modified 9 months, 2 weeks ago by maherbert604.
-
This topic was modified 9 months, 2 weeks ago by maherbert604.
-
This topic was modified 9 months, 2 weeks ago by maherbert604.