Default 0.8 s codes, wipe over 70% of the interval (560 ms)
This commit is contained in:
+2
-2
@@ -22,9 +22,9 @@
|
||||
<div>
|
||||
<label for="interval">Rotation du code</label>
|
||||
<select id="interval">
|
||||
<option value="500" selected>0,5 s</option>
|
||||
<option value="500">0,5 s</option>
|
||||
<option value="700">0,7 s</option>
|
||||
<option value="800">0,8 s</option>
|
||||
<option value="800" selected>0,8 s</option>
|
||||
<option value="1000">1 s</option>
|
||||
<option value="1500">1,5 s</option>
|
||||
<option value="2000">2 s</option>
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ function ringLoop(t) {
|
||||
if (c.width !== size) { c.width = c.height = size; }
|
||||
const ctx = c.getContext("2d");
|
||||
ctx.clearRect(0, 0, size, size);
|
||||
const fadeMs = Math.min(500, qr.interval_ms * 0.6);
|
||||
const fadeMs = Math.min(700, qr.interval_ms * 0.7);
|
||||
const k = prevBits ? Math.min(1, (t - switchedAt) / fadeMs) : 1;
|
||||
drawRing(ctx, size / 2, size / 2, (size / 2) / DISC * 0.98, (t / 1000) * (2 * Math.PI / 45), qr.bits, t / 1000,
|
||||
prevBits ? { from: prevBits, k, seed: qr.slot } : null);
|
||||
|
||||
@@ -165,7 +165,7 @@ window.runSeq = async (cfg) => {
|
||||
for (const name of cfg.pipes) res[name] = { got: [], false: 0, frames: 0, ms: 0, first5: null };
|
||||
for (const key of Object.keys(scanners)) delete scanners[key];
|
||||
let px = 0, py = 0;
|
||||
const fadeMs = Math.min(400, s.interval * (s.fadeK || 0.45)), t00 = s.t0 || 0;
|
||||
const fadeMs = Math.min(700, s.interval * (s.fadeK || 0.7)), t00 = s.t0 || 0;
|
||||
for (let i = 0; i < s.fps * s.secs; i++) {
|
||||
const ms = t00 + (i * 1000) / s.fps + rnd() * 20, slot = Math.floor(ms / s.interval), idx = slot - Math.floor(t00 / s.interval);
|
||||
const cur = s.tokens[idx], prev = idx > 0 ? s.tokens[idx - 1] : null, since = ms - slot * s.interval;
|
||||
|
||||
@@ -14,7 +14,7 @@ for (const ms of [1000, 500]) {
|
||||
let slot = 0, bits = "", prevBits = "", switchedAt = 0, idx = 0;
|
||||
// changed dashes wipe over a short time, a few frames are then unreadable, which is fine
|
||||
// ?fade=0.5 tries a longer wipe, as a share of the interval
|
||||
const FADE = params.get("fade") ? MS * +params.get("fade") : Math.min(500, MS * 0.6);
|
||||
const FADE = params.get("fade") ? MS * +params.get("fade") : Math.min(700, MS * 0.7);
|
||||
const EASE = params.get("ease") || "sine";
|
||||
function tick() {
|
||||
prevBits = bits || null;
|
||||
|
||||
Reference in New Issue
Block a user