All files / core sigma.renderers.def.js

66.67% Statements 2/3
40% Branches 2/5
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12      4x     4x          
import isWebGLAvailable from "./domain/utils/webgl/isAvailable";
 
export default function configure(sigma, global = window) {
  Iif (typeof sigma === "undefined") throw new Error("sigma is not declared");
 
  // Copy the good renderer:
  sigma.register(
    "sigma.renderers.def",
    isWebGLAvailable(global) ? sigma.renderers.webgl : sigma.renderers.canvas
  );
}