- Oberfläche in CSS-Pixeln layouten (stretch disabled, content_scale_factor = Bildschirm-Skalierung), damit 56-px-Ziele auf Tablets auch 56 CSS-Pixel groß sind - Kompakte Werkzeugleiste unter 1280 px, umbruchfähige Timing-Leiste; 1024 px (iPad-Landscape) und 1400 px (Tab S9+) geprüft - Chrome-Guard gegen synthetische Maus-Events vor/nach Touch-Gesten - Web-Export-Preset und tools/export_web.sh (single-threaded) - Kurven-Cache und Linien-Fastpath: Stresstest mit 480 Segmenten von ca. 48 ms auf ca. 7-10 ms pro Redraw - Neue Suiten für Touch/Layout und Performance, Tablet-Testanleitung in docs/web-test.md
37 lines
1.2 KiB
GDScript
37 lines
1.2 KiB
GDScript
extends SceneTree
|
|
|
|
## Manual visual smoke test: renders the whiteboard at a given window size.
|
|
##
|
|
## Usage:
|
|
## xvfb-run -a godot --path rinkplanner \
|
|
## --script res://tests/manual/capture.gd -- 1024 768 /tmp/capture.png
|
|
##
|
|
## The output path is optional. This is a development tool, not part of
|
|
## `tools/test.sh`; the headless suites cover the behaviour.
|
|
|
|
func _init() -> void:
|
|
_capture.call_deferred()
|
|
|
|
|
|
func _capture() -> void:
|
|
var args := OS.get_cmdline_user_args()
|
|
var width := int(args[0]) if args.size() > 0 else 1024
|
|
var height := int(args[1]) if args.size() > 1 else 768
|
|
var output := args[2] if args.size() > 2 else "user://capture.png"
|
|
|
|
var packed := load("res://scenes/whiteboard/whiteboard.tscn") as PackedScene
|
|
var instance := packed.instantiate()
|
|
var controller := instance as WhiteboardController
|
|
if controller != null:
|
|
controller.restore_autosave = false
|
|
controller.autosave_enabled = false
|
|
root.add_child(instance)
|
|
root.size = Vector2i(width, height)
|
|
await process_frame
|
|
await process_frame
|
|
await RenderingServer.frame_post_draw
|
|
|
|
var path := ProjectSettings.globalize_path(output)
|
|
root.get_texture().get_image().save_png(path)
|
|
print("Saved %s at %dx%d" % [path, width, height])
|
|
quit(0)
|