mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-30 15:42:42 +08:00
Fix API stuff
This commit is contained in:
parent
fde215f6db
commit
6eb5160b8e
@ -56,13 +56,13 @@ class ResizeLine {
|
||||
if (data.top !== undefined) {
|
||||
jq.css('top', data.top+'px')
|
||||
}
|
||||
if (data.bottom !== undefined && (!data.horizontal || data.top === undefined)) {
|
||||
if (data.bottom !== undefined && (!this.horizontal || data.top === undefined)) {
|
||||
jq.css('bottom', data.bottom+'px')
|
||||
}
|
||||
if (data.left !== undefined) {
|
||||
jq.css('left', data.left+'px')
|
||||
}
|
||||
if (data.right !== undefined && (data.horizontal || data.left === undefined)) {
|
||||
if (data.right !== undefined && (this.horizontal || data.left === undefined)) {
|
||||
jq.css('right', data.right+'px')
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ Object.defineProperty(window, 'selected', {
|
||||
}
|
||||
});
|
||||
//Colors
|
||||
var markerColors = [
|
||||
const markerColors = [
|
||||
{pastel: "#A2EBFF", standard: "#58C0FF", id: 'light_blue'},
|
||||
{pastel: "#FFF899", standard: "#F4D714", id: 'yellow'},
|
||||
{pastel: "#F1BB75", standard: "#EC9218", id: 'orange'},
|
||||
|
@ -42,6 +42,10 @@ class PreviewScene {
|
||||
Canvas.global_light_side = 0;
|
||||
Canvas.updateShading();
|
||||
}
|
||||
delete() {
|
||||
delete PreviewScene.scenes[this.id];
|
||||
delete PreviewScene.select_options[this.id];
|
||||
}
|
||||
}
|
||||
PreviewScene.scenes = {};
|
||||
PreviewScene.active = null;
|
||||
@ -52,6 +56,7 @@ PreviewScene.select_options = {
|
||||
class PreviewModel {
|
||||
constructor(id, data) {
|
||||
PreviewModel.models[id] = this;
|
||||
this.id = id;
|
||||
this.condition = data.condition;
|
||||
this.model_3d = new THREE.Object3D();
|
||||
this.onUpdate = data.onUpdate;
|
||||
@ -164,6 +169,9 @@ class PreviewModel {
|
||||
})
|
||||
return this;
|
||||
}
|
||||
delete() {
|
||||
delete PreviewModel.models[id];
|
||||
}
|
||||
}
|
||||
PreviewModel.models = {};
|
||||
PreviewModel.getActiveModels = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user