Here's the relevant code.
"counter.text = scorestring.toFixed(1).toString();"
I am not sure the code below is correct.
const Scene = require('Scene');
const Patches = require('Patches');
Promise.all([
Scene.root.findFirst('number'),
Patches.outputs.getScalar('score'),
Scene.root.findFirst('timer'),
Patches.outputs.getScalar('timer_sec')
]).then(function(results){
var counter = results[0];
var scorestring = results[1];
var counter2 = results[2];
var timerstring = results[3];
counter.text = scorestring.toFixed(1).toString();
counter2.text = timerstring.toString();
})
SparkAR preview:
ScalarSignal class should be formatted with:
The formatString rules as specified here: https://github.com/facebook/folly/blob/master/folly/docs/Format.md#format-string-syntax .
In your scenario: