-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
beaad40
commit dc9f390
Showing
3 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import "./style.css"; | ||
import { UI } from "@peasy-lib/peasy-ui"; | ||
import { Engine, DisplayMode, TileMap, Rectangle, Color, Vector } from "excalibur"; | ||
import { Engine, DisplayMode, TileMap, Vector } from "excalibur"; | ||
import { bluey, model, template, whitey } from "./ui"; | ||
//@ts-expect-error | ||
Check failure on line 5 in src/main.ts GitHub Actions / lint
Check failure on line 5 in src/main.ts GitHub Actions / lint / lint
|
||
import { PerlinGenerator } from "@excaliburjs/plugin-perlin"; | ||
|
||
export let generator: PerlinGenerator; | ||
|
@@ -33,7 +34,7 @@ export function drawTilemap() { | |
//loop through tiles in tmap and grab noise value | ||
game.remove(game.currentScene.tileMaps[0]); | ||
let tileIndex = 0; | ||
for (let tile of tmap.tiles) { | ||
for (const tile of tmap.tiles) { | ||
const noise = generator.noise(tile.x / tmap.columns, tile.y / tmap.rows); | ||
if (noise > 0.5) { | ||
model.tiles[tileIndex] = 1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters