Use alt key to amplify graph from center

This commit is contained in:
JannisX11 2023-04-28 22:55:36 +02:00
parent 00b477de2d
commit 6947de5b82
3 changed files with 7 additions and 3 deletions

View File

@ -1380,7 +1380,7 @@
background-color: var(--color-ui);
right: 12px;
margin-top: 29px;
z-index: 2;
z-index: 5;
}
#timeline_graph_editor_amplifier > div {
position: absolute;

View File

@ -1180,7 +1180,11 @@ Interface.definePanels(() => {
value = Math.round(value*100)/100;
for (let kf of keyframes) {
let target_value = (original_values[kf.uuid] - original_range[anchor_side]) * value + original_range[anchor_side];
let origin = original_range[anchor_side];
if (e2.altKey) {
origin = Math.lerp(original_range[0], original_range[1], 0.5);
}
target_value = (original_values[kf.uuid] - origin) * value + origin;
kf.offset(axis, -kf.get(axis) + target_value);
values_changed = true;
}

View File

@ -217,6 +217,7 @@ window.BedrockEntityManager = class BedrockEntityManager {
}
}
initAnimations() {
this.initialized_animations = true;
let anim_list = this.client_entity && this.client_entity.description && this.client_entity.description.animations;
if (anim_list instanceof Object) {
let animation_names = [];
@ -256,7 +257,6 @@ window.BedrockEntityManager = class BedrockEntityManager {
} catch (err) {}
})
}
this.initialized_animations = true;
}
findEntityTexture(mob, return_path) {
if (!mob) return;