Skip to content

Commit

Permalink
fix: blending
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Oct 30, 2024
1 parent cfa8890 commit 41ea7be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/world-edit/utils/blending.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ export function skipForBlending(
) {
if (blending === -1) return dontBlend

const vectorId = Vector.string(vector)
if (blendStorage.has(vectorId)) return true

const distance = ~~Vector.distance(vector, center)

if (blending === 0) {
Expand All @@ -21,6 +18,9 @@ export function skipForBlending(
} else {
// Blending
if (blending < radius) {
const vectorId = Vector.string(vector)
if (blendStorage.has(vectorId)) return true

const blendingFactor = 1 + factor * 0.01
if (Math.randomInt(radius - blending, radius) < distance * blendingFactor) {
blendStorage.add(vectorId)
Expand Down

0 comments on commit 41ea7be

Please sign in to comment.