Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
j-devel committed May 2, 2019
1 parent ba39611 commit 6cfc7e8
Show file tree
Hide file tree
Showing 6 changed files with 2,138 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .gitignore
@@ -0,0 +1,36 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# Remove some common IDE working directories
.idea
.vscode

.DS_Store

lib
*.rst.html
42 changes: 42 additions & 0 deletions README.rst
@@ -0,0 +1,42 @@
threelet
===================

A portable standalone viewer for THREE objects.

Setup
-----

**Installation**

.. code:: sh
$ npm install threelet
**Loading**

.. code:: js
import Threelet from 'dist/threelet.js';
Usage
-----

.. code:: html

<canvas id="canvas" style="width: 100%; height: 100%;"></canvas>
<script src="../deps/three.min.js"></script>
<script src="../deps/OrbitControls.js"></script>
<script src="../deps/stats.min.js"></script>
<script>
import Threelet from '../../dist/threelet.js';
const threelet = new Threelet({
canvas: document.getElementById("canvas"),
optClassControls: window.THREE.OrbitControls,
optClassStats: window.Stats,
});
threelet.updateLoop(0); // 0 fps, i.e. passive rendering with OribitControls
</script>

.. image:: https://w3reality.github.io/threelet/examples/simple/img/threelet.png

0 comments on commit 6cfc7e8

Please sign in to comment.