我正在用http://canvasengine.net/做一个网络游戏。
我正在尝试从我用http://www.mapeditor.org/软件创建的JSON文件生成等轴测图。
引擎和软件是兼容的。
因此,我有一个如下的json文件:
{ "height":5,
"layers":[
{
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
"height":5,
"name":"Calque de Tile 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"orientation":"isometric",
"properties":
{
},
"tileheight":41,
"tilesets":[
{
"firstgid":1,
"image":"..\/..\/..\/wamp\/www\/Symfony\/src\/Dontdie\/MapBundle\/Resources\/public\/images\/herbe.png",
"imageheight":41,
"imagewidth":82,
"margin":0,
"name":"herbe",
"properties":
{
},
"spacing":0,
"tileheight":41,
"tilewidth":82
}],
"tilewidth":82,
"version":1,
"width":5
}之后,我用canvasengine在Js中包含了这个文件:
var url = "{{ asset('bundles/dontdiemap_temp/images/map.json') }}";
var canvas = CE.defines("canvas_id").
extend(Tiled).
ready(function() {
canvas.Scene.call("MyScene");
});
canvas.Scene.new({
name: "MyScene",
materials: {
images: {
herbe: "{{ asset('bundles/dontdiemap_temp/images/herbe.png') }}"
}
},
ready: function(stage) {
var el = this.createElement();
var tiled = canvas.Tiled.new();
tiled.load(this, el, url);
tiled.ready(function() {
var tile_w = this.getTileWidth(),
tile_h = this.getTileHeight(),
layer_object = this.getLayerObject();
stage.append(el);
});
}
});现在,我有个问题。锁定为此屏幕:

在等轴测中,瓦片不会按其应有的方式堆叠,但就像2d法线贴图一样。
你有什么想法吗??谢谢!
发布于 2013-07-10 22:58:36
这就是你的答案: Tiled.js扩展https://github.com/RSamaium/CanvasEngine/issues/14不支持等轴测贴图。你必须从头开始翻译:(
https://stackoverflow.com/questions/16401835
复制相似问题