Skip to content

hyperframes snapshot ignores root data-width/data-height, defaults to 1920×1080 viewport #587

@sidorovanthon

Description

@sidorovanthon

Describe the bug

npx hyperframes snapshot captures at a hardcoded 1920×1080 viewport, regardless of the composition's root data-width / data-height. For portrait compositions (1080×1920), the body renders in the upper-left of the capture area, and the lower 840px (everything below y=1080 in the composition) is clipped.

There is no --width / --height flag to override.

Link to reproduction

https://github.com/sidorovanthon/hyperframes-repro-snapshot-portrait

Steps to reproduce

  1. Clone the repo above.
  2. npm install
  3. npx hyperframes snapshot --at 1
  4. Open the resulting PNG.

Expected behavior

Either auto-detect viewport from root data-width / data-height, OR accept --width / --height flags. Currently neither happens.

Actual behavior

PNG is 1920×1080. The composition's full 1080×1920 body is not visible — only the upper 1080px is captured. Anything authored at bottom: <px> is clipped.

Suggested fix

snapshot should honor the same viewport-sizing logic that validate and inspect already do (both correctly use the root composition's declared dimensions). At minimum, expose --width / --height flags as an explicit override.

Environment

  • hyperframes 0.4.41
  • Windows 11, Node 20.x

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions