git.iko.soy/rowtype-yoga/purescript-webgl-raw
on main help sign in
Release webgl-raw 0.0.1 with portable runtime APIs
commit7cd89fcc01153f32c29c9c837fb979dea063e87f authorMark <mark.eibes@gmail.com> dateSun 13 Sep 2026, 00:19 (1 month ago)
6 files changed+1016
unifiedsplit
.gitignore+6 LICENSE+21 spago.lock+799 spago.yaml+16 src/Graphics/WebGL/Raw.js+54 src/Graphics/WebGL/Raw.purs+120
.gitignorenew file+6
@@ -0,0 +1,6 @@
1+/.spago/
2+/output/
3+/output-es/
4+/node_modules/
5+/.jj/
6+/.DS_Store
LICENSEnew file+21
@@ -0,0 +1,21 @@
1+MIT License
2+
3+Copyright (c) 2026 Mark Eibes
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+SOFTWARE.
spago.locknew file+799
@@ -0,0 +1,799 @@
1+{
2+ "workspace": {
3+ "packages": {
4+ "webgl-raw": {
5+ "path": "./",
6+ "core": {
7+ "dependencies": [
8+ {
9+ "canvas": ">=6.0.0 <7.0.0"
10+ },
11+ {
12+ "effect": ">=4.0.0 <5.0.0"
13+ },
14+ {
15+ "nullable": ">=6.0.0 <7.0.0"
16+ },
17+ {
18+ "prelude": ">=6.0.2 <7.0.0"
19+ }
20+ ]
21+ },
22+ "test": {
23+ "dependencies": []
24+ }
25+ }
26+ },
27+ "package_set": {
28+ "address": {
29+ "registry": "77.3.1"
30+ },
31+ "compiler": ">=0.15.15 <0.16.0",
32+ "content": {
33+ "abc-parser": "2.1.0",
34+ "ace": "9.1.0",
35+ "address-rfc2821": "0.1.1",
36+ "aff": "8.0.0",
37+ "aff-bus": "6.0.0",
38+ "aff-coroutines": "9.0.0",
39+ "aff-promise": "4.0.0",
40+ "aff-retry": "2.0.0",
41+ "affjax": "13.0.0",
42+ "affjax-node": "1.0.0",
43+ "affjax-web": "1.0.0",
44+ "ansi": "7.0.0",
45+ "apexcharts": "0.5.0",
46+ "applicative-phases": "1.0.0",
47+ "argonaut": "9.0.0",
48+ "argonaut-aeson-generic": "0.4.1",
49+ "argonaut-codecs": "9.1.0",
50+ "argonaut-core": "7.0.0",
51+ "argonaut-generic": "8.0.0",
52+ "argonaut-traversals": "10.0.0",
53+ "argparse-basic": "2.0.0",
54+ "array-builder": "0.1.2",
55+ "array-search": "0.6.0",
56+ "arraybuffer": "13.2.0",
57+ "arraybuffer-builder": "3.1.0",
58+ "arraybuffer-types": "3.0.2",
59+ "arrays": "7.3.0",
60+ "arrays-extra": "0.6.1",
61+ "arrays-zipper": "2.0.1",
62+ "ask": "1.0.0",
63+ "assert": "6.0.0",
64+ "assert-multiple": "0.4.0",
65+ "avar": "5.0.1",
66+ "axon": "0.0.3",
67+ "b64": "0.0.9",
68+ "barbies": "1.0.1",
69+ "barlow-lens": "0.9.0",
70+ "benchlib": "0.0.4",
71+ "bifunctors": "6.1.0",
72+ "bigints": "7.0.1",
73+ "blessed": "1.0.0",
74+ "bolson": "0.3.9",
75+ "bookhound": "0.1.7",
76+ "bower-json": "3.0.0",
77+ "call-by-name": "4.0.1",
78+ "canvas": "6.0.0",
79+ "canvas-action": "9.0.0",
80+ "cartesian": "1.0.6",
81+ "catenable-lists": "7.0.0",
82+ "cbor-stream": "1.3.0",
83+ "chameleon": "1.0.0",
84+ "chameleon-halogen": "1.0.3",
85+ "chameleon-react-basic": "1.1.0",
86+ "chameleon-styled": "2.5.0",
87+ "chameleon-transformers": "1.0.0",
88+ "channel": "1.0.0",
89+ "chartjs": "0.1.1",
90+ "chartjs-halogen": "0.1.0",
91+ "checked-exceptions": "3.1.1",
92+ "choku": "1.0.2",
93+ "classless": "0.1.1",
94+ "classless-arbitrary": "0.1.1",
95+ "classless-decode-json": "0.1.1",
96+ "classless-encode-json": "0.1.3",
97+ "classnames": "2.0.0",
98+ "codec": "6.1.0",
99+ "codec-argonaut": "10.0.0",
100+ "codec-json": "2.0.0",
101+ "colors": "7.0.1",
102+ "compile-fail": "0.4.0",
103+ "concur-core": "0.5.0",
104+ "concur-react": "0.5.0",
105+ "concurrent-queues": "3.0.0",
106+ "console": "6.1.0",
107+ "const": "6.0.0",
108+ "contravariant": "6.0.0",
109+ "control": "6.0.0",
110+ "convertable-options": "1.0.0",
111+ "coroutines": "7.0.0",
112+ "css": "6.0.0",
113+ "css-class-name-extractor": "0.0.4",
114+ "css-frameworks": "1.1.0",
115+ "csv-stream": "2.3.0",
116+ "currency": "0.1.0",
117+ "data-mvc": "0.0.2",
118+ "datetime": "6.1.0",
119+ "datetime-parsing": "0.2.0",
120+ "debounce": "0.1.0",
121+ "debug": "6.0.2",
122+ "decimals": "7.1.0",
123+ "default-values": "1.0.1",
124+ "deku": "0.9.23",
125+ "deno": "0.0.5",
126+ "dissect": "1.0.0",
127+ "distributive": "6.0.0",
128+ "dodo-printer": "2.2.3",
129+ "dom-filereader": "7.0.0",
130+ "dom-indexed": "13.0.0",
131+ "dom-simple": "0.4.0",
132+ "dotenv": "4.0.3",
133+ "droplet": "0.6.0",
134+ "dts": "1.0.0",
135+ "dual-numbers": "1.0.3",
136+ "dynamic-buffer": "3.0.1",
137+ "echarts-simple": "0.0.1",
138+ "effect": "4.0.0",
139+ "either": "6.1.0",
140+ "elmish": "0.13.0",
141+ "elmish-enzyme": "0.1.1",
142+ "elmish-hooks": "0.11.0",
143+ "elmish-html": "0.10.0",
144+ "elmish-testing-library": "0.3.2",
145+ "elmish-time-machine": "0.4.2",
146+ "email-validate": "7.0.0",
147+ "encoding": "0.0.10",
148+ "enums": "6.0.1",
149+ "env-names": "0.4.0",
150+ "environment": "2.0.0",
151+ "error": "2.0.0",
152+ "eta-conversion": "0.3.2",
153+ "exceptions": "6.1.0",
154+ "exists": "6.0.0",
155+ "exitcodes": "4.0.0",
156+ "expect-inferred": "3.0.0",
157+ "express": "0.9.1",
158+ "ezfetch": "1.1.1",
159+ "fahrtwind": "2.0.0",
160+ "faker-ffi": "0.1.1",
161+ "fakerjs": "0.0.1",
162+ "fallback": "0.1.0",
163+ "fast-vect": "1.2.0",
164+ "fetch": "4.1.0",
165+ "fetch-argonaut": "1.0.1",
166+ "fetch-core": "5.1.0",
167+ "fetch-yoga-json": "1.1.0",
168+ "ffi-simple": "0.5.1",
169+ "fft": "0.3.0",
170+ "fft-js": "0.1.0",
171+ "filterable": "5.0.0",
172+ "fix-functor": "0.1.0",
173+ "fixed-points": "7.0.0",
174+ "fixed-precision": "5.0.0",
175+ "flame": "1.6.0",
176+ "float32": "2.0.0",
177+ "fmt": "0.2.1",
178+ "foldable-traversable": "6.0.0",
179+ "foldable-traversable-extra": "0.0.6",
180+ "foreign": "7.0.0",
181+ "foreign-object": "4.1.0",
182+ "foreign-readwrite": "3.4.0",
183+ "forgetmenot": "0.1.0",
184+ "fork": "6.0.0",
185+ "form-urlencoded": "7.0.0",
186+ "formatters": "7.0.0",
187+ "framer-motion": "3.1.0",
188+ "free": "7.1.0",
189+ "freeap": "7.0.0",
190+ "freer-free": "0.0.1",
191+ "freet": "7.0.0",
192+ "functions": "6.0.0",
193+ "functor1": "3.0.0",
194+ "functors": "5.0.0",
195+ "fuzzy": "0.4.0",
196+ "gen": "4.0.0",
197+ "generate-values": "1.0.1",
198+ "generic-router": "0.0.1",
199+ "geojson": "0.0.5",
200+ "geometria": "2.2.0",
201+ "gesso": "1.0.1",
202+ "gojs": "0.1.1",
203+ "golden-test": "0.1.0",
204+ "golem-fetch": "0.1.0",
205+ "grain": "3.0.0",
206+ "grain-router": "3.0.0",
207+ "grain-virtualized": "3.0.0",
208+ "graphql-client": "10.1.1",
209+ "graphs": "8.1.0",
210+ "group": "4.1.1",
211+ "halogen": "7.0.0",
212+ "halogen-bootstrap5": "5.3.2",
213+ "halogen-canvas": "1.0.0",
214+ "halogen-css": "10.0.0",
215+ "halogen-declarative-canvas": "0.0.8",
216+ "halogen-echarts-simple": "0.0.4",
217+ "halogen-formless": "4.0.3",
218+ "halogen-helix": "1.1.0",
219+ "halogen-hooks": "0.6.3",
220+ "halogen-hooks-extra": "0.9.0",
221+ "halogen-infinite-scroll": "1.1.0",
222+ "halogen-store": "0.5.4",
223+ "halogen-storybook": "2.0.0",
224+ "halogen-subscriptions": "2.0.0",
225+ "halogen-svg-elems": "8.0.0",
226+ "halogen-typewriter": "1.0.4",
227+ "halogen-use-trigger-hooks": "1.0.0",
228+ "halogen-vdom": "8.0.0",
229+ "halogen-vdom-string-renderer": "0.5.0",
230+ "halogen-xterm": "2.0.0",
231+ "heckin": "2.0.1",
232+ "heterogeneous": "0.7.0",
233+ "homogeneous": "0.4.0",
234+ "http-methods": "6.0.0",
235+ "httpurple": "4.0.0",
236+ "huffman": "0.4.0",
237+ "humdrum": "0.0.1",
238+ "hylograph-canvas": "0.1.0",
239+ "hylograph-d3-kernel": "0.1.0",
240+ "hylograph-graph": "0.3.0",
241+ "hylograph-layout": "0.3.0",
242+ "hylograph-music": "0.4.0",
243+ "hylograph-optics": "0.1.0",
244+ "hylograph-selection": "0.5.1",
245+ "hylograph-simulation": "0.5.0",
246+ "hylograph-simulation-core": "0.1.0",
247+ "hylograph-simulation-halogen": "0.5.0",
248+ "hylograph-transitions": "0.1.0",
249+ "hylograph-wasm-kernel": "0.1.0",
250+ "hyrule": "2.3.8",
251+ "i18next": "0.1.0",
252+ "idb": "0.2.0",
253+ "identity": "6.0.0",
254+ "identy": "4.0.1",
255+ "indexed-db": "1.0.0",
256+ "indexed-monad": "3.0.0",
257+ "ink": "0.0.1",
258+ "int64": "3.0.0",
259+ "integers": "6.0.0",
260+ "interpolate": "5.0.2",
261+ "intersection-observer": "1.0.1",
262+ "invariant": "6.0.0",
263+ "jarilo": "1.0.1",
264+ "jelly": "0.10.0",
265+ "jelly-router": "0.3.0",
266+ "jelly-signal": "0.4.0",
267+ "jest": "1.0.0",
268+ "js-abort-controller": "1.0.0",
269+ "js-bigints": "2.2.1",
270+ "js-date": "8.0.0",
271+ "js-fetch": "0.2.1",
272+ "js-fileio": "3.0.0",
273+ "js-intl": "1.3.0",
274+ "js-iterators": "0.1.1",
275+ "js-maps": "0.1.2",
276+ "js-promise": "1.0.0",
277+ "js-promise-aff": "1.0.0",
278+ "js-temporal": "3.0.0",
279+ "js-timers": "6.1.0",
280+ "js-uri": "3.1.0",
281+ "jsdom": "1.0.0",
282+ "jsinc": "0.5.1",
283+ "json": "1.1.0",
284+ "json-codecs": "5.0.0",
285+ "justifill": "0.5.0",
286+ "jwt": "0.0.9",
287+ "labeled-data": "0.2.0",
288+ "language-cst-parser": "0.14.1",
289+ "lazy": "6.0.0",
290+ "lazy-joe": "1.0.0",
291+ "lcg": "4.0.0",
292+ "leibniz": "5.0.0",
293+ "leveldb": "1.0.1",
294+ "liminal": "1.0.1",
295+ "linalg": "6.0.0",
296+ "linear": "0.1.0",
297+ "lists": "7.0.0",
298+ "literals": "1.0.2",
299+ "logging": "3.0.0",
300+ "logging-journald": "0.4.0",
301+ "lumi-components": "18.0.0",
302+ "machines": "7.0.0",
303+ "maps-eager": "0.5.0",
304+ "marionette": "1.0.0",
305+ "marionette-react-basic-hooks": "0.1.1",
306+ "markdown-it-js": "0.1.0",
307+ "marked": "0.1.0",
308+ "matrices": "5.0.1",
309+ "matryoshka": "1.0.0",
310+ "maybe": "6.0.0",
311+ "media-types": "6.0.0",
312+ "meowclient": "1.0.0",
313+ "midi": "4.0.0",
314+ "milkdown": "0.1.0",
315+ "milkis": "9.0.0",
316+ "mimetype": "0.0.1",
317+ "minibench": "4.0.1",
318+ "mmorph": "7.0.0",
319+ "monad-control": "5.0.0",
320+ "monad-logger": "1.3.1",
321+ "monad-loops": "0.5.0",
322+ "monad-unlift": "1.0.1",
323+ "monoid-extras": "0.0.1",
324+ "monoidal": "0.16.0",
325+ "morello": "0.4.0",
326+ "mote": "3.0.0",
327+ "motsunabe": "2.0.0",
328+ "mvc": "0.0.1",
329+ "mysql": "6.0.1",
330+ "n3": "0.1.0",
331+ "nano-id": "1.1.0",
332+ "nanoid": "0.1.0",
333+ "naturals": "3.0.0",
334+ "nested-functor": "0.2.1",
335+ "newtype": "5.0.0",
336+ "next-purs-rsc": "0.1.0",
337+ "nextjs": "0.1.1",
338+ "nextui": "0.2.0",
339+ "node-buffer": "9.0.0",
340+ "node-child-process": "11.1.0",
341+ "node-event-emitter": "3.0.0",
342+ "node-execa": "5.0.0",
343+ "node-fs": "9.2.0",
344+ "node-glob-basic": "2.0.0",
345+ "node-http": "9.1.0",
346+ "node-http2": "1.1.1",
347+ "node-human-signals": "1.0.0",
348+ "node-net": "5.1.0",
349+ "node-os": "5.1.0",
350+ "node-path": "5.0.1",
351+ "node-process": "11.2.0",
352+ "node-readline": "8.1.1",
353+ "node-sqlite3": "8.0.0",
354+ "node-stream-pipes": "2.1.6",
355+ "node-streams": "9.0.1",
356+ "node-tls": "0.3.1",
357+ "node-url": "7.0.1",
358+ "node-workerbees": "0.3.1",
359+ "node-zlib": "0.4.0",
360+ "nonempty": "7.0.0",
361+ "now": "6.0.0",
362+ "npm-package-json": "2.0.0",
363+ "nqueens": "0.1.4",
364+ "nullable": "6.0.0",
365+ "numberfield": "0.2.2",
366+ "numbers": "9.0.1",
367+ "oak": "3.1.1",
368+ "oak-debug": "1.2.2",
369+ "object-maps": "0.3.0",
370+ "ocarina": "1.5.4",
371+ "oooooooooorrrrrrrmm-lib": "0.0.1",
372+ "open-colors-scales-and-schemes": "1.0.0",
373+ "open-drawing": "6.0.4",
374+ "open-folds": "6.4.0",
375+ "open-foreign-generic": "11.0.3",
376+ "open-memoize": "6.2.0",
377+ "open-mkdirp-aff": "1.2.0",
378+ "open-pairing": "6.2.0",
379+ "open-smolder": "12.0.2",
380+ "options": "7.0.0",
381+ "optparse": "5.0.1",
382+ "ordered-collections": "3.2.0",
383+ "ordered-set": "0.5.0",
384+ "orders": "6.0.0",
385+ "org-doc": "0.1.0",
386+ "owoify": "1.2.0",
387+ "pairs": "9.0.1",
388+ "parallel": "7.0.0",
389+ "parsing": "11.0.0",
390+ "parsing-dataview": "3.2.4",
391+ "partial": "4.0.0",
392+ "pathy": "9.0.0",
393+ "pha": "0.13.0",
394+ "phaser": "0.7.0",
395+ "phylio": "1.1.2",
396+ "pipes": "8.0.0",
397+ "pirates-charm": "0.0.1",
398+ "play": "1.0.0",
399+ "pmock": "0.9.0",
400+ "point-free": "1.0.0",
401+ "pointed-list": "0.5.1",
402+ "polymorphic-vectors": "4.0.0",
403+ "posix-types": "6.0.0",
404+ "postgresql": "2.0.21",
405+ "precise": "6.0.0",
406+ "precise-datetime": "7.0.0",
407+ "prelude": "6.0.2",
408+ "prettier-printer": "3.0.0",
409+ "printf": "0.1.0",
410+ "priority-queue": "0.1.2",
411+ "profunctor": "6.0.1",
412+ "profunctor-lenses": "8.0.0",
413+ "prospero": "0.1.0",
414+ "protobuf": "4.4.0",
415+ "ps-spa": "0.7.1",
416+ "psa-utils": "8.0.0",
417+ "psci-support": "6.0.0",
418+ "punycode": "1.0.0",
419+ "pursfmt": "0.17.0",
420+ "qualified-do": "2.2.0",
421+ "quantities": "12.2.0",
422+ "quickcheck": "8.0.1",
423+ "quickcheck-combinators": "0.1.3",
424+ "quickcheck-laws": "7.0.0",
425+ "quickcheck-utf8": "0.0.0",
426+ "random": "6.0.0",
427+ "rationals": "6.0.0",
428+ "rdf": "0.1.0",
429+ "react": "11.0.0",
430+ "react-aria": "0.2.0",
431+ "react-basic": "17.0.0",
432+ "react-basic-classic": "3.0.0",
433+ "react-basic-dnd": "10.1.0",
434+ "react-basic-dom": "7.0.0",
435+ "react-basic-dom-beta": "0.1.1",
436+ "react-basic-emotion": "7.1.0",
437+ "react-basic-hooks": "9.1.1",
438+ "react-basic-storybook": "2.0.0",
439+ "react-dnd-kit": "0.6.0",
440+ "react-dom": "8.0.0",
441+ "react-halo": "3.0.0",
442+ "react-icons": "1.1.5",
443+ "react-markdown": "0.1.0",
444+ "react-testing-library": "4.0.1",
445+ "react-virtuoso": "1.0.0",
446+ "reactix": "0.6.1",
447+ "read": "1.0.1",
448+ "recharts": "1.1.0",
449+ "record": "4.0.0",
450+ "record-extra": "5.0.1",
451+ "record-extra-srghma": "0.2.8",
452+ "record-ptional-fields": "0.1.2",
453+ "record-studio": "1.0.4",
454+ "ref-lifted": "0.0.2",
455+ "refs": "6.0.0",
456+ "remotedata": "5.0.1",
457+ "repr": "0.5.0",
458+ "resize-arrays": "0.0.1",
459+ "resize-observer": "1.0.0",
460+ "resource": "2.0.1",
461+ "resourcet": "1.0.0",
462+ "result": "1.0.3",
463+ "return": "0.2.0",
464+ "ring-modules": "5.0.1",
465+ "rito": "0.3.4",
466+ "roman": "0.4.0",
467+ "rough-notation": "1.0.2",
468+ "routing": "11.0.0",
469+ "routing-duplex": "0.7.0",
470+ "run": "5.0.0",
471+ "safe-coerce": "2.0.0",
472+ "safely": "4.0.1",
473+ "school-of-music": "1.3.0",
474+ "selection-foldable": "0.2.0",
475+ "selective-functors": "1.0.1",
476+ "semirings": "7.0.0",
477+ "shuffle": "2.0.0",
478+ "sigil": "0.3.0",
479+ "sigil-hats": "0.3.0",
480+ "signal": "13.0.0",
481+ "simple-emitter": "3.0.1",
482+ "simple-i18n": "2.0.1",
483+ "simple-json": "9.0.0",
484+ "simple-json-generics": "0.2.1",
485+ "simple-ulid": "3.0.0",
486+ "sized-matrices": "1.0.0",
487+ "sized-vectors": "5.0.2",
488+ "slug": "3.2.0",
489+ "small-ffi": "4.0.1",
490+ "soundfonts": "4.1.0",
491+ "sparse-matrices": "2.0.1",
492+ "sparse-polynomials": "3.0.1",
493+ "spec": "8.1.2",
494+ "spec-discovery": "8.4.1",
495+ "spec-mocha": "5.1.1",
496+ "spec-node": "0.0.3",
497+ "spec-quickcheck": "5.0.2",
498+ "spec-reporter-xunit": "0.7.1",
499+ "splitmix": "2.1.0",
500+ "ssrs": "1.0.0",
501+ "st": "6.2.0",
502+ "statistics": "0.3.2",
503+ "strictlypositiveint": "1.0.1",
504+ "string-parsers": "8.0.0",
505+ "strings": "6.0.1",
506+ "strings-extra": "4.0.0",
507+ "stringutils": "0.0.13",
508+ "structured-logging": "1.0.0",
509+ "substitute": "0.2.3",
510+ "supabase": "0.1.0",
511+ "supply": "0.2.0",
512+ "svg-parser": "3.0.0",
513+ "systemd-journald": "0.3.0",
514+ "tagged": "4.0.2",
515+ "tailrec": "6.1.0",
516+ "tanstack-query": "3.0.0",
517+ "tecton": "0.2.1",
518+ "tecton-halogen": "0.2.0",
519+ "temporal": "0.1.0",
520+ "test-unit": "17.0.0",
521+ "text-formatting": "0.1.0",
522+ "thermite": "6.3.1",
523+ "thermite-dom": "0.3.1",
524+ "these": "6.0.0",
525+ "threading": "0.0.3",
526+ "tidy": "0.11.1",
527+ "tidy-codegen": "4.0.1",
528+ "tldr": "0.0.0",
529+ "toestand": "0.9.0",
530+ "transformation-matrix": "1.0.1",
531+ "transformers": "6.1.0",
532+ "transit": "1.0.0",
533+ "tree-rose": "4.0.2",
534+ "trivial-unfold": "0.5.0",
535+ "ts-bridge": "4.0.0",
536+ "tuples": "7.0.0",
537+ "two-or-more": "1.0.0",
538+ "type-equality": "4.0.1",
539+ "typedenv": "2.0.1",
540+ "typelevel": "6.0.0",
541+ "typelevel-lists": "2.1.0",
542+ "typelevel-peano": "1.0.1",
543+ "typelevel-prelude": "7.0.0",
544+ "typelevel-regex": "0.0.3",
545+ "typelevel-rows": "0.1.0",
546+ "typisch": "0.4.0",
547+ "uint": "7.0.0",
548+ "ulid": "3.0.1",
549+ "uncurried-transformers": "1.1.0",
550+ "undefined": "2.0.0",
551+ "undefined-is-not-a-problem": "1.1.0",
552+ "unfoldable": "6.0.0",
553+ "unicode": "6.0.0",
554+ "unique": "0.6.1",
555+ "unlift": "1.0.1",
556+ "unordered-collections": "3.1.0",
557+ "unsafe-coerce": "6.0.0",
558+ "unsafe-reference": "5.0.0",
559+ "untagged-to-tagged": "0.1.4",
560+ "untagged-union": "1.0.0",
561+ "uri": "9.0.0",
562+ "url-immutable": "1.0.0",
563+ "url-regex-safe": "0.1.1",
564+ "uuid": "9.0.0",
565+ "uuidv4": "1.0.0",
566+ "validation": "6.0.0",
567+ "variant": "8.0.0",
568+ "variant-encodings": "2.0.0",
569+ "variant-gen": "1.0.0",
570+ "vectorfield": "1.0.1",
571+ "vectors": "2.1.0",
572+ "versions": "7.0.0",
573+ "visx": "0.0.2",
574+ "vitest": "2.0.0",
575+ "web-chain": "1.0.1",
576+ "web-clipboard": "6.0.0",
577+ "web-cssom": "2.0.0",
578+ "web-cssom-view": "0.1.0",
579+ "web-dom": "6.0.0",
580+ "web-dom-parser": "8.0.0",
581+ "web-dom-xpath": "3.0.0",
582+ "web-encoding": "3.0.0",
583+ "web-events": "4.0.0",
584+ "web-fetch": "4.0.1",
585+ "web-file": "4.0.0",
586+ "web-geometry": "0.1.0",
587+ "web-html": "4.1.1",
588+ "web-pointerevents": "2.0.0",
589+ "web-proletarian": "1.0.0",
590+ "web-promise": "3.2.0",
591+ "web-resize-observer": "2.1.0",
592+ "web-router": "1.0.0",
593+ "web-socket": "4.0.0",
594+ "web-storage": "5.0.0",
595+ "web-streams": "4.0.0",
596+ "web-touchevents": "4.0.0",
597+ "web-uievents": "5.0.0",
598+ "web-url": "2.0.0",
599+ "web-workers": "1.1.0",
600+ "web-xhr": "5.0.1",
601+ "webb-aff-list": "0.0.2",
602+ "webb-array": "0.0.2",
603+ "webb-channel": "0.0.3",
604+ "webb-commandline": "0.0.3",
605+ "webb-directory": "0.0.7",
606+ "webb-file": "0.0.1",
607+ "webb-map": "0.0.1",
608+ "webb-monad": "0.0.2",
609+ "webb-mutex": "0.0.7",
610+ "webb-parsing": "0.0.5",
611+ "webb-random": "0.0.1",
612+ "webb-refer": "0.0.3",
613+ "webb-set": "0.0.1",
614+ "webb-slot": "0.0.1",
615+ "webb-stateful": "0.0.3",
616+ "webb-string": "0.0.1",
617+ "webb-test": "0.0.1",
618+ "webb-thread": "0.0.2",
619+ "webb-writer": "0.0.3",
620+ "webextension-polyfill": "0.1.0",
621+ "webgpu": "0.0.1",
622+ "which": "2.0.0",
623+ "whine-core": "0.0.33",
624+ "xterm": "1.0.0",
625+ "yaml-next": "3.1.1",
626+ "yoga-acp-om": "0.1.1",
627+ "yoga-better-auth": "0.2.2",
628+ "yoga-bun-yoga": "0.2.1",
629+ "yoga-config": "0.2.1",
630+ "yoga-country": "3.0.0",
631+ "yoga-docker-compose": "0.1.1",
632+ "yoga-dynamodb": "0.1.1",
633+ "yoga-elasticsearch": "0.1.1",
634+ "yoga-fastify": "0.5.1",
635+ "yoga-fastify-om": "0.4.4",
636+ "yoga-fetch": "1.0.1",
637+ "yoga-fetch-om": "0.6.3",
638+ "yoga-http-api": "0.3.1",
639+ "yoga-jaeger": "0.1.1",
640+ "yoga-json": "5.2.1",
641+ "yoga-language": "1.0.0",
642+ "yoga-next-fastify": "0.1.1",
643+ "yoga-om": "2.2.0",
644+ "yoga-om-layer": "2.1.0",
645+ "yoga-om-strom": "0.4.2",
646+ "yoga-om-workerbees": "0.1.2",
647+ "yoga-opentelemetry": "0.2.0",
648+ "yoga-options": "0.1.1",
649+ "yoga-pino": "0.1.1",
650+ "yoga-postgres": "6.0.0",
651+ "yoga-react": "1.0.2",
652+ "yoga-react-dom": "2.0.1",
653+ "yoga-react-native": "0.2.1",
654+ "yoga-react-om": "0.2.0",
655+ "yoga-redis": "0.1.0",
656+ "yoga-shadcn": "1.0.5",
657+ "yoga-sql-types": "0.1.0",
658+ "yoga-sqlite": "0.3.2",
659+ "yoga-sse": "0.1.1",
660+ "yoga-subtlecrypto": "0.1.0",
661+ "yoga-test-docker": "0.1.2",
662+ "yoga-timezone": "1.0.0",
663+ "yoga-tree": "1.0.0",
664+ "yoga-tree-svg": "0.1.0",
665+ "yoga-tree-utils": "1.0.0",
666+ "z3": "0.0.2",
667+ "zipperarray": "2.0.0"
668+ }
669+ },
670+ "extra_packages": {}
671+ },
672+ "packages": {
673+ "arraybuffer-types": {
674+ "type": "registry",
675+ "version": "3.0.2",
676+ "integrity": "sha256-p05cJnSkyeoB7VHzMyc2Eb1RwUaB7Nl0sQSqEGNEUD8=",
677+ "dependencies": []
678+ },
679+ "canvas": {
680+ "type": "registry",
681+ "version": "6.0.0",
682+ "integrity": "sha256-AZZOi/ZOhFdN7Lhpng/GPEebJiSaEsMGXeen5F8SowE=",
683+ "dependencies": [
684+ "arraybuffer-types",
685+ "effect",
686+ "exceptions",
687+ "functions",
688+ "maybe",
689+ "prelude"
690+ ]
691+ },
692+ "control": {
693+ "type": "registry",
694+ "version": "6.0.0",
695+ "integrity": "sha256-0vxyYh5FL+ilxgLo954w1LqCUC0RSIivNNlb9CaNUQg=",
696+ "dependencies": [
697+ "newtype",
698+ "prelude"
699+ ]
700+ },
701+ "effect": {
702+ "type": "registry",
703+ "version": "4.0.0",
704+ "integrity": "sha256-DdqU3bncRTjgMVPPRlAuGHVeajSPEcRaRhNuio7if6s=",
705+ "dependencies": [
706+ "prelude"
707+ ]
708+ },
709+ "either": {
710+ "type": "registry",
711+ "version": "6.1.0",
712+ "integrity": "sha256-tBHx3PgtH4GZOApZCDkcM7szRTYJinrUrVGWazQCUUg=",
713+ "dependencies": [
714+ "control",
715+ "invariant",
716+ "maybe",
717+ "prelude"
718+ ]
719+ },
720+ "exceptions": {
721+ "type": "registry",
722+ "version": "6.1.0",
723+ "integrity": "sha256-nRrr+N0wk0TUFOWLR7e1n1oxcXo/X345bQUtoY9lW6A=",
724+ "dependencies": [
725+ "effect",
726+ "either",
727+ "maybe",
728+ "prelude"
729+ ]
730+ },
731+ "functions": {
732+ "type": "registry",
733+ "version": "6.0.0",
734+ "integrity": "sha256-0jgtOr+SFO4UScKc40oA/9Vdcf2rLn3h3vZlY0KfqVo=",
735+ "dependencies": [
736+ "prelude"
737+ ]
738+ },
739+ "invariant": {
740+ "type": "registry",
741+ "version": "6.0.0",
742+ "integrity": "sha256-HyoT1I5qIHRq8RSZji6zZDvqnpVjLw748utrKwZtqsw=",
743+ "dependencies": [
744+ "control",
745+ "prelude"
746+ ]
747+ },
748+ "maybe": {
749+ "type": "registry",
750+ "version": "6.0.0",
751+ "integrity": "sha256-8X6XEgtZ5lqfkEuc1hWOofnL6mwhk8gSJTxwvbR/SbY=",
752+ "dependencies": [
753+ "control",
754+ "invariant",
755+ "newtype",
756+ "prelude"
757+ ]
758+ },
759+ "newtype": {
760+ "type": "registry",
761+ "version": "5.0.0",
762+ "integrity": "sha256-dt6w0cty4OS+Pjt9fsh3iU6ottqSU83mdAZkaEEvo6c=",
763+ "dependencies": [
764+ "prelude",
765+ "safe-coerce"
766+ ]
767+ },
768+ "nullable": {
769+ "type": "registry",
770+ "version": "6.0.0",
771+ "integrity": "sha256-CDAZk+L9Sc0GCFTkE8n+qdp4Ys8avvnkU+m2hVALt7M=",
772+ "dependencies": [
773+ "functions",
774+ "maybe",
775+ "prelude"
776+ ]
777+ },
778+ "prelude": {
779+ "type": "registry",
780+ "version": "6.0.2",
781+ "integrity": "sha256-IqykrDRquGUD/LRSad7y75hZv3bUsGQ4knc8tdez8Qw=",
782+ "dependencies": []
783+ },
784+ "safe-coerce": {
785+ "type": "registry",
786+ "version": "2.0.0",
787+ "integrity": "sha256-EJrxtKt5xC7TYjBZrSBO/J7Aw3DmtilYjt4olpAXWVc=",
788+ "dependencies": [
789+ "unsafe-coerce"
790+ ]
791+ },
792+ "unsafe-coerce": {
793+ "type": "registry",
794+ "version": "6.0.0",
795+ "integrity": "sha256-0L1QsaY20OILjfU5TV72d3U/tSjhmL9hJ32WMp857Lk=",
796+ "dependencies": []
797+ }
798+ }
799+}
spago.yamlnew file+16
@@ -0,0 +1,16 @@
1+package:
2+ name: webgl-raw
3+ dependencies:
4+ - canvas: ">=6.0.0 <7.0.0"
5+ - effect: ">=4.0.0 <5.0.0"
6+ - nullable: ">=6.0.0 <7.0.0"
7+ - prelude: ">=6.0.2 <7.0.0"
8+ publish:
9+ version: 0.0.1
10+ license: MIT
11+ location:
12+ githubOwner: rowtype-yoga
13+ githubRepo: purescript-webgl-raw
14+workspace:
15+ packageSet:
16+ registry: 77.3.1
src/Graphics/WebGL/Raw.jsnew file+54
@@ -0,0 +1,54 @@
1+const allocated = (value, kind) => {
2+ if (value === null) throw new Error(`WebGL ${kind} allocation failed`);
3+ return value;
4+};
5+
6+export const getContext = canvas => kind => attributes => () => canvas.getContext(kind, attributes);
7+export const createShader = gl => kind => () => allocated(gl.createShader(kind), "shader");
8+export const shaderSource = gl => shader => source => () => gl.shaderSource(shader, source);
9+export const compileShader = gl => shader => () => gl.compileShader(shader);
10+export const shaderCompiled = gl => shader => () => !!gl.getShaderParameter(shader, gl.COMPILE_STATUS);
11+export const shaderInfoLog = gl => shader => () => gl.getShaderInfoLog(shader) || "";
12+export const deleteShader = gl => shader => () => gl.deleteShader(shader);
13+export const createProgram = gl => () => allocated(gl.createProgram(), "program");
14+export const attachShader = gl => program => shader => () => gl.attachShader(program, shader);
15+export const bindAttribLocation = gl => program => index => name => () => gl.bindAttribLocation(program, index, name);
16+export const attribLocation = gl => program => name => () => gl.getAttribLocation(program, name);
17+export const linkProgram = gl => program => () => gl.linkProgram(program);
18+export const programLinked = gl => program => () => !!gl.getProgramParameter(program, gl.LINK_STATUS);
19+export const programInfoLog = gl => program => () => gl.getProgramInfoLog(program) || "";
20+export const deleteProgram = gl => program => () => gl.deleteProgram(program);
21+export const useProgram = gl => program => () => gl.useProgram(program);
22+export const createBuffer = gl => () => allocated(gl.createBuffer(), "buffer");
23+export const bindBuffer = gl => target => buffer => () => gl.bindBuffer(target, buffer);
24+export const bufferDataF32 = gl => target => data => usage => () => gl.bufferData(target, new Float32Array(data), usage);
25+export const deleteBuffer = gl => buffer => () => gl.deleteBuffer(buffer);
26+export const enableVertexAttribArray = gl => index => () => gl.enableVertexAttribArray(index);
27+export const vertexAttribPointer = gl => index => size => type => normalized => stride => offset => () => gl.vertexAttribPointer(index, size, type, normalized, stride, offset);
28+export const enableExtension = gl => name => () => { gl.getExtension(name); };
29+export const createTexture = gl => () => allocated(gl.createTexture(), "texture");
30+export const bindTexture = gl => texture => () => gl.bindTexture(gl.TEXTURE_2D, texture);
31+export const texParameteri = gl => target => name => value => () => gl.texParameteri(target, name, value);
32+export const unpackFlipY = gl => flip => () => gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flip);
33+export const uniformLocation = gl => program => name => () => gl.getUniformLocation(program, name);
34+export const uniform1i = gl => location => x => () => gl.uniform1i(location, x);
35+export const uniform1f = gl => location => x => () => gl.uniform1f(location, x);
36+export const uniform2f = gl => location => x => y => () => gl.uniform2f(location, x, y);
37+export const uniform3f = gl => location => x => y => z => () => gl.uniform3f(location, x, y, z);
38+export const uniform1fv = gl => location => values => () => gl.uniform1fv(location, new Float32Array(values));
39+export const uniform2fv = gl => location => values => () => gl.uniform2fv(location, new Float32Array(values));
40+export const uniform4fv = gl => location => values => () => gl.uniform4fv(location, new Float32Array(values));
41+export const activeTexture = gl => unit => () => gl.activeTexture(unit);
42+export const texImageFromCanvas = gl => canvas => () => gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
43+export const texSubImageFromCanvas = gl => canvas => () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
44+export const bindDefaultFramebuffer = gl => () => gl.bindFramebuffer(gl.FRAMEBUFFER, null);
45+export const viewport = gl => width => height => () => gl.viewport(0, 0, width, height);
46+export const clearColor = gl => r => g => b => a => () => gl.clearColor(r, g, b, a);
47+export const clear = gl => mask => () => gl.clear(mask);
48+export const drawArrays = gl => mode => first => count => () => gl.drawArrays(mode, first, count);
49+export const deleteTexture = gl => texture => () => gl.deleteTexture(texture);
50+export const isContextLost = gl => () => gl.isContextLost();
51+export const loseContext = gl => () => {
52+ const extension = gl.getExtension("WEBGL_lose_context");
53+ if (extension !== null) extension.loseContext();
54+};
src/Graphics/WebGL/Raw.pursnew file+120
@@ -0,0 +1,120 @@
1+module Graphics.WebGL.Raw where
2+
3+import Prelude
4+
5+import Data.Nullable (Nullable)
6+import Effect (Effect)
7+import Graphics.Canvas (CanvasElement)
8+
9+type ContextAttributes =
10+ { alpha :: Boolean
11+ , antialias :: Boolean
12+ , depth :: Boolean
13+ , premultipliedAlpha :: Boolean
14+ , preserveDrawingBuffer :: Boolean
15+ , stencil :: Boolean
16+ }
17+
18+vertexShader :: Int
19+vertexShader = 35633
20+
21+fragmentShader :: Int
22+fragmentShader = 35632
23+
24+arrayBuffer :: Int
25+arrayBuffer = 34962
26+
27+staticDraw :: Int
28+staticDraw = 35044
29+
30+float :: Int
31+float = 5126
32+
33+texture2D :: Int
34+texture2D = 3553
35+
36+texture0 :: Int
37+texture0 = 33984
38+
39+textureMinFilter :: Int
40+textureMinFilter = 10241
41+
42+textureMagFilter :: Int
43+textureMagFilter = 10240
44+
45+textureWrapS :: Int
46+textureWrapS = 10242
47+
48+textureWrapT :: Int
49+textureWrapT = 10243
50+
51+linear :: Int
52+linear = 9729
53+
54+clampToEdge :: Int
55+clampToEdge = 33071
56+
57+colorBufferBit :: Int
58+colorBufferBit = 16384
59+
60+triangles :: Int
61+triangles = 4
62+
63+triangleStrip :: Int
64+triangleStrip = 5
65+
66+foreign import data GL :: Type
67+foreign import data Shader :: Type
68+foreign import data Program :: Type
69+foreign import data Buffer :: Type
70+foreign import data Texture :: Type
71+
72+-- Native null uniform locations are valid: WebGL uniform writes to them are no-ops.
73+foreign import data Uniform :: Type
74+
75+foreign import getContext :: CanvasElement -> String -> ContextAttributes -> Effect (Nullable GL)
76+foreign import createShader :: GL -> Int -> Effect Shader
77+foreign import shaderSource :: GL -> Shader -> String -> Effect Unit
78+foreign import compileShader :: GL -> Shader -> Effect Unit
79+foreign import shaderCompiled :: GL -> Shader -> Effect Boolean
80+foreign import shaderInfoLog :: GL -> Shader -> Effect String
81+foreign import deleteShader :: GL -> Shader -> Effect Unit
82+foreign import createProgram :: GL -> Effect Program
83+foreign import attachShader :: GL -> Program -> Shader -> Effect Unit
84+foreign import bindAttribLocation :: GL -> Program -> Int -> String -> Effect Unit
85+foreign import attribLocation :: GL -> Program -> String -> Effect Int
86+foreign import linkProgram :: GL -> Program -> Effect Unit
87+foreign import programLinked :: GL -> Program -> Effect Boolean
88+foreign import programInfoLog :: GL -> Program -> Effect String
89+foreign import deleteProgram :: GL -> Program -> Effect Unit
90+foreign import useProgram :: GL -> Program -> Effect Unit
91+foreign import createBuffer :: GL -> Effect Buffer
92+foreign import bindBuffer :: GL -> Int -> Buffer -> Effect Unit
93+foreign import bufferDataF32 :: GL -> Int -> Array Number -> Int -> Effect Unit
94+foreign import deleteBuffer :: GL -> Buffer -> Effect Unit
95+foreign import enableVertexAttribArray :: GL -> Int -> Effect Unit
96+foreign import vertexAttribPointer :: GL -> Int -> Int -> Int -> Boolean -> Int -> Int -> Effect Unit
97+foreign import enableExtension :: GL -> String -> Effect Unit
98+foreign import createTexture :: GL -> Effect Texture
99+foreign import bindTexture :: GL -> Texture -> Effect Unit
100+foreign import texParameteri :: GL -> Int -> Int -> Int -> Effect Unit
101+foreign import unpackFlipY :: GL -> Boolean -> Effect Unit
102+foreign import uniformLocation :: GL -> Program -> String -> Effect Uniform
103+foreign import uniform1i :: GL -> Uniform -> Int -> Effect Unit
104+foreign import uniform1f :: GL -> Uniform -> Number -> Effect Unit
105+foreign import uniform2f :: GL -> Uniform -> Number -> Number -> Effect Unit
106+foreign import uniform3f :: GL -> Uniform -> Number -> Number -> Number -> Effect Unit
107+foreign import uniform1fv :: GL -> Uniform -> Array Number -> Effect Unit
108+foreign import uniform2fv :: GL -> Uniform -> Array Number -> Effect Unit
109+foreign import uniform4fv :: GL -> Uniform -> Array Number -> Effect Unit
110+foreign import activeTexture :: GL -> Int -> Effect Unit
111+foreign import texImageFromCanvas :: GL -> CanvasElement -> Effect Unit
112+foreign import texSubImageFromCanvas :: GL -> CanvasElement -> Effect Unit
113+foreign import bindDefaultFramebuffer :: GL -> Effect Unit
114+foreign import viewport :: GL -> Int -> Int -> Effect Unit
115+foreign import clearColor :: GL -> Number -> Number -> Number -> Number -> Effect Unit
116+foreign import clear :: GL -> Int -> Effect Unit
117+foreign import drawArrays :: GL -> Int -> Int -> Int -> Effect Unit
118+foreign import deleteTexture :: GL -> Texture -> Effect Unit
119+foreign import isContextLost :: GL -> Effect Boolean
120+foreign import loseContext :: GL -> Effect Unit