* @function Util.createCanvasContext2D * @description 创建 2D 画布。 * @param {number} opt_width - 画布宽度。 * @param {number} opt_height - 画布高度。 * @private
(opt_width, opt_height)
| 277 | * @private |
| 278 | */ |
| 279 | createCanvasContext2D(opt_width, opt_height) { |
| 280 | const canvas = document.createElement('CANVAS'); |
| 281 | if (opt_width) { |
| 282 | canvas.width = opt_width; |
| 283 | } |
| 284 | if (opt_height) { |
| 285 | canvas.height = opt_height; |
| 286 | } |
| 287 | return canvas.getContext('2d'); |
| 288 | }, |
| 289 | /** |
| 290 | * @function Util.supportWebGL2 |
| 291 | * @description 是否支持 webgl2。 |
nothing calls this directly
no test coverage detected