14 lines
396 B
JavaScript
14 lines
396 B
JavaScript
import Terrain from "./Terrain.js";
|
|
import FileLoader from "../../js/FileLoader.js";
|
|
|
|
let image = new Image();
|
|
image.src = '../graphics/tileset-landscape01.jpg';
|
|
image.onload = function () {
|
|
console.log('Loaded');
|
|
|
|
let loader = new FileLoader('../levels/level.json');
|
|
let terrain = Terrain.createFromJson(loader.getContent());
|
|
|
|
document.body.appendChild(terrain.getElement());
|
|
};
|