Skip to content

Commit 7ec8b02

Browse files
author
zhangpeng26
committed
translate
1 parent bf10f07 commit 7ec8b02

19 files changed

+503
-520
lines changed

docs/api/zh/loaders/AnimationLoader.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,77 +11,77 @@
1111
<h1>[name]</h1>
1212

1313
<p class="desc">
14-
Class for loading [page:AnimationClip AnimationClips] in JSON format.
15-
This uses the [page:FileLoader] internally for loading files.
14+
以JSON格式来加载 [page:AnimationClip AnimationClips] 的一个类。
15+
内部使用 [page:FileLoader] 来加载文件。
1616
</p>
1717

18-
<h2>Example</h2>
18+
<h2>例子</h2>
1919

2020
<code>
21-
// instantiate a loader
21+
// 初始化一个加载器
2222
var loader = new THREE.AnimationLoader();
2323

24-
// load a resource
24+
// 加载资源
2525
loader.load(
26-
// resource URL
26+
// 资源URL
2727
'animations/animation.js',
2828

29-
// onLoad callback
29+
// onLoad回调
3030
function ( animations ) {
31-
// animations is an array of AnimationClips
31+
// animations时一个AnimationClips组数
3232
},
3333

34-
// onProgress callback
34+
// onProgress回调
3535
function ( xhr ) {
3636
console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
3737
},
3838

39-
// onError callback
39+
// onError回调
4040
function ( err ) {
4141
console.log( 'An error happened' );
4242
}
4343
);
4444
</code>
4545

46-
<h2>Constructor</h2>
46+
<h2>构造函数</h2>
4747

4848
<h3>[name]( [param:LoadingManager manager] )</h3>
4949
<p>
50-
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
50+
[page:LoadingManager manager] — 加载器所使用的[page:LoadingManager loadingManager]。 默认为[page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
5151

52-
Creates a new [name].
52+
创建一个新的[name].
5353
</p>
5454

55-
<h2>Properties</h2>
55+
<h2>属性</h2>
5656

5757
<h3>[property:LoadingManager manager]</h3>
5858
<p>
59-
The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
59+
加载器正在使用的[page:LoadingManager loadingManager]。默认为[page:DefaultLoadingManager].
6060
</p>
6161

62-
<h2>Methods</h2>
62+
<h2>方法</h2>
6363

6464
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
6565
<p>
66-
[page:String url] — the path or URL to the file. This can also be a
66+
[page:String url] — 文件的URL或者路径,也可以为
6767
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
68-
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Animation animation].<br />
69-
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
70-
[page:Function onError] — Will be called if load errors.<br /><br />
68+
[page:Function onLoad] — 加载完成时将调用。回调参数为将要加载的[page:Animation animation].<br />
69+
[page:Function onProgress] — 将在加载过程中进行调用。参数为XMLHttpRequest实例,实例包含[page:Integer total][page:Integer loaded]字节。<br />
70+
[page:Function onError] — 在加载错误时被调用。<br /><br />
7171

72-
Begin loading from url and pass the loaded animation to onLoad.
72+
从URL中进行加载并将动画传递给onLoad。
7373
</p>
7474

7575
<h3>[method:null parse]( [param:JSON json], [param:Function onLoad] )</h3>
7676
<p>
77-
[page:JSON json] — required<br />
78-
[page:Function onLoad] — Will be called when parsing completes. <br /><br />
77+
[page:JSON json] — 请求<br />
78+
[page:Function onLoad] — 当解析完成时,将被调用 <br /><br />
7979

