Skip to content

📚 Stand-alone library of threejs examples designed to run without transpilation in node & browser

License

Notifications You must be signed in to change notification settings

ill-inc/three-stdlib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

three-stdlib

Version Downloads Twitter Discord release

Stand-alone version of threejs/examples/jsm written in Typescript & built for ESM & CJS.

Basic usage

npm install three-stdlib
// Export collection
import * as STDLIB from 'three-stdlib'
// Flatbundle
import { OrbitControls, ... } from 'three-stdlib'
// Pick individual objects
import { OrbitControls } from 'three-stdlib/controls/OrbitControls'

Problem

threejs/examples are usually regarded as something that you copy/paste into your project and adapt to your needs. That's not how people use it, and this has caused numerous issues in the past.

Solution

  • A build system for esm and cjs
  • Version managed dependencies
  • Class based, optimized for tree-shaking, no globals, exports instead of collections
  • Single flatbundle as well as individual transpiles
  • Typesafety with simple annotation-like types
  • CI, tests, linting, formatting (prettier)

But most importantly, allowing more people that use and rely on these primitives to hold a little stake, and to share the weight of maintaining it.

How to contribute

If you want to get involved you could do any of the following:

  • Help to maintain and sync the existing primitives
  • Create stories for these examples for our dedicated storybook
  • Convert some of the files to Typescript
  • Add new examples for the library you think could be helpful for others

About

📚 Stand-alone library of threejs examples designed to run without transpilation in node & browser

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.0%
  • TypeScript 23.0%