From 9a8c701884344f300668c98c3f6868b0401f41bb Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Sun, 12 Jul 2020 15:33:32 -0400 Subject: [PATCH] feat: add npm/yarn install directions to readme. --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb03178e..b34d9eb4 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,32 @@ This library is currently in alpha and in midst of significant development. It may not even compile properly. You have been warned. +## Install and Import + +Threeify and its modules are published on npm with full typing support. To install, use: + +```sh +npm install threeify --save +``` + +Or + +```sh +yarn add threeify +``` + +This will allow you to import Threeify entirely using: + +```javascript +import * as THREEIFY from "threeify"; // NOT YET SUPPORTED +``` + +or individual classes using: + +```javascript +import { RenderContext, Vector3 } from "threeify"; +``` + ### Usage This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` renderer context for the scene and camera, and it adds that viewport to the `document.body` element. Finally, it animates the cube within the scene for the camera. @@ -102,4 +128,3 @@ This project exists thanks to all