Added php for parameter of resolution of sphere in stream

This commit is contained in:
Thomas FORGIONE
2015-04-08 17:26:02 +02:00
parent 566f42f5dc
commit 5c9390da90
3 changed files with 31 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
var ProgessiveSphere = function(loader) {
var ProgessiveSphere = function(loader, res) {
Displayable.call(this);
this.started = false;
this.finished = false;
@@ -6,8 +6,11 @@ var ProgessiveSphere = function(loader) {
this.begin = false;
this.addedToScene = false;
if (res === undefined)
res = 5;
(function(self) {
loader.load('/data/spheres/4.obj', function(object) {
loader.load('/data/spheres/' + res + '.obj', function(object) {
object.traverse(function(child) {
if (child instanceof THREE.Mesh) {
child.up = new THREE.Vector3(0,0,1);