Forráskód Böngészése

Merge pull request #119 from vbouzon/TypeScriptDefinitions

Update Typescript definitions
deltakosh 11 éve
szülő
commit
0969468c1e

+ 4 - 4
Typescript/Animations/babylon.animation.d.ts

@@ -6,16 +6,16 @@ declare module BABYLON {
         targetProperty: string;
         targetPropertyPath: string[];
         framePerSecond: number;
-        dataType: string;
+        dataType: number;
         loopMode: number;
         _keys: number[];
         _offsetCache: Object;
         _highLimitsCache: Object;
 
-        constructor(name: string, targetProperty: string, framePerSecond: number, dataType: string, loopMode: number);
+        constructor(name: string, targetProperty: string, framePerSecond: number, dataType: number, loopMode: number);
 
         clone(): Animation;
-        setKeys(values: number[]);
+        setKeys(values: any[]);
         _interpolate(currentFrame: number, repeatCount: number, loopMode: number, offsetValue: number, highLimitValue: number);
         animate(target: Object, delay: number, from: number, to: number, loop: boolean, speedRatio: number): boolean;
         
@@ -28,4 +28,4 @@ declare module BABYLON {
         static ANIMATIONLOOPMODE_CYCLE: number;
         static ANIMATIONLOOPMODE_CONSTANT: number;
     }
-}
+}   

+ 1 - 1
Typescript/Materials/textures/babylon.texture.d.ts

@@ -6,7 +6,7 @@ declare module BABYLON {
         url: string
         animations: Animation[];
 
-        constructor(url: string, scene: Scene, noMipmap: boolean, invertY: boolean);
+        constructor(url: string, scene: Scene, noMipmap?: boolean, invertY?: boolean);
 
         static EXPLICIT_MODE: number;
         static SPHERICAL_MODE: number;

+ 1 - 1
Typescript/Mesh/babylon.mesh.d.ts

@@ -14,7 +14,7 @@ declare module BABYLON {
         subMeshes: SubMesh[];
         animations: Animation[];
 
-        constructor(name: string, vertexDeclaration: number[], scene: Scene);
+        constructor(name: string, scene: Scene);
 
         static BILLBOARDMODE_NONE: number;
         static BILLBOARDMODE_X: number;

+ 7 - 7
Typescript/Mesh/babylon.vertexBuffer.d.ts

@@ -10,12 +10,12 @@ declare module BABYLON {
         update(data: any[]): void;
         dispose(): void;
 
-        PositionKind: string;
-        NormalKind: string;
-        UVKind: string;
-        UV2Kind: string;
-        ColorKind: string;
-        MatricesIndicesKind: string;
-        MatricesWeightsKind: string;
+        static PositionKind: string;
+        static NormalKind: string;
+        static UVKind: string;
+        static UV2Kind: string;
+        static ColorKind: string;
+        static MatricesIndicesKind: string;
+        static MatricesWeightsKind: string;
     }
 }

+ 1 - 1
Typescript/Tools/babylon.tools.d.ts

@@ -20,7 +20,7 @@ declare module BABYLON.Tools {
     function _MeasureFps(): void;
 
     class SmartArray {
-        data: Array;
+        data: any[];
         length: number;
 
         constructor(capacity: number);

+ 2 - 2
Typescript/babylon.scene.d.ts

@@ -57,8 +57,8 @@ declare module BABYLON {
         executeWhenReady(func: Function): void;
         getWaitingItemsCount(): number;
 
-        beginAnimation(target: string, from: number, to: number, loop: boolean, speedRatio: number, onAnimationEnd: Function): void;
-        stopAnimation(target: string);
+        beginAnimation(target: Mesh, from: number, to: number, loop: boolean, speedRatio?: number, onAnimationEnd?: Function): void;
+        stopAnimation(target: Mesh);
 
         getViewMatrix(): Matrix;
         getProjectionMatrix(): Matrix;