Phaser API Documentation

  Version: 
shouldFlush([amount])

Description:

Check if the current batch of vertices is full.

You can optionally provide an amount parameter. If given, it will check if the batch needs to flush if the amount is added to it. This allows you to test if you should flush before populating the batch.

Parameters:

name type arguments description
amount number <optional>

Will the batch need to flush if this many vertices are added to it?

Returns:
Description:

true if the current batch should be flushed, otherwise false.

Type:
  • boolean
Examples:
Since: 3.0.0