Skip to content

@emile/engine


@emile/engine / rendering/sprite-creators/simpleCullingFunction / createSimpleCullingFunction

Function: createSimpleCullingFunction() ​

createSimpleCullingFunction(engine): (entity, container) => boolean

Defined in: src/rendering/sprite-creators/simpleCullingFunction.ts:13

Creates a simple culling function that culls entities based on their distance from the camera's center.

Parameters ​

engine ​

Engine

The engine of the sprite creator using the culling function.

Returns ​

Function

A function that returns true if the entity should be culled, false otherwise.

Parameters ​

entity ​

string

container ​

Container<ContainerChild>

Returns ​

boolean