mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Make keyframes in motion trails right clickable
This commit is contained in:
parent
a0c748e198
commit
9ee7c35749
@ -1304,7 +1304,7 @@ const Animator = {
|
||||
if (object.isLine) return;
|
||||
var scaleVector = new THREE.Vector3();
|
||||
var scale = scaleVector.subVectors(object.position, Preview.selected.camera.position).length() / 500;
|
||||
scale = (Math.sqrt(scale)/3 + scale/1.4) * 3.8
|
||||
scale = (Math.sqrt(scale)/3 + scale/1.4) * 4
|
||||
if (Blockbench.isMobile) scale *= 4;
|
||||
object.scale.set(scale, scale, scale)
|
||||
})
|
||||
@ -1504,7 +1504,6 @@ const Animator = {
|
||||
let json = autoParseJSON(file.content)
|
||||
let keys = [];
|
||||
for (var key in json.animations) {
|
||||
console.log(key)
|
||||
// Test if already loaded
|
||||
if (isApp && file.path) {
|
||||
let is_already_loaded = false
|
||||
|
@ -316,6 +316,7 @@ class Keyframe {
|
||||
showContextMenu(event) {
|
||||
if (!this.selected) {
|
||||
this.select();
|
||||
updateKeyframeSelection();
|
||||
}
|
||||
this.menu.open(event, this);
|
||||
return this;
|
||||
|
@ -668,10 +668,12 @@ class Preview {
|
||||
Prop.active_panel = 'preview';
|
||||
if (this.static_rclick && (event.which === 3 || (event.type == 'touchend' && this.rclick_cooldown == true))) {
|
||||
var data = this.raycast(event)
|
||||
if (Toolbox.selected.selectCubes && Modes.selected.selectCubes && data && data.cube) {
|
||||
if (!Modes.animate) {
|
||||
data.cube.showContextMenu(event)
|
||||
}
|
||||
if (Toolbox.selected.selectCubes && Modes.selected.selectCubes && data && data.cube && !Modes.animate) {
|
||||
data.cube.showContextMenu(event);
|
||||
|
||||
} else if (data.type == 'keyframe') {
|
||||
data.keyframe.showContextMenu(event);
|
||||
|
||||
} else {
|
||||
this.menu.open(event, this)
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ class Texture {
|
||||
console.log('Successfully loaded '+scope.name+' from default pack')
|
||||
}
|
||||
|
||||
|
||||
//Width / Animation
|
||||
if (img.naturalWidth !== img.naturalHeight && Format.id == 'java_block') {
|
||||
BARS.updateConditions()
|
||||
|
Loading…
Reference in New Issue
Block a user