【发布时间】:2021-07-10 05:32:39
【问题描述】:
我正在尝试将设备运动值链接到 2D 文本元素,以便旋转 Y 值将在我的场景中显示为文本。
我一直在尝试实施another thread 中描述的解决方案,但没有成功。显然,自 2020 年 3 月发布 v85 以来,Spark AR 中脚本的工作方式发生了一些变化。
这是我在项目中使用的代码:
const Patches = require('Patches');
const numberFormat = 'Time: {0}';
const number = Patches.getScalarValue('number');
Patches.setStringValue('value', number.format(numberFormat));
This is what my script looks like in the editor
如果有人知道脚本为什么不起作用,请帮助我。
【问题讨论】:
标签: javascript spark-ar-studio