Phaser API Documentation

<protected> preUpdate(time, delta)


The Mesh update loop. The following takes place in this method:

First, the totalRendered and totalFrame properties are set.

If the view matrix of this Mesh isn't dirty, and the model position, rotate or scale properties are all clean, then the method returns at this point.

Otherwise, if the viewPosition is dirty (i.e. from calling a method like panZ), then it will refresh the viewMatrix.

After this, a new transformMatrix is built and it then iterates through all Faces in this Mesh, calling transformCoordinatesLocal on all of them. Internally, this updates every vertex, calculating its new transformed position, based on the new transform matrix.

Finally, the faces are depth sorted.


name type description
time number

The current timestamp.

delta number

The delta time, in ms, elapsed since the last frame.

Since: 3.50.0