files){
160 | final FileReader reader=FileReader.createFileReader();
161 | reader.setOnLoad(new FileHandler() {
162 | @Override
163 | public void onLoad() {
164 | parseBVH(reader.getResultAsString());
165 | if(files.size()>0){
166 | File f=files.remove(0);
167 |
168 | reader.readAsText(f,"utf-8");
169 | }else{//last
170 | doAllFileAction();
171 | }
172 | }
173 | });
174 | reader.readAsText(files.remove(0),"utf-8");
175 | }
176 |
177 | private void doThinOut(){
178 |
179 | int skips=1;
180 | try{
181 | skips=Integer.parseInt(thinSize.getValue());
182 | }catch(Exception e){}
183 |
184 | BVH bvh=bvhList.get(0);
185 | bvh.setSkips(skips);
186 | BVHWriter writer=new BVHWriter();
187 |
188 | String text=writer.writeToString(bvh);
189 | textArea.setText(text);
190 |
191 | logLabel.setText("from "+bvh.getMotion().getFrames()+" to "+bvh.getFrames());
192 | }
193 |
194 |
195 |
196 | private TextBox thinSize;
197 |
198 | protected void doAllFileAction() {
199 | doThinOut();
200 | }
201 | }
202 |
--------------------------------------------------------------------------------
/war/BVHTools.css:
--------------------------------------------------------------------------------
1 | /** Add css rules here for your application. */
2 |
3 |
4 | /** Example rules used by the template application (remove for your app) */
5 | h1 {
6 | font-size: 2em;
7 | font-weight: bold;
8 | color: #777777;
9 | margin: 40px 0px 70px;
10 | text-align: center;
11 | }
12 |
13 | .sendButton {
14 | display: block;
15 | font-size: 16pt;
16 | }
17 |
18 | /** Most GWT widgets already have a style name defined */
19 | .gwt-DialogBox {
20 | width: 400px;
21 | }
22 |
23 | .dialogVPanel {
24 | margin: 5px;
25 | }
26 |
27 | .serverResponseLabelError {
28 | color: red;
29 | }
30 |
31 | /** Set ids using widget.getElement().setId("idOfElement") */
32 | #closeButton {
33 | margin: 15px 6px 6px;
34 | }
35 |
36 | .fileborder{
37 | border:inset 1px #aaaaaa;
38 | }
39 | .selected{
40 | background: #ccccff;
41 | }
42 |
43 | .bvhlabel { cursor: pointer }
44 |
--------------------------------------------------------------------------------
/war/BVHTools.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/war/GWTBVH.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/war/WEB-INF/.gitignore:
--------------------------------------------------------------------------------
1 | /deploy
2 |
--------------------------------------------------------------------------------
/war/WEB-INF/lib/gwt-servlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akjava/BVH-Motion-Creator/fc05cfb750d8edadb5ca94e369b55b9f8d121dfd/war/WEB-INF/lib/gwt-servlet.jar
--------------------------------------------------------------------------------
/war/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 | BVHTools.html
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/war/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akjava/BVH-Motion-Creator/fc05cfb750d8edadb5ca94e369b55b9f8d121dfd/war/icon.png
--------------------------------------------------------------------------------
/war/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | BVH Motion Creator
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/war/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BVH Player",
3 | "description": "Model Weight Editor",
4 | "version": "1.0.1",
5 | "app": {
6 | "launch": {
7 | "local_path": "index.html"
8 | }
9 | },
10 | "icons": {
11 | "128": "icon.png"
12 | },
13 | "permissions": [
14 | "unlimitedStorage"
15 | ]
16 | }
--------------------------------------------------------------------------------
/war/pose.bvh:
--------------------------------------------------------------------------------
1 | HIERARCHY
2 | ROOT Hips
3 | {
4 | OFFSET 0 0 0
5 | CHANNELS 6 Xposition Yposition Zposition Zrotation Yrotation Xrotation
6 | JOINT LHipJoint
7 | {
8 | OFFSET 0 0 0
9 | CHANNELS 3 Zrotation Yrotation Xrotation
10 | JOINT LeftUpLeg
11 | {
12 | OFFSET 1.48061 -1.808 0.67318
13 | CHANNELS 3 Zrotation Yrotation Xrotation
14 | JOINT LeftLeg
15 | {
16 | OFFSET 2.63258 -7.23296 0
17 | CHANNELS 3 Zrotation Yrotation Xrotation
18 | JOINT LeftFoot
19 | {
20 | OFFSET 2.54779 -7 0
21 | CHANNELS 3 Zrotation Yrotation Xrotation
22 | JOINT LeftToeBase
23 | {
24 | OFFSET 0.23067 -0.63376 2.12161
25 | CHANNELS 3 Zrotation Yrotation Xrotation
26 | End Site
27 | {
28 | OFFSET 0 0 1.11
29 | }
30 | }
31 | }
32 | }
33 | }
34 | }
35 | JOINT RHipJoint
36 | {
37 | OFFSET 0 0 0
38 | CHANNELS 3 Zrotation Yrotation Xrotation
39 | JOINT RightUpLeg
40 | {
41 | OFFSET -1.48061 -1.808 0.67318
42 | CHANNELS 3 Zrotation Yrotation Xrotation
43 | JOINT RightLeg
44 | {
45 | OFFSET -2.63258 -7.23296 0
46 | CHANNELS 3 Zrotation Yrotation Xrotation
47 | JOINT RightFoot
48 | {
49 | OFFSET -2.54779 -7 0
50 | CHANNELS 3 Zrotation Yrotation Xrotation
51 | JOINT RightToeBase
52 | {
53 | OFFSET -0.23067 -0.63376 2.12161
54 | CHANNELS 3 Zrotation Yrotation Xrotation
55 | End Site
56 | {
57 | OFFSET 0 0 1.11
58 | }
59 | }
60 | }
61 | }
62 | }
63 | }
64 | JOINT LowerBack
65 | {
66 | OFFSET 0 0 0
67 | CHANNELS 3 Zrotation Yrotation Xrotation
68 | JOINT Spine
69 | {
70 | OFFSET -0.02108 2.07573 -0.16981
71 | CHANNELS 3 Zrotation Yrotation Xrotation
72 | JOINT Spine1
73 | {
74 | OFFSET 0.0507 2.08439 -0.03141
75 | CHANNELS 3 Zrotation Yrotation Xrotation
76 | JOINT Neck
77 | {
78 | OFFSET 0 0 0
79 | CHANNELS 3 Zrotation Yrotation Xrotation
80 | JOINT Neck1
81 | {
82 | OFFSET -0.10731 1.60408 0.3137
83 | CHANNELS 3 Zrotation Yrotation Xrotation
84 | JOINT Head
85 | {
86 | OFFSET 0.08411 1.65679 -0.30822
87 | CHANNELS 3 Zrotation Yrotation Xrotation
88 | End Site
89 | {
90 | OFFSET 0.03911 1.69149 -0.14146
91 | }
92 | }
93 | }
94 | }
95 | JOINT LeftShoulder
96 | {
97 | OFFSET 0 0 0
98 | CHANNELS 3 Zrotation Yrotation Xrotation
99 | JOINT LeftArm
100 | {
101 | OFFSET 2.65 0.73219 -0.54694
102 | CHANNELS 3 Zrotation Yrotation Xrotation
103 | JOINT LeftForeArm
104 | {
105 | OFFSET 4.33589 0 0
106 | CHANNELS 3 Zrotation Yrotation Xrotation
107 | JOINT LeftHand
108 | {
109 | OFFSET 3.64134 0 0
110 | CHANNELS 3 Zrotation Yrotation Xrotation
111 | JOINT LeftFingerBase
112 | {
113 | OFFSET 0 0 0
114 | CHANNELS 3 Zrotation Yrotation Xrotation
115 | JOINT LeftHandIndex1
116 | {
117 | OFFSET 0.73481 0 0
118 | CHANNELS 3 Zrotation Yrotation Xrotation
119 | End Site
120 | {
121 | OFFSET 0.59242 0 0
122 | }
123 | }
124 | }
125 | JOINT LThumb
126 | {
127 | OFFSET 0 0 0
128 | CHANNELS 3 Zrotation Yrotation Xrotation
129 | End Site
130 | {
131 | OFFSET 0.60147 0 0.60147
132 | }
133 | }
134 | }
135 | }
136 | }
137 | }
138 | JOINT RightShoulder
139 | {
140 | OFFSET 0 0 0
141 | CHANNELS 3 Zrotation Yrotation Xrotation
142 | JOINT RightArm
143 | {
144 | OFFSET -2.65 0.73219 -0.54694
145 | CHANNELS 3 Zrotation Yrotation Xrotation
146 | JOINT RightForeArm
147 | {
148 | OFFSET -4.33589 0 0
149 | CHANNELS 3 Zrotation Yrotation Xrotation
150 | JOINT RightHand
151 | {
152 | OFFSET -3.64134 0 0
153 | CHANNELS 3 Zrotation Yrotation Xrotation
154 | JOINT RightFingerBase
155 | {
156 | OFFSET 0 0 0
157 | CHANNELS 3 Zrotation Yrotation Xrotation
158 | JOINT RightHandIndex1
159 | {
160 | OFFSET -0.73481 0 0
161 | CHANNELS 3 Zrotation Yrotation Xrotation
162 | End Site
163 | {
164 | OFFSET -0.59242 0 0
165 | }
166 | }
167 | }
168 | JOINT RThumb
169 | {
170 | OFFSET 0 0 0
171 | CHANNELS 3 Zrotation Yrotation Xrotation
172 | End Site
173 | {
174 | OFFSET -0.60147 0 0.60147
175 | }
176 | }
177 | }
178 | }
179 | }
180 | }
181 | }
182 | }
183 | }
184 | }
185 | MOTION
186 | Frames: 1
187 | Frame Time: 0.0083333
188 | 3.0615 17.3489 -3.5799 0 0 0 0 0 0 -21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -16 0 0 21 0 0 11 0 0 0 -8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
--------------------------------------------------------------------------------
/war/pose_help.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Pose Editor is Creating BVH Motion App.
5 |
6 | Easy to Create Motion with IK-Bone
7 | English Info
8 | Japanese Info
9 |
10 |
11 |
--------------------------------------------------------------------------------
/war/stats.min.js:
--------------------------------------------------------------------------------
1 | // stats.js - http://github.com/mrdoob/stats.js
2 | var Stats=function(){var l=Date.now(),m=l,g=0,n=Infinity,o=0,h=0,p=Infinity,q=0,r=0,s=0,f=document.createElement("div");f.id="stats";f.addEventListener("mousedown",function(b){b.preventDefault();t(++s%2)},!1);f.style.cssText="width:80px;opacity:0.9;cursor:pointer";var a=document.createElement("div");a.id="fps";a.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#002";f.appendChild(a);var i=document.createElement("div");i.id="fpsText";i.style.cssText="color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px";
3 | i.innerHTML="FPS";a.appendChild(i);var c=document.createElement("div");c.id="fpsGraph";c.style.cssText="position:relative;width:74px;height:30px;background-color:#0ff";for(a.appendChild(c);74>c.children.length;){var j=document.createElement("span");j.style.cssText="width:1px;height:30px;float:left;background-color:#113";c.appendChild(j)}var d=document.createElement("div");d.id="ms";d.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#020;display:none";f.appendChild(d);var k=document.createElement("div");
4 | k.id="msText";k.style.cssText="color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px";k.innerHTML="MS";d.appendChild(k);var e=document.createElement("div");e.id="msGraph";e.style.cssText="position:relative;width:74px;height:30px;background-color:#0f0";for(d.appendChild(e);74>e.children.length;)j=document.createElement("span"),j.style.cssText="width:1px;height:30px;float:left;background-color:#131",e.appendChild(j);var t=function(b){s=b;switch(s){case 0:a.style.display=
5 | "block";d.style.display="none";break;case 1:a.style.display="none",d.style.display="block"}};return{REVISION:11,domElement:f,setMode:t,begin:function(){l=Date.now()},end:function(){var b=Date.now();g=b-l;n=Math.min(n,g);o=Math.max(o,g);k.textContent=g+" MS ("+n+"-"+o+")";var a=Math.min(30,30-30*(g/200));e.appendChild(e.firstChild).style.height=a+"px";r++;b>m+1E3&&(h=Math.round(1E3*r/(b-m)),p=Math.min(p,h),q=Math.max(q,h),i.textContent=h+" FPS ("+p+"-"+q+")",a=Math.min(30,30-30*(h/100)),c.appendChild(c.firstChild).style.height=
6 | a+"px",m=b,r=0);return b},update:function(){l=this.end()}}};
7 |
--------------------------------------------------------------------------------
/war/weight_help.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Model Weight Tool is Skining BVH & Three.js Model
5 |
6 | this tool can create model for Pose Editor
7 | the format is same as SkinnedMesh but it not work perfectlly yet.
8 |
9 | Japanese Info
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------