新增renderableComponent 用于控制可渲染组件的基类 不要在transform当中直接更改目标属性

This commit is contained in:
yhh
2020-06-10 16:25:39 +08:00
parent 94818d5784
commit f62f449d99
12 changed files with 125 additions and 114 deletions

View File

@@ -1,6 +1,9 @@
class WebGLUtils {
public static getWebGL(): WebGLRenderingContext{
return document.querySelector("canvas").getContext("webgl");
if (egret.WebGLUtils.checkCanUseWebGL())
return document.querySelector("canvas").getContext("webgl");
throw new Error("cannot get webgl");
}
public static drawUserIndexPrimitives<T>(primitiveType: number, vertexData: T[], vertexOffset: number, numVertices: number, indexData: number[], indexOffset: number, primitiveCount: number){