qqq
This commit is contained in:
parent
acf93ec6df
commit
ee22e1a929
49 changed files with 1380 additions and 338 deletions
|
|
@ -136,7 +136,7 @@ const RESET_PRESETS = Object.freeze({
|
|||
function presetItemFootprintRadius(worldRef, item) {
|
||||
const radius = globalThis.TarinaiCollisionFootprints?.itemFootprintRadius?.(worldRef, item);
|
||||
if (Number.isFinite(Number(radius))) {
|
||||
if (item?.type === "ball") return Math.max(34, Number(radius) * 1.35);
|
||||
if (item?.type === "ball" || item?.type === "balloon") return Math.max(34, Number(radius) * 1.35);
|
||||
return Math.max(14, Number(radius));
|
||||
}
|
||||
return Math.max(14, Number(item?.r || 16) || 16);
|
||||
|
|
@ -177,7 +177,7 @@ const RESET_PRESETS = Object.freeze({
|
|||
function findPresetItemSpot(worldRef, item, opts = {}) {
|
||||
const allowOriginal = opts.allowOriginal !== false;
|
||||
if (allowOriginal && !presetItemPlacementBlocked(worldRef, item, opts)) return { x: item.x, y: item.y };
|
||||
const solid = Boolean(worldRef?.isFenceType?.(item.type) || item.type === "rotator" || item.type === "reciprocator" || item.type === "nest_box");
|
||||
const solid = Boolean(worldRef?.isFenceType?.(item.type) || item.type === "rotator" || item.type === "reciprocator" || item.type === "nest_box" || item.type === "pipe");
|
||||
const count = Math.max(12, Number(opts.attempts || 0) || (solid ? 96 : 58));
|
||||
const maxRadius = Math.max(70, Number(opts.maxRadius || 0) || (solid ? 220 : 170));
|
||||
const golden = Math.PI * (3 - Math.sqrt(5));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue