소스 검색

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;