feat: 灯条段排序。
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
import { createStore } from 'solid-js/store';
|
||||
import { DisplayConfig } from '../models/display-config';
|
||||
import { LedStripConfig, LedStripPixelMapper } from '../models/led-strip-config';
|
||||
|
||||
export const [ledStripStore, setLedStripStore] = createStore({
|
||||
displays: new Array<DisplayConfig>(),
|
||||
strips: new Array<LedStripConfig>(),
|
||||
mappers: new Array<LedStripPixelMapper>(),
|
||||
colors: new Uint8ClampedArray(),
|
||||
sortedColors: new Array<string>(),
|
||||
colors: new Array<string>(),
|
||||
sortedColors: new Uint8ClampedArray(),
|
||||
get totalLedCount() {
|
||||
return Math.max(0, ...ledStripStore.mappers.map((m) => Math.max(m.start, m.end)));
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user