Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-85 committed Jul 11, 2024
1 parent 77cf82c commit ebccba3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/procgen/PatchBaseCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export class PatchBaseCache extends PatchCache {
return [...this.spawnedEntities, ...this.extEntities]
}

static async updateCache(center: Vector3, cacheSync = cacheSyncProvider, asyncMode = false) {
static async updateCache(
center: Vector3,
cacheSync = cacheSyncProvider,
asyncMode = false,
) {
const { patchSize } = PatchCache
const { cacheRadius } = PatchBaseCache
const cacheSize = patchSize * cacheRadius
Expand Down
8 changes: 4 additions & 4 deletions src/procgen/PatchBatchProcessing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class PatchBatchProcessing {
let elapsedTime = Date.now()
const { inputPatches } = this
for (const patch of inputPatches.regular) {
asyncMode && await new Promise(resolve => setTimeout(resolve, 0))
asyncMode && (await new Promise(resolve => setTimeout(resolve, 0)))
const patchBlocks = patch.genGroundBlocks()
patchBlocks.initialPatchRef = patch
// patch.genEntitiesBlocks(patchBlocks, patch.spawnedEntities)
Expand Down Expand Up @@ -78,7 +78,7 @@ export class PatchBatchProcessing {
})
let count = 0
for (const patch of inputPatches.transition) {
asyncMode && await new Promise(resolve => setTimeout(resolve, 0))
asyncMode && (await new Promise(resolve => setTimeout(resolve, 0)))
const patchBlocks = patch.genGroundBlocks()
patchBlocks.initialPatchRef = patch
// patch.genEntitiesBlocks(patchBlocks, patch.spawnedEntities)
Expand All @@ -99,8 +99,8 @@ export class PatchBatchProcessing {
finaliseBatch() {
let elapsedTime = Date.now()
// finalize patches skipping already
this.outputPatches.map(patch =>
patch.initialPatchRef?.genEntitiesBlocks(patch),
this.outputPatches.map(
patch => patch.initialPatchRef?.genEntitiesBlocks(patch),
)
elapsedTime = Date.now() - elapsedTime
// console.log(`finalising batch took ${elapsedTime}ms for ${count} items`)
Expand Down

0 comments on commit ebccba3

Please sign in to comment.