@
feat(web): 演出配置 Timeline 加「场景底图」选择器(venue 特写)
- 后端 /api/sceneshots:列 SceneShots 全部俯视底图(venue 特写) name->{url,bounds}
- timeline.js:底图优先级 ir.stage.backdrop(venue) > 点位集默认 shot;
顶栏加底图下拉 renderMapInfo + applyBackdrop(换底+改投影范围+重画+回调)
- app.js:拉 /api/sceneshots;performSelect 传入;saveBackdrop 写 ir.stage.backdrop 并 PUT
- venue 特写与点位集同 map-local → 换底图后锚点自动落对位(无头实拍擂台验证)
- ir.stage.backdrop 是编辑器元数据:validate 不读、compile 不碰
@
This commit is contained in:
15
web/app.py
15
web/app.py
@ -219,6 +219,21 @@ async def pointsets():
|
||||
return out
|
||||
|
||||
|
||||
@app.get("/api/sceneshots")
|
||||
async def sceneshots():
|
||||
"""列出 SceneShots 目录里所有可用俯视底图(venue 特写等):name -> {url,bounds,w,h}。
|
||||
供演出配置「场景底图」选择器:事件可挑一张当 Timeline 底图(写进 ir.stage.backdrop)。"""
|
||||
out = {}
|
||||
if os.path.isdir(_SCENESHOTS_DIR):
|
||||
for fn in os.listdir(_SCENESHOTS_DIR):
|
||||
if fn.endswith(".shot.json"):
|
||||
name = fn[: -len(".shot.json")]
|
||||
shot = _load_shot(name)
|
||||
if shot:
|
||||
out[name] = shot
|
||||
return out
|
||||
|
||||
|
||||
@app.get("/sceneshot/{name}.png")
|
||||
async def sceneshot(name: str):
|
||||
# 防目录穿越:只认纯文件名
|
||||
|
||||
Reference in New Issue
Block a user