Initial cost map with visualisation
This commit is contained in:
parent
d00a867f5f
commit
e824d238db
@ -26,6 +26,7 @@
|
|||||||
<script src="view/products.js"></script>
|
<script src="view/products.js"></script>
|
||||||
<script src="logic/knowledge.js"></script>
|
<script src="logic/knowledge.js"></script>
|
||||||
<script src="logic/shop.js"></script>
|
<script src="logic/shop.js"></script>
|
||||||
|
<script src="logic/costMap.js"></script>
|
||||||
|
|
||||||
<!-- Main script file -->
|
<!-- Main script file -->
|
||||||
<script src="main.js"></script>
|
<script src="main.js"></script>
|
||||||
@ -53,8 +54,9 @@
|
|||||||
<div class="boards">
|
<div class="boards">
|
||||||
<canvas id="canvas-floor"></canvas>
|
<canvas id="canvas-floor"></canvas>
|
||||||
<canvas id="canvas-grid"></canvas>
|
<canvas id="canvas-grid"></canvas>
|
||||||
<canvas id="canvas-agent"></canvas>
|
|
||||||
<canvas id="canvas-products"></canvas>
|
<canvas id="canvas-products"></canvas>
|
||||||
|
<canvas id="canvas-costmap"></canvas>
|
||||||
|
<canvas id="canvas-agent"></canvas>
|
||||||
<div id="products">
|
<div id="products">
|
||||||
<!-- p[nr_kolumny]_[nr_wiersza] -->
|
<!-- p[nr_kolumny]_[nr_wiersza] -->
|
||||||
<div id="p0_0"><i class="fas fa-apple-alt"></i></div>
|
<div id="p0_0"><i class="fas fa-apple-alt"></i></div>
|
||||||
|
@ -3,11 +3,15 @@ window.addEventListener('DOMContentLoaded', () => document.fonts.ready.then(() =
|
|||||||
const gridCanvas = document.getElementById('canvas-grid');
|
const gridCanvas = document.getElementById('canvas-grid');
|
||||||
const agentCanvas = document.getElementById('canvas-agent');
|
const agentCanvas = document.getElementById('canvas-agent');
|
||||||
const productsCanvas = document.getElementById('canvas-products');
|
const productsCanvas = document.getElementById('canvas-products');
|
||||||
|
const costCanvas = document.getElementById('canvas-costmap');
|
||||||
|
|
||||||
const floor = new Floor(floorCanvas);
|
const floor = new Floor(floorCanvas);
|
||||||
const grid = new Grid(gridCanvas);
|
const grid = new Grid(gridCanvas);
|
||||||
const agent = new Agent(agentCanvas);
|
const agent = new Agent(agentCanvas);
|
||||||
const products = new Products(productsCanvas);
|
const products = new Products(productsCanvas);
|
||||||
|
const costMap = new CostMap();
|
||||||
|
const costMapVisualisation = new CostMapVisualisation(costCanvas);
|
||||||
|
|
||||||
|
|
||||||
const fpsElement = document.getElementById('fps');
|
const fpsElement = document.getElementById('fps');
|
||||||
if (window.location.hash == '#debug') {
|
if (window.location.hash == '#debug') {
|
||||||
|
Loading…
Reference in New Issue
Block a user