setViewOffset method

dynamic setViewOffset(
  1. dynamic fullWidth,
  2. dynamic fullHeight,
  3. dynamic x,
  4. dynamic y,
  5. dynamic width,
  6. dynamic height,
)

Implementation

setViewOffset(fullWidth, fullHeight, x, y, width, height) {
  view ??= {
    "enabled": true,
    "fullWidth": 1,
    "fullHeight": 1,
    "offsetX": 0,
    "offsetY": 0,
    "width": 1,
    "height": 1
  };

  view!["enabled"] = true;
  view!["fullWidth"] = fullWidth;
  view!["fullHeight"] = fullHeight;
  view!["offsetX"] = x;
  view!["offsetY"] = y;
  view!["width"] = width;
  view!["height"] = height;

  updateProjectionMatrix();
}