mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
How: gpuview's direct render has an RGBA mode (GpuView.rgba): its three-deep readback ring copies the composite itself (RGBA8 premultiplied) instead of making NV12, so a PNG costs no extra pass. runtime/encode writes each frame straight-coloured (straight(), the engine path's un-premultiply, now shared). RenderOpts.alpha (apps/media's --alpha, refused for video) sets the page's canvas row to #00000000; the camera's clear colour was read as RGB with alpha forced to 255, so a clear canvas came out black. runtime/view's camera_bg reads #rrggbbaa, premultiplied, for gpuview and cpuview (one function where each had its own copy). The help and cli.md say OUT.png and --alpha for PAGE.html. Check: bench/html-png/check.sh (a half-opaque red box sliding over an empty canvas): -o DIR --at 0,29 writes two PNGs, and the box moved between them; -o DIR into a folder that's there works; -o OUT.png --at 29 is byte-identical to the folder's frame 29, and -o OUT.png is frame 0; opaque, the canvas is white and the box pink (255,127,127); with --alpha the canvas is 0,0,0,0 and the box straight red at half alpha (255,0,0,128); --alpha to an MP4 is refused. It fails on the raea before this and passes on this one. bench/html-repeat, bench/frame-panic and bench/dropped-css still pass. Video is unchanged: bench/html-repeat to .txt gives identical hashes for all 270 frames before and after. fps to MP4, seven alternating rounds on a shared, busy machine (the "before" build is about an hour older, with other lanes' changes): median 181 before vs 170 after, ranges 165-202 and 159-198, no difference beyond the noise (closes #32)
17 lines
779 B
HTML
17 lines
779 B
HTML
<!doctype html>
|
|
<!-- #32: an HTML page to PNGs. Nothing on the canvas but a red box at half opacity sliding right over 30 frames.
|
|
bench/html-png/check.sh -->
|
|
<html><head><meta charset="utf-8">
|
|
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
|
|
<style>html,body{margin:0;width:320px;height:180px}#box{position:absolute;left:40px;top:40px;width:100px;height:100px;background:#ff0000;opacity:.5}</style>
|
|
</head><body>
|
|
<div id="root" data-composition-id="main" data-start="0" data-width="320" data-height="180" data-duration="1">
|
|
<div id="box"></div>
|
|
</div>
|
|
<script>
|
|
window.__timelines=window.__timelines||{};
|
|
var tl=gsap.timeline({paused:true});
|
|
tl.to('#box',{x:120,duration:1,ease:'none'},0);
|
|
window.__timelines.main=tl;
|
|
</script></body></html>
|