优化动画
This commit is contained in:
parent
f9543c6fbf
commit
f2140b03d9
19 changed files with 1189 additions and 1145 deletions
|
@ -81,8 +81,8 @@ public class ClientEventHandler {
|
|||
}
|
||||
|
||||
data.putDouble("sway_time", data.getDouble("sway_time") + 0.015 * times);
|
||||
data.putDouble("x", (pose * -0.008 * Math.sin(data.getDouble("sway_time")) * (1 - 0.9 * data.getDouble("zoom_time"))));
|
||||
data.putDouble("y", (pose * 0.125 * Math.sin(data.getDouble("sway_time") - 1.585) * (1 - 0.9 * data.getDouble("zoom_time"))));
|
||||
data.putDouble("x", (pose * -0.008 * Math.sin(data.getDouble("sway_time")) * (1 - 0.95 * data.getDouble("zoom_time"))));
|
||||
data.putDouble("y", (pose * 0.125 * Math.sin(data.getDouble("sway_time") - 1.585) * (1 - 0.95 * data.getDouble("zoom_time"))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,9 @@ public class ClientEventHandler {
|
|||
data.putDouble("gun_moveX_time", 0);
|
||||
}
|
||||
|
||||
data.putDouble("gun_move_posY", -0.135 * Math.sin(2 * Math.PI * (data.getDouble("gun_moveY_time") - 0.25)) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posY", -0.135 * Math.sin(2 * Math.PI * (data.getDouble("gun_moveY_time") - 0.25)) * (1 - 0.95 * data.getDouble("zoom_time")));
|
||||
|
||||
data.putDouble("gun_move_posX", 0.2 * Math.sin(1 * Math.PI * data.getDouble("gun_moveX_time")) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posX", 0.2 * Math.sin(1 * Math.PI * data.getDouble("gun_moveX_time")) * (1 - 0.95 * data.getDouble("zoom_time")));
|
||||
|
||||
} else {
|
||||
if (data.getDouble("gun_moveY_time") > 0.25) {
|
||||
|
@ -154,15 +154,15 @@ public class ClientEventHandler {
|
|||
}
|
||||
|
||||
if (data.getDouble("gun_move_posX") > 0) {
|
||||
data.putDouble("gun_move_posX", data.getDouble("gun_move_posX") - 1.5 * (Math.pow(data.getDouble("gun_move_posX"), 2) * times) * (1 - 0.5 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posX", data.getDouble("gun_move_posX") - 1.5 * (Math.pow(data.getDouble("gun_move_posX"), 2) * times) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
} else {
|
||||
data.putDouble("gun_move_posX", data.getDouble("gun_move_posX") + 1.5 * (Math.pow(data.getDouble("gun_move_posX"), 2) * times) * (1 - 0.5 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posX", data.getDouble("gun_move_posX") + 1.5 * (Math.pow(data.getDouble("gun_move_posX"), 2) * times) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
}
|
||||
|
||||
if (data.getDouble("gun_move_posY") > 0) {
|
||||
data.putDouble("gun_move_posY", data.getDouble("gun_move_posY") - 1.5 * (Math.pow(data.getDouble("gun_move_posY"), 2) * times) * (1 - 0.5 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posY", data.getDouble("gun_move_posY") - 1.5 * (Math.pow(data.getDouble("gun_move_posY"), 2) * times) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
} else {
|
||||
data.putDouble("gun_move_posY", data.getDouble("gun_move_posY") + 1.5 * (Math.pow(data.getDouble("gun_move_posY"), 2) * times) * (1 - 0.5 * data.getDouble("zoom_time")));
|
||||
data.putDouble("gun_move_posY", data.getDouble("gun_move_posY") + 1.5 * (Math.pow(data.getDouble("gun_move_posY"), 2) * times) * (1 - 0.75 * data.getDouble("zoom_time")));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -328,10 +328,10 @@ public class ClientEventHandler {
|
|||
if (-0.8 < velocity + 0.078 && velocity + 0.078 < 0.8) {
|
||||
if (data.getDouble("vy") < entity.getDeltaMovement().y() + 0.078) {
|
||||
data.putDouble("vy",
|
||||
((data.getDouble("vy") + 0.5 * Math.pow((velocity + 0.078) - data.getDouble("vy"), 2)) * (1 - 0.4 * data.getDouble("zoom_time"))));
|
||||
((data.getDouble("vy") + 0.5 * Math.pow((velocity + 0.078) - data.getDouble("vy"), 2)) * (1 - 0.6 * data.getDouble("zoom_time"))));
|
||||
} else {
|
||||
data.putDouble("vy",
|
||||
((data.getDouble("vy") - 0.5 * Math.pow((velocity + 0.078) - data.getDouble("vy"), 2)) * (1 - 0.4 * data.getDouble("zoom_time"))));
|
||||
((data.getDouble("vy") - 0.5 * Math.pow((velocity + 0.078) - data.getDouble("vy"), 2)) * (1 - 0.6 * data.getDouble("zoom_time"))));
|
||||
}
|
||||
}
|
||||
if (data.getDouble("vy") > 0.8) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 17, -11]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 1, 3]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -1, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -2, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -0.5, 5]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
@ -240,12 +240,12 @@
|
|||
"origin": [-6.2, -5.8, 17.4],
|
||||
"size": [4, 12, 4],
|
||||
"uv": {
|
||||
"north": {"uv": [0, 72.75], "uv_size": [4, 2]},
|
||||
"east": {"uv": [0, 72.75], "uv_size": [4, 2]},
|
||||
"south": {"uv": [0, 72.75], "uv_size": [4, 2]},
|
||||
"west": {"uv": [0, 72.75], "uv_size": [4, 2]},
|
||||
"up": {"uv": [4, 74.75], "uv_size": [-4, -2]},
|
||||
"down": {"uv": [4, 74.75], "uv_size": [-4, -2]}
|
||||
"north": {"uv": [0, 124.25], "uv_size": [4, 3.75]},
|
||||
"east": {"uv": [18.75, 12.25], "uv_size": [4, 2]},
|
||||
"south": {"uv": [18.75, 12.25], "uv_size": [4, 2]},
|
||||
"west": {"uv": [18.75, 12.25], "uv_size": [4, 2]},
|
||||
"up": {"uv": [22.75, 14.25], "uv_size": [-4, -2]},
|
||||
"down": {"uv": [22.75, 14.25], "uv_size": [-4, -2]}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -2, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -2, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 0, -2]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -1, 6]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 18, -12]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 1, 4]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -4, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -2, 3]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
@ -43,11 +43,11 @@
|
|||
{
|
||||
"name": "holo",
|
||||
"parent": "0",
|
||||
"pivot": [0.34531, 4.30078, -41.25],
|
||||
"pivot": [0.34531, 4.12344, 2.75],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-3.14011, 2.12036, -41.25],
|
||||
"size": [6.97085, 2.26553, 0],
|
||||
"origin": [-0.24469, 3.93169, 2.75],
|
||||
"size": [1.18, 0.3835, 0],
|
||||
"uv": {
|
||||
"north": {"uv": [0, 0], "uv_size": [2, 2]},
|
||||
"east": {"uv": [0, 0], "uv_size": [0, 2]},
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -1, -1]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, -1, -2]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
"pivot": [0, 0, -2]
|
||||
},
|
||||
{
|
||||
"name": "move",
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Loading…
Add table
Reference in a new issue