mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 14:39:22 +00:00
fix(led): preserve strip corners and feather the complete light field
Keep real end and corner emitters, robust decimal joins and wall-circle sweep events. Render one positive-winding compound visibility clip so Chromium cannot cancel or cut away overlapping light regions. Add independent pixel oracles for glow falloff and wall-following tubes. Replace the lossy fan-count limit with explicit cached-path bounds while retaining the original timing and warm-cycle heap-growth limits. Issue: #788 User-Visible: yes
This commit is contained in:
@@ -675,7 +675,10 @@ export const LAZY_ONBOARDING_GZIP_CEILING = 28_395;
|
||||
* its English dictionary + shared geometry 9 913 B), plus 10 %, rounded up to
|
||||
* a KiB. Absolute walls: a View without strips loads neither graph.
|
||||
*/
|
||||
export const LAZY_LED_GZIP_CEILING = 10 * 1024;
|
||||
// #788: retaining real end/corner emitters, stable numerical miters and exact
|
||||
// wall/radius events raises the lazy View graph to 10 353 B gzip. Give this
|
||||
// corrected representation 11 KiB; no-LED initial View is still untouched.
|
||||
export const LAZY_LED_GZIP_CEILING = 11 * 1024;
|
||||
export const LAZY_LED_EDITOR_GZIP_CEILING = 11 * 1024;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14296,6 +14296,46 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: " const shift = [0, 0];",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-field-endpoint-dropped',
|
||||
guard: 'node demo/smoke_led_strip_field.mjs',
|
||||
because: '#788: both true ends must fade to zero, including a short residual segment in either direction',
|
||||
patches: [{
|
||||
file: 'src/led-strip-field.ts',
|
||||
find: ' const emitters = emitterSamples(path, input.faces, r / 4);',
|
||||
replace: ' const emitters = emitterSamples(path, input.faces, r / 4).slice(0, -1);',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-field-disc-cancels-fan',
|
||||
guard: 'node demo/smoke_led_strip_field.mjs',
|
||||
because: '#788: positive-winding discs and blocked fans form an OR union, never subtract visible floor',
|
||||
patches: [{
|
||||
file: 'src/led-strip-field.ts',
|
||||
find: '0 1 1 ${right} ${cy} A${r} ${r} 0 1 1 ${left}',
|
||||
replace: '0 1 0 ${right} ${cy} A${r} ${r} 0 1 0 ${left}',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-field-compound-clip-children',
|
||||
guard: 'node demo/smoke_led_strip_field.mjs',
|
||||
because: '#788: Chromium rasterizes several compound clip children with direction-dependent bright holes',
|
||||
patches: [{
|
||||
file: 'src/led-strip-field.ts',
|
||||
find: '<path d="${geometry.pieces.map((piece) => piece.clip).join(\' \')}" clip-rule="nonzero"></path>',
|
||||
replace: '${geometry.pieces.map((piece) => svg`<path d="${piece.clip}" clip-rule="nonzero"></path>`)}',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-field-circle-events-missing',
|
||||
guard: 'node demo/smoke_led_strip_field.mjs',
|
||||
because: '#788: a long wall meeting the emitter radius must not replace visible floor with a coarse sweep chord',
|
||||
patches: [{
|
||||
file: 'src/led-strip-field.ts',
|
||||
find: ' const near = circleSegments(p, radius, scene.occluders);',
|
||||
replace: ' const near = scene.occluders;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-emits-from-body',
|
||||
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
|
||||
|
||||
@@ -608,7 +608,8 @@ export const SMOKE_LINKS = [
|
||||
'src/led-strip-gate.ts', 'src/led-strip-card.ts', 'src/led-strip-geometry.ts',
|
||||
'src/led-strip-runtime.ts', 'src/led-strip-field.ts', 'src/led-strip-editor.ts',
|
||||
],
|
||||
smokes: ['smoke_led_strip_draw.mjs', 'smoke_led_strip_bind.mjs', 'smoke_led_strip_glow.mjs'],
|
||||
smokes: ['smoke_led_strip_draw.mjs', 'smoke_led_strip_bind.mjs', 'smoke_led_strip_glow.mjs',
|
||||
'smoke_led_strip_field.mjs', 'smoke_led_strip_tube.mjs'],
|
||||
because: '#780: drawing, placement against walls, binding, the icon ↔ strip switch, the LED '
|
||||
+ 'history, the View target, the field states and the static card are observed only as '
|
||||
+ 'rendered strips and saved configs; no smoke names the lazy modules’ functions',
|
||||
|
||||
Reference in New Issue
Block a user