Saltar la navegación

31 Rotate 10 Items

31 Rotate 360 Birds

Import Photosphere Rotate 10 items

……………………………………………….

//Scene 1

//one item rotate in circle,

var radio_1 = 12;//Circle radio 1

var x_initial_1=0;//Circle center coordinates item 1

var y_initial_1=0;

var z_initial_1=0;

var rotate_0_1 = Math.PI/2;//rotate initial item 1

var Height_from_the_ground_1= 0;//level z item 1

var item_1 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var steps_1=30;//number steps circle

var speed=10;// speed rotate

item_1.setPositionAngle(0, radio_1,Height_from_the_ground_1, 0, 0, 1,rotate_0_1);

var step=0;//number step

Scene.scheduleRepeating(function() {

step=step+1;//go to next step

var pos_x_1= x_initial_1 + radio_1*Math.sin(Math.PI*2*step/steps_1);

var pos_y_1= y_initial_1 + radio_1*Math.cos(Math.PI*2*step/steps_1);

var pos_z_1=z_initial_1 + Height_from_the_ground_1;

var rotate_1= rotate_0_1 + (Math.PI*2*step/steps_1);

item_1.setPositionAngle(pos_x_1, pos_y_1, pos_z_1, 0, 0, 1,rotate_1);

}, 1/speed);

…………………………………………………………………………………….

//Scene 2

//two items rotate in circle,

var radio_1 = 12;//Circle radio 1

var radio_2 = 11;//Circle radio 2

var x_initial_1=0;//Circle center coordinates item 1

var y_initial_1=0;

var z_initial_1=0;

var x_initial_2=0;//Circle center coordinates item 2

var y_initial_2=0;

var z_initial_2=0;

var rotate_0_1 = Math.PI/2;//rotate initial item 1

var rotate_0_2 = - Math.PI/2;//rotate initial item 2

var Height_from_the_ground_1= 0;//level z item 1

var Height_from_the_ground_2= 0.5;//level z item 2

var item_1 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_2 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var steps_1=30;//number steps circle

var steps_2=40;//number steps circle

var speed=10;// speed rotate

item_1.setPositionAngle(0, radio_1,Height_from_the_ground_1, 0, 0, 1,rotate_0_1);

item_2.setPositionAngle(0, radio_2,Height_from_the_ground_2, 0, 0, 1,rotate_0_2);

var step=0;//number step

Scene.scheduleRepeating(function() {

step=step+1;//go to next step

//clockwise

var pos_x_1= x_initial_1 + radio_1*Math.sin(Math.PI*2*step/steps_1);

var pos_y_1= y_initial_1 + radio_1*Math.cos(Math.PI*2*step/steps_1);

var pos_z_1=z_initial_1 + Height_from_the_ground_1;

var rotate_1= rotate_0_1 + (Math.PI*2*step/steps_1);

//counterclockwise

var pos_x_2= x_initial_2 + radio_2*Math.sin(-Math.PI*2*step/steps_2);

var pos_y_2= y_initial_2 + radio_2*Math.cos(-Math.PI*2*step/steps_2);

var pos_z_2=z_initial_2 + Height_from_the_ground_2;

var rotate_2= rotate_0_2 - (Math.PI*2*step/steps_2);

item_1.setPositionAngle(pos_x_1, pos_y_1, pos_z_1, 0, 0, 1,rotate_1);

item_2.setPositionAngle(pos_x_2, pos_y_2, pos_z_2, 0, 0, 1,rotate_2);

}, 1/speed);

………………………………………………………………………………………….

//Scena 3

//ten items rotate in circle,

var radio_1 = 12;//Circle radio 1

var radio_2 = 11;//Circle radio 2

var radio_3 = 10;//Circle radio 3

var radio_4 = 9;//Circle radio 4

var radio_5 = 8;//Circle radio 5

var radio_6 = 7;//Circle radio 6

var radio_7 = 6;//Circle radio 7

var radio_8 = 5;//Circle radio 8

var radio_9 = 4;//Circle radio 9

var radio_10 = 3;//Circle radio 10

var x_initial_1=0;//Circle center coordinates item 1

var y_initial_1=0;

var z_initial_1=0;

var x_initial_2=0;//Circle center coordinates item 2

var y_initial_2=0;

var z_initial_2=0;

var x_initial_3=0;//Circle center coordinates item 3

var y_initial_3=0;

var z_initial_3=0;

var x_initial_4=0;//Circle center coordinates item 4

var y_initial_4=0;

var z_initial_4=0;

