Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unconed/ThreeBox.js
(dead) ThreeBox provides an improved boilerplate set up for tQuery / Three.js.
https://github.com/unconed/ThreeBox.js
Last synced: 2 months ago
JSON representation
(dead) ThreeBox provides an improved boilerplate set up for tQuery / Three.js.
- Host: GitHub
- URL: https://github.com/unconed/ThreeBox.js
- Owner: unconed
- License: mit
- Created: 2012-07-16T11:48:18.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-04-14T16:45:54.000Z (almost 10 years ago)
- Last Synced: 2024-05-02T00:54:47.589Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 601 KB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome - ThreeBox.js - (dead) ThreeBox provides an improved boilerplate set up for tQuery / Three.js. (etc)
- awesome - ThreeBox.js - (dead) ThreeBox provides an improved boilerplate set up for tQuery / Three.js. (etc)
README
Note: This project has been abandoned and rewritten into [threestrap](https://github.com/unconed/threestrap), which doesn't use tQuery.
---ThreeBox.js
==========![ThreeBox.js](https://raw.github.com/unconed/ThreeBox.js/master/misc/ThreeBox.png)
ThreeBox is a plug-in for tQuery/Three.js which provides an improved boilerplate set up.
It lets you easily embed Three.js scenes as elements in a web page, rather than just as a full-screen render. User-friendly mouse controls are also included.
* * *
Build:
* ThreeBox.js: tQuery plug-in + dependencies
* ThreeBox-core.js: tQuery plug-in onlyDepends on: tQuery (Jerome Etienne et al.), Three.js (Ricardo Cabello et al.)
Usage
-----Create a tQuery world and call the threeBox method. You may use a shorthand syntax.
```javascript
var options = { /* .. */ }; // Combined options object// Fill the entire body.
var world = tQuery.createWorld(options).threeBox(options);// or shorthand:
var world = threeBox(options);// Fill a particular DOM element.
var world = tQuery.createWorld(options).threeBox(element, options);// or shorthand:
var world = threeBox(element, options);
```All arguments are optional. The following `options` are available for ThreeBox in addition to the normal tQuery world options:
* cameraControls: true,
Whether to allow mouse control of the camera.
* controlClass: ThreeBox.OrbitControls,
Override the class to use for mouse controls.
* cursor: true,
Whether to show the mouse cursor. When set to false, the cursor auto-hides after a short delay.
* elementResize: true,
Whether to track resizing of the containing element.
* fullscreen: true,
Enable fullscreen mode with 'f'
* scale: 1,
Render at scaled resolution, e.g. scale 2 is half the width/height. Fractional values allowed.
* screenshot: true,
Enable screenshot taking with 'p'
* stats: true,
Show FPS stats in the corner.* * *
Steven Wittens - http://acko.net/