-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: merge internal and external node types
- Loading branch information
Showing
48 changed files
with
219 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import type { Instance } from '../typedefs/Instance'; | ||
import type { HostConfig } from '../typedefs/HostConfig.ts'; | ||
|
||
export const catalogue: { | ||
[name: string]: { | ||
new (...args: any): Instance | ||
new (...args: any): HostConfig['instance'], | ||
} | ||
} = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import { catalogue } from './catalogue.ts'; | ||
import { | ||
Container, | ||
Filter, | ||
} from 'pixi.js'; | ||
|
||
import type { ContainerElement } from '../typedefs/ContainerElement.ts'; | ||
import type { FilterElement } from '../typedefs/FilterElement.ts'; | ||
import type { Instance } from '../typedefs/Instance.ts'; | ||
import type { HostConfig } from '../typedefs/HostConfig.ts'; | ||
|
||
export function hideInstance(instance: Instance) | ||
export function hideInstance( | ||
instance: HostConfig['instance'] | ||
) | ||
{ | ||
const { | ||
Container, | ||
Filter, | ||
} = catalogue; | ||
|
||
if (Container && instance instanceof Container) | ||
if (instance instanceof Container) | ||
{ | ||
(instance as ContainerElement).visible = false; | ||
(instance as HostConfig['containerInstance']).visible = false; | ||
} | ||
else if (Filter && instance instanceof Filter) | ||
else if (instance instanceof Filter) | ||
{ | ||
(instance as FilterElement).enabled = false; | ||
(instance as HostConfig['filterInstance']).enabled = false; | ||
} | ||
} |
Oops, something went wrong.