three-orbit-viewer
Advanced tools
Comparing version 69.1.2 to 69.2.0
@@ -5,2 +5,3 @@ var createApp = require('canvas-app') | ||
var xtend = require('xtend') | ||
var number = require('as-number') | ||
@@ -26,5 +27,8 @@ module.exports = function(THREE) { | ||
var fov = typeof opt.fov === 'number' ? opt.fov : 50 | ||
var fov = number(opt.fov, 50) | ||
var near = number(opt.near, 0.1) | ||
var far = number(opt.far, 1000) | ||
emitter.scene = new THREE.Scene() | ||
emitter.camera = new THREE.PerspectiveCamera(fov, width/height, 1, 1000) | ||
emitter.camera = new THREE.PerspectiveCamera(fov, width/height, near, far) | ||
@@ -31,0 +35,0 @@ var position = opt.position || new THREE.Vector3(1, 1, -2) |
{ | ||
"name": "three-orbit-viewer", | ||
"version": "69.1.2", | ||
"version": "69.2.0", | ||
"description": "quick harness for viewing a mesh with orbit viewer", | ||
@@ -13,2 +13,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"as-number": "^1.0.0", | ||
"canvas-app": "^2.4.0", | ||
@@ -15,0 +16,0 @@ "events": "^1.0.2", |
@@ -37,2 +37,4 @@ # three-orbit-viewer | ||
- `fov` field of view, defaults to 50 | ||
- `near` the near z depth for the camera, defaults to 0.1 | ||
- `far` the far z depth for the camera, defaults to 1000 | ||
- `clearColor` the THREE.Color or hex code, default black | ||
@@ -39,0 +41,0 @@ - `clearAlpha` the alpha, default 0 |
7354
56
79
5
+ Addedas-number@^1.0.0
+ Addedas-number@1.0.0(transitive)