PerspectiveProjection.fromDepth(num depth, num scale)

Creates a perspective projection with custom depth and scale values.

The depth defines the distance to the farthest display object after the 3D transformation. The scale defines the distortion of the 3D objects caused by an imaginary lense.

The values used by the default constructor are 10000 and 10.

Source

PerspectiveProjection.fromDepth(num depth, num scale) {
  perspectiveMatrix3D.setIdentity();
  perspectiveMatrix3D.data[10] = 1.0 / depth;
  perspectiveMatrix3D.data[14] = scale / depth;
}