@soonspacejs/plugin-navigation
v2.11.56
Published
Navigation plugin for SoonSpace.js
Downloads
397
Readme
@soonspacejs/plugin-navigation
navigation plugin for SoonSpace.js
导航功能列表:
导航相机 ✅
- 跟随模型 ✅
- 相机位置偏移 ✅
- 相机角度偏移 ✅
- 反向朝向 ✅
- 自动恢复朝向 ✅
- 是否锁定相机朝向 ✅
- 相机朝向不受控制器影响 ✅
- 仍可以反向 ✅
- 相机朝向 ✅
- 相对朝向 ✅
- 相对朝向会跟随目标旋转 ✅
- 绝对朝向 ✅
- 绝对朝向不会跟随目标旋转 ✅
- 朝向目标 ✅
- 默认为导航主体 ✅
- 固定点 ✅
- 固定模型 ✅
- 固定方向 ✅
- 陀螺仪朝向 ✅
- 相对朝向 ✅
- 视角 ✅
- 第一人称 ✅
- 第三人称 ✅
- 俯视角 ✅
- 左视角 ✅
小地图
- 小地图相机 ✅
- 地图 dom 节点生成
- 地图尺寸缩放
- 适应最短边
- 适应最长边
- 固定尺寸
路径导航
- 多路径整合
- 基本配置
- 导航结束时是否返回起点
- 路径动画配置
- 是否循环播放
- 每段路径结束时是否自动开始下一段路径
- 导航主体
- 设置模型
- 静止时执行的模型动画(将来)
- 运行时执行的模型动画(将来)
- 操作
- 开始导航
- 重新开始
- 播放
- 暂停
- 停止
- 变速
- 反向
- 进度调节
- 结束导航
- 回调
- 一段路径结束时
- 导航开始时回调
- 导航完全执行完毕时回调(finished)
- 导航结束时回调(completed)
- 整体进度
- 单段路径进度
- 距离信息
- 距离起点
- 距离当前路径起点
- 距离终点
- 距离当前路径终点
- 距离下个节点
- 当前位置
- 当前朝向
- 前方转弯方向
<<<<<<< HEAD
代码 usage
import NavigatorPlugin from "@soonspacejs/plugin-navigator";
const { NavigatorControl } = ssp.registerPlugin(
NavigatorPlugin,
"navigator-plugin"
);
const shortestPath1 = ssp.getShortest(/* ... */);
const shortestPath2 = ssp.getShortest(/* ... */);
const navigator = new NavigatorControl({
camera: {
opposite: true,
offset: new Vector3(),
},
paths: [],
onStart() {
console.log("start");
},
});
navigator.flyToStart();
navigator.start();
=======
c8d957be8672383fdc0971cbcf1b0f8ea061d2d1 Document: http://www.xwbuilders.com:8800/plugin/navigation.html