SelectionHelper constructor

SelectionHelper(
  1. GlobalKey<PeripheralsState> listenableKey,
  2. Camera camera, [
  3. SelectionHelperOptions? options
])

Implementation

SelectionHelper(this.listenableKey, this.camera, [SelectionHelperOptions? options]) {
    this.options = options ?? SelectionHelperOptions();
	_domElement.addEventListener( PeripheralType.pointerdown, onPointerDown );
	_domElement.addEventListener( PeripheralType.pointermove, onPointerMove );
	_domElement.addEventListener( PeripheralType.pointerup, onPointerUp );

    selectionBox = Mesh(
      PlaneGeometry(),
      MeshStandardMaterial.fromMap({
        'color': this.options.color,
        'transparent': true,
        'opacity': this.options.opacity,
        'side': DoubleSide
      })
    )..name = 'selector';
}