@thi.ng/webgl-shadertoy 0.4.113 → 0.4.115

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-01-30T15:21:31Z
3
+ - **Last updated**: 2024-02-06T23:18:11Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [0.4.115](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl-shadertoy@0.4.115) (2024-02-06)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - use shader type consts ([813d277](https://github.com/thi-ng/umbrella/commit/813d277))
17
+
12
18
  ### [0.4.95](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl-shadertoy@0.4.95) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -61,7 +61,7 @@ For Node.js REPL:
61
61
  const webglShadertoy = await import("@thi.ng/webgl-shadertoy");
62
62
  ```
63
63
 
64
- Package sizes (brotli'd, pre-treeshake): ESM: 666 bytes
64
+ Package sizes (brotli'd, pre-treeshake): ESM: 693 bytes
65
65
 
66
66
  ## Dependencies
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/webgl-shadertoy",
3
- "version": "0.4.113",
3
+ "version": "0.4.115",
4
4
  "description": "Basic WebGL scaffolding for running interactive fragment shaders via @thi.ng/shader-ast",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,10 +35,10 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.21",
39
- "@thi.ng/shader-ast": "^0.13.5",
40
- "@thi.ng/shader-ast-glsl": "^0.4.95",
41
- "@thi.ng/webgl": "^6.6.24"
38
+ "@thi.ng/api": "^8.9.22",
39
+ "@thi.ng/shader-ast": "^0.13.7",
40
+ "@thi.ng/shader-ast-glsl": "^0.4.97",
41
+ "@thi.ng/webgl": "^6.6.26"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.39.0",
@@ -89,5 +89,5 @@
89
89
  "status": "alpha",
90
90
  "year": 2019
91
91
  },
92
- "gitHead": "ded7c5e87ebc7f6279c24f183c24ff348db8f304\n"
92
+ "gitHead": "ce8202c237a367c4038d41919a8acf75e1122507\n"
93
93
  }
package/shadertoy.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { F, I, V2, V4 } from "@thi.ng/shader-ast/api/types";
1
2
  import { assign } from "@thi.ng/shader-ast/ast/assign";
2
3
  import { defMain, defn } from "@thi.ng/shader-ast/ast/function";
3
4
  import { FLOAT0, FLOAT1, vec4 } from "@thi.ng/shader-ast/ast/lit";
@@ -70,7 +71,7 @@ const shaderToy = (opts) => {
70
71
  assign(
71
72
  outputs.fragColor,
72
73
  defn(
73
- "vec4",
74
+ V4,
74
75
  "mainImage",
75
76
  [],
76
77
  () => main(gl2, unis)
@@ -79,13 +80,13 @@ const shaderToy = (opts) => {
79
80
  ])
80
81
  ],
81
82
  attribs: {
82
- position: "vec2"
83
+ position: V2
83
84
  },
84
85
  uniforms: {
85
- resolution: "vec2",
86
- mouse: ["vec2", [0, 0]],
87
- mouseButtons: ["int", 0],
88
- time: "float",
86
+ resolution: V2,
87
+ mouse: [V2, [0, 0]],
88
+ mouseButtons: [I, 0],
89
+ time: F,
89
90
  ...opts.uniforms
90
91
  }
91
92
  },