Discussion
Loading...

#Tag

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
dch :flantifa: :flan_hacker: boosted
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 3 days ago

#ReleaseTuesday — Earlier today, I published https://thi.ng/arcball, a small new package providing an intuitive click & drag 3D camera view controller which is completely agnostic from any UI/drawing/rendering framework. The library simply provides the (quaternion) maths to translate gesture events into rotations and then computes a view matrix (presumably for WebGL/WebGPU).

The code is ported from the old 2016 Clojure implementation in https://thi.ng/geom-clj, which itself is based on a 1992 paper (link in readme). Behind the scenes it uses https://thi.ng/matrices and https://thi.ng/vectors for various math ops.

There's also a small new example project to show how to use it (mouse & touch events are enabled, but zooming only works via scroll gestures on touchpad or mousewheel):

https://demo.thi.ng/umbrella/webgl-arcball/

#ThingUmbrella #TypeScript #JavaScript #UI

https://demo.thi.ng/umbrella/webgl-arcball/
thi.ng/vectors

Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

  • Copy link
  • Flag this post
  • Block
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 3 days ago

#ReleaseTuesday — Earlier today, I published https://thi.ng/arcball, a small new package providing an intuitive click & drag 3D camera view controller which is completely agnostic from any UI/drawing/rendering framework. The library simply provides the (quaternion) maths to translate gesture events into rotations and then computes a view matrix (presumably for WebGL/WebGPU).

The code is ported from the old 2016 Clojure implementation in https://thi.ng/geom-clj, which itself is based on a 1992 paper (link in readme). Behind the scenes it uses https://thi.ng/matrices and https://thi.ng/vectors for various math ops.

There's also a small new example project to show how to use it (mouse & touch events are enabled, but zooming only works via scroll gestures on touchpad or mousewheel):

https://demo.thi.ng/umbrella/webgl-arcball/

#ThingUmbrella #TypeScript #JavaScript #UI

https://demo.thi.ng/umbrella/webgl-arcball/
thi.ng/vectors

Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.5 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login