Skip to content

Commit aa0b669

Browse files
committed
Merge remote-tracking branch 'origin/translation-zh' into translation-zh
2 parents 06b2adc + 7ec8b02 commit aa0b669

File tree

86 files changed

+2648
-3292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2648
-3292
lines changed

docs/api/zh/animation/AnimationAction.html

Lines changed: 95 additions & 140 deletions
Large diffs are not rendered by default.

docs/api/zh/animation/AnimationClip.html

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

1313
<p class="desc">
14-
An AnimationClip is a reusable set of keyframe tracks which represent an animation.<br /><br />
14+
动画剪辑(AnimationClip)是一个可重用的关键帧轨道集,它代表动画。<br /><br />
1515

16-
For an overview of the different elements of the three.js animation system see the
17-
"Animation System" article in the "Next Steps" section of the manual.
16+
在使用手册的“下一步”章节中,“动画系统”一文对three.js动画系统中的不同元素作出了概述
1817
</p>
1918

2019

21-
<h2>Constructor</h2>
20+
<h2>构造器</h2>
2221

2322

2423
<h3>[name]( [param:String name], [param:Number duration], [param:Array tracks] )</h3>
2524
<p>
26-
[page:String name] - a name for this clip.<br />
27-
[page:Number duration] - the duration of this clip (in seconds). If a negative value is passed,
28-
the duration will be calculated from the passed *tracks* array.<br />
29-
[page:Array tracks] - an array of [page:KeyframeTrack KeyframeTracks].<br /><br />
25+
[page:String name] - 此剪辑的名称<br />
26+
[page:Number duration] - 持续时间 (单位秒). 如果传入负数, 持续时间将会从传入的数组中计算得到。<br />
27+
[page:Array tracks] - 一个由关键帧轨道([page:KeyframeTrack KeyframeTracks])组成的数组。<br /><br />
28+
29+
说明: 与其直接调用构造函数实例化一个动画剪辑, 不如使用其静态方法中的一个来创建:
30+
用JSON ([page:.parse parse]), 用变形目标序列([page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence],
31+
[page:.CreateClipsFromMorphTargetSequences CreateClipsFromMorphTargetSequences])或者用动画层级 ([page:.parseAnimation parseAnimation])来创建 - 如果你的模型中几何体的动画数组中还没有保存动画剪辑的话。
3032

31-
Note: Instead of instantiating an AnimationClip directly with the constructor, you can use one
32-
of its static methods to create AnimationClips: from JSON ([page:.parse parse]), from morph
33-
target sequences ([page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence],
34-
[page:.CreateClipsFromMorphTargetSequences CreateClipsFromMorphTargetSequences]) or from
35-
animation hierarchies ([page:.parseAnimation parseAnimation]) - if your model doesn't already
36-
hold AnimationClips in its geometry's animations array.
3733
</p>
3834

3935

40-
<h2>Properties</h2>
36+
<h2>属性</h2>
4137

4238

4339
<h3>[property:Number duration]</h3>
4440
<p>
45-
The duration of this clip (in seconds). This can be calculated from the [page:.tracks tracks]
46-
array via [page:.resetDuration resetDuration].
41+
剪辑的持续时间 (单位秒). 可以通过[page:.resetDuration resetDuration]从轨道数组([page:.tracks tracks])计算出来。
42+
4743
</p>
4844

4945
<h3>[property:String name]</h3>
5046
<p>
51-
A name for this clip. A certain clip can be searched via [page:.findByName findByName].
47+
剪辑的名称. 调用[page:.findByName findByName]根据名称搜索某个剪辑
5248
</p>
5349

5450
<h3>[property:Array tracks]</h3>
5551
<p>
56-
An array containing a [page:KeyframeTrack] for each property that are animated by this clip.
52+
一个包含该剪辑中有动画的所有属性的关键帧轨道([page:KeyframeTrack])的数组。
5753
</p>
5854

