Fix #1388 Dummy item model displayed incorrectly

Expose templates in skin format
Fix #1225 Area select keybind not working correctly
This commit is contained in:
JannisX11 2022-04-28 21:41:47 +02:00
parent cb5b3226b9
commit 262b261558
4 changed files with 6 additions and 4 deletions

View File

@ -415,7 +415,7 @@ var codec = new Codec('java_block', {
) {
let texture_mesh = new TextureMesh({
name: model.textures.layer0,
rotation: [-90, 180, 0],
rotation: [90, 180, 0],
local_pivot: [0, -7.5, -16],
locked: true,
export: false

View File

@ -170,6 +170,7 @@ format.new = function() {
skin_dialog.show();
return true;
}
format.presets = skin_presets;
function generateTemplate(width = 64, height = 64, cubes, name = 'name', eyes, layer_template) {

View File

@ -747,9 +747,10 @@ class Preview {
}, 420)
Transformer.dispatchPointerHover(event);
}
if (Transformer.hoverAxis !== null || (!Keybinds.extra.preview_select.keybind.isTriggered(event) && event.which !== 0)) return;
if (Transformer.hoverAxis !== null) return;
let is_canvas_click = Keybinds.extra.preview_select.keybind.isTriggered(event) || event.which === 0;
var data = this.raycast(event);
var data = is_canvas_click && this.raycast(event);
if (data) {
this.selection.click_target = data;

View File

@ -924,7 +924,7 @@ function rotateOnAxis(modify, axis, slider) {
} else if (slider || (space == 2 && Format.rotation_limit)) {
var obj_val = modify(obj.rotation[axis]);
obj_val = Math.trimDeg(obj_val)
if (Format.rotation_limit) {
if (Format.rotation_limit && obj instanceof Cube) {
//Limit To 1 Axis
obj.rotation[(axis+1)%3] = 0
obj.rotation[(axis+2)%3] = 0