瀏覽代碼

Added missing methods/members: Vector2.cross and WebGLCapabilities.isWebGL2

David Pritchard 5 年之前
父節點
當前提交
d26df2d5b6
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 6 0
      src/math/Vector2.d.ts
  2. 1 0
      src/renderers/webgl/WebGLCapabilities.d.ts

+ 6 - 0
src/math/Vector2.d.ts

@@ -305,6 +305,12 @@ export class Vector2 implements Vector {
    */
   dot(v: Vector2): number;
 
+  /**
+   * Calculates the cross product of this vector and v. Note that a 'cross-product' in 2D is not well-defined. This function
+   * computes a geometric cross-product often used in 2D graphics
+   */
+  cross(v: Vector2): number;
+
   /**
    * Computes squared length of this vector.
    */

+ 1 - 0
src/renderers/webgl/WebGLCapabilities.d.ts

@@ -23,6 +23,7 @@ export class WebGLCapabilities {
   vertexTextures: any;
   floatFragmentTextures: any;
   floatVertexTextures: any;
+  isWebGL2: boolean;
 
   getMaxAnisotropy(): number;
   getMaxPrecision(precision: string): string;