feat: 切换至滚动阻力运行模型并更新资产、编辑器与验证

- 物理规则:现行模型仅保留滚动阻力耗能与恢复系数碰撞,风力、空气阻力、静摩擦、动摩擦不再参与运行;确认三球质量 60/330/约890 kg 及水密度、流阻参数
- 定向加速改为真实顶面接触触发的一次性 +5 m/s 速度事件,模型新增渐进式 U 形导槽出口
- 更新球体、滑槽、水/冰/墙、球洞模型与 storybook 目录、物理、实体配置
- 工坊摆放、编辑器、运行适配与检查脚本同步;删除过时的 baseline 三组检查
- 新增谜题设计参考文档、关卡草稿与本轮实验产物
This commit is contained in:
Yanchen
2026-12-05 10:37:31 +08:00
parent d1141b04c7
commit bf6c355fa6
132 changed files with 13205 additions and 1838 deletions
+27
View File
@@ -12,8 +12,31 @@ func check(name: String, passed: bool, detail: Dictionary = {}) -> void:
if not passed:failures += 1
print(("PASS " if passed else "FAIL ") + name)
func check_supported_workshop_goal() -> void:
var workshop = load("res://designer/scenes/workshop.tscn").instantiate()
root.add_child(workshop)
workshop.apply_data({"schemaVersion":2, "pieces":[], "entities":[
{"id":"support", "kind":"wall", "position":[2,0,-1], "quarter":0},
{"id":"hole", "kind":"goal_hole", "position":[2,2,-1], "quarter":0}
], "balls":[{"id":"iron", "ballTypeId":"iron_ball", "position":[2.24,3.2,-1]}]})
await physics_frame
workshop.toggle_run()
for frame in range(360):
await physics_frame
var ball = workshop.balls[0]
check("workshop_scores_inside_supported_goal", workshop.events.size()==1
and workshop.events[0].goalId=="hole" and workshop.entered.size()==1
and workshop.status.begins_with("全部入洞") and not ball.visible and ball.position.y>1.3,
{"events":workshop.events.duplicate(true), "centerY":ball.position.y, "status":workshop.status})
root.remove_child(workshop)
workshop.queue_free()
func run() -> void:
await check_supported_workshop_goal()
var lib = Library.new()
check("skimming_above_mouth_does_not_score", not lib.crossed_goal(Vector3(-.3,.4,0),Vector3(.3,.3,0),Vector3.ZERO,.3))
check("grazing_throat_edge_does_not_score", not lib.crossed_goal(Vector3(.08,.4,0),Vector3(.08,-1.2,0),Vector3.ZERO,.3))
check("rising_from_below_does_not_score", not lib.crossed_goal(Vector3.DOWN*1.2,Vector3.UP,Vector3.ZERO,.3))
var arena := Node3D.new();root.add_child(arena)
var trials: Array = []
var offsets := [Vector2.ZERO,Vector2(.12,0),Vector2(.26,0),Vector2(.36,0),
@@ -60,6 +83,10 @@ func run() -> void:
app.started=false;app.unlocked=4;app.open_lesson(index)
for r in Maps.solution(app.lesson):
app.records.append({"id":r.id,"kind":r.kind,"position":app.lib.vector(r.position),"quarter":int(r.quarter)})
if index==0:
# Exercise a rolling approach with the exit sealed, as in the workshop.
var bottom: Vector3 = app.placement.bottom_of(app.goals[0])
app.records.append({"id":"support","kind":"wall","position":bottom-Vector3.UP,"quarter":0})
app.rebuild();app.reset_simulation()
for i in range(3):await physics_frame
app.toggle_run()