feat: boulders
This commit is contained in:
parent
9aa0ec6a3f
commit
680e08aadc
7 changed files with 169 additions and 11 deletions
|
|
@ -142,6 +142,15 @@ const needle: Shade = (x, y) => {
|
|||
return [40 + n * 0.4 + clump * 0.3, 84 + n + streak + clump, 58 + n * 0.5 + clump * 0.4, 255]
|
||||
}
|
||||
|
||||
// Boulder rock: cool grey, mottled patches, the odd dark crack.
|
||||
const rock: Shade = (x, y) => {
|
||||
const n = noise(x, y) * 20
|
||||
const patch = noise(Math.floor(x / 7), Math.floor(y / 7)) * 16
|
||||
const crack = noise(Math.floor(x / 5) + 3, Math.floor(y / 9)) < -0.5 ? -28 : 0
|
||||
const g = 118 + n + patch + crack
|
||||
return [g, g + 3, g + 8, 255]
|
||||
}
|
||||
|
||||
const wall: Shade = (x, y) => {
|
||||
const row = Math.floor(y / 16)
|
||||
const bx = (x + (row % 2) * 16) % 32
|
||||
|
|
@ -199,6 +208,7 @@ const assets: Array<[string, number, number, Shade]> = [
|
|||
["bark", 64, 64, bark],
|
||||
["leaf", 64, 64, leaf],
|
||||
["needle", 64, 64, needle],
|
||||
["rock", 64, 64, rock],
|
||||
["wall", 64, 64, wall],
|
||||
["crate", 64, 64, crate],
|
||||
["npc", 48, 64, npc],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue