ViewHelper2 constructor

ViewHelper2({
  1. required Camera camera,
  2. required GlobalKey<PeripheralsState> listenableKey,
  3. required Size screenSize,
  4. Vector2? offset,
  5. OffsetType offsetType = OffsetType.bottomLeft,
})

Implementation

ViewHelper2({
  required this.camera,
  required this.listenableKey,
  required this.screenSize,
  Vector2? offset,
  this.offsetType = OffsetType.bottomLeft,
}):super(){
  _offset = offset ?? Vector2();
  _calculatePosition();
  orthoCamera.position.setValues( 0, 0, 2 );
  createBox();
  _activate();
  addLight();
}