Browse Source

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

David Pritchard 5 years ago
parent
commit
d26df2d5b6
2 changed files with 7 additions and 0 deletions
  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;