var x_initial_5=0;//Circle center coordinates item 5

var y_initial_5=0;

var z_initial_5=0;

var x_initial_6=0;//Circle center coordinates item 6

var y_initial_6=0;

var z_initial_6=0;

var x_initial_7=0;//Circle center coordinates item 7

var y_initial_7=0;

var z_initial_7=0;

var x_initial_8=0;//Circle center coordinates item 8

var y_initial_8=0;

var z_initial_8=0;

var x_initial_9=0;//Circle center coordinates item 9

var y_initial_9=0;

var z_initial_9=0;

var x_initial_10=0;//Circle center coordinates item 10

var y_initial_10=0;

var z_initial_10=0;

var rotate_0_1 = Math.PI/2;//rotate initial item 1

var rotate_0_2 = - Math.PI/2;//rotate initial item 2

var rotate_0_3 = Math.PI/2;//rotate initial item 3

var rotate_0_4 = - Math.PI/2;//rotate initial item 4

var rotate_0_5 = Math.PI/2;//rotate initial item 5

var rotate_0_6 = - Math.PI/2;//rotate initial item 6

var rotate_0_7 = Math.PI/2;//rotate initial item 7

var rotate_0_8 = -Math.PI/2;//rotate initial item 8

var rotate_0_9 = Math.PI/2;//rotate initial item 9

var rotate_0_10 = -Math.PI/2;//rotate initial item 10

var Height_from_the_ground_1= 0;//level z item 1

var Height_from_the_ground_2= 0.5;//level z item 2

var Height_from_the_ground_3= 1;//level z item 3

var Height_from_the_ground_4= 1.5;//level z item 4

var Height_from_the_ground_5= 2;//level z item 5

var Height_from_the_ground_6= 2.5;//level z item 6

var Height_from_the_ground_7= 3;//level z item 7

var Height_from_the_ground_8= 3.5;//level z item 8

var Height_from_the_ground_9= 4;//level z item 9

var Height_from_the_ground_10= 4.5;//level z item 10

var item_1 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_2 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_3 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_4 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_5 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_6 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_7 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_8 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_9 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var item_10 = Scene.createItem('LP_WhiteBird', 0, 0, 0);

var steps_1=30;//number steps circle

var steps_2=40;//number steps circle

var steps_3=50;//number steps circle

var steps_4=60;//number steps circle

var steps_5=70;//number steps circle

var steps_6=30;//number steps circle

var steps_7=40;//number steps circle

var steps_8=50;//number steps circle

var steps_9=60;//number steps circle

var steps_10=70;//number steps circle

var speed=10;// speed rotate

item_1.setPositionAngle(0, radio_1,Height_from_the_ground_1, 0, 0, 1,rotate_0_1);

item_2.setPositionAngle(0, radio_2,Height_from_the_ground_2, 0, 0, 1,rotate_0_2);

item_3.setPositionAngle(0, radio_3,Height_from_the_ground_3, 0, 0, 1,rotate_0_3);

item_4.setPositionAngle(0, radio_4,Height_from_the_ground_4, 0, 0, 1,rotate_0_4);

item_5.setPositionAngle(0, radio_5,Height_from_the_ground_5, 0, 0, 1,rotate_0_5);

item_6.setPositionAngle(0, radio_6,Height_from_the_ground_6, 0, 0, 1,rotate_0_6);

item_7.setPositionAngle(0, radio_7,Height_from_the_ground_7, 0, 0, 1,rotate_0_7);

item_8.setPositionAngle(0, radio_8,Height_from_the_ground_8, 0, 0, 1,rotate_0_8);

item_9.setPositionAngle(0, radio_9,Height_from_the_ground_9, 0, 0, 1,rotate_0_9);

item_10.setPositionAngle(0, radio_10,Height_from_the_ground_10, 0, 0, 1,rotate_0_10);

var step=0;//number step

Scene.scheduleRepeating(function() {

step=step+1;//go to next step

//clockwise

var pos_x_1= x_initial_1 + radio_1*Math.sin(Math.PI*2*step/steps_1);

var pos_y_1= y_initial_1 + radio_1*Math.cos(Math.PI*2*step/steps_1);

var pos_z_1=z_initial_1 + Height_from_the_ground_1;

var rotate_1= rotate_0_1 + (Math.PI*2*step/steps_1);

//counterclockwise

var pos_x_2= x_initial_2 + radio_2*Math.sin(-Math.PI*2*step/steps_2);

var pos_y_2= y_initial_2 + radio_2*Math.cos(-Math.PI*2*step/steps_2);

var pos_z_2=z_initial_2 + Height_from_the_ground_2;

var rotate_2= rotate_0_2 - (Math.PI*2*step/steps_2);

//clockwise

var pos_x_3= x_initial_3 + radio_3*Math.sin(Math.PI*2*step/steps_3);

var pos_y_3= y_initial_3 + radio_3*Math.cos(Math.PI*2*step/steps_3);

var pos_z_3=z_initial_3 + Height_from_the_ground_3;

var rotate_3= rotate_0_3 + (Math.PI*2*step/steps_3);

//counterclockwise

var pos_x_4= x_initial_4 + radio_4*Math.sin(-Math.PI*2*step/steps_4);

var pos_y_4= y_initial_4 + radio_4*Math.cos(-Math.PI*2*step/steps_4);

var pos_z_4=z_initial_4 + Height_from_the_ground_4;

var rotate_4= rotate_0_4 - (Math.PI*2*step/steps_4);

//clockwise

var pos_x_5= x_initial_5 + radio_5*Math.sin(Math.PI*2*step/steps_5);

var pos_y_5= y_initial_5 + radio_5*Math.cos(Math.PI*2*step/steps_5);

var pos_z_5=z_initial_5 + Height_from_the_ground_5;

var rotate_5= rotate_0_5 + (Math.PI*2*step/steps_5);

//counterclockwise

var pos_x_6= x_initial_6 + radio_6*Math.sin(-Math.PI*2*step/steps_6);

var pos_y_6= y_initial_6 + radio_6*Math.cos(-Math.PI*2*step/steps_6);

var pos_z_6=z_initial_6 + Height_from_the_ground_6;

var rotate_6= rotate_0_6 - (Math.PI*2*step/steps_6);

//clockwise

var pos_x_7= x_initial_7 + radio_7*Math.sin(Math.PI*2*step/steps_7);

var pos_y_7= y_initial_7 + radio_7*Math.cos(Math.PI*2*step/steps_7);

var pos_z_7=z_initial_7 + Height_from_the_ground_7;

var rotate_7= rotate_0_7 + (Math.PI*2*step/steps_7);

//counterclockwise

var pos_x_8= x_initial_8 + radio_8*Math.sin(-Math.PI*2*step/steps_8);

var pos_y_8= y_initial_8 + radio_8*Math.cos(-Math.PI*2*step/steps_8);

var pos_z_8=z_initial_8 + Height_from_the_ground_8;

var rotate_8= rotate_0_8 - (Math.PI*2*step/steps_8);

//clockwise

var pos_x_9= x_initial_9 + radio_9*Math.sin(Math.PI*2*step/steps_9);

var pos_y_9= y_initial_9 + radio_9*Math.cos(Math.PI*2*step/steps_9);

var pos_z_9=z_initial_9 + Height_from_the_ground_9;

var rotate_9= rotate_0_9 + (Math.PI*2*step/steps_9);

//counterclockwise

var pos_x_10= x_initial_10 + radio_10*Math.sin(-Math.PI*2*step/steps_10);

var pos_y_10= y_initial_10 + radio_10*Math.cos(-Math.PI*2*step/steps_10);

var pos_z_10=z_initial_10 + Height_from_the_ground_10;

var rotate_10= rotate_0_10 - (Math.PI*2*step/steps_10);

item_1.setPositionAngle(pos_x_1, pos_y_1, pos_z_1, 0, 0, 1,rotate_1);

item_2.setPositionAngle(pos_x_2, pos_y_2, pos_z_2, 0, 0, 1,rotate_2);

item_3.setPositionAngle(pos_x_3, pos_y_3, pos_z_3, 0, 0, 1,rotate_3);

item_4.setPositionAngle(pos_x_4, pos_y_4, pos_z_4, 0, 0, 1,rotate_4);

item_5.setPositionAngle(pos_x_5, pos_y_5, pos_z_5, 0, 0, 1,rotate_5);

item_6.setPositionAngle(pos_x_6, pos_y_6, pos_z_6, 0, 0, 1,rotate_6);

item_7.setPositionAngle(pos_x_7, pos_y_7, pos_z_7, 0, 0, 1,rotate_7);

item_8.setPositionAngle(pos_x_8, pos_y_8, pos_z_8, 0, 0, 1,rotate_8);

item_9.setPositionAngle(pos_x_9, pos_y_9, pos_z_9, 0, 0, 1,rotate_9);

item_10.setPositionAngle(pos_x_10, pos_y_10, pos_z_10, 0, 0, 1,rotate_10);

}, 1/speed);