U1 展开(plan 002):证适配器不止 tap-targets,泛化到 realtime/update 行为。 - 加 trigger=update 词汇 op=drift-targets(目标随 ctx.time 慢漂移,amplitude/speed 可配);targets 记 baseX/baseY/phase。 - 新 fixture moving-targets.source.json(tickModel=realtime + drift behavior + tap behavior + win rule)。 - drift 单测 +2(共 8):update 后目标漂移 / 漂移下 tap 当前位仍命中计分。单测 11/11 绿(adapter 8 + scaffold 3)。 - e2e(集成段,本机):scaffoldFromSource 落 moving-targets → build → 真九门 A–I + 首局门全过 (tap driver 命中漂移目标、score 0→3、latch 驻留;瞬时验证件已清)。 证成:两迥异 archetype(静态点击 + realtime 漂移)经同一适配器都过真九门 → 退役 adversarial F4 「声明式最小集过不了九门」之虑;E1 声明式路泛化成立。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.1 KiB
JSON
27 lines
1.1 KiB
JSON
{
|
|
"schemaVersion": "1.0",
|
|
"sourceHash": "1111111111111111111111111111111111111111111111111111111111111111",
|
|
"profile": { "tickModel": "realtime", "inputModel": "discrete-choice", "progressModel": "metric" },
|
|
"gameDefinition": {
|
|
"entities": [
|
|
{ "id": "m1", "transform": { "position": { "x": 100, "y": 240 } }, "components": ["r-mov"] },
|
|
{ "id": "m2", "transform": { "position": { "x": 200, "y": 440 } }, "components": ["r-mov"] },
|
|
{ "id": "m3", "transform": { "position": { "x": 150, "y": 640 } }, "components": ["r-mov"] }
|
|
],
|
|
"components": [
|
|
{ "id": "r-mov", "kind": "render", "shape": "rect", "w": 60, "h": 60, "color": "#7cf" }
|
|
],
|
|
"behaviors": [
|
|
{ "id": "b-drift", "trigger": "update", "op": "drift-targets", "amplitude": 24, "speed": 0.8 },
|
|
{ "id": "b-tap", "trigger": "input", "op": "hit-nearest-target" }
|
|
],
|
|
"scenes": [
|
|
{ "id": "s1", "entityRefs": ["m1", "m2", "m3"] }
|
|
],
|
|
"rules": [
|
|
{ "id": "win", "condition": "score >= config.winScore", "outcome": "win" }
|
|
]
|
|
},
|
|
"config": { "winScore": 3, "hitRadius": 60 }
|
|
}
|