5955
<h3>[property:String uuid]</h3>
6056
<p>
61-
The [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this clip instance.
62-
It gets automatically assigned and shouldn't be edited.
57+
剪辑实例的[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID],自动分配且不可编辑。
58+
6359
</p>
6460

6561

66-
<h2>Methods</h2>
62+
<h2>方法</h2>
6763

6864

6965
<h3>[method:this optimize]()</h3>
7066
<p>
71-
Optimizes each track by removing equivalent sequential keys (which are common in morph target
72-
sequences).
67+
通过移除等效的顺序键(在变形目标序列中很常见)来优化每一个轨道
68+
7369
</p>
7470

7571
<h3>[method:this resetDuration]()</h3>
7672
<p>
77-
Sets the [page:.duration duration] of the clip to the duration of its longest
78-
[page:KeyframeTrack].
73+
将剪辑的持续时间([page:.duration duration])设为最长的关键帧轨道([page:KeyframeTrack])的持续时间。
74+
.
7975
</p>
8076

8177
<h3>[method:this trim]()</h3>
8278
<p>
83-
Trims all tracks to the clip's duration.
79+
修剪所有的轨道到该剪辑的持续时间。
8480
</p>
8581

8682
<h3>[method:Boolean validate]()</h3>
8783
<p>
88-
Performs minimal validation on each track in the clip. Returns true if all tracks are valid.
84+
对剪辑中的每个轨道执行最小验证。如果所有轨道都有效,返回true。
8985
</p>
9086

9187

92-
<h2>Static Methods</h2>
88+
<h2>静态方法</h2>
9389

9490

9591
<h3>[method:Array CreateClipsFromMorphTargetSequences]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
9692
<p>
97-
Returns an array of new AnimationClips created from the [page:Geometry.morphTargets morph
98-
target sequences] of a geometry, trying to sort morph target names into animation-group-based
99-
patterns like "Walk_001, Walk_002, Run_001, Run_002 ..."<br /><br />
93+
返回从几何体的变形目标序列([page:Geometry.morphTargets morph
94+
target sequences])创建的新动画剪辑(AnimationClip)数组,并尝试将变形目标名称分类为基于动画组的模式,如“Walk_001、Walk_002、Run_001、Run_002……”。<br /><br />
10095

101-
This method is called by the [page:JSONLoader] internally, and it uses
96+
该方法被[page:JSONLoader]内部调用, 并且它使用了
10297
[page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence].
10398
</p>
10499

105100
<h3>[method:AnimationClip CreateFromMorphTargetSequence]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
106101
<p>
107-
Returns a new AnimationClip from the passed [page:Geometry.morphTargets morph targets array]
108-
of a geometry, taking a name and the number of frames per second.<br /><br />
102+
返回一个由几何体变形目标数组([page:Geometry.morphTargets morph targets array])得到的新动画剪辑,接收名称和帧率参数。<br /><br />
103+
104+
说明: 帧率是必须参数, 但是动画速度可能会在*AnimationAction*中被[page:AnimationAction.setDuration animationAction.setDuration]方法重写。
109105

110-
Note: The fps parameter is required, but the animation speed can be overridden in an
111-
*AnimationAction* via [page:AnimationAction.setDuration animationAction.setDuration].
112106
</p>
113107

114108
<h3>[method:AnimationClip findByName]( [param:Object objectOrClipArray], [param:String name] )</h3>
115109
<p>
116-
Searches for an AnimationClip by name, taking as its first parameter either an array of
117-
AnimationClips, or a mesh or geometry that contains an array named "animations".
110+
根据名称搜索动画剪辑(AnimationClip), 接收一个动画剪辑数组或者一个包含名为"animation"的数组的网格(或几何体)作为第一个参数。
118111
</p>
119112

120113
<h3>[method:AnimationClip parse]( [param:Object json] )</h3>
121114
<p>
122-
Parses a JSON representation of a clip and returns an AnimationClip.
115+
解析剪辑的JSON表示,并返回一个动画剪辑(AnimationClip)。
123116
</p>
124117

125118
<h3>[method:AnimationClip parseAnimation]( [param:Object animation], [param:Array bones] )</h3>
126119
<p>
127-
Parses the animation.hierarchy format and returns an AnimationClip.
120+
解析动画层级格式并返回动画剪辑。
128121
</p>
129122

130123
<h3>[method:Object toJSON]( [param:AnimationClip clip] )</h3>
131124
<p>
132-
Takes an AnimationClip and returns a JSON object.
125+
接收一个动画剪辑为参数并返回一个JSON对象.
133126
</p>
134127

135128

136-
<h2>Source</h2>
129+
<h2>源码</h2>
137130

138131

139132
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/zh/animation/AnimationMixer.html

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

1313
<p class="desc">
14-
The AnimationMixer is a player for animations on a particular object in the scene. When
15-
multiple objects in the scene are animated independently, one AnimationMixer may be used for
16-
each object.<br /><br />
14+
动画混合器是用于场景中特定对象的动画的播放器。当场景中的多个对象独立动画时,每个对象都可以使用同一个动画混合器。<br /><br />
1715

18-
For an overview of the different elements of the three.js animation system see the
19-
"Animation System" article in the "Next Steps" section of the manual.
16+
在使用手册的“下一步”章节中,“动画系统”一文对three.js动画系统中的不同元素作出了概述
2017
</p>
2118

2219

23-
<h2>Constructor</h2>
20+
<h2>构造器</h2>
2421

2522

2623
<h3>[name]( [param:Object3D rootObject] )</h3>
2724
<p>
28-
[page:Object3D rootObject] - the object whose animations shall be played by this mixer.<br />
25+
[page:Object3D rootObject] - 混合器播放的动画所属的对象<br />
2926
</p>
3027

3128

32-
<h2>Properties</h2>
29+
<h2>属性</h2>
3330

3431

3532
<h3>[property:Number time]</h3>
3633
<p>
37-
The global mixer time (in seconds; starting with 0 on the mixer's creation).
34+
全局的混合器时间(单位秒; 混合器创建的时刻记作0时刻)
3835
</p>
3936

4037
<h3>[property:Number timeScale]</h3>
4138
<p>
42-
A scaling factor for the global [page:.time mixer time].<br /><br />
39+
全局时间([page:.time mixer time])的比例因子<br /><br />
4340

44-
Note: Setting the mixer's timeScale to 0 and later back to 1 is a possibility to pause/unpause
45-
all actions that are controlled by this mixer.
41+
说明: 将混合器的时间比例设为0, 稍后再设置为1,可以暂停/取消暂停由该混合器控制的所有动作。
4642
</p>
4743

4844

49-
<h2>Methods</h2>
45+
<h2>方法</h2>
5046

5147

5248
<h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
5349
<p>
54-
Returns an [page:AnimationAction] for the passed clip, optionally using a root object different
55-
from the mixer's default root. The first parameter can be either an [page:AnimationClip] object
56-
or the name of an AnimationClip.<br /><br />
50+
返回所传入的剪辑参数的[page:AnimationAction], 根对象参数可选,默认值为混合器的默认根对象。第一个参数可以是动画剪辑([page:AnimationClip])对象或者动画剪辑的名称。<br /><br />
5751

58-
If an action fitting the clip and root parameters doesn't yet exist, it will be created by
59-
this method. Calling this method several times with the same clip and root parameters always
60-
returns the same clip instance.
52+
如果不存在符合传入的剪辑和根对象这两个参数的动作, 该方法将会创建一个。传入相同的参数多次调用将会返回同一个剪辑实例。
6153
</p>
6254

6355
<h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
6456
<p>
65-
Returns an existing [page:AnimationAction] for the passed clip, optionally using a root object
66-
different from the mixer's default root.<br /><br />
57+
返回传入剪辑的已有[page:AnimationAction], 根对象参数可选,默认值为混合器的默认根对象。<br /><br />
6758

68-
The first parameter can be either an [page:AnimationClip] object or the name of an AnimationClip.
59+
第一个参数可以是动画剪辑([page:AnimationClip])对象或者动画剪辑的名称。
6960
</p>
7061

7162
<h3>[method:Object3D getRoot]()</h3>
7263
<p>
73-
Returns this mixer's root object.
64+
返回混合器的根对象
7465
</p>
7566

7667
<h3>[method:AnimationMixer stopAllAction]()</h3>
7768
<p>
78-
Deactivates all previously scheduled actions on this mixer.
69+
停用混合器上所有预定的动作
7970
</p>
8071

8172
<h3>[method:AnimationMixer update]([param:Number deltaTimeInSeconds]) </h3>
8273
<p>
83-
Advances the global mixer time and updates the animation.<br /><br />
74+
推进混合器时间并更新动画 <br /><br />
8475

85-
This is usually done in the render loop, passing [page:Clock.getDelta clock.getDelta] scaled by the mixer's [page:.timeScale timeScale]).
76+
通常在渲染循环中完成, 传入按照混合器的时间比例([page:.timeScale timeScale])缩放过的[page:Clock.getDelta clock.getDelta]
8677
</p>
8778

8879
<h3>[method:null uncacheClip]([param:AnimationClip clip])</h3>
8980

9081
<p>
91-
Deallocates all memory resources for a clip.
82+
释放剪辑的所有内存资源
9283
</p>
9384

9485
<h3>[method:null uncacheRoot]([param:Object3D root]) </h3>
9586
<p>
96-
Deallocates all memory resources for a root object.
87+
释放根对象的所有内存资源
9788
</p>
9889

9990
<h3>[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
10091
<p>
101-
Deallocates all memory resources for an action.
92+
释放动作的所有内存资源
10293
</p>
10394

10495

105-
<h2>Source</h2>
96+
<h2>源码</h2>
10697

10798

10899
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/zh/animation/AnimationObjectGroup.html

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,74 +10,71 @@
1010
<body>
1111
<h1>[name]</h1>
1212

13-
<p class="desc">A group of objects that receives a shared animation state.<br /><br />
13+
<p class="desc">接收共享动画状态的一组对象。<br /><br />
1414

15-
For an overview of the different elements of the three.js animation system see the
16-
"Animation System" article in the "Next Steps" section of the manual.
15+
在使用手册的“下一步”章节中,“动画系统”一文对three.js动画系统中的不同元素作出了概述
1716
</p>
1817

19-
<h2>Usage:</h2>
18+
<h2>用法:</h2>
2019

2120
<p class="desc">
22-
Add objects you would otherwise pass as 'root' to the constructor or the [page:AnimationMixer.clipAction clipAction]
23-
method of [page:AnimationMixer AnimationMixer] and instead pass this object as 'root'.<br /><br />
21+
将本来要作为根对象传入构造器或者动画混合器([page:AnimationMixer AnimationMixer])的[page:AnimationMixer.clipAction clipAction]方法中的对象加入组中,并将这个组对象作为根对象传递。
22+
<br /><br />
2423

25-
Note that objects of this class appear as one object to the mixer,
26-
so cache control of the individual objects must be done on the group.
24+
注意,这个类的实例作为混合器中的一个对象,因此,必须对组内的单个对象做缓存控制。
2725
</p>
2826

2927

30-
<h2>Limitations</h2>
28+
<h2>限制</h2>
3129
<p class="desc">
32-
The animated properties must be compatible among all objects in the group.<br /><br />
30+
动画属性必须在组中的所有对象之间兼容。<br /><br />
3331

34-
A single property can either be controlled through a target group or directly, but not both.
32+
单个属性可以通过目标组控制或者直接控制,但不能两者同时。
3533
</p>
3634

3735

38-
<h2>Constructor</h2>
36+
<h2>构造器</h2>
3937

4038

4139
<h3>[name]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
42-
[page:object obj] - an abitrary number of meshes that share the same animation state.<br />
40+
[page:object obj] - 共享同一动画状态的任意数量的网格<br />
4341

4442

45-
<h2>Properties</h2>
43+
<h2>属性</h2>
4644

4745

4846
<h3>[property:object stats]</h3>
4947
<p>
50-
An object that contains some informations of this *AnimationObjectGroup* (total number, number
51-
in use, number of bindings per object)
48+
一个包含此动画对象组(AnimationObjectGroup)的一些信息的对象 (总数, 使用中的数量,绑定到每个对象上的数量)
49+
5250
</p>
5351

5452
<h3>[property:String uuid]</h3>
5553
<p>
56-
The [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this
57-
*AnimationObjectGroup*. It gets automatically assigned and shouldn't be edited.
54+
这个动画对象组(AnimationObjectGroup)的[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID]。它是自动分配的,不可被编辑。
5855
</p>
5956

6057

61-
<h2>Methods</h2>
58+
<h2>方法</h2>
6259

6360

6461
<h3>[method:null add]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
6562
<p>
66-
Adds an arbitrary number of objects to this *AnimationObjectGroup*.
63+
将任意数量的对象添加到这个动画对象组(AnimationObjectGroup)。
6764
</p>
6865

6966
<h3>[method:null remove]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
7067
<p>
71-
Removes an arbitrary number of objects from this *AnimationObjectGroup*.
68+
将任意数量的对象从这个动画对象组(AnimationObjectGroup)中删除。
7269
</p>
7370

7471
<h3>[method:null uncache]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
7572
<p>
76-
Deallocates all memory resources for the passed objects of this *AnimationObjectGroup*.
73+
释放此动画对象组(AnimationObjectGroup)传递的对象的所有内存资源
7774
</p>
7875

7976

80-
<h2>Source</h2>
77+
<h2>源码</h2>
8178

8279

8380
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

0 commit comments

Comments
 (0)