1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 | global.window = {};
|
6 |
|
7 | var test = require('tape');
|
8 | var THREE = require('three');
|
9 | var index = require('../build/index.common.js');
|
10 |
|
11 | test('Test three', function (t) {
|
12 | t.ok(true, 'Can run a test');
|
13 | var vec = new THREE.Vector3(1,2,3);
|
14 | t.equal(vec.x,1,'Vector x');
|
15 | t.equal(vec.lengthSq(),1+4+9, 'Vector length');
|
16 |
|
17 | var camera = new THREE.PerspectiveCamera( 45, 1.0, 1, 1000 );
|
18 | t.equal(camera.far, 1000, 'Camera far');
|
19 |
|
20 | t.end();
|
21 | });
|
22 |
|
23 | test('Test three plugins', function (t) {
|
24 | var shadow = new index.ShadowBuilder();
|
25 | t.ok(shadow, 'Can create a shadow builder');
|
26 | t.end();
|
27 | });
|