render
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| BrowserNotInstalledError framesheet.render Raised when Playwright's Chromium is missing. |
||
| Session framesheet.render One browser page showing one input, with a virtual clock starting at ``t\=0``. |
||
| Snapshot framesheet.render Everything captured at one sample time. |
🛈 DocStrings¶
Playwright/Chromium session with frame-accurate time control.
Time is virtual. Three mechanisms are driven to the same target time t:
- JavaScript clocks (
Date,performance.now,setTimeout,requestAnimationFrame) run on Playwright's fake clock, installed before navigation and paused. Moving totcallspage.clock.run_for(delta), which fires every due timer and rAF callback in order, so canvas/rAF animations advance deterministically. - SMIL: every outermost
<svg>getspauseAnimations()+setCurrentTime(t). - CSS animations/transitions and Web Animations:
document.getAnimations()are paused andcurrentTimeis set tot(relative to when the animation first appeared).
BrowserNotInstalledError
¶
Session
¶
One browser page showing one input, with a virtual clock starting at t=0.
Source code in src/framesheet/render.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
capture
¶
goto
¶
screenshot
¶
Pixels only, at virtual time t.
seek
¶
Move all clocks to virtual time t (seconds). Time only moves forward.
Source code in src/framesheet/render.py
snapshot
¶
snapshot(t: float, *, overflow: bool = False) -> Snapshot
Pixels plus element geometry at virtual time t.
Source code in src/framesheet/render.py
Snapshot
dataclass
¶
Everything captured at one sample time.
Source code in src/framesheet/render.py
install_browser
¶
Install Playwright's Chromium for the running Python environment.