bitgridio / generator-janus-dist

:straight_ruler: Yeoman generator to distribute assets in Janus VR
1 stars 0 forks source link

Multiple configuration options? #3

Open sirkitree opened 9 years ago

sirkitree commented 9 years ago

I thinking the default configuration option would be just a wall of assets. generator-janus-dist 2014-12-16 12-08-46

But we could have other configurations as well, like corridor: generator-janus-dist 2014-12-16 12-12-51

sirkitree commented 9 years ago

Another one I've wanted to figure out for a long time is the sphere. three.js has a demo of squares in a sphere that we might be able to borrow from:

from view-source:http://mrdoob.com/lab/javascript/threejs/css3d/periodictable/

// sphere

                var vector = new THREE.Vector3();

                for ( var i = 0, l = objects.length; i < l; i ++ ) {

                    var object = objects[ i ];

                    var phi = Math.acos( -1 + ( 2 * i ) / l );
                    var theta = Math.sqrt( l * Math.PI ) * phi;

                    var object = new THREE.Object3D();

                    object.position.x = 1000 * Math.cos( theta ) * Math.sin( phi );
                    object.position.y = 1000 * Math.sin( theta ) * Math.sin( phi );
                    object.position.z = 1000 * Math.cos( phi );

                    vector.copy( object.position ).multiplyScalar( 2 );

                    object.lookAt( vector );

                    targets.sphere.push( object );

                }
sirkitree commented 9 years ago

The helix and grid configurations are also quite nice and would also make good placement options I think.