mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 13:11:33 +00:00
tower world gen
This commit is contained in:
12
Sources/Voxelotl/Generator/WorldGenerator.swift
Normal file
12
Sources/Voxelotl/Generator/WorldGenerator.swift
Normal file
@ -0,0 +1,12 @@
|
||||
protocol WorldGenerator {
|
||||
mutating func reset(seed: UInt64)
|
||||
func makeChunk(id: SIMD3<Int>) -> Chunk
|
||||
}
|
||||
|
||||
internal extension RandomProvider where Output == UInt64, Self: RandomSeedable, SeedType == UInt64 {
|
||||
static func createState(seed value: UInt64) -> (UInt64, UInt64) {
|
||||
var hash = Self(seed: value)
|
||||
let state = (hash.next(), hash.next())
|
||||
return state
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user