The pointer drawn into an editor recording lived as paths in code, so
it could not be looked at or edited by hand. The shapes are now SVG
files, and the editor can show the same pointer on screen, so what is
recorded is what was seen.
- src/core/recording/cursors/ holds one file per shape: arrow, hand,
open-hand, fist, move, crosshair, text and resize. Resize is turned
for the vertical and diagonal directions.
- data-hot="x y" on the <svg> is the hotspot in viewBox units. Width
and height in the file are ignored, and anything before <svg>, such
as <?xml ...> from a drawing program, is cut off.
- The open hand had six fingers. It has a thumb and four now, the
middle one longest.
- CURSOR_SIZE = 0.8 scales every pointer the same on screen and in a
recording, so the files keep their units.
- General settings has "Custom mouse pointer", on by default. It hangs
the files into Pixi's cursorStyles as CSS cursors with the keyword as
fallback, so the system still draws the pointer and the canvas does
not. Off gives Pixi's own values back at once.
- A recording draws the pointer from the same files at its own size,
so it stays sharp in 4K. It still reads the shape from the canvas
when that holds a url(...) cursor.
Tests:
- Unit recording and view-tween: 3 new, green. They read viewBox and
data-hot in an edited form, the boxes of turned shapes, the default
size and old settings without the switch. Red without data-hot and
without cutting before <svg>.
- e2e 46i-ii: the canvas cursor is a url(...) ending in default and
the image loads. Off gives inherit and stores false, on brings the
file back. Red without useCursorFiles.
- e2e 67e: the recording is still black at the mouse position.
- The README names 2046 e2e checks.
- Gate on melektaus-atx: 304 files, 4702 tests green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game view could already record itself through nodes. Making a
video of the editor itself, to show how something is done, needed an
outside screen recorder. The main menu now starts and stops one, with
no options to set.
- "Start recording" sits in its own group before General settings, and
reads "Stop recording" while one runs. The name is
"Recording <time>", the size is the whole canvas in device pixels
(an odd row or column is cut), 60 fps always. Sound is the master,
saving goes the same way as for the game view.
- The encoder, the sound and the Matroska writing of a take moved from
GameRecorder.ts to RecordingTake.ts. A take now reads its pictures
from a FrameSource, so the game view and the editor share it.
- The editor's picture is copied from the canvas after each render, in
the same frame, so nothing is drawn twice. A resting editor does not
render, and the recording repeats its last picture.
- The mouse pointer is drawn into the recording in the shape the editor
shows (arrow, hand, resize arrows, I-beam, crosshair, move).
- A red dot with the running time stands beside the menu button on
screen only. It is drawn after the copy, and the toolbar makes room
for it.
- Drawing that dot made Pixi take it as the root for every hit test,
and the menu would not open any more. The stage is set back as the
last rendered object after it.
Tests:
- Gate on melektaus-atx green: 303 files, 4686 tests.
- Unit recording: 20 green, 5 new.
- e2e 67: 8 checks, 67e new. It records through the menu and decodes
the MP4: 1280x800 at 60 fps, the pointer black at the mouse, the dot
missing, 238 plain spots alike with the canvas. Without the pointer
and with the dot drawn before the copy, 67e is red.
- e2e 46: the main menu lists "Start recording".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>