toxi, to typescript
@toxi@mastodon.thi.ng avatar

Example #167, and the very first example showing basic usage of the new https://thi.ng/geom-webgl interop package (still unreleased): Parsing a SVG path, sampling it with uniform vertex density (configurable), converting it into a complex polygon (w/ holes) and then into WebGL buffers (w/ vertex color option enabled), randomizing colors via probabilistic color theme, and — finally — drawing it all...

Demo (reload for new variation):
https://demo.thi.ng/umbrella/geom-webgl-basics/

Source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/geom-webgl-basics/src/index.ts

#ThingUmbrella #WebGL #SVG #Geometry #Tessellation #Triangulation #DebugArt #TypeScript #Typography #Polygon
#ThingUmbrella

toxi, to opensource
@toxi@mastodon.thi.ng avatar

Since I've just been asked again why some of the https://thi.ng/umbrella examples in the repo are not working when copy/pasting the source code into a new (external, I assume) project — there could be several reasons...

  1. The default branch of the repo is develop and usually does contain code which hasn't been released yet (as library/package). If in doubt, please switch to the main branch which contains the state as of the most recent release cycle...

  2. Related to #1, there could be breaking API changes on the develop branch (as is the case for the current major undertaking of thi.ng/geom v8.0.0) and some of the examples are already using the new/upcoming API...

  3. Rare, but possible, I've forgotten to declare dependencies for an example and you might encounter broken imports. Since 2022 I've got a custom tool to verify imports and exports of all packages and examples (and which is run prior to each release), so this shouldn't happen anymore...

  4. Personally, I'm only using a bundler setup/workflow (@vite) and had zero problems in the past few years. However, some people using ESM imports directly have been encountering weird issues with some transpilation features of JS CDNs (e.g. skypack) in the past, but these shouldn't happen with more modern ones like https://esm.run.

Finally, all packages have a generally uniform readme structure, incl. "install/import instructions". For examples, there're also these wiki pages:

General:
https://github.com/thi-ng/umbrella/wiki/Example-build-instructions

For examples added since late 2023:
https://github.com/thi-ng/umbrella/wiki/Development-mode-for-examples-using-thi.ng-meta%E2%80%90css

#ThingUmbrella #Documentation #Examples #OpenSource #TypeScript #JavaScript #ESM

toxi, to zig
@toxi@mastodon.thi.ng avatar

Congrats to @andrewrk & team to the new Zig v0.13.0 release! So exciting! 🚀🤩

Thankfully there were only very minor changes to be done on my end this time around, and I've just updated the build file & readme for https://thi.ng/wasm-api to be compatible with this new Zig version (the older build files are still kept around for those who might need it...). Also tested all the bundled examples, all working fine!

#ThingUmbrella #Zig #Ziglang #WASM #TypeScript #OpenSource

kubikpixel, (edited ) to webdev
@kubikpixel@chaos.social avatar

A other web tool with the name @lume but a 3D web design from @trusktr.

Do any of you use this and what is your experience with it? It is probably based on three.js and I hope it makes it "easier" to implement.

🧊 https://lume.io


toxi, to typescript
@toxi@mastodon.thi.ng avatar

Testing/debugging the dynamic tessellation feature of the upcoming thi.ng/geom-webgl interop package... This will provide a single polymorphic function to convert https://thi.ng/geom shapes into WebGL binary data & model/attribute specs, with lots of options for memory layout, indexing, instancing and other advanced usage...

By default (and as shown here), polygons are tessellated via ear cutting[1], but users have a choice of 9 other algorithm presets (or their own custom ones), incl. iterative application of multiple tessellation strategies..

[1] https://en.wikipedia.org/wiki/Polygon_triangulation

A random, blobby, triangulated polygon, with each triangle tinted in a random colorful gradient
A random, blobby, triangulated polygon, with each triangle tinted in a random colorful gradient
A random, blobby, triangulated polygon, with each triangle tinted in a random colorful gradient

32bitkid, to retrogaming
@32bitkid@mstdn.social avatar

Other people have also done this in photoshop, but i don't know of anybody who has done it quite like this, so imma show this off: Ultra-widescreen EGA composition in SCI0 compatible commands. The canvas is 665 x 190, with a small stitched area to help transition the two screens… no post-processing trickery. I interleaved the left and right side drawing screens with the appropriate matrix transformations, and... behold... ultra-wide EGA.

#RetroGaming #SierraOnLine #SpaceQuest #TypeScript

video/mp4

toxi, to typescript
@toxi@mastodon.thi.ng avatar

Current status: Updating the https://thi.ng/geom readme to give a better overview of the full extensive API, ahead of the v8 release (soon)... Attached are screenshots of three sections of the readme showing:

  1. list of 32 shape types (both 2D and 3D)
  2. list of 54 polymorphic functions/operations to manipulate/convert/analyze shapes & shape hierarchies
  3. list of additional 40 shape creation functions

Still to come: Documenting the bundled preset implementations of:

  • vertex convolution kernels (3)
  • curve subdivision strategies (8)
  • polygon/polyline to bezier conversion strategies (3)
  • polygon tessellators (9)

(...and how most of these can be combined & applied iteratively. Some of the recent/existing examples are already hinting at the potential...)

#ThingUmbrella #Geometry #Visualization #SVG #Documentation #TypeScript #JavaScript

Screenshot of a section of the linked GitHub readme, showing a table of 54 polymorphic functions/operations to manipulate/convert/analyze shapes & shape hierarchies
Screenshot of a section of the linked GitHub readme, showing a list of links to additional 40 shape creation functions

32bitkid, to genart
@32bitkid@mstdn.social avatar

