fragment-tools 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/. npmignore +4 -0
- package/examples/package.json +0 -1
- package/examples/shape-2d.js +5 -0
- package/package.json +1 -1
- package/src/cli/server.js +7 -1
- package/src/client/app/modules/Monitor.svelte +12 -0
package/. npmignore
ADDED
package/examples/package.json
CHANGED
package/examples/shape-2d.js
CHANGED
|
@@ -23,6 +23,7 @@ export let props = {
|
|
|
23
23
|
export let fps = 0;
|
|
24
24
|
|
|
25
25
|
export let update = ({ context, width, height }) => {
|
|
26
|
+
console.log("shape2d update");
|
|
26
27
|
// draw background
|
|
27
28
|
context.fillStyle = props.background.value;
|
|
28
29
|
context.fillRect(0, 0, width, height);
|
|
@@ -43,3 +44,7 @@ export let update = ({ context, width, height }) => {
|
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
export let rendering = "2d";
|
|
47
|
+
|
|
48
|
+
export let buildConfig = {
|
|
49
|
+
gui: true,
|
|
50
|
+
}
|
package/package.json
CHANGED
package/src/cli/server.js
CHANGED
|
@@ -86,11 +86,17 @@ export async function start({ options, filepaths, entries, fragment }) {
|
|
|
86
86
|
'__PRODUCTION__': options.build,
|
|
87
87
|
},
|
|
88
88
|
optimizeDeps: {
|
|
89
|
+
include: ['convert-length', 'webm-writer', 'changedpi'],
|
|
89
90
|
exclude: [
|
|
90
91
|
"@fragment/sketches",
|
|
91
92
|
...entriesPaths,
|
|
92
93
|
]
|
|
93
|
-
}
|
|
94
|
+
},
|
|
95
|
+
build: {
|
|
96
|
+
commonjsOptions: {
|
|
97
|
+
include: ['convert-length', 'webm-writer', 'changedpi'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
94
100
|
});
|
|
95
101
|
|
|
96
102
|
if (options.build) {
|
|
@@ -21,6 +21,18 @@ let selected = sketchKey ?
|
|
|
21
21
|
sketchKey :
|
|
22
22
|
($preview ? $preview : $sketchesKeys[Math.min(id, $sketchesKeys.length - 1)]);
|
|
23
23
|
|
|
24
|
+
sketchesKeys.subscribe((keys) => {
|
|
25
|
+
if (!selected && keys.length > 0) {
|
|
26
|
+
$monitors = $monitors.map(monitor => {
|
|
27
|
+
if (monitor.id === id) {
|
|
28
|
+
monitor.selected = $sketchesKeys[Math.min(id, $sketchesKeys.length - 1)];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return monitor;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
24
36
|
onMount(() => {
|
|
25
37
|
$monitors = [
|
|
26
38
|
...$monitors,
|