feat(pointview): 新增「场景/点位」页签——正交俯视真实场景底图 + 点位精确叠加
第三个页签(与海选审核/演出配置平级),只读查看每个点位集里各点的真实
位置/朝向,配 move.to/camera.focus 时对照用,不必回 Unity 翻 json。
- pointview.js: 独立白模点位查看器(按 kind 上色/朝向箭头/悬停坐标/侧栏清单);
有底图则把正交俯视真实场景图当画布底图、点位按 shot.bounds 线性投上去
(像素级对齐家具),带显隐开关;无底图回退黑底白模。
- app.py: /api/pointsets 给有底图的点位集附 shot{url,bounds};新增
/sceneshot/{name}.png 路由(防目录穿越)。
- Dockerfile/compose: 加 STORY_SCENESHOTS_DIR(/sceneshots) env + 挂载点与注释。
底图由 SGame 仓新增 Editor 工具「剧情场景俯视抓拍」产出
({name}.png + {name}.shot.json,map-local 覆盖范围)。
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
status: null,
|
||||
selectedNode: null,
|
||||
dirty: false,
|
||||
mode: "review", // review=海选审核 / perform=演出配置
|
||||
mode: "review", // review=海选审核 / perform=演出配置 / points=场景点位
|
||||
by: localStorage.getItem("story_by") || "匿名",
|
||||
};
|
||||
window.App = App;
|
||||
@ -196,20 +196,50 @@
|
||||
// ---------- 试走 ----------
|
||||
$("btn-playtest").onclick = () => Playtest.open(App.ir, App.dict);
|
||||
|
||||
// ---------- 模式切换:海选审核 / 演出配置 ----------
|
||||
// ---------- 模式切换:海选审核 / 演出配置 / 场景点位 ----------
|
||||
function setMode(m) {
|
||||
App.mode = m;
|
||||
$("mode-review").classList.toggle("active", m === "review");
|
||||
$("mode-perform").classList.toggle("active", m === "perform");
|
||||
$("mode-points").classList.toggle("active", m === "points");
|
||||
$("wrap").classList.toggle("hidden", m !== "review");
|
||||
$("perform-wrap").classList.toggle("hidden", m !== "perform");
|
||||
$("points-wrap").classList.toggle("hidden", m !== "points");
|
||||
$("review-toolbar").style.display = m === "review" ? "" : "none";
|
||||
document.body.classList.toggle("perform-mode", m === "perform"); // 切背景色调
|
||||
document.body.classList.toggle("points-mode", m === "points");
|
||||
Timeline.stop();
|
||||
if (m === "points") PointView.clear();
|
||||
if (m === "perform") performLoadList();
|
||||
if (m === "points") pointsLoadList();
|
||||
}
|
||||
$("mode-review").onclick = () => setMode("review");
|
||||
$("mode-perform").onclick = () => setMode("perform");
|
||||
$("mode-points").onclick = () => setMode("points");
|
||||
|
||||
// ---------- 场景点位页:点位集列表 + 只读白模查看器 ----------
|
||||
let pointsCurrent = null;
|
||||
function pointsLoadList() {
|
||||
const names = Object.keys(App.pointsets || {}).sort();
|
||||
const host = $("points-set-list"); host.innerHTML = "";
|
||||
if (!names.length) { host.innerHTML = '<div class="empty" style="padding:14px">未找到任何点位集(StreamingAssets/Story/PointSets/*.points.json)。</div>'; return; }
|
||||
names.forEach(name => {
|
||||
const ps = App.pointsets[name] || {};
|
||||
const cnt = (ps.anchors || ps.points || []).length;
|
||||
const d = document.createElement("div");
|
||||
d.className = "ev" + (name === pointsCurrent ? " sel" : "");
|
||||
d.innerHTML = '<div class="t">' + esc(name) + '</div><div class="g">'
|
||||
+ (ps.mapId ? '地图 ' + esc(ps.mapId) + ' · ' : '') + cnt + ' 个点</div>';
|
||||
d.onclick = () => pointsSelect(name);
|
||||
host.appendChild(d);
|
||||
});
|
||||
}
|
||||
function pointsSelect(name) {
|
||||
pointsCurrent = name;
|
||||
pointsLoadList();
|
||||
$("points-empty").style.display = "none";
|
||||
PointView.show($("points-view"), name, App.pointsets[name] || {});
|
||||
}
|
||||
|
||||
// ---------- 演出配置页:已确认事件列表 + 内嵌白模预览 ----------
|
||||
let performCurrent = null;
|
||||
|
||||
Reference in New Issue
Block a user