Skip to content

Commit

Permalink
docs:LUTCubeLoader translation (#28634)
Browse files Browse the repository at this point in the history
* docs:LUTCubeLoader translation

* Update LUT3dlLoader.html

---------

Co-authored-by: Michael Herzog <[email protected]>
  • Loading branch information
mmjinglin163 and Mugen87 authored Jun 12, 2024
1 parent f1f9a1c commit 59ea902
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
84 changes: 84 additions & 0 deletions docs/examples/zh/loaders/LUT3dlLoader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Loader] &rarr;

<h1>[name]</h1>

<p class="desc">
支持.3dl文件格式的3D LUT加载器。<br />
参考资料如下:
</p>

<ul>
<li>[link:http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492]</li>
<li>[link:https://community.foundry.com/discuss/topic/103636/format-spec-for-3dl?mode=Post&postID=895258]</li>
</ul>

<h2>导入</h2>

<p>
[name] 是一个附加组件,必须显式导入。
请参阅 [link:#manual/introduction/Installation Installation / Addons].
</p>

<code>
import { LUT3dlLoader } from 'three/addons/loaders/LUT3dlLoader.js';
</code>

<h2>构造函数</h2>

<h3>[name]( [param:LoadingManager manager] )</h3>
<p>
[page:LoadingManager manager] — 加载器所使用的[page:LoadingManager loadingManager]. 默认值为[page:DefaultLoadingManager DefaultLoadingManager]<br />
</p>
<p>
创建一个新的 [name].
</p>

<h2>属性</h2>
<p>共有属性请参见其基类[page:Loader]。</p>

<h2>方法</h2>
<p>共有方法请参见其基类[page:Loader]。</p>

<h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<p>
[page:String url] — `.3dl`格式的文件URL或者路径.<br />
[page:Function onLoad] — (可选) 加载成功完成后调用的函数。函数接收[page: function parse]方法的结果。<br />
[page:Function onProgress] — (可选) 在加载过程中调用的函数。参数将是XMLHttpRequest实例,它包含[page:Integer total]和[page:Integer loaded]字节。如果服务器没有设置Content-Length报头,[page:Integer total]将为0。<br />
[page:Function onError] — (可选) 在加载过程中发生错误时调用的函数。函数接收错误作为参数。<br />
</p>
<p>
开始从url加载并返回加载的LUT。
</p>

<h3>[method:Object parse]( [param:String input] )</h3>
<p>
[page:String input] — 3dl数据字符串。<br />
</p>
<p>
解析3dl数据字符串并在完成时触发[page:Function onLoad]回调。[page:Function onLoad]的参数将是一个[page:Object对象],包含以下LUT数据:[page:Number .size], [page:datattexture .texture]和[page:Data3DTexture .texture3d]。
</p>

<h3>[method:this setType]( [param:Number type] )</h3>
<p>
[page:Number type] - 纹理类型。详情请参阅[page:Textures纹理常量]页面。<br />
</p>
<p>
设置所需的纹理类型。支持[page:Textures THREE.UnsignedByteType]和[page:Textures THREE.FloatType]。默认为[page:Textures THREE.UnsignedByteType].
</p>

<h2>源代码</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/[name].js examples/jsm/loaders/[name].js]
</p>
</body>
</html>
1 change: 1 addition & 0 deletions docs/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@
"GLTFLoader": "examples/zh/loaders/GLTFLoader",
"KTX2Loader": "examples/zh/loaders/KTX2Loader",
"LDrawLoader": "examples/zh/loaders/LDrawLoader",
"LUT3dlLoader": "examples/zh/loaders/LUT3dlLoader",
"LUTCubeLoader": "examples/zh/loaders/LUTCubeLoader",
"MMDLoader": "examples/zh/loaders/MMDLoader",
"MTLLoader": "examples/zh/loaders/MTLLoader",
Expand Down

0 comments on commit 59ea902

Please sign in to comment.