Browsers | HTTP/WS | HTTPS/WSS | File:// |
---|---|---|---|
Chrome | ✔ | ✔ | ✔ |
FireFox | ✔ | ✔ | ✔ |
Edge | ✔ | ✔ | |
Safari |
3dRudderjs v1.0.4
Installation
-
Node
npm install 3drudder-js
API Documentation on Wiki
Usage
Node.js
var Sdk3dRudder = require('3drudder-js');
// default options {host: "127.51.100.82", port: 15698, schemeWs: "wss", autoReconnect: false, autoReconnectInterval: 5000 /*ms*/};
var SDK = new Sdk3dRudder();
or
// with options
var opts = {host: "127.0.0.0", port: 1234, schemeWs: "ws", autoReconnect: true, autoReconnectInterval: 1000 /*1 sec*/};
var SDK = new Sdk3dRudder(opts);
SDK.init();
var rudder = SDK.controllers[0];
var x = rudder.axis.roll;
...
Browser
Include in html page<script src="../dist/3dRudder-x.x.x.js"></script>
var SDK = new Sdk3dRudder();
SDK.init();
var rudder = SDK.controllers[0];
var x = rudder.axis.roll;
...
See examples
- Axis
- WebGL (three.js)
- WebVR (A-Frame)
- WebGL/WebVR (BabylonJS)
- Youtube
- Google Maps rotation experimental
- Google Poly or poly.html?t=ID (ID of poly model)
- Sketchfab Viewer orbit mode
-
npm run-script sample
to see in local:- Axis: http://localhost:3000/
- WebGL: http://localhost:3000/webgl/
- Youtube: http://localhost:3000/video/
- Maps: http://localhost:3000/maps/
- Google Poly: http://localhost:3000/poly or http://localhost:3000/poly?t=ID (ID of poly model)
- Sketchfab: http://localhost:3000/sketchfab or http://localhost:3000/sketchfab?t=ID (ID of sketchfab model)
Build for browser
-
npm install --save-optional bufferutil
(optionnal) -
npm install browserify -g
-g is for global install npm install grunt-cli -g
npm run build
- Result in
dist/3dRudder-x.x.x.js
Unit Test
- Command
npm test
TODO features
- add http request for the function