refactor
This commit is contained in:
parent
9606014617
commit
7764a7c118
|
|
@ -11,7 +11,7 @@ import { PropertyValues } from '@lit/reactive-element';
|
|||
* Previous CPU-based implementation: github.com/folk-canvas/folk-canvas/commit/fdd7fb9d84d93ad665875cad25783c232fd17bcc
|
||||
*/
|
||||
export class FolkDistanceField extends FolkBaseSet {
|
||||
static tagName = 'folk-distance-field';
|
||||
static override tagName = 'folk-distance-field';
|
||||
|
||||
private textures: WebGLTexture[] = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ declare global {
|
|||
}
|
||||
|
||||
export class FolkHull extends FolkBaseSet {
|
||||
static tagName = 'folk-hull';
|
||||
static override tagName = 'folk-hull';
|
||||
|
||||
static styles = [
|
||||
FolkBaseSet.styles,
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
import { FolkElement } from './common/folk-element';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'folk-metronome': FolkMetronome;
|
||||
}
|
||||
}
|
||||
|
||||
export class FolkMetronome extends HTMLElement {
|
||||
static tagName = 'folk-metronome';
|
||||
|
||||
static define() {
|
||||
if (customElements.get(this.tagName)) return;
|
||||
customElements.define(this.tagName, this);
|
||||
}
|
||||
export class FolkMetronome extends FolkElement {
|
||||
static override tagName = 'folk-metronome';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ declare global {
|
|||
}
|
||||
|
||||
export class FolkCluster extends FolkHull {
|
||||
static tagName = 'folk-cluster';
|
||||
static override tagName = 'folk-cluster';
|
||||
|
||||
static #config = new Map<ElementConstructor, ElementConfig>();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ declare global {
|
|||
}
|
||||
|
||||
export class FolkSpace extends FolkElement {
|
||||
static tagName = 'folk-space';
|
||||
static override tagName = 'folk-space';
|
||||
|
||||
static styles = css`
|
||||
:host {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ declare global {
|
|||
}
|
||||
|
||||
export class FolkTimer extends FolkElement {
|
||||
static tagName = 'folk-timer';
|
||||
static override tagName = 'folk-timer';
|
||||
|
||||
#timeMs = 0;
|
||||
#timeoutId = -1;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { verticesToPolygon } from './common/utils.js';
|
|||
import type { Point } from './common/types.js';
|
||||
import { PropertyValues } from '@lit/reactive-element';
|
||||
export class FolkXanadu extends FolkBaseConnection {
|
||||
static tagName = 'folk-xanadu';
|
||||
static override tagName = 'folk-xanadu';
|
||||
|
||||
override update(changedProperties: PropertyValues<this>) {
|
||||
super.update(changedProperties);
|
||||
|
|
|
|||
Loading…
Reference in New Issue