80-
Parse the JSON object and pass the result to onLoad. Individual clips in the object will
81-
be parsed with [page:AnimationClip.parse].
80+
解析JSON对象并将结果传递给onLoad。对象中的单个片段将
81+
[page [page:AnimationClip.parse]进行解析。
8282
</p>
8383

84-
<h2>Source</h2>
84+
<h2></h2>
8585

8686
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
8787
</body>

docs/api/zh/loaders/AudioLoader.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,88 +11,88 @@
1111
<h1>[name]</h1>
1212

1313
<p class="desc">
14-
Class for loading an
15-
[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer AudioBuffer].
16-
This uses the [page:FileLoader] internally for loading files.
14+
用来加载
15+
[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer AudioBuffer]的一个类。
16+
内部默认使用[page:FileLoader]来加载文件。
1717
</p>
1818

19-
<h2>Example</h2>
19+
<h2>例子</h2>
2020

2121
<code>
22-
// instantiate a listener
22+
// 初始化一个监听
2323
var audioListener = new THREE.AudioListener();
2424

25-
// add the listener to the camera
25+
// 把监听添加到camera
2626
camera.add( audioListener );
2727

28-
// instantiate audio object
28+
// 初始化音频对象
2929
var oceanAmbientSound = new THREE.Audio( audioListener );
3030

31-
// add the audio object to the scene
31+
// 添加一个音频对象到场景中
3232
scene.add( oceanAmbientSound );
3333

34-
// instantiate a loader
34+
// 初始化一个加载器
3535
var loader = new THREE.AudioLoader();
3636

37-
// load a resource
37+
// 加载资源
3838
loader.load(
39-
// resource URL
39+
// 资源URL
4040
'audio/ambient_ocean.ogg',
4141

42-
// onLoad callback
42+
// onLoad回调
4343
function ( audioBuffer ) {
44-
// set the audio object buffer to the loaded object
44+
// 给一个加载器对象设置音频对象的缓存
4545
oceanAmbientSound.setBuffer( audioBuffer );
4646

47-
// play the audio
47+
// 播放音频
4848
oceanAmbientSound.play();
4949
},
5050

51-
// onProgress callback
51+
// onProgress回调
5252
function ( xhr ) {
5353
console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
5454
},
5555

56-
// onError callback
56+
// onError回调
5757
function ( err ) {
5858
console.log( 'An error happened' );
5959
}
6060
);
6161
</code>
6262

63-
<h2>Constructor</h2>
63+
<h2>构造函数</h2>
6464

6565
<h3>[name]( [param:String context], [param:LoadingManager manager] )</h3>
6666
<p>
67-
[page:String context] — The [page:String AudioContext] for the loader to use. Default is [page:String window.AudioContext].<br />
68-
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
67+
[page:String context] — 加载器使用的[page:String AudioContext]。 默认为[page:String window.AudioContext].<br />
68+
[page:LoadingManager manager] — 加载器使用的[page:LoadingManager loadingManager]。默认为[page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
6969

70-
Creates a new [name].
70+
创建一个新的[name].
7171
</p>
7272

73-
<h2>Properties</h2>
73+
<h2>属性</h2>
7474

7575
<h3>[property:LoadingManager manager]</h3>
7676
<p>
77-
The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
77+
加载器正在使用的[page:LoadingManager loadingManager]。默认为[page:DefaultLoadingManager].
7878
</p>
7979

8080

81-
<h2>Methods</h2>
81+
<h2>方法</h2>
8282

8383
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
8484
<p>
85-
[page:String url] — the path or URL to the file. This can also be a
85+
[page:String url] — 文件的URL或者路径,也可以为
8686
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
87-
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
88-
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
89-
[page:Function onError] — Will be called when load errors.<br />
87+
[page:Function onLoad] — 加载完成时将调用。回调参数为将要加载的响应文本。<br />
88+
[page:Function onProgress] — 将在加载过程中进行调用。参数为XMLHttpRequest实例,实例包含[page:Integer total][page:Integer loaded]字节.<br />
89+
[page:Function onError] — 在加载错误时被调用。<br />
9090
</p>
9191
<p>
92-
Begin loading from url and pass the loaded [page:String AudioBuffer] to onLoad.
92+
从URL中进行加载并将已经加载的[page:String AudioBuffer]传递给onLoad。
9393
</p>
9494

95-
<h2>Source</h2>
95+
<h2></h2>
9696

9797
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
9898
</body>

docs/api/zh/loaders/BufferGeometryLoader.html

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,81 +11,81 @@
1111
<h1>[name]</h1>
1212

1313
<p class="desc">
14-
A loader for loading a [page:BufferGeometry].
15-
This uses the [page:FileLoader] internally for loading files.
14+
用来加载[page:BufferGeometry]的加载器。
15+
内部使用[page:FileLoader]来加载文件。
1616
</p>
1717

18-
<h2>Example</h2>
18+
<h2>例子</h2>
1919

2020
[example:webgl_geometry_colors_lookuptable WebGL / geometry / colors / lookuptable]
2121

2222
<code>
23-
// instantiate a loader
23+
// 初始化一个加载器
2424
var loader = new THREE.BufferGeometryLoader();
2525

26-
// load a resource
26+
// 加载资源
2727
loader.load(
28-
// resource URL
28+
// 资源URL
2929
'models/json/pressure.json',
3030

31-
// onLoad callback
31+
// onLoad回调
3232
function ( geometry ) {
3333
var material = new THREE.MeshLambertMaterial( { color: 0xF5F5F5 } );
3434
var object = new THREE.Mesh( geometry, material );
3535
scene.add( object );
3636
},
3737

38-
// onProgress callback
38+
// onProgress回调
3939
function ( xhr ) {
4040
console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
4141
},
4242

43-
// onError callback
43+
// onError回调
4444
function ( err ) {
4545
console.log( 'An error happened' );
4646
}
4747
);
4848
</code>
4949

50-
<h2>Constructor</h2>
50+
<h2>构造函数</h2>
5151

5252
<h3>[name]( [param:LoadingManager manager] )</h3>
5353
<p>
54-
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
54+
[page:LoadingManager manager] — 加载器所使用的[page:LoadingManager loadingManager]。默认为[page:LoadingManager THREE.DefaultLoadingManager].
5555
</p>
5656
<p>
57-
Creates a new [name].
57+
创建一个新的[name].
5858
</p>
5959

6060

61-
<h2>Properties</h2>
61+
<h2>属性</h2>
6262

6363
<h3>[property:LoadingManager manager]</h3>
6464
<p>
65-
The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
65+
正在使用的[page:LoadingManager loadingManager]。默认为[page:DefaultLoadingManager].
6666
</p>
6767

68-
<h2>Methods</h2>
68+
<h2>方法</h2>
6969

7070
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
7171
<p>
72-
[page:String url] — the path or URL to the file. This can also be a
72+
[page:String url] — 文件的URL或者路径,也可以为
7373
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].d<br />
74-
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:BufferGeometry].<br />
75-
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
76-
[page:Function onError] — Will be called when load errors.<br />
74+
[page:Function onLoad] — 加载完成时将调用。回调参数为将要加载的[page:BufferGeometry].<br />
75+
[page:Function onProgress] — 将在加载过程中进行调用。参数为XMLHttpRequest实例,实例包含[page:Integer total][page:Integer loaded]字节。<br />
76+
[page:Function onError] —在加载错误时被调用。<br />
7777
</p>
7878
<p>
79-
Begin loading from url and call onLoad with the parsed response content.
79+
从URL中进行加载,并将已经以解析的响应内容传递给onLoad。
8080
</p>
8181

8282
<h3>[method:BufferGeometry parse]( [param:Object json] )</h3>
8383
<p>
84-
[page:Object json] — The <em>JSON</em> structure to parse.<br /><br />
85-
Parse a <em>JSON</em> structure and return a [page:BufferGeometry].
84+
[page:Object json] — 所需要解析的<em>JSON</em>结构。<br /><br />
85+
解析一个<em>JSON</em>结构,并返回[page:BufferGeometry].
8686
</p>
8787

88-
<h2>Source</h2>
88+
<h2></h2>
8989

9090
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
9191
</body>

0 commit comments

Comments
 (0)