setPosition method

Future setPosition(
  1. double x,
  2. double y,
  3. double z
)

Implementation

Future setPosition(double x, double y, double z) async {
  await _check();
  x = x.clamp(-1.0, 1.0);
  y = y.clamp(-1.0, 1.0);
  z = z.clamp(-1.0, 1.0);
  super.value = super.value.copyWith(x: x, y: y, z: z);
  await _controller?.evaluateJavascript('set_panner('
      '${x * 5.5 + 30}, '
      '${y * 5.5 + 30}, '
      '${z * 5.5 + 300}'
      ');');
}