javascript - how to draw sphere using math/sphere.js in threee.js? -


drawing sphere mesh function.

function draw_sp(x,y,z) {     var geometry = new three.spheregeometry( .02, 100,100 );     var material = new three.meshbasicmaterial( {color: 0xff0000} );     var sphere = new three.mesh( geometry, material );     sphere.position.set(x,y,z );     scene.add( sphere ); } 

its working , how draw same using sphere.js, given in three.js/doc under math?

i tried this

var sphere1= new three.sphere(new three.vector3( -l/2, 0, 0 ), 1.0); scene.add( sphere1); 

its not working .. can 1 give simple example use this?

sphere.js mathematically version of sphere. doesn't draw anything. used calculations.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -