mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 16:35:39 +00:00
Add suffixInjector hook
This commit is contained in:
@@ -23,6 +23,7 @@ export class BiomeNoisePreview extends Preview {
|
||||
this.biomeColors = new Property({})
|
||||
this.biomeColors.set(JSON.parse(localStorage.getItem(LOCAL_STORAGE_BIOME_COLORS) ?? '{}'))
|
||||
this.noise = []
|
||||
this.biomeColors.watch(() => this.redraw())
|
||||
}
|
||||
|
||||
getName() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { View } from "../views/View"
|
||||
export abstract class Preview {
|
||||
state: any
|
||||
path?: ModelPath
|
||||
redraw: () => void = () => {}
|
||||
|
||||
dirty(path: ModelPath): boolean {
|
||||
return JSON.stringify(this.state) !== JSON.stringify(path.get())
|
||||
|
||||
Reference in New Issue
Block a user