Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Mar 12, 2021
1 parent 1eb2091 commit 577bdff
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# three-stdlib

[![release](https://github.com/pmndrs/three-stdlib/actions/workflows/main.yml/badge.svg)](https://github.com/pmndrs/three-stdlib/actions/workflows/main.yml)
[![Version](https://img.shields.io/npm/v/three-stdlib?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/three-stdlib)
[![Downloads](https://img.shields.io/npm/dt/three-stdlib.svg?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/three-stdlib)
[![Twitter](https://img.shields.io/twitter/follow/pmndrs?label=%40pmndrs&style=flat&colorA=000000&colorB=000000&logo=twitter&logoColor=000000)](https://twitter.com/pmndrs)
[![Discord](https://img.shields.io/discord/740090768164651008?style=flat&colorA=000000&colorB=000000&label=discord&logo=discord&logoColor=000000)](https://discord.gg/ZZjjNvJ)
[![release](https://github.com/pmndrs/three-stdlib/actions/workflows/main.yml/badge.svg?style=flat&colorA=000000&colorB=000000)](https://github.com/pmndrs/three-stdlib/actions/workflows/main.yml)

Stand-alone version of [threejs/examples/jsm](https://github.com/mrdoob/three.js/tree/dev/examples/jsm) written in Typescript & built for ESM & CJS.

## Basic usage

npm install three-stdlib

```jsx
```ts
// Export collection
import * as STDLIB from 'three-stdlib'
// Flatbundle
Expand All @@ -13,9 +21,11 @@ import { OrbitControls, ... } from 'three-stdlib'
import { OrbitControls } from 'three-stdlib/controls/OrbitControls'
```

This is a stand-alone of https://github.com/mrdoob/three.js/tree/dev/examples/jsm
## Problem

Our main goals are:
`threejs/examples` were always considered as something that you need to copy/paste into your project and adapt to your needs. But that's not how people use them. This causes numerous issues & little support.

## Solution

- Real, npm/node conform esm modules with marked dependencies
- Class based, optimized for tree-shaking, no global pollution, exports instead of collections
Expand All @@ -24,11 +34,14 @@ Our main goals are:
- Typesafety with simple annotation-like types
- CI, tests, linting, formatting (prettier)

But most importantly, allowing the people that use and rely on these primitives to hold a little stake, and to distribute the weight of maintaining it. Jsm/examples were always considered as something that you copy/paste into your project and adapt to your needs. But that is not how people use it.
But most importantly, allowing the people that use and rely on these primitives to hold a little stake, and to distribute the weight of maintaining it.

Let's give jsm/examples the care it deserves!

## Changes
## How to contribute

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

- [x] All Collections have been converted to export maps (GeometryUtils, CurveExtras, etc)
- [x] WebGL has been moved to /misc
- Create amazing stories for these examples for our dedicate storybook
- Convert some of the files to Typescript
- Add new examples for the library you think could be awesome for others

1 comment on commit 577bdff

@vercel
Copy link

@vercel vercel bot commented on 577bdff Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.