Skip to main content
The Deno 2 Release Candidate is here
Learn more
method ContainerHelper.prototype.locateSlot
import { ContainerHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/ContainerHelper.d.ts";

Find a slot inside a container an item can be placed in

Parameters

container2D: number[][]

Container to find space in

containerX: number

Container x size

containerY: number

Container y size

x: number

???

y: number

???

itemW: number

Items width

itemH: number

Items height

Returns

boolean

True - slot found