Mercurial > hg > Members > e085737 > sample
changeset 19:1f1d330aac98
ver5
author | <e085737> |
---|---|
date | Sat, 11 Dec 2010 12:55:18 +0900 |
parents | 931ad40d56f5 |
children | d322eed6e1c7 |
files | Pants_FPS/resources/human.js Pants_FPS/resources/walk.js Pants_FPS/xml/kata.xml |
diffstat | 3 files changed, 143 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Pants_FPS/resources/human.js Sat Dec 11 05:04:20 2010 +0900 +++ b/Pants_FPS/resources/human.js Sat Dec 11 12:55:18 2010 +0900 @@ -31,7 +31,12 @@ body.set_move_collision(no_move_idle, no_collision_idle) - var joint_rh = new sgroot.createSceneGraph1("green") + var joint_rh = new sgroot.createSceneGraph1("Kata") + /*joint_rh.xyz[0] = -sgroot.sg_src["green"].model_x * 7 + joint_rh.xyz[1] =- sgroot.sg_src["green"].model_y * 7 + joint_rh.xyz[2] = -sgroot.sg_src["green"].model_z * 7 + */ + joint_rh.scale = 7 joint_rh.set_move_collision(joint_rh_move, no_collision_idle) @@ -44,7 +49,7 @@ right_hand.set_move_collision(right_hand_move, no_collision_idle) - var joint_lh = new sgroot.createSceneGraph1("green") + var joint_lh = new sgroot.createSceneGraph1("Kata") joint_lh.scale = 7 joint_lh.set_move_collision(joint_lh_move, no_collision_idle) @@ -57,7 +62,7 @@ left_hand.set_move_collision(left_hand_move, no_collision_idle) - var joint_rl = new sgroot.createSceneGraph1("green") + var joint_rl = new sgroot.createSceneGraph1("Kata") joint_rl.scale = 7 joint_rl.set_move_collision(joint_rl_move, no_collision_idle) @@ -69,7 +74,7 @@ right_leg.set_move_collision(right_leg_move, no_collision_idle) - var joint_ll = new sgroot.createSceneGraph1("green") + var joint_ll = new sgroot.createSceneGraph1("Kata") joint_ll.scale = 7 joint_ll.set_move_collision(joint_ll_move, no_collision_idle) @@ -106,6 +111,10 @@ } +roteta_body = function(node, sgroot, w, h){ + node.angle[2] += 1 +} + head_move = function(node, sgroot, w, h){ var move_eye = 1.0 var PI = 3.14 @@ -114,6 +123,7 @@ var dz = node.parents.xyz[2] - position_xyz[2] var d = Math.sqrt(Math.pow(dx,2) + Math.pow(dz,2)) + if(pad.left_isHold()){ cameraAngle_xyz[0] -= move_eye theta += move_eye @@ -287,7 +297,6 @@ } - if(node.xyz[2] < 0){ node.xyz[2] = 0 position_xyz[2] = -d * Math.sin(radian) @@ -306,7 +315,6 @@ var PI = 3.14 var radian = (((move_length*5)%360) / 360) * 2 * PI var range = 90 - node.angle[0] = Math.sin(radian) * range } @@ -339,6 +347,7 @@ joint_rh_move = function(node, sgroot, w, h){ + //node.angle[2] += 1 node.angle[1] = 45 node.xyz[0] = 0 node.xyz[1] = 300 @@ -347,7 +356,7 @@ joint_lh_move = function(node, sgroot, w, h){ node.angle[1] = -45 - node.xyz[0] = 0 + node.xyz[0] = 0 node.xyz[1] = -300 node.xyz[2] = 100 }
--- a/Pants_FPS/resources/walk.js Sat Dec 11 05:04:20 2010 +0900 +++ b/Pants_FPS/resources/walk.js Sat Dec 11 12:55:18 2010 +0900 @@ -46,6 +46,7 @@ sgroot.createFromXMLfile(gl, sgroot, "./xml/hand.xml") sgroot.createFromXMLfile(gl, sgroot, "./xml/blue.xml") sgroot.createFromXMLfile(gl, sgroot, "./xml/human.xml") + sgroot.createFromXMLfile(gl, sgroot, "./xml/kata.xml") var walk_man = createHuman(sgroot, w, h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Pants_FPS/xml/kata.xml Sat Dec 11 12:55:18 2010 +0900 @@ -0,0 +1,126 @@ +<?xml version="1.0"?> +<OBJECT-3D> + <surface name="Kata" size="36" prim="Triangle" parent="NULL"> + <coordinate> + 6.000000 6.000000 -6.000000 + 6.000000 -6.000000 -6.000000 + -6.000001 -5.999999 -6.000000 + -6.000001 -5.999999 -6.000000 + -5.999998 6.000002 -6.000000 + 6.000000 6.000000 -6.000000 + 6.000003 5.999997 6.000000 + -6.000000 6.000000 6.000000 + -6.000002 -5.999998 6.000000 + -6.000002 -5.999998 6.000000 + 5.999996 -6.000004 6.000000 + 6.000003 5.999997 6.000000 + 6.000000 6.000000 -6.000000 + 6.000003 5.999997 6.000000 + 5.999996 -6.000004 6.000000 + 5.999996 -6.000004 6.000000 + 6.000000 -6.000000 -6.000000 + 6.000000 6.000000 -6.000000 + 6.000000 -6.000000 -6.000000 + 5.999996 -6.000004 6.000000 + -6.000002 -5.999998 6.000000 + -6.000002 -5.999998 6.000000 + -6.000001 -5.999999 -6.000000 + 6.000000 -6.000000 -6.000000 + -6.000001 -5.999999 -6.000000 + -6.000002 -5.999998 6.000000 + -6.000000 6.000000 6.000000 + -6.000000 6.000000 6.000000 + -5.999998 6.000002 -6.000000 + -6.000001 -5.999999 -6.000000 + 6.000003 5.999997 6.000000 + 6.000000 6.000000 -6.000000 + -5.999998 6.000002 -6.000000 + -5.999998 6.000002 -6.000000 + -6.000000 6.000000 6.000000 + 6.000003 5.999997 6.000000 + </coordinate> + <normal> + 0.000000 0.000000 -6.000000 + 0.000000 0.000000 -6.000000 + 0.000000 0.000000 -6.000000 + 0.000000 0.000000 -6.000000 + 0.000000 0.000000 -6.000000 + 0.000000 0.000000 -6.000000 + 0.000000 -0.000000 6.000000 + 0.000000 -0.000000 6.000000 + 0.000000 -0.000000 6.000000 + 0.000000 -0.000000 6.000000 + 0.000000 -0.000000 6.000000 + 0.000000 -0.000000 6.000000 + 6.000000 -0.000002 0.000000 + 6.000000 -0.000002 0.000000 + 6.000000 -0.000002 0.000000 + 6.000000 -0.000002 0.000000 + 6.000000 -0.000002 0.000000 + 6.000000 -0.000002 0.000000 + -0.000002 -6.000000 -0.000001 + -0.000002 -6.000000 -0.000001 + -0.000002 -6.000000 -0.000001 + -0.000002 -6.000000 -0.000001 + -0.000002 -6.000000 -0.000001 + -0.000002 -6.000000 -0.000001 + -6.000000 0.000001 -0.000001 + -6.000000 0.000001 -0.000001 + -6.000000 0.000001 -0.000001 + -6.000000 0.000001 -0.000001 + -6.000000 0.000001 -0.000001 + -6.000000 0.000001 -0.000001 + 0.000001 6.000000 0.000001 + 0.000001 6.000000 0.000001 + 0.000001 6.000000 0.000001 + 0.000001 6.000000 0.000001 + 0.000001 6.000000 0.000001 + 0.000001 6.000000 0.000001 + </normal> + <model> + 0.000000 0.000000 0.000000 + </model> + <texture> + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + 0.000000 0.000000 + </texture> + <image name="dummy.png"> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGUlEQVQokWP8/fs3AymAiSTVoxpG + NQwpDQAwxQMRlevqcQAAAABJRU5ErkJggg== + </image> + </surface> +</OBJECT-3D>