diff --git a/docs/api/en/loaders/ObjectLoader.html b/docs/api/en/loaders/ObjectLoader.html index 75c8acc58e713f..12abe23b38531e 100644 --- a/docs/api/en/loaders/ObjectLoader.html +++ b/docs/api/en/loaders/ObjectLoader.html @@ -88,6 +88,14 @@

[property:String resourcePath]

Methods

+

[method:ObjectLoader bindSkeletons]( [param:Object3D object], [param:Array skeletons] )

+

+ [page:Object3D object] — required. The parsed object hierarchy.

+ [page:Array skeletons] — required. An array of parsed skeletons.

+ + Used to bind skeletons to objects of type [page:SkinnedMesh]. +

+

[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )

[page:String url] — the path or URL to the file. This can also be a @@ -100,7 +108,6 @@

[method:null load]( [param:String url], [param:Function onLoad], [param:Func Begin loading from url and call onLoad with the parsed response content.

-

[method:Object3D parse]( [param:Object json], [param:Function onLoad] )

[page:Object json] — required. The JSON source to parse.

@@ -111,46 +118,41 @@

[method:Object3D parse]( [param:Object json], [param:Function onLoad] )

-

[method:Object3D parseGeometries]( [param:Object json] )

+

[method:Array parseAnimations]( [param:Object json] )

[page:Object json] — required. The JSON source to parse.

- This is used [page:.parse] to parse any [page:Geometry geometries] or [page:BufferGeometry buffer geometries] in the JSON structure. + This is used by [page:.parse]() to parse any animations in the JSON structure, using [page:AnimationClip.parse]().

-

[method:Object3D parseMaterials]( [param:Object json] )

+

[method:Object parseGeometries]( [param:Object json] )

[page:Object json] — required. The JSON source to parse.

- This is used [page:.parse] to parse any materials in the JSON structure using [page:MaterialLoader]. + This is used by [page:.parse]() to parse any geometries in the JSON structure.

-

[method:Object3D parseAnimations]( [param:Object json] )

-

- [page:Object json] — required. The JSON source to parse.

- - This is used [page:.parse] to parse any animations in the JSON structure, using [page:AnimationClip.parse]. -

- -

[method:Object3D parseImages]( [param:Object json] )

+

[method:Object parseImages]( [param:Object json] )

[page:Object json] — required. The JSON source to parse.

This is used [page:.parse] to parse any images in the JSON structure, using [page:ImageLoader].

-

[method:Object3D parseTextures]( [param:Object json] )

+

[method:Object parseMaterials]( [param:Object json] )

[page:Object json] — required. The JSON source to parse.

- This is used [page:.parse] to parse any textures in the JSON structure. + This is used by [page:.parse]() to parse any materials in the JSON structure using [page:MaterialLoader].

-

[method:Object3D parseObject]( [param:Object json] )

+

[method:Object3D parseObject]( [param:Object data], [param:Object geometries], [param:Object materials] )

- [page:Object json] — required. The JSON source to parse.

+ [page:Object data] — required. The JSON source to parse.

+ [page:Object geometries] — The parsed geometries.

+ [page:Object materials] — The parsed materials.

- This is used [page:.parse] to parse any objects in the JSON structure. + This is used by [page:.parse]() to parse any objects in the JSON structure. Objects can be of the following types:

+

[method:Object parseShapes]( [param:Object json] )

+

+ [page:Object json] — required. The JSON source to parse.

+ + This is used by [page:.parse]() to parse any shapes in the JSON structure. +

+ +

[method:Object parseSkeletons]( [param:Object json], [param:Object3D object] )

+

+ [page:Object json] — required. The JSON source to parse.

+ [page:Object3D object] — required. A hierarchy of 3D objects which is used to query the bones.

+ + This is used by [page:.parse]() to parse any skeletons in the JSON structure. +

+ +

[method:Object parseTextures]( [param:Object json] )

+

+ [page:Object json] — required. The JSON source to parse.

+ + This is used by [page:.parse]() to parse any textures in the JSON structure. +

+

[method:ObjectLoader setCrossOrigin]( [param:String value] )

[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. diff --git a/docs/api/en/objects/Skeleton.html b/docs/api/en/objects/Skeleton.html index b5c94d851b5898..194352ccfa30ca 100644 --- a/docs/api/en/objects/Skeleton.html +++ b/docs/api/en/objects/Skeleton.html @@ -79,6 +79,11 @@

[property:DataTexture boneTexture]

The [page:DataTexture] holding the bone data when using a vertex texture.

+

[property:Number boneTextureSize]

+

+ The size of the bone texture. +

+

Methods

@@ -92,10 +97,22 @@

[method:null calculateInverses]()

Generates the [page:.boneInverses boneInverses] array if not provided in the constructor.

+

[method:Skeleton fromJSON]( [param:Object json], [param:Object3D object])

+

Creates the skeleton by the given JSON data and object hierarchy.

+ + +

[method:Skeleton init]()

+

Initializes [page:.boneMatrices] and [page:.boneInverses] if necessary.

+ +

[method:null pose]()

Returns the skeleton to the base pose.

+

[method:Object toJSON]()

+

Serializes this skeleton object.

+ +

[method:null update]()

Updates the [page:Float32Array boneMatrices] and [page:DataTexture boneTexture] after changing the bones. diff --git a/docs/api/zh/loaders/ObjectLoader.html b/docs/api/zh/loaders/ObjectLoader.html index 0d75f52c8473bf..f51d2c5bc63a41 100644 --- a/docs/api/zh/loaders/ObjectLoader.html +++ b/docs/api/zh/loaders/ObjectLoader.html @@ -71,8 +71,8 @@

属性

[property:String crossOrigin]

- 如果设置了,在开始加载前, 将为图片分配 [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin] - 属性,其值为 *crossOrigin*, 默认为"anonymous"。 + 如果设置了,在开始加载前, 将为图片分配 [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin] + 属性,其值为 *crossOrigin*, 默认为"anonymous"。

[property:LoadingManager manager]

@@ -88,6 +88,14 @@

[property:String texturePath]

方法

+

[method:ObjectLoader bindSkeletons]( [param:Object3D object], [param:Array skeletons] )

+

+ [page:Object3D object] — TODO.

+ [page:Array skeletons] — TODO.

+ + TODO +

+

[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )

[page:String url] — 文件的URL或者路径,也可以为 @@ -97,58 +105,74 @@

[method:null load]( [param:String url], [param:Function onLoad], [param:Func [page:Function onError] — 在加载错误时被调用。

- 从URL中进行加载,并将被解析的响应内容传递给onLoad。 + 从URL中进行加载,并将被解析的响应内容传递给onLoad。

-

[method:Object3D parse]( [param:Object json], [param:Function onLoad] )

+

[method:Object3D parse]( [param:Object json], [param:Function onLoad] )

[page:Object json] — 必选参数,需要被解析的JSON源。

[page:Function onLoad] — 当解析完成时被调用,其中参数被解析为[page:Object3D object].

- 解析一个JSON结构,并返回一个threejs对象. + 解析一个JSON结构,并返回一个threejs对象. 内部使用[page:.load]进行加载, 但也可以直接用于解析先前加载的JSON结构。

-

[method:Object3D parseGeometries]( [param:Object json] )

+

[method:Object parseGeometries]( [param:Object json] )

[page:Object json] — 必选参数,需要被解析的JSON源。

- 此函数以JSON结构,用[page:.parse]去解析[page:Geometry geometries]或[page:BufferGeometry buffer geometries]。 + 此函数以JSON结构,用[page:.parse]去解析[page:Geometry geometries]或[page:BufferGeometry buffer geometries]。

-

[method:Object3D parseMaterials]( [param:Object json] )

+

[method:Object parseMaterials]( [param:Object json] )

- [page:Object json] — 必选参数,需要被解析的JSON源。

+ [page:Object json] — 必选参数,需要被解析的JSON源。

此函数通过[page:.parse]来使用[page:MaterialLoader],以解析JSON结构中任意材质。

-

[method:Object3D parseAnimations]( [param:Object json] )

+

[method:Array parseAnimations]( [param:Object json] )

- [page:Object json] — 必选参数,需要被解析的JSON源。

+ [page:Object json] — 必选参数,需要被解析的JSON源。

此函数通过[page:.parse]来使用[page:AnimationClip.parse], 以解析JSON结构中任意动画。 -

+

+ +

[method:Object parseImages]( [param:Object json] )

+

+ [page:Object json] — 必选参数,需要被解析的JSON源。

+ 此函数通过[page:.parse]来使用[page:ImageLoader], 以解析JSON结构中任意图片。 +

-

[method:Object3D parseImages]( [param:Object json] )

+

[method:Object parseShapes]( [param:Object json] )

- [page:Object json] — 必选参数,需要被解析的JSON源。

+ [page:Object json] — TODO.

- 此函数通过[page:.parse]来使用[page:ImageLoader], 以解析JSON结构中任意图片。 + TODO.

-

[method:Object3D parseTextures]( [param:Object json] )

+

[method:Object parseSkeletons]( [param:Object json], [param:Object3D object] )

- [page:Object json] — 必选参数,需要被解析的JSON源。

- 此函数通过[page:.parse]来解析JSON结构中任意纹理。 + [page:Object json] — TODO.

+ [page:Object3D object] — TODO.

+ + TODO. +

+ +

[method:Object parseTextures]( [param:Object json] )

+

+ [page:Object json] — 必选参数,需要被解析的JSON源。

+ 此函数通过[page:.parse]来解析JSON结构中任意纹理。

-

[method:Object3D parseObject]( [param:Object json] )

+

[method:Object3D parseObject]( [param:Object data], [param:Object geometries], [param:Object materials] )

- [page:Object json] — 必选参数,需要被解析的JSON源。

+ [page:Object data] — 必选参数,需要被解析的JSON源。

+ [page:Object geometries] — TODO.

+ [page:Object materials] — TODO.

- 此函数通过[page:.parse]来解析JSON结构中任意对象。 + 此函数通过[page:.parse]来解析JSON结构中任意对象。 对象可以为如下类型: