when i check the function 'PIXI.utils.isWebGLSupported', i found the code below
var t = { stencil: !0, failIfMajorPerformanceCaveat: !0 }; try { if (!window.WebGLRenderingContext) return !1; var e = document.createElement("canvas"), n = e.getContext("webgl", t) || e.getContext("experimental-webgl", t), i = !(!n || !n.getContextAttributes().stencil); if (n) { var r = n.getExtension("WEBGL_lose_context"); r && r.loseContext() } return n = null, i } catch (o) { return !1 }
but i didn't found anywhere call this function 'PIXI.utils.isWebGLSupported'
so, how does pixi.js judge which mode to use, 'canvas' or 'webgl' ?
can you help me? thanks!!
thsi is my device params
when i check the function 'PIXI.utils.isWebGLSupported', i found the code below
var t = { stencil: !0, failIfMajorPerformanceCaveat: !0 }; try { if (!window.WebGLRenderingContext) return !1; var e = document.createElement("canvas"), n = e.getContext("webgl", t) || e.getContext("experimental-webgl", t), i = !(!n || !n.getContextAttributes().stencil); if (n) { var r = n.getExtension("WEBGL_lose_context"); r && r.loseContext() } return n = null, i } catch (o) { return !1 }
but i didn't found anywhere call this function 'PIXI.utils.isWebGLSupported' so, how does pixi.js judge which mode to use, 'canvas' or 'webgl' ? can you help me? thanks!!