Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
bf1efc61
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf1efc61
编写于
2月 23, 2017
作者:
B
BrianSipple
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve documentation of TextGeometry usage
上级
b2cbafea
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
10 deletion
+38
-10
docs/api/geometries/TextGeometry.html
docs/api/geometries/TextGeometry.html
+26
-4
docs/manual/introduction/Creating-text.html
docs/manual/introduction/Creating-text.html
+12
-6
未找到文件。
docs/api/geometries/TextGeometry.html
浏览文件 @
bf1efc61
...
...
@@ -12,7 +12,11 @@
<h1>
[name]
</h1>
<div
class=
"desc"
>
This object creates a 3D object of text as a single object.
</div>
<div
class=
"desc"
>
A class for generating text as a single geometry. It is constructed by providing a string of text, and a hash of
parameters consisting of a loaded [page:Font] and settings for the geometry's parent [page:ExtrudeGeometry].
See the [page:Font], [page:FontLoader] and [page:Creating_Text] pages for additional details.
</div>
<iframe
id=
"scene"
src=
"scenes/geometry-browser.html#TextGeometry"
></iframe>
...
...
@@ -32,13 +36,31 @@
</script>
<h2>
Example
</h2>
<h2>
Example
s
</h2>
<div>
[example:webgl_geometry_text geometry / text ]
<br/>
[example:webgl_geometry_text2 geometry / text2 ]
</div>
<code>
var loader = new THREE.FontLoader();
loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
var geometry = new THREE.TextGeometry( 'Hello three.js!', {
font: font,
size: 80,
height: 5,
curveSegments: 12,
bevelEnabled: true,
bevelThickness: 10,
bevelSize: 8,
bevelSegments: 5
} );
} );
</code>
<h2>
Constructor
</h2>
<h3>
[name]([page:String text], [page:Object parameters])
</h3>
...
...
@@ -46,8 +68,8 @@
text — The text that needs to be shown.
<br
/>
parameters — Object that can contains the following parameters.
<ul>
<li>
font — THREE.Font.
</li>
<li>
size — Float. Size of the text.
</li>
<li>
font —
an instance of
THREE.Font.
</li>
<li>
size — Float. Size of the text.
Default is 100.
</li>
<li>
height — Float. Thickness to extrude text. Default is 50.
</li>
<li>
curveSegments — Integer. Number of points on the curves. Default is 12.
</li>
<li>
bevelEnabled — Boolean. Turn on bevel. Default is False.
</li>
...
...
docs/manual/introduction/Creating-text.html
浏览文件 @
bf1efc61
...
...
@@ -61,13 +61,19 @@
<h2>
4. Procedural Text Geometry
</h2>
<div>
<p>
Use this method if you prefer to work purely in three.js or create procedural and dynamic 3d
text geometries. However, font data files in THREE.js JSON format need to be loaded
before this will work.
See the [page:TextGeometry] page for examples of JSON fonts.
If you prefer to work purely in THREE.js or to create procedural and dynamic 3D
text geometries, you can create a mesh whose geometry is an instance of THREE.TextGeometry:
</p>
<p>
<code>
new THREE.TextGeometry( text, parameters );
</code>
</p>
<p>
In order for this to work, however, your TextGeomety will need an instance of THREE.Font
to be set on its "font" parameter.
See the [page:TextGeometry] page for more info on how this can be done, descriptions of each
accepted parameter, and a list of the JSON fonts that come with the THREE.js distribution itself.
</p>
<p>
A Text Geometry can then be created with
</p>
<code>
new THREE.TextGeometry( text, parameters );
</code>
<h3>
Examples
</h3>
[example:webgl_geometry_text WebGL / geometry / text]
<br
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录