toJSON
方法用于将Smoother实例转换为一个JSON字符串。
const smoother = new Yuka.Smoother({
// 滤波器的参数
});
const json = smoother.toJSON();
toJSON
方法返回一个字符串,表示由Smoother实例生成的JSON格式数据。
const smoother = new Yuka.Smoother({
// 滤波器的参数
});
const json = smoother.toJSON();
console.log(json);
输出:
{
"type": "Smoother",
"options": {
// 滤波器的参数
}
}