standalone imports
This commit is contained in:
parent
b0b74d077c
commit
92ea7090fa
|
|
@ -26,10 +26,10 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<distance-field> </distance-field>
|
<distance-field></distance-field>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { DistanceField } from '../src/distance-field.ts';
|
import '../src/standalone/distance-field.ts';
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
|
|
||||||
const d = document.querySelector('distance-field');
|
const d = document.querySelector('distance-field');
|
||||||
|
|
||||||
|
|
@ -48,8 +48,6 @@
|
||||||
}
|
}
|
||||||
console.log(performance.now() - now);
|
console.log(performance.now() - now);
|
||||||
|
|
||||||
DistanceField.define();
|
|
||||||
|
|
||||||
// function tick() {
|
// function tick() {
|
||||||
// window.requestAnimationFrame(tick);
|
// window.requestAnimationFrame(tick);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
|
|
||||||
const geometries = [];
|
const geometries = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<folk-shape x="100" y="300" width="50" height="50"></folk-shape>
|
<folk-shape x="100" y="300" width="50" height="50"></folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
|
|
||||||
const geos = document.querySelectorAll('folk-shape');
|
const geos = document.querySelectorAll('folk-shape');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@
|
||||||
></folk-event-propagator>
|
></folk-event-propagator>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkLLM } from '../src/folk-llm.ts';
|
import '../src/standalone/folk-llm.ts';
|
||||||
import { FolkMetronome } from '../src/folk-metronome.ts';
|
import '../src/standalone/folk-metronome.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
|
|
||||||
function copyStyles(from, to) {
|
function copyStyles(from, to) {
|
||||||
const styles = getComputedStyle(from);
|
const styles = getComputedStyle(from);
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@
|
||||||
<folk-rope source="#frame1 >>> #box1" target="#frame2 >>> #box1"></folk-rope>
|
<folk-rope source="#frame1 >>> #box1" target="#frame2 >>> #box1"></folk-rope>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkRope } from '../src/folk-rope.ts';
|
import '../src/standalone/folk-rope.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<folk-xanadu source="#frame1 >>> p:nth-child(6)" target="#frame2 >>> p:nth-child(4)"></folk-xanadu>
|
<folk-xanadu source="#frame1 >>> p:nth-child(6)" target="#frame2 >>> p:nth-child(4)"></folk-xanadu>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkXanadu } from '../src/folk-xanadu.ts';
|
import '../src/standalone/folk-xanadu.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
</distance-field>
|
</distance-field>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { DistanceField } from '../src/distance-field.ts';
|
import '../src/standalone/distance-field.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,8 @@
|
||||||
source="folk-llm"
|
source="folk-llm"
|
||||||
target="folk-timer"
|
target="folk-timer"
|
||||||
triggers="started"
|
triggers="started"
|
||||||
expression="$target.reset(); $target.start()"
|
expression="reset(): true
|
||||||
|
start(): true"
|
||||||
>
|
>
|
||||||
</folk-event-propagator>
|
</folk-event-propagator>
|
||||||
|
|
||||||
|
|
@ -106,14 +107,14 @@
|
||||||
source="folk-llm"
|
source="folk-llm"
|
||||||
target="folk-timer"
|
target="folk-timer"
|
||||||
triggers="finished"
|
triggers="finished"
|
||||||
expression="$target.stop();"
|
expression="stop(): true"
|
||||||
></folk-event-propagator>
|
></folk-event-propagator>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkLLM } from '../src/folk-llm.ts';
|
import '../src/standalone/folk-llm.ts';
|
||||||
import { FolkTimer } from '../src/folk-timer.ts';
|
import '../src/standalone/folk-timer.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ rotation: from.x"
|
||||||
></folk-event-propagator>
|
></folk-event-propagator>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18.0/cdn/components/qr-code/qr-code.js';
|
import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18.0/cdn/components/qr-code/qr-code.js';
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
|
|
||||||
const ropeMode = document.querySelector('input[type="checkbox"]');
|
const ropeMode = document.querySelector('input[type="checkbox"]');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@
|
||||||
<button on:click="DRAW">Draw</button>
|
<button on:click="DRAW">Draw</button>
|
||||||
</nav>
|
</nav>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkInk } from '../src/folk-ink.ts';
|
import '../src/standalone/folk-ink.ts';
|
||||||
|
|
||||||
const drawButton = document.querySelector('button');
|
const drawButton = document.querySelector('button');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@
|
||||||
</folk-shape>
|
</folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkSpreadsheet } from '../src/folk-spreadsheet.ts';
|
import '../src/standalone/folk-spreadsheet.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,9 @@
|
||||||
<folk-toolbar></folk-toolbar>
|
<folk-toolbar></folk-toolbar>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { DistanceField } from '../src/distance-field.ts';
|
import '../src/standalone/distance-field.ts';
|
||||||
import { FolkToolbar } from '../src/folk-toolbar.ts';
|
import '../src/standalone/folk-toolbar.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -83,12 +83,14 @@
|
||||||
></folk-event-propagator>
|
></folk-event-propagator>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
import { FolkMap } from '../src/folk-map.ts';
|
import '../src/standalone/folk-map.ts';
|
||||||
import { FolkWeather } from '../src/folk-weather.ts';
|
import '../src/standalone/folk-weather.ts';
|
||||||
import { FolkCluster, FolkProximity } from '../src/folk-proximity.ts';
|
import './src/geo-wiki.ts';
|
||||||
import { GeoWiki } from './src/geo-wiki.ts';
|
import { FolkCluster } from '../src/folk-proximity.ts';
|
||||||
|
|
||||||
|
FolkCluster.register();
|
||||||
|
|
||||||
FolkCluster.registerElement({
|
FolkCluster.registerElement({
|
||||||
constructor: FolkMap,
|
constructor: FolkMap,
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,13 @@
|
||||||
</folk-proximity>
|
</folk-proximity>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkMap } from '../src/folk-map.ts';
|
import '../src/standalone/folk-map.ts';
|
||||||
import { FolkWeather } from '../src/folk-weather.ts';
|
import '../src/standalone/folk-weather.ts';
|
||||||
import { FolkCluster, FolkProximity } from '../src/folk-proximity.ts';
|
import './src/geo-wiki.ts';
|
||||||
import { GeoWiki } from './src/geo-wiki.ts';
|
import { FolkCluster } from '../src/folk-proximity.ts';
|
||||||
|
|
||||||
|
FolkCluster.define();
|
||||||
|
|
||||||
FolkCluster.registerElement({
|
FolkCluster.registerElement({
|
||||||
constructor: FolkMap,
|
constructor: FolkMap,
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@
|
||||||
</folk-shape>
|
</folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { RecordPlayer } from './src/record-player.ts';
|
import './src/record-player.ts';
|
||||||
import { collisionDetection } from '../src/common/collision.ts';
|
import { collisionDetection } from '../src/common/collision.ts';
|
||||||
|
|
||||||
let proximityDistance = 150;
|
let proximityDistance = 150;
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@
|
||||||
<folk-connection source="#box1" target="#box3"></folk-connection>
|
<folk-connection source="#box1" target="#box3"></folk-connection>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkConnection } from '../src/folk-connection.ts';
|
import '../src/standalone/folk-connection.ts';
|
||||||
|
|
||||||
document.body.querySelectorAll('folk-shape').forEach((el, i) => (el.style.viewTransitionName = `g${i}`));
|
document.body.querySelectorAll('folk-shape').forEach((el, i) => (el.style.viewTransitionName = `g${i}`));
|
||||||
document.body.querySelectorAll('folk-connection').forEach((el, i) => (el.style.viewTransitionName = `c${i}`));
|
document.body.querySelectorAll('folk-connection').forEach((el, i) => (el.style.viewTransitionName = `c${i}`));
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<folk-shape x="200" y="200" width="50" height="50"></folk-shape>
|
<folk-shape x="200" y="200" width="50" height="50"></folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { collisionDetection } from '../src/common/collision.ts';
|
import { collisionDetection } from '../src/common/collision.ts';
|
||||||
|
|
||||||
const geometryElements = document.querySelectorAll('folk-shape');
|
const geometryElements = document.querySelectorAll('folk-shape');
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<folk-shape x="100" y="300" width="50" height="50" rotation="45"></folk-shape>
|
<folk-shape x="100" y="300" width="50" height="50" rotation="45"></folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -43,15 +43,10 @@
|
||||||
</folk-space>
|
</folk-space>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkSpace } from '../src/folk-space.ts';
|
import '../src/standalone/folk-space.ts';
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
|
|
||||||
const space = document.getElementById('space');
|
document.addEventListener('click', () => window.space.transition());
|
||||||
document.addEventListener('keydown', (event) => {
|
|
||||||
if (event.key === 'Enter') {
|
|
||||||
space.transition();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -166,9 +166,9 @@
|
||||||
</folk-shape>
|
</folk-shape>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkConnection } from '../src/folk-connection.ts';
|
import '../src/standalone/folk-connection.ts';
|
||||||
import { FolkSpreadsheet } from '../src/folk-spreadsheet.ts';
|
import '../src/standalone/folk-spreadsheet.ts';
|
||||||
|
|
||||||
let isProjected = false;
|
let isProjected = false;
|
||||||
const button = document.querySelector('button');
|
const button = document.querySelector('button');
|
||||||
|
|
|
||||||
|
|
@ -162,10 +162,10 @@
|
||||||
></folk-event-propagator>
|
></folk-event-propagator>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkMap } from '../src/folk-map.ts';
|
import '../src/standalone/folk-map.ts';
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkEventPropagator } from '../src/folk-event-propagator.ts';
|
import '../src/standalone/folk-event-propagator.ts';
|
||||||
import { FolkSpreadsheet } from '../src/folk-spreadsheet.ts';
|
import '../src/standalone/folk-spreadsheet.ts';
|
||||||
|
|
||||||
window.round = (number, digits = 0) => {
|
window.round = (number, digits = 0) => {
|
||||||
const base = Number('1'.padEnd(digits + 1, '0'));
|
const base = Number('1'.padEnd(digits + 1, '0'));
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
<folk-connection source="#box1" target="#box2"></folk-connection>
|
<folk-connection source="#box1" target="#box2"></folk-connection>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkConnection } from '../src/folk-connection.ts';
|
import '../src/standalone/folk-connection.ts';
|
||||||
import '../src/common/iframe-script.ts';
|
import '../src/common/iframe-script.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@
|
||||||
<folk-rope source="#box1" target="#box4"></folk-rope>
|
<folk-rope source="#box1" target="#box4"></folk-rope>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkRope } from '../src/folk-rope.ts';
|
import '../src/standalone/folk-rope.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
<folk-hull sources="folk-shape"></folk-hull>
|
<folk-hull sources="folk-shape"></folk-hull>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
import { FolkHull } from '../src/folk-hull.ts';
|
import '../src/standalone/folk-hull.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -201,8 +201,8 @@
|
||||||
<folk-xanadu source="folk-shape[name='1'] [link='2']" target="folk-shape[name='2'] [link='2']"></folk-xanadu>
|
<folk-xanadu source="folk-shape[name='1'] [link='2']" target="folk-shape[name='2'] [link='2']"></folk-xanadu>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkXanadu } from '../src/folk-xanadu.ts';
|
import '../src/standalone/folk-xanadu.ts';
|
||||||
import { FolkShape } from '../src/folk-shape.ts';
|
import '../src/standalone/folk-shape.ts';
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ export class AbstractArrow extends HTMLElement {
|
||||||
static tagName = 'abstract-arrow';
|
static tagName = 'abstract-arrow';
|
||||||
|
|
||||||
static define() {
|
static define() {
|
||||||
|
if (customElements.get(this.tagName)) return;
|
||||||
|
FolkShape.define();
|
||||||
customElements.define(this.tagName, this);
|
customElements.define(this.tagName, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { frag, vert } from './common/tags.ts';
|
import { frag, vert } from './common/tags.ts';
|
||||||
import { WebGLUtils } from './common/webgl.ts';
|
import { WebGLUtils } from './common/webgl.ts';
|
||||||
import type { FolkShape } from './folk-shape.ts';
|
import { FolkShape } from './folk-shape.ts';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DistanceField class calculates a distance field using the Jump Flooding Algorithm (JFA) in WebGL.
|
* The DistanceField class calculates a distance field using the Jump Flooding Algorithm (JFA) in WebGL.
|
||||||
|
|
@ -31,6 +31,7 @@ export class DistanceField extends HTMLElement {
|
||||||
|
|
||||||
static define() {
|
static define() {
|
||||||
if (customElements.get(this.tagName)) return;
|
if (customElements.get(this.tagName)) return;
|
||||||
|
FolkShape.define();
|
||||||
customElements.define(this.tagName, this);
|
customElements.define(this.tagName, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -569,5 +570,3 @@ void main() {
|
||||||
vec2 seedCoord = gl_FragCoord.xy / u_canvasSize;
|
vec2 seedCoord = gl_FragCoord.xy / u_canvasSize;
|
||||||
outColor = vec4(seedCoord, v_shapeID, 0.0); // Seed coords (x, y), shape ID (z), initial distance (a)
|
outColor = vec4(seedCoord, v_shapeID, 0.0); // Seed coords (x, y), shape ID (z), initial distance (a)
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
DistanceField.define();
|
|
||||||
|
|
|
||||||
|
|
@ -85,5 +85,3 @@ export class FolkConnection extends AbstractArrow {
|
||||||
this.style.backgroundColor = 'black';
|
this.style.backgroundColor = 'black';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkConnection.define();
|
|
||||||
|
|
|
||||||
|
|
@ -244,5 +244,3 @@ function parseAst(functionBody: string) {
|
||||||
console.log('Properties accessed on to:', Array.from(toProps));
|
console.log('Properties accessed on to:', Array.from(toProps));
|
||||||
console.log('Properties accessed on from:', Array.from(fromProps));
|
console.log('Properties accessed on from:', Array.from(fromProps));
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkEventPropagator.define();
|
|
||||||
|
|
|
||||||
|
|
@ -110,5 +110,3 @@ export function makeHull(rects: DOMRectReadOnly[]): Point[] {
|
||||||
|
|
||||||
return upperHull.concat(lowerHull);
|
return upperHull.concat(lowerHull);
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkHull.define();
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ export class FolkInk extends HTMLElement {
|
||||||
static tagName = 'folk-ink';
|
static tagName = 'folk-ink';
|
||||||
|
|
||||||
static define() {
|
static define() {
|
||||||
|
if (customElements.get(this.tagName)) return;
|
||||||
customElements.define(this.tagName, this);
|
customElements.define(this.tagName, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,5 +212,3 @@ export class FolkInk extends HTMLElement {
|
||||||
return d.join(' ');
|
return d.join(' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkInk.define();
|
|
||||||
|
|
|
||||||
|
|
@ -103,5 +103,3 @@ declare global {
|
||||||
ai: any;
|
ai: any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkLLM.define();
|
|
||||||
|
|
|
||||||
|
|
@ -95,5 +95,3 @@ export class FolkMap extends HTMLElement {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkMap.define();
|
|
||||||
|
|
|
||||||
|
|
@ -70,5 +70,3 @@ export class FolkMetronome extends HTMLElement {
|
||||||
this.textContent = this.#beat.toString();
|
this.textContent = this.#beat.toString();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkMetronome.define();
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ export class FolkProximity extends HTMLElement {
|
||||||
|
|
||||||
static define() {
|
static define() {
|
||||||
if (customElements.get(this.tagName)) return;
|
if (customElements.get(this.tagName)) return;
|
||||||
|
FolkShape.define();
|
||||||
|
FolkCluster.define();
|
||||||
customElements.define(this.tagName, this);
|
customElements.define(this.tagName, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -193,6 +195,3 @@ export class FolkProximity extends HTMLElement {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkCluster.define();
|
|
||||||
FolkProximity.define();
|
|
||||||
|
|
|
||||||
|
|
@ -257,5 +257,3 @@ function applyConstraint(p1: RopePoint, p2: RopePoint) {
|
||||||
p2.pos = Vector.sub(p2.pos, adjustment);
|
p2.pos = Vector.sub(p2.pos, adjustment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkRope.define();
|
|
||||||
|
|
|
||||||
|
|
@ -79,5 +79,3 @@ export class FolkSet extends HTMLElement {
|
||||||
|
|
||||||
update() {}
|
update() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkSet.define();
|
|
||||||
|
|
|
||||||
|
|
@ -786,5 +786,3 @@ export class FolkShape extends HTMLElement {
|
||||||
this.height = Math.abs(unrotatedAnchor.y - unrotatedHandle.y);
|
this.height = Math.abs(unrotatedAnchor.y - unrotatedHandle.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkShape.define();
|
|
||||||
|
|
|
||||||
|
|
@ -71,5 +71,3 @@ export class FolkSpace extends HTMLElement {
|
||||||
space?.classList.toggle('rotate');
|
space?.classList.toggle('rotate');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkSpace.define();
|
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ export class FolkSpreadsheet extends HTMLElement {
|
||||||
|
|
||||||
static define() {
|
static define() {
|
||||||
if (customElements.get(this.tagName)) return;
|
if (customElements.get(this.tagName)) return;
|
||||||
|
// order of registering is important
|
||||||
FolkSpreadSheetCell.define();
|
FolkSpreadSheetCell.define();
|
||||||
FolkSpreadsheetHeader.define();
|
FolkSpreadsheetHeader.define();
|
||||||
customElements.define(this.tagName, this);
|
customElements.define(this.tagName, this);
|
||||||
|
|
@ -516,5 +517,3 @@ export class FolkSpreadSheetCell extends HTMLElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkSpreadsheet.define();
|
|
||||||
|
|
|
||||||
|
|
@ -40,5 +40,3 @@ export class FolkTimer extends HTMLElement {
|
||||||
this.textContent = (time / 1000).toFixed(1);
|
this.textContent = (time / 1000).toFixed(1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkTimer.define();
|
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,3 @@ export class FolkToolbar extends HTMLElement {
|
||||||
return element.id;
|
return element.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkEventPropagator.define();
|
|
||||||
FolkToolbar.define();
|
|
||||||
|
|
|
||||||
|
|
@ -69,5 +69,3 @@ export class FolkWeather extends HTMLElement {
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkWeather.define();
|
|
||||||
|
|
|
||||||
|
|
@ -100,5 +100,3 @@ function computeInlineVertices(rects: DOMRect[]): Point[] {
|
||||||
|
|
||||||
return vertices;
|
return vertices;
|
||||||
}
|
}
|
||||||
|
|
||||||
FolkXanadu.define();
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { DistanceField } from '../distance-field';
|
||||||
|
|
||||||
|
DistanceField.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkConnection } from '../folk-connection';
|
||||||
|
|
||||||
|
FolkConnection.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkEventPropagator } from '../folk-event-propagator';
|
||||||
|
|
||||||
|
FolkEventPropagator.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkHull } from '../folk-hull';
|
||||||
|
|
||||||
|
FolkHull.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkInk } from '../folk-ink';
|
||||||
|
|
||||||
|
FolkInk.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkLLM } from '../folk-llm';
|
||||||
|
|
||||||
|
FolkLLM.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkMap } from '../folk-map';
|
||||||
|
|
||||||
|
FolkMap.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkMetronome } from '../folk-metronome';
|
||||||
|
|
||||||
|
FolkMetronome.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkProximity } from '../folk-proximity';
|
||||||
|
|
||||||
|
FolkProximity.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkRope } from '../folk-rope';
|
||||||
|
|
||||||
|
FolkRope.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkShape } from '../folk-shape';
|
||||||
|
|
||||||
|
FolkShape.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkSpace } from '../folk-space';
|
||||||
|
|
||||||
|
FolkSpace.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkSpreadsheet } from '../folk-spreadsheet';
|
||||||
|
|
||||||
|
FolkSpreadsheet.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkTimer } from '../folk-timer';
|
||||||
|
|
||||||
|
FolkTimer.define();
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
import './folk-event-propagator';
|
||||||
|
import { FolkToolbar } from '../folk-toolbar';
|
||||||
|
|
||||||
|
FolkToolbar.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkWeather } from '../folk-weather';
|
||||||
|
|
||||||
|
FolkWeather.define();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { FolkXanadu } from '../folk-xanadu';
|
||||||
|
|
||||||
|
FolkXanadu.define();
|
||||||
Loading…
Reference in New Issue