WebGLRenderer constructor

WebGLRenderer(
  1. Map<String, dynamic>? parameters
)

Implementation

WebGLRenderer(Map<String, dynamic>? parameters) {
  this.parameters = parameters ?? <String, dynamic>{};

  _width = this.parameters["width"].toDouble();
  _height = this.parameters["height"].toDouble();

  depth = this.parameters["depth"] ?? true;
  stencil = this.parameters["stencil"] ?? true;
  _antialias = this.parameters["antialias"] ?? false;
  premultipliedAlpha = this.parameters["premultipliedAlpha"] ?? true;
  preserveDrawingBuffer = this.parameters["preserveDrawingBuffer"] ?? false;
  powerPreference = this.parameters["powerPreference"] ?? "default";

  failIfMajorPerformanceCaveat = this.parameters["failIfMajorPerformanceCaveat"] ?? false;

  alpha = this.parameters["alpha"] ?? false;

  _viewport = Vector4(0, 0, width, height);
  _scissor = Vector4(0, 0, width, height);

  _gl = this.parameters["gl"];

  initGLContext();
}