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
@@ -0,0 +1,61 @@
"""Author the launcher's permanent outlet with the straight chute's mouth profile."""
from math import cos, pi, sin
def build_outlet(radius, mesh_object, outline, mats):
# The last cross-section uses the same 32 facets as the adjoining chute.
groove = [(radius * sin(i*pi/32), radius * (1-cos(i*pi/32))) for i in range(-16, 17)]
profile = [(-.5, radius), *groove, (.5, radius)]
start = -.375
def rise(x, depth):
u = min(1, max(0, (x-start)/(.5-start)))
return depth * u*u*(3-2*u)
vertices, faces = [], []
for i in range(25):
x = -.5+i/24
ring = [(x, y, 1+rise(x, depth)) for y, depth in profile]
vertices.extend([*ring, (x,.5,0), (x,-.5,0)])
width = len(profile)+2
for row in range(24):
for col in range(width):
a = row*width+col
b = row*width+(col+1)%width
faces.append((a,b,b+width,a+width))
# Blender triangulates the concave end caps on export.
faces.extend([tuple(reversed(range(width))), tuple(range(24*width,25*width))])
body = mesh_object('directional_boost',vertices,faces)
for key in ['wall','wall_top']:
body.data.materials.append(mats[key])
for face in body.data.polygons:
face.material_index = int(face.normal.z>0.001)
group = [body,outline(body)]
# Sample the graphic along the same cross-section so it lies on the wood.
for suffix,scale,lift,color in [('border',1,.003,'ink'),('fill',.82,.005,'red')]:
verts, polys = [], []
# Separate bands at the arrow shoulders to keep their sharp corners.
for low,high,shaft in [(-.28,-.12,False),(-.12,.12,True),(.12,.28,False)]:
cuts = [(low*scale,None),*((y,d) for y,d in groove if low*scale < y < high*scale),(high*scale,None)]
for y, depth in cuts:
if depth is None:
for (ya,da),(yb,db) in zip(groove,groove[1:]):
if ya<=y<=yb:
depth=da+(db-da)*(y-ya)/(yb-ya)
break
left = (-.34 if shaft else .04)*scale
right = .36*scale-.32*abs(y)/.28
for j in range(9):
x=left+(right-left)*j/8
verts.append((x,y,1+rise(x,depth)+lift))
band_start=len(verts)-9*len(cuts)
for i in range(len(cuts)-1):
for j in range(8):
a=band_start+9*i+j
polys.append((a,a+1,a+10,a+9))
arrow=mesh_object('ink_boost_arrow_'+suffix,verts,polys)
arrow.data.materials.append(mats[color])
group.append(arrow)
return group