Files
IntoHole/playtest/captures/capture_editor_tools.gd
T
Yanchen d1141b04c7 feat: 更新 IntoHole 的球体、滑槽和环境资产
- 为铁球、陶瓷球和木球制作风格化材质,归档 CC0 原始参考
- 更新方形球洞和实心滑槽,统一 90° 弯槽并兼容旧存档
- 用顺流泡沫表示水流方向,为冰块制作三种交错的裂纹
- 同步 Blender 源资产、Godot 加载、工坊和试玩预览
2026-11-19 16:18:41 +08:00

24 lines
1.1 KiB
GDScript

extends SceneTree
func _initialize() -> void:call_deferred("run")
func capture(name: String) -> void:
for i in range(12):await process_frame
await RenderingServer.frame_post_draw
root.get_texture().get_image().save_png(ProjectSettings.globalize_path("res://playtest/artifacts/styled/"+name+".png"))
func run() -> void:
var app=load("res://designer/scenes/workshop.tscn").instantiate();root.add_child(app)
var records: Array=[]
for item in [["wall",Vector3(-2,0,0)],["wall",Vector3(-2,1,0)],["straight",Vector3(-1,1,0)],
["goal_hole",Vector3(1,0,0)],["water",Vector3(0,0,2)],["ice",Vector3(1,0,2)]]:
records.append(app.placement.record_at(item[0],item[1],0,"piece_%d"%records.size()))
app.apply_data(app.codec.encode(records,[{"id":"wood","ballTypeId":"wood_ball","position":[-2,2.3,0]}],"Editor tools"))
app.target=Vector3(0,1,1);app.camera_size=8;app.update_camera()
app.eraser_tool_button.pressed.emit()
await capture("editor_eraser")
app.reset_level_button.pressed.emit()
# Show the reset action at the same menu position as the old redo button.
app.sidebar_scroll.scroll_vertical=320
await capture("editor_reset")
quit()