mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Format the scope opacity changes
Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
8379a0ffd3
commit
1dcc025832
5 files changed
+24
-7
No files matched your search
+10
-3
@@ -289,7 +289,10 @@ export class ShareLinkManager {
|
||||
// mirrors live state for the link this session generates, so it must match
|
||||
// the mask, not the archive.)
|
||||
scopeFeatherPct: clampScopeFeatherPct(parseOr(params.get('scf'), 35)),
|
||||
scopeOpacityPct: Math.max(0, Math.min(100, Math.round(parseOr(params.get('sco'), 100)))),
|
||||
scopeOpacityPct: Math.max(
|
||||
0,
|
||||
Math.min(100, Math.round(parseOr(params.get('sco'), 100))),
|
||||
),
|
||||
// Absent (or non-numeric) `sce` = adaptive (null), the default behavior;
|
||||
// a value pins the terminus opacity percent, clamped into the SUPPORTED
|
||||
// 94..100 band. `sce=0` used to survive as a sub-94 terminus — a hole in
|
||||
@@ -631,7 +634,10 @@ export class ShareLinkManager {
|
||||
this._scopeFeatherPct = clampScopeFeatherPct(extras.scopeFeatherPct);
|
||||
}
|
||||
if (typeof extras.scopeOpacityPct === 'number') {
|
||||
this._scopeOpacityPct = Math.max(0, Math.min(100, Math.round(extras.scopeOpacityPct)));
|
||||
this._scopeOpacityPct = Math.max(
|
||||
0,
|
||||
Math.min(100, Math.round(extras.scopeOpacityPct)),
|
||||
);
|
||||
}
|
||||
if (extras.scopeTerminusPct === null) this._scopeTerminusPct = null;
|
||||
else if (typeof extras.scopeTerminusPct === 'number') {
|
||||
@@ -748,7 +754,8 @@ export class ShareLinkManager {
|
||||
params.set('cr', this._celestialRingEnabled ? '1' : '0');
|
||||
params.set('sc', this._scopeEnabled ? '1' : '0');
|
||||
params.set('scf', Math.round(this._scopeFeatherPct).toString());
|
||||
if (this._scopeOpacityPct !== 100) params.set('sco', String(this._scopeOpacityPct));
|
||||
if (this._scopeOpacityPct !== 100)
|
||||
params.set('sco', String(this._scopeOpacityPct));
|
||||
// Only written when pinned — an absent `sce` IS the adaptive default, so a
|
||||
// shared link never freezes the ramp for the recipient by accident. The
|
||||
// same 94..100 clamp applies on the way OUT, so a link can never carry an
|
||||
|
||||
Reference in new issue
Block a user