Ooooh, the edge-weights (even if just totally randomly generated) seem to help the cohesion of the wash layer quite a bit!

image/png

nclslbrn, to typescript
@nclslbrn@mstdn.io avatar

Now my SVG font (JS library) supports hyphenation but it's quite experimental, you can try it there https://nclslbrn.github.io/plot-writer/

#penPlotter #typescript #customFont

A quote by Sol Lewitt read by plot-writer

toxi, to typescript
@toxi@mastodon.thi.ng avatar

Added a convolution kernel filtering operator for polygons/polylines to https://thi.ng/geom, incl. some useful preset kernels: box filter, triangle, gaussian, all with configurable size...

The image shows effects of various kernel sizes & iterations. Unlike with subdivision smoothing, here each version has the exact same number of vertices, only their positions are impacted: orange = box, magenta = triangle, blue = gaussian

(For now the operator is only implemented for polygons (also w/ holes) & polylines, but can be extended to other shape types...)

#ThingUmbrella #Geometry #Polygon #Curve #Convolution #Gaussian #TypeScript

retiolus, to react
@retiolus@mamot.fr avatar

I was curious about and and I remade my drinking game application with .

And this time, in addition to F-Droid, I plan to publish it on the Play Store and App Store!

The app has already been translated into Catalan with a few sentences, but it would be so cool if it were available in lots of other languages!

https://translate.codeberg.org/projects/cigalo-react/app/

image/png
image/png

kubikpixel, to javascript German
@kubikpixel@chaos.social avatar

Es scheint so, als müsste ich mich bei der TypeScript Entwicklung auf @deno_land konzentrieren. Sicherlich, noch mit JSR genutzt, mittlerweile ein Ersatz für @nodejs professionell.

»Deno 1.44 lernt den Umgang mit privaten npm-Registries:
Das Minor Release kann mit privaten npm-Registries sowie gRPC-Verbindungen umgehen und erhöht nochmals die Kompatibilität mit Node.js.«

📰 https://www.heise.de/news/Deno-1-44-lernt-den-Umgang-mit-privaten-npm-Registries-9742970.html
🦕 https://deno.com


#javascript #typescript #denojs #nodejs #webdev #jsr #grpc #dev #npm

levlaz, to python
@levlaz@hachyderm.io avatar

pro tip: learning this the hard way, if you're trying to fix linter issues based on ouput with #python or #typescript start fixing from the bottom of the output because if you start on the top then all of your changes will effect the downstream line number references.

toxi, (edited ) to generative
@toxi@mastodon.thi.ng avatar

Added a new[1] configurable curve subdivision kernel for https://thi.ng/geom to (iteratively) subdivide polygons/polylines with displacement, allowing for super compact code, infinite variation, and beautiful results like shown...

[1] Actually been using this approach since 2010, initially for 3D mesh subdivisions (3rd image)

daishi, to reactjs
@daishi@fosstodon.org avatar

🤩 Celebrating Waku (waku.gg) ⛩️ reaching 4k stars on GitHub! 🥳

#ReactJS #React #JavaScript #TypeScript #Waku

voxpelli, to programming
@voxpelli@mastodon.social avatar
sonny, to GNOME
@sonny@floss.social avatar

Workbench News 🛠️

Now available in the GNOME nightly repository

Welcoming 2 GSoC students

@vixalientoots and @atbrat

https://blog.sonny.re/workbench-news

#GNOME #TypeScript #Vala #GSoC

mackuba, to typescript
@mackuba@martianbase.net avatar

Good intro to using #TypeScript in the form of JSDoc tags: https://alexharri.com/blog/jsdoc-as-an-alternative-typescript-syntax - I've been using this recently in one small-ish project (#Bluesky thread reader) and I think I like it. I can run a typecheck when I want, but I don't need a build phase, don't need to install the npm package on the server, it's still just JS that a browser can open as is.

toxi, to typescript
@toxi@mastodon.thi.ng avatar
daishi, to reactjs
@daishi@fosstodon.org avatar

We are excited about React Compiler, aren't we? I just remembered that my first OSS library in JavaScript was a JS-to-JS compiler! Funny how things come around.

https://github.com/dai-shi/continuation.js

(The source code is hardly readable, even for me now... but feel free to try.)

kubikpixel, to webdev German
@kubikpixel@chaos.social avatar

DomainFilter

A fully-typed class for filtering a list of domain names in various ways

📝 https://crock.github.io/DomainFilter/


croc, to webdev
@croc@mastodon.social avatar

🤓 This is gonna be a extremely nerdy toot, but my most favorite piece of code I ever wrote is a small TypeScript library complete with unit tests that makes it super simple to filter a list of domain names by various criteria.

https://github.com/crock/domainfilter
https://www.npmjs.com/package/domainfilter

#domains #webdev #code #typescript #javascript

toxi, to genart
@toxi@mastodon.thi.ng avatar

Little Friday night gift for a friend (& example #163 in #ThingUmbrella): How to generate & then recursively tessellate a hex grid and visualize as SVG, all via just https://thi.ng/geom & https://thi.ng/transducers...

Demo:
https://demo.thi.ng/umbrella/geom-hexgrid/

Source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/geom-hexgrid/src/index.ts

(cc @nkint)

#Geometry #Hexagon #Grid #Tessellation #Recursion #GenerativeArt #SVG #TypeScript #Javascript

toxi,
@toxi@mastodon.thi.ng avatar

(Almost) same code, alternative tessellation (swapped order: first quad fan, then edge split). Also using 4 colors (vs two) to tint result polys...

toxi,
@toxi@mastodon.thi.ng avatar
toxi,
@toxi@mastodon.thi.ng avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines