javascript - THREE.js translation/position weirdness -


i'm trying generate random planes in random position in screen , of random size. problem have don't understand set.position values. representing? tried search every answer couldn't find. here's code planes:

var planes = [];  (i = 0; < 20; i++) {     var geometry = new three.planegeometry(sizewidth*((randomso(1,20)*0.00001)), sizeheight*((randomso(1,10)*0.0001)));     var material = new three.meshbasicmaterial( {color: 0x00ff00});     var plane = new three.mesh(geometry, material);     plane.drawmode = three.trianglesdrawmode;      plane.position.set(-10+i, 0, 0);     scene.add(plane);     planes[i] = plane; } 

the x-co-ordinate in above example isn't how i'd want testing. work according screensize, each plane locate in random % of width , height. width of screen 1280 , when set the x co-ordinate let's -20 it's out of screen. should set z co-ordinate of camera differently? don't understand position co-ordinates in :-(


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -