Keep order of autotiles
This commit is contained in:
parent
43a1876ae9
commit
4400e24575
@ -39,7 +39,13 @@ loader.prototype.load = function (callback) {
|
||||
core.loader.loadImages(images, core.material.images.images, function () {
|
||||
// 加载autotile
|
||||
core.material.images.autotile = {};
|
||||
core.loader.loadImages(Object.keys(core.material.icons.autotile), core.material.images.autotile, function () {
|
||||
var keys = Object.keys(core.material.icons.autotile);
|
||||
var autotiles = {};
|
||||
core.loader.loadImages(keys, autotiles, function () {
|
||||
|
||||
keys.forEach(function (v) {
|
||||
core.material.images.autotile[v] = autotiles[v];
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
core.maps.makeAutotileEdges();
|
||||
|
||||
@ -688,6 +688,10 @@ maps.prototype.makeAutotileEdges = function () {
|
||||
|
||||
var canvas = document.createElement("canvas"), ctx = canvas.getContext('2d');
|
||||
canvas.width = canvas.height = 32;
|
||||
ctx.mozImageSmoothingEnabled = false;
|
||||
ctx.webkitImageSmoothingEnabled = false;
|
||||
ctx.msImageSmoothingEnabled = false;
|
||||
ctx.imageSmoothingEnabled = false;
|
||||
|
||||
autotileIds.forEach(function (t) {
|
||||
var n = core.maps.getNumberById(t);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user