regl-web-components 0.0.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/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 22.13.0
package/.rr.todo.md ADDED
@@ -0,0 +1,15 @@
1
+ - regl-intersecting-web-component
2
+ - a regl component that initializes on intersection observer, and destroys after. maybe we could use deferred regl for this, setting the regl instance when its approaching the viewport
3
+ - curious if this is more performant than mult-regl?
4
+ - regl-multi-web-component
5
+ - make mult-regl based on web components
6
+ - avoid using getBoundingClientRect, can we just use the subcontext intersection observer response to do the offsets to determine the viewport
7
+
8
+
9
+ - renamed variables to be more consistent
10
+
11
+ todo
12
+
13
+ × shadow dom for the canvas element? probs not necessary
14
+ × start work on multi-regl
15
+ × debug why my regl-multi-element doesnt render anything
@@ -0,0 +1,7 @@
1
+ import { build } from 'esbuild'
2
+ import config from './esbuild.config.mjs'
3
+
4
+ await build({
5
+ ...config,
6
+ outdir: 'dist',
7
+ })
@@ -0,0 +1,22 @@
1
+ import aliasPlugin from 'esbuild-plugin-path-alias'
2
+
3
+ export default {
4
+ entryPoints: [
5
+ 'src/all.ts',
6
+ 'src/all-define.ts',
7
+ 'src/regl-element.ts',
8
+ 'src/regl-element-define.ts',
9
+ 'src/regl-multi-element.ts',
10
+ 'src/regl-multi-element-define.ts',
11
+ 'src/regl-multi-root.ts',
12
+ 'src/regl-multi-root-define.ts',
13
+ ],
14
+ outdir: 'example',
15
+ bundle: true,
16
+ format: 'esm',
17
+ plugins: [
18
+ aliasPlugin({
19
+ '@': process.cwd(),
20
+ }),
21
+ ],
22
+ }
@@ -0,0 +1,14 @@
1
+ import * as esbuild from 'esbuild'
2
+ import config from './esbuild.config.mjs'
3
+ import {join} from 'node:path'
4
+
5
+ let ctx = await esbuild.context({
6
+ ...config,
7
+ })
8
+
9
+ await ctx.watch()
10
+
11
+ let { host, port } = await ctx.serve({
12
+ servedir: join(process.cwd(), 'example'),
13
+ })
14
+ console.log(`Watching: ${host}:${port}`)