JSPM

three-stdlib

2.21.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 441490
  • Score
    100M100P100Q175206F
  • License MIT

stand-alone library of threejs examples

Package Exports

  • three-stdlib
  • three-stdlib/controls/DeviceOrientationControls
  • three-stdlib/controls/DeviceOrientationControls.js
  • three-stdlib/controls/FlyControls
  • three-stdlib/controls/FlyControls.js
  • three-stdlib/controls/OrbitControls
  • three-stdlib/controls/OrbitControls.js
  • three-stdlib/controls/PointerLockControls
  • three-stdlib/controls/PointerLockControls.js
  • three-stdlib/controls/TrackballControls
  • three-stdlib/controls/TrackballControls.js
  • three-stdlib/controls/TransformControls
  • three-stdlib/controls/TransformControls.js
  • three-stdlib/index.cjs.js
  • three-stdlib/index.js
  • three-stdlib/lines/Line2
  • three-stdlib/lines/Line2.js
  • three-stdlib/lines/LineGeometry
  • three-stdlib/lines/LineGeometry.js
  • three-stdlib/lines/LineMaterial
  • three-stdlib/lines/LineMaterial.js
  • three-stdlib/loaders/DRACOLoader
  • three-stdlib/loaders/DRACOLoader.js
  • three-stdlib/loaders/FBXLoader
  • three-stdlib/loaders/FBXLoader.js
  • three-stdlib/loaders/GLTFLoader
  • three-stdlib/loaders/GLTFLoader.js
  • three-stdlib/loaders/RGBELoader
  • three-stdlib/loaders/RGBELoader.js
  • three-stdlib/loaders/SVGLoader.js
  • three-stdlib/math/MeshSurfaceSampler
  • three-stdlib/math/MeshSurfaceSampler.js
  • three-stdlib/math/SimplexNoise
  • three-stdlib/math/SimplexNoise.js
  • three-stdlib/modifiers/CurveModifier
  • three-stdlib/modifiers/CurveModifier.js
  • three-stdlib/modifiers/EdgeSplitModifier
  • three-stdlib/modifiers/EdgeSplitModifier.js
  • three-stdlib/modifiers/SimplifyModifier
  • three-stdlib/modifiers/SimplifyModifier.js
  • three-stdlib/modifiers/TessellateModifier
  • three-stdlib/modifiers/TessellateModifier.js
  • three-stdlib/objects/Sky
  • three-stdlib/objects/Sky.js
  • three-stdlib/postprocessing/EffectComposer
  • three-stdlib/postprocessing/EffectComposer.js
  • three-stdlib/postprocessing/RenderPass
  • three-stdlib/postprocessing/RenderPass.js
  • three-stdlib/postprocessing/ShaderPass
  • three-stdlib/postprocessing/ShaderPass.js
  • three-stdlib/shaders/GammaCorrectionShader
  • three-stdlib/shaders/GammaCorrectionShader.js
  • three-stdlib/shaders/HorizontalBlurShader
  • three-stdlib/shaders/HorizontalBlurShader.js
  • three-stdlib/shaders/VerticalBlurShader
  • three-stdlib/shaders/VerticalBlurShader.js
  • three-stdlib/utils/BufferGeometryUtils
  • three-stdlib/utils/BufferGeometryUtils.js
  • three-stdlib/webxr/ARButton
  • three-stdlib/webxr/ARButton.js
  • three-stdlib/webxr/VRButton
  • three-stdlib/webxr/VRButton.js
  • three-stdlib/webxr/XRControllerModelFactory
  • three-stdlib/webxr/XRControllerModelFactory.js
  • three-stdlib/webxr/XRHandModelFactory
  • three-stdlib/webxr/XRHandModelFactory.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (three-stdlib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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