cajonzero 0.1.2 → 0.1.3
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/README.md +42 -3
- package/dist/bin/cj0.js +14243 -47
- package/dist/{config-BOzAyP7m.d.ts → config-B32NDXlr.d.ts} +1 -1
- package/dist/core.d.ts +15 -7
- package/dist/core.js +319 -157
- package/dist/index.d.ts +5 -5
- package/dist/index.js +184 -22
- package/dist/{providers-BX7e4pNW.d.ts → providers-BwJKzGkd.d.ts} +17 -0
- package/dist/scaffold.d.ts +67 -3
- package/dist/scaffold.js +293 -32
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +325 -163
- package/dist/ui/assets/index-CNHWg0_t.js +4404 -0
- package/dist/ui/assets/{main-BeABKxzY.js → main-DTcEV4JE.js} +16 -16
- package/dist/ui/index.html +1 -1
- package/package.json +4 -4
- package/dist/ui/assets/index-CaAHje8X.js +0 -4404
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Z as C,_ as w,a as T,at as E,b as D,c as O,d as k,et as A,f as ee,g as j,h as M,i as N,it as P,j as F,k as te,l as I,m as ne,n as re,nt as ie,o as ae,ot as oe,p as se,q as L,r as ce,rt as R,s as z,t as B,u as le,v as V,w as H,x as ue,y as de,z as fe}from"./index-
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Z as C,_ as w,a as T,at as E,b as D,c as O,d as k,et as A,f as ee,g as j,h as M,i as N,it as P,j as F,k as te,l as I,m as ne,n as re,nt as ie,o as ae,ot as oe,p as se,q as L,r as ce,rt as R,s as z,t as B,u as le,v as V,w as H,x as ue,y as de,z as fe}from"./index-CNHWg0_t.js";var pe=oe(E(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.createREGL=r()})(n,(function(){var e=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},t=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;++r)e[n[r]]=t[n[r]];return e},n=`
|
|
2
2
|
`;function r(e){return typeof atob<`u`?atob(e):`base64:`+e}function i(e){var t=Error(`(regl) `+e);throw console.error(t),t}function a(e,t){e||i(t)}function o(e){return e?`: `+e:``}function s(e,t,n){e in t||i(`unknown parameter (`+e+`)`+o(n)+`. possible values: `+Object.keys(t).join())}function c(t,n){e(t)||i(`invalid parameter type`+o(n)+`. must be a typed array`)}function l(e,t){switch(t){case`number`:return typeof e==`number`;case`object`:return typeof e==`object`;case`string`:return typeof e==`string`;case`boolean`:return typeof e==`boolean`;case`function`:return typeof e==`function`;case`undefined`:return e===void 0;case`symbol`:return typeof e==`symbol`}}function u(e,t,n){l(e,t)||i(`invalid parameter type`+o(n)+`. expected `+t+`, got `+typeof e)}function d(e,t){e>=0&&(e|0)===e||i(`invalid parameter type, (`+e+`)`+o(t)+`. must be a nonnegative integer`)}function f(e,t,n){t.indexOf(e)<0&&i(`invalid value`+o(n)+`. must be one of: `+t)}var p=[`gl`,`canvas`,`container`,`attributes`,`pixelRatio`,`extensions`,`optionalExtensions`,`profile`,`onDone`];function m(e){Object.keys(e).forEach(function(e){p.indexOf(e)<0&&i(`invalid regl constructor argument "`+e+`". must be one of `+p)})}function h(e,t){for(e+=``;e.length<t;)e=` `+e;return e}function g(){this.name=`unknown`,this.lines=[],this.index={},this.hasErrors=!1}function _(e,t){this.number=e,this.line=t,this.errors=[]}function v(e,t,n){this.file=e,this.line=t,this.message=n}function y(){var e=Error(),t=(e.stack||e).toString(),n=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(t);if(n)return n[1];var r=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(t);return r?r[1]:`unknown`}function b(){var e=Error(),t=(e.stack||e).toString(),n=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(t);if(n)return n[1];var r=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(t);return r?r[1]:`unknown`}function x(e,t){var n=e.split(`
|
|
3
3
|
`),i=1,a=0,o={unknown:new g,0:new g};o.unknown.name=o[0].name=t||y(),o.unknown.lines.push(new _(0,``));for(var s=0;s<n.length;++s){var c=n[s],l=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(c);if(l)switch(l[1]){case`line`:var u=/(\d+)(\s+\d+)?/.exec(l[2]);u&&(i=u[1]|0,u[2]&&(a=u[2]|0,a in o||(o[a]=new g)));break;case`define`:var d=/SHADER_NAME(_B64)?\s+(.*)$/.exec(l[2]);d&&(o[a].name=d[1]?r(d[2]):d[2])}o[a].lines.push(new _(i++,c))}return Object.keys(o).forEach(function(e){var t=o[e];t.lines.forEach(function(e){t.index[e.number]=e})}),o}function S(e){var t=[];return e.split(`
|
|
4
4
|
`).forEach(function(e){if(!(e.length<5)){var n=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(e);n?t.push(new v(n[1]|0,n[2]|0,n[3].trim())):e.length>0&&t.push(new v(`unknown`,0,e))}}),t}function C(e,t){t.forEach(function(t){var n=e[t.file];if(n){var r=n.index[t.line];if(r){r.errors.push(t),n.hasErrors=!0;return}}e.unknown.hasErrors=!0,e.unknown.lines[0].errors.push(t)})}function w(e,t,r,i,o){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var s=e.getShaderInfoLog(t),c=i===e.FRAGMENT_SHADER?`fragment`:`vertex`;ee(r,`string`,c+` shader source must be a string`,o);var l=x(r,o);C(l,S(s)),Object.keys(l).forEach(function(e){var t=l[e];if(!t.hasErrors)return;var r=[``],i=[``];function a(e,t){r.push(e),i.push(t||``)}a(`file number `+e+`: `+t.name+`
|
|
@@ -2778,7 +2778,7 @@ struct LightProperties {
|
|
|
2778
2778
|
|
|
2779
2779
|
struct PostData {
|
|
2780
2780
|
#ifdef GLSLIFY_HACK
|
|
2781
|
-
float
|
|
2781
|
+
float foo_0;
|
|
2782
2782
|
#endif
|
|
2783
2783
|
mediump float gamma, exposure;
|
|
2784
2784
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
|
@@ -2786,7 +2786,7 @@ struct PostData {
|
|
|
2786
2786
|
|
|
2787
2787
|
struct PostFrag {
|
|
2788
2788
|
#ifdef GLSLIFY_HACK
|
|
2789
|
-
float
|
|
2789
|
+
float foo_3;
|
|
2790
2790
|
#endif
|
|
2791
2791
|
highp vec3 eye, position;
|
|
2792
2792
|
mediump vec4 color;
|
|
@@ -3477,7 +3477,7 @@ uniform lowp vec3 pbrMod;
|
|
|
3477
3477
|
|
|
3478
3478
|
struct SurfaceProperties {
|
|
3479
3479
|
#ifdef GLSLIFY_HACK
|
|
3480
|
-
float
|
|
3480
|
+
float foo_1;
|
|
3481
3481
|
#endif
|
|
3482
3482
|
highp vec3 position;
|
|
3483
3483
|
mediump vec3 normal, faceU, faceV;
|
|
@@ -3494,7 +3494,7 @@ struct SurfaceProperties {
|
|
|
3494
3494
|
|
|
3495
3495
|
struct LightProperties {
|
|
3496
3496
|
#ifdef GLSLIFY_HACK
|
|
3497
|
-
float
|
|
3497
|
+
float foo_2;
|
|
3498
3498
|
#endif
|
|
3499
3499
|
mediump vec3 direction, color, skyLeft, skyRight, skyTop, skyBottom, skyFront, skyBack;
|
|
3500
3500
|
mediump float globalLight;
|
|
@@ -3502,7 +3502,7 @@ struct LightProperties {
|
|
|
3502
3502
|
|
|
3503
3503
|
struct PostData {
|
|
3504
3504
|
#ifdef GLSLIFY_HACK
|
|
3505
|
-
float
|
|
3505
|
+
float foo_0;
|
|
3506
3506
|
#endif
|
|
3507
3507
|
mediump float gamma, exposure;
|
|
3508
3508
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
|
@@ -3510,7 +3510,7 @@ struct PostData {
|
|
|
3510
3510
|
|
|
3511
3511
|
struct PostFrag {
|
|
3512
3512
|
#ifdef GLSLIFY_HACK
|
|
3513
|
-
float
|
|
3513
|
+
float foo_3;
|
|
3514
3514
|
#endif
|
|
3515
3515
|
highp vec3 eye, position;
|
|
3516
3516
|
mediump vec4 color;
|
|
@@ -4447,7 +4447,7 @@ uniform vec3 center;
|
|
|
4447
4447
|
|
|
4448
4448
|
struct LightProperties {
|
|
4449
4449
|
#ifdef GLSLIFY_HACK
|
|
4450
|
-
float
|
|
4450
|
+
float foo_2;
|
|
4451
4451
|
#endif
|
|
4452
4452
|
mediump vec3 direction, color, skyLeft, skyRight, skyTop, skyBottom, skyFront, skyBack;
|
|
4453
4453
|
mediump float globalLight;
|
|
@@ -4455,7 +4455,7 @@ struct LightProperties {
|
|
|
4455
4455
|
|
|
4456
4456
|
struct PostData {
|
|
4457
4457
|
#ifdef GLSLIFY_HACK
|
|
4458
|
-
float
|
|
4458
|
+
float foo_1;
|
|
4459
4459
|
#endif
|
|
4460
4460
|
mediump float gamma, exposure;
|
|
4461
4461
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
|
@@ -4463,7 +4463,7 @@ struct PostData {
|
|
|
4463
4463
|
|
|
4464
4464
|
struct PostFrag {
|
|
4465
4465
|
#ifdef GLSLIFY_HACK
|
|
4466
|
-
float
|
|
4466
|
+
float foo_0;
|
|
4467
4467
|
#endif
|
|
4468
4468
|
highp vec3 eye, position;
|
|
4469
4469
|
mediump vec4 color;
|
|
@@ -4594,7 +4594,7 @@ uniform sampler2D tRGBA;
|
|
|
4594
4594
|
|
|
4595
4595
|
struct LightProperties {
|
|
4596
4596
|
#ifdef GLSLIFY_HACK
|
|
4597
|
-
float
|
|
4597
|
+
float foo_1;
|
|
4598
4598
|
#endif
|
|
4599
4599
|
mediump vec3 direction, color, skyLeft, skyRight, skyTop, skyBottom, skyFront, skyBack;
|
|
4600
4600
|
mediump float globalLight;
|
|
@@ -4602,7 +4602,7 @@ struct LightProperties {
|
|
|
4602
4602
|
|
|
4603
4603
|
struct PostData {
|
|
4604
4604
|
#ifdef GLSLIFY_HACK
|
|
4605
|
-
float
|
|
4605
|
+
float foo_2;
|
|
4606
4606
|
#endif
|
|
4607
4607
|
mediump float gamma, exposure;
|
|
4608
4608
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
|
@@ -5132,7 +5132,7 @@ varying highp vec3 position;
|
|
|
5132
5132
|
|
|
5133
5133
|
struct LightProperties {
|
|
5134
5134
|
#ifdef GLSLIFY_HACK
|
|
5135
|
-
float
|
|
5135
|
+
float foo_1;
|
|
5136
5136
|
#endif
|
|
5137
5137
|
mediump vec3 direction, color, skyLeft, skyRight, skyTop, skyBottom, skyFront, skyBack;
|
|
5138
5138
|
mediump float globalLight;
|
|
@@ -5140,7 +5140,7 @@ struct LightProperties {
|
|
|
5140
5140
|
|
|
5141
5141
|
struct PostData {
|
|
5142
5142
|
#ifdef GLSLIFY_HACK
|
|
5143
|
-
float
|
|
5143
|
+
float foo_2;
|
|
5144
5144
|
#endif
|
|
5145
5145
|
mediump float gamma, exposure;
|
|
5146
5146
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
|
@@ -6831,7 +6831,7 @@ void main(void) {
|
|
|
6831
6831
|
|
|
6832
6832
|
struct LightProperties {
|
|
6833
6833
|
#ifdef GLSLIFY_HACK
|
|
6834
|
-
float
|
|
6834
|
+
float foo_1;
|
|
6835
6835
|
#endif
|
|
6836
6836
|
mediump vec3 direction, color, skyLeft, skyRight, skyTop, skyBottom, skyFront, skyBack;
|
|
6837
6837
|
mediump float globalLight;
|
|
@@ -6839,7 +6839,7 @@ struct LightProperties {
|
|
|
6839
6839
|
|
|
6840
6840
|
struct PostData {
|
|
6841
6841
|
#ifdef GLSLIFY_HACK
|
|
6842
|
-
float
|
|
6842
|
+
float foo_2;
|
|
6843
6843
|
#endif
|
|
6844
6844
|
mediump float gamma, exposure;
|
|
6845
6845
|
mediump vec4 fogParams, fogParams2, fogParams3;
|
package/dist/ui/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="color-scheme" content="light" />
|
|
7
7
|
<title>cajonzero</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CNHWg0_t.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Bhv7LV8L.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cajonzero",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Slim, serverless (Cloudflare) play-only reimplementation of box3-local-engine, shipped as a library + CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "tobylaifun",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"registry": "https://registry.npmjs.org/"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
|
-
"build": "tsup && npm run build:ui",
|
|
63
|
+
"build": "npm run setup:ui && tsup && npm run build:ui",
|
|
64
64
|
"build:ui": "npm --prefix ui run build",
|
|
65
65
|
"setup:ui": "node scripts/ensure-ui-deps.mjs",
|
|
66
|
-
"prepack": "npm run
|
|
66
|
+
"prepack": "npm run build",
|
|
67
67
|
"prepublishOnly": "npm run lint:guards",
|
|
68
68
|
"dev": "tsx src/bin/cj0.ts",
|
|
69
69
|
"demo": "tsx src/bin/cj0.ts serve --config demo/wrangler.jsonc --port 8787",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"typecheck": "tsc --noEmit",
|
|
74
74
|
"lint:guards": "node scripts/lint-guards.mjs",
|
|
75
75
|
"lint:bundle": "node scripts/lint-bundle.mjs",
|
|
76
|
-
"ci:gates": "npm run
|
|
76
|
+
"ci:gates": "npm run lint:guards && npm run typecheck && npm test && npm run build && npm run lint:bundle"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@hono/zod-validator": "^0.9.1",
|