Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions docs/api/en/loaders/AnimationLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Loader] &rarr;

<h1>[name]</h1>

<p class="desc">
Expand Down Expand Up @@ -53,13 +55,10 @@ <h3>[name]( [param:LoadingManager manager] )</h3>
</p>

<h2>Properties</h2>

<h3>[property:LoadingManager manager]</h3>
<p>
The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
</p>
<p>See the base [page:Loader] class for common properties.</p>

<h2>Methods</h2>
<p>See the base [page:Loader] class for common methods.</p>

<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<p>
Expand All @@ -80,14 +79,6 @@ <h3>[method:Array parse]( [param:JSON json] )</h3>
be parsed with [page:AnimationClip.parse].
</p>

<h3>[method:AnimationLoader setPath]( [param:String path] )</h3>
<p>
[page:String path] — Base path of the file to load.<br /><br />

Sets the base path or URL from which to load files. This can be useful if
you are loading many animations from the same directory.
</p>

<h2>Source</h2>

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
Expand Down
9 changes: 4 additions & 5 deletions docs/api/zh/loaders/AnimationLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Loader] &rarr;

<h1>[name]</h1>

<p class="desc">
Expand Down Expand Up @@ -53,13 +55,10 @@ <h3>[name]( [param:LoadingManager manager] )</h3>
</p>

<h2>属性</h2>

<h3>[property:LoadingManager manager]</h3>
<p>
加载器正在使用的[page:LoadingManager loadingManager]。默认为[page:DefaultLoadingManager].
</p>
<p>See the base [page:Loader] class for common properties.</p>

<h2>方法</h2>
<p>See the base [page:Loader] class for common methods.</p>

<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<p>
Expand Down
6 changes: 2 additions & 4 deletions src/loaders/AnimationLoader.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { LoadingManager } from './LoadingManager';
import { Loader } from './Loader';
import { AnimationClip } from './../animation/AnimationClip';

export class AnimationLoader {
export class AnimationLoader extends Loader {

constructor( manager?: LoadingManager );

manager: LoadingManager;

load(
url: string,
onLoad?: ( response: string | ArrayBuffer ) => void,
onProgress?: ( request: ProgressEvent ) => void,
onError?: ( event: ErrorEvent ) => void
): any;
parse( json: any ): AnimationClip[];
setPath( path: string ): AnimationLoader;

}
13 changes: 3 additions & 10 deletions src/loaders/AnimationLoader.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { AnimationClip } from '../animation/AnimationClip.js';
import { FileLoader } from './FileLoader.js';
import { DefaultLoadingManager } from './LoadingManager.js';
import { Loader } from './Loader.js';

/**
* @author bhouston / http://clara.io/
*/

function AnimationLoader( manager ) {

this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;
Loader.call( this, manager );

}

Object.assign( AnimationLoader.prototype, {
AnimationLoader.prototype = Object.assign( Object.create( Loader.prototype ), {

load: function ( url, onLoad, onProgress, onError ) {

Expand Down Expand Up @@ -42,13 +42,6 @@ Object.assign( AnimationLoader.prototype, {

return animations;

},

setPath: function ( value ) {

this.path = value;
return this;

}

} );
Expand Down