updateMatrixWorld method

  1. @override
void updateMatrixWorld([
  1. bool force = false
])
override

Implementation

@override
updateMatrixWorld([bool force = false]) {
  var scale = -plane!.constant;

  if (Math.abs(scale) < 1e-8) scale = 1e-8; // sign does not matter

  this.scale.set(0.5 * size, 0.5 * size, scale);

  children[0].material.side = (scale < 0)
      ? BackSide
      : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here

  lookAt(plane!.normal);

  super.updateMatrixWorld(force);
}