feat: 切换至滚动阻力运行模型并更新资产、编辑器与验证
- 物理规则:现行模型仅保留滚动阻力耗能与恢复系数碰撞,风力、空气阻力、静摩擦、动摩擦不再参与运行;确认三球质量 60/330/约890 kg 及水密度、流阻参数 - 定向加速改为真实顶面接触触发的一次性 +5 m/s 速度事件,模型新增渐进式 U 形导槽出口 - 更新球体、滑槽、水/冰/墙、球洞模型与 storybook 目录、物理、实体配置 - 工坊摆放、编辑器、运行适配与检查脚本同步;删除过时的 baseline 三组检查 - 新增谜题设计参考文档、关卡草稿与本轮实验产物
This commit is contained in:
@@ -17,8 +17,13 @@ func valid_vector(value: Variant) -> bool:
|
||||
if not (n is float or n is int) or not is_finite(float(n)):return false
|
||||
return true
|
||||
|
||||
func overlaps(a: Dictionary,b: Dictionary) -> bool:
|
||||
func overlaps(a: Dictionary,b: Dictionary, saved_layout := false) -> bool:
|
||||
var ab: AABB=lib.record_bounds(a);var bb: AABB=lib.record_bounds(b)
|
||||
# Earlier saves allow another block directly above the 1 m base.
|
||||
# Accept those coordinates on load. New placements reserve the full rim.
|
||||
if saved_layout:
|
||||
if a.kind=="directional_boost":ab.size.y=lib.catalog[a.kind].baseHeight
|
||||
if b.kind=="directional_boost":bb.size.y=lib.catalog[b.kind].baseHeight
|
||||
var extent: Vector3=ab.end.min(bb.end)-ab.position.max(bb.position)
|
||||
return extent.x>.001 and extent.y>.001 and extent.z>.001
|
||||
|
||||
@@ -42,7 +47,7 @@ func validate(data: Variant) -> String:
|
||||
if r.kind!="goal_hole" and (r.position[0]!=round(r.position[0]) or r.position[2]!=round(r.position[2])):return "积木 X / Z 坐标必须对齐网格"
|
||||
var d={"id":r.id,"kind":Chutes.canonical_kind(r.kind),"position":lib.vector(r.position),"quarter":Chutes.canonical_quarter(r.kind,int(r.quarter))}
|
||||
for other in decoded:
|
||||
if overlaps(d,other):return "关卡中有重叠方块"
|
||||
if overlaps(d,other,true):return "关卡中有重叠方块"
|
||||
decoded.append(d);ids.append(r.id)
|
||||
var ball_ids: Array=[]
|
||||
for b in data.balls:
|
||||
|
||||
Reference in New Issue
Block a user