Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceat committed Dec 22, 2023
1 parent f79bd89 commit cd3517b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/world_gen/noise.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { createNoise2D } from 'simplex-noise'
import alea from 'alea'

import biomes from './biomes'

const memoized = new Map()
import biomes from './biomes.js'

export function create_fractionnal_brownian(biome, seed) {
const { scale, height, octaves, persistence, lacunarity, exponentiation } =
Expand All @@ -14,10 +12,6 @@ export function create_fractionnal_brownian(biome, seed) {
const noise_pass_3 = createNoise2D(alea(`${seed}_3`))

return (x, y) => {
// const key = `${x}:${y}:${JSON.stringify(biome)}:${seed}`

// if (memoized.has(key)) return memoized.get(key)

const xs = x / scale
const ys = y / scale
let total = 0
Expand All @@ -43,8 +37,6 @@ export function create_fractionnal_brownian(biome, seed) {
total *= height
total = Math.floor(total)

// memoized.set(key, total)

return total
}
}

0 comments on commit cd3517b

Please sign in to comment.