mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-11 16:12:06 +08:00
Add Blockbench.isTouch property
Fix issue with copying keyframes
This commit is contained in:
parent
890ad47a02
commit
6471dd6a50
@ -673,22 +673,21 @@ class GeneralAnimator {
|
||||
});
|
||||
keyframes.push(keyframe);
|
||||
|
||||
keyframe.channel = channel;
|
||||
keyframe.time = time;
|
||||
|
||||
if (value) {
|
||||
keyframe.extend(value);
|
||||
} else if (this.fillValues) {
|
||||
this.fillValues(keyframe, value, true);
|
||||
}
|
||||
|
||||
keyframe.channel = channel;
|
||||
keyframe.time = time;
|
||||
|
||||
this[channel].push(keyframe);
|
||||
keyframe.animator = this;
|
||||
|
||||
if (select !== false) {
|
||||
keyframe.select();
|
||||
}
|
||||
|
||||
var deleted = [];
|
||||
delete keyframe.time_before;
|
||||
keyframe.replaceOthers(deleted);
|
||||
|
@ -3,6 +3,7 @@ const LastVersion = localStorage.getItem('last_version') || localStorage.getItem
|
||||
const Blockbench = {
|
||||
isWeb: !isApp,
|
||||
isMobile: !isApp && window.innerWidth <= 640,
|
||||
isTouch: 'ontouchend' in document,
|
||||
version: appVersion,
|
||||
platform: 'web',
|
||||
flags: [],
|
||||
|
@ -1232,7 +1232,7 @@ const BARS = {
|
||||
//Extras
|
||||
new KeybindItem('preview_select', {
|
||||
category: 'navigate',
|
||||
keybind: new Keybind({key: Blockbench.isMobile ? 0 : 1, ctrl: null, shift: null, alt: null})
|
||||
keybind: new Keybind({key: Blockbench.isTouch ? 0 : 1, ctrl: null, shift: null, alt: null})
|
||||
})
|
||||
new KeybindItem('preview_rotate', {
|
||||
category: 'navigate',
|
||||
|
@ -251,14 +251,13 @@ var Extruder = {
|
||||
north: {uv:[(rect.x2+1)*scale_i, rect.y*scale_i, rect.x*scale_i, (rect.y+1)*scale_i], texture: texture},
|
||||
south: {uv:[rect.x*scale_i, rect.y2*scale_i, (rect.x2+1)*scale_i, (rect.y2+1)*scale_i], texture: texture},
|
||||
east: {uv:[rect.x2*scale_i, rect.y*scale_i, (rect.x2+1)*scale_i, (rect.y2+1)*scale_i], texture: texture, rotation: 90},
|
||||
west: {uv:[rect.x*scale_i, rect.y*scale_i, (rect.x+1)*scale_i, (rect.y2+1)*scale_i], texture: texture, rotation: 270}
|
||||
west: {uv:[rect.x*scale_i, rect.y*scale_i, (rect.x+1)*scale_i, (rect.y2+1)*scale_i], texture: texture, rotation: 270},
|
||||
}
|
||||
}).init()
|
||||
selected.push(current_cube)
|
||||
cube_nr++;
|
||||
}
|
||||
|
||||
|
||||
ext_x++;
|
||||
}
|
||||
ext_y++;
|
||||
|
@ -1471,7 +1471,7 @@ window.addEventListener("gamepadconnected", function(event) {
|
||||
-gamepad.axes[2],
|
||||
gamepad.axes[1],
|
||||
)
|
||||
offset.multiplyScalar(4);
|
||||
offset.multiplyScalar(3);
|
||||
offset.applyQuaternion(preview.camera.quaternion);
|
||||
|
||||
preview.controls.target.add(offset);
|
||||
@ -1490,6 +1490,8 @@ window.addEventListener("gamepadconnected", function(event) {
|
||||
|
||||
preview.controls.target.copy(camera_diff).add(preview.camera.position);
|
||||
|
||||
main_preview.controls.updateSceneScale();
|
||||
|
||||
}, 16)
|
||||
|
||||
window.addEventListener("gamepadconnected", function(event2) {
|
||||
|
Loading…
Reference in New Issue
Block a user