diff --git a/threejs/tests/webgl/webgl_animation_skinning_morph.ts b/threejs/tests/webgl/webgl_animation_skinning_morph.ts index ab588fad3..207a83bb2 100644 --- a/threejs/tests/webgl/webgl_animation_skinning_morph.ts +++ b/threejs/tests/webgl/webgl_animation_skinning_morph.ts @@ -6,7 +6,7 @@ () => { // ------- variable definitions that does not exist in the original code. These are for typescript. var material: THREE.SpriteMaterial; - var geometry: THREE.JSonLoaderResultGeometry; + var geometry: THREE.Geometry; var dat:any; // ------- diff --git a/threejs/three.d.ts b/threejs/three.d.ts index 67b8efd43..22c419dbd 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -923,6 +923,10 @@ declare module THREE { */ dispose(): void; + //These properties does not exist in a normal Geometry class, but if you use the instance that was passed by JSONLoader, it will be added. + bones: Bone[]; + animation: AnimationData; + animations: AnimationData[]; // EventDispatcher mixins addEventListener(type: string, listener: (event: any) => void ): void; @@ -1778,17 +1782,13 @@ declare module THREE { * @param callback. This function will be called with the loaded model as an instance of geometry when the load is completed. * @param texturePath If not specified, textures will be assumed to be in the same folder as the Javascript model file. */ - load(url: string, callback: (geometry: JSonLoaderResultGeometry, materials: Material[]) => void , texturePath?: string): void; + load(url: string, callback: (geometry: Geometry, materials: Material[]) => void , texturePath?: string): void; loadAjaxJSON(context: JSONLoader, url: string, callback: (geometry: Geometry, materials: Material[]) => void , texturePath?: string, callbackProgress?: (progress: Progress) => void ): void; parse(json: any, texturePath?: string): { geometry: Geometry; materials?: Material[] }; } - export interface JSonLoaderResultGeometry extends Geometry { - animation: AnimationData; - } - /** * Handles and keeps track of loaded and pending data. */ @@ -5018,7 +5018,7 @@ declare module THREE { animations: any[]; - init(data: Animation): void; + init(data: AnimationData): void; parse(root: Mesh): Object3D[]; play(animation: Animation): void; stop(animation: Animation): void;