muigui 0.0.16 → 0.0.17

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 CHANGED
@@ -179,9 +179,9 @@ into using tweakpane and it doesn't meet my needs as of v4.0.0. Examples below
179
179
  ```js
180
180
  const uniforms = {
181
181
  color1: [1, 0.5, 0.25], // orange
182
- color2: new Float32Array([0, 1, 1]); // cyan
183
- color3: new Uint8Array([0, 128, 0, 128]); // transparent green
184
- }
182
+ color2: new Float32Array([0, 1, 1]), // cyan
183
+ color3: new Uint8Array([0, 128, 0, 128]), // transparent green
184
+ };
185
185
  ```
186
186
 
187
187
  Neither dat.gui, lil.gui, nor tweakpane can edit these AFAICT. (2023)
@@ -311,11 +311,11 @@ have not made it into muigui yet.
311
311
  But that's not really what you get from a typed system.
312
312
  In a typed system, the fact that `someOption` is an enum
313
313
  is known from its type. Similar that `someColor` is a
314
- a color is known from it's type. `someNumber` is still
314
+ a color is known from its type. `someNumber` is still
315
315
  problematic because it needs a range which is probably
316
316
  not part of its type.
317
317
 
318
- In any case, I'd be nice to find a way to get an
318
+ In any case, It'd be nice to find a way to get an
319
319
  instant UI like C#/Unity does.
320
320
 
321
321
  * ## Modularity
@@ -325,7 +325,10 @@ have not made it into muigui yet.
325
325
  editor that is the combination of 3 number editors.
326
326
 
327
327
  I'm still experimenting. While muigui has components that
328
- do this I'm not happy with the API ergonomics yet.
328
+ do this I'm not happy with the API ergonomics yet and is
329
+ why I haven't documented them. In fact I'd pretty much like
330
+ to re-write all of the code for like the 4th time 😅 but
331
+ I hope to keep the normal usage API the same.
329
332
 
330
333
  Similarly I'd like to more easily split layout so it's trivial
331
334
  to layout sub components. Again, still experimenting.
@@ -380,6 +383,36 @@ have not made it into muigui yet.
380
383
  just returned a canvas and left the rest outside
381
384
  the library made it way more flexible.
382
385
 
386
+ Another example might be monitoring. Some libraries
387
+ provide a way to make a GUI part poll its value for
388
+ the purpose of displaying values but does that really
389
+ need to be part of the library?
390
+
391
+ Compare
392
+
393
+ ```js
394
+ pane.addBinding(PARAMS, 'data', {
395
+ readonly: true,
396
+ interval: 200,
397
+ });
398
+ ```
399
+
400
+ vs
401
+
402
+ ```js
403
+ const label = gui.addLabel();
404
+ setInterval(() => {
405
+ label.text(JSON.stringify(PARAMS.data, null, 2));
406
+ }, 200);
407
+ ```
408
+
409
+ They're about the same amount of code but in the first version
410
+ you can only make that area show the data at `PARAMS.data` where
411
+ as in the 2nd version you can show whatever you want. Data
412
+ for the currently select item, player stats, a text based graph.
413
+ You're not limited to only properties of `PARAMS` nor are you
414
+ limited to how it chooses to format those.
415
+
383
416
  This problem of providing too specialized a solution
384
417
  is endemic throughout the library ecosystem of pretty much
385
418
  every language.
@@ -389,6 +422,8 @@ have not made it into muigui yet.
389
422
  wrong solution. It's better to provide the
390
423
  building blocks.
391
424
 
425
+ `</rant>` 😅
426
+
392
427
  ## No Save/Restore
393
428
 
394
429
  The problem with save/restore in lil.gui etc is it assumes the data
@@ -1,4 +1,4 @@
1
- /* muigui@0.0.16, license MIT */
1
+ /* muigui@0.0.17, license MIT */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -1,4 +1,4 @@
1
- /* muigui@0.0.16, license MIT */
1
+ /* muigui@0.0.17, license MIT */
2
2
  var css = {
3
3
  default: `
4
4
  .muigui {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "muigui",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "A Simple GUI",
5
5
  "main": "dist/0.x/muigui.js",
6
- "module": "dist/0.x/muigui-module.js",
6
+ "module": "dist/0.x/muigui.module.js",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "build": "npm run build-normal",