完善客户端功能并同步差距文档

This commit is contained in:
shenlei
2026-09-03 18:40:01 +09:00
parent f93a172296
commit 13ccb8d02d
135 changed files with 21881 additions and 1259 deletions
+21
View File
@@ -42,12 +42,15 @@ func parse_text(src: String) -> Dictionary:
"bsphere_pos": _vec3(top.get("BoundingSpherePosition", [0, 0, 0])),
"particles": [],
"meshes": [],
"lights": [],
"dir": "",
}
for g in top.get("__group_Particle", []):
out.particles.append(_norm_particle(g))
for g in top.get("__group_Mesh", []):
out.meshes.append(_norm_mesh(g))
for g in top.get("__group_Light", []):
out.lights.append(_norm_light(g))
return out
# --- 归一化 -----------------------------------------------------------
@@ -70,10 +73,28 @@ func _norm_mesh(g: Dictionary) -> Dictionary:
"start_time": float(_scalar(g.get("StartTime", 0.0))),
"position": g.get("TimeEventPosition", []),
"mesh_file": String(_scalar(g.get("MeshFileName", ""))),
"loop": int(_scalar(g.get("MeshAnimationLoopEnable", 0))),
"loop_count": int(_scalar(g.get("MeshAnimationLoopCount", 0))),
"frame_delay": float(_scalar(g.get("MeshAnimationFrameDelay", 0.0))),
"elements": elems,
}
func _norm_light(g: Dictionary) -> Dictionary:
return {
"start_time": float(_scalar(g.get("StartTime", 0.0))),
"position": g.get("TimeEventPosition", []),
"duration": float(_scalar(g.get("Duration", 1.0))),
"loop": int(_scalar(g.get("LoopFlag", 0))),
"loop_count": int(_scalar(g.get("LoopCount", 0))),
"max_range": float(_scalar(g.get("MaxRange", 300.0))),
"ambient": g.get("AmbientColor", [0.5, 0.5, 0.5, 1.0]),
"diffuse": g.get("DiffuseColor", [0.0, 0.0, 0.0, 1.0]),
"attenuation0": float(_scalar(g.get("Attenuation0", 0.0))),
"attenuation1": float(_scalar(g.get("Attenuation1", 0.1))),
"attenuation2": float(_scalar(g.get("Attenuation2", 0.0))),
"range": g.get("TimeEventRange", []),
}
func _first(a) -> Dictionary:
return a[0] if a is Array and a.size() > 0 else {}