πŸ“¦ Importable base64 encoded CC0 assets for THREEJS

the link to the repo: https://github.com/pmndrs/assets

a playground: pmndrs assets - CodeSandbox

this is not react related. you can use this to quickly gain access to commonly used assets without fearing CDN outages or having to track down and move files manually into your /public folder. they are npm installed and self hosted, because each asset is a base64 encoded javascript module.

base64 is normally a bit larger, but with compression and subsetting these assets are a lot smaller than the original that people commonly use. for example:

  • a common polyhaven HDRI is 1-2mb, the pmndrs/assets counterpart 100-200kb
  • a common THREE.TextGeometry json 700-800kb, assets 30kb.
  • a common normalmap is 300-400kb, assets 10kb

currently it contains:

  • the full INTER font, all weights and variants, as woff (for troika et al) and json (for THREE.TextGeometry)
  • over 300 matcaps compressed into webp
  • 30 normal maps compressed into webp (cracks, hairlines, patterns, etc)
  • 10 common HDRIs as EXR + DWAB compression
  • a few models for quick prototyping compressed with gltf-functions (currently only the stanford bunny and dear suzi)

if you want to add something, you can submit a PR. it will auto compress assets so you don’t need to worry.

3 Likes

This is actually a very nice idea. And the CC0 license is also sweet.

1 Like