@soonspacejs/plugin-sspx
v2.11.67
Published
Ssp instance store for SoonSpace.js
Downloads
321
Readme
@soonspacejs/sspx
Ssp instance store for SoonSpace.js
Use
import SoonSpace from "soonspacejs"
import Sspx from "@soonspacejs/plugin-sspx"
const ssp = new SoonSpace({
el: '#view',
options: {
showGrid: true,
},
events: {},
});
// 保存 ssp 实例
Sspx.add("firstSsp", ssp)
// 加载一个测试模型
ssp
.loadSbm({
id: "test_model",
url: "./model/changjing02/changjing02_1F_0.sbm",
})
.then(() => {
ssp.flyMainViewpoint()
})
// 获取已保存 ssp 实例
console.log("Sspx get", Sspx.get("firstSsp"))