mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 15:34:57 +01:00
115 lines
3.0 KiB
HTML
Executable File
115 lines
3.0 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<script src="../../list.js"></script>
|
|
<script src="../../page.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
|
</head>
|
|
<body>
|
|
<h1>[name]</h1>
|
|
|
|
<div class="desc">A class for text operations in three.js (See [page:TextGeometry])</div>
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
|
|
|
|
<h3>[property:number divisions]</h3>
|
|
<div>
|
|
The amount of segments in a curve. Default is 10.
|
|
</div>
|
|
|
|
<h3>[property:string style]</h3>
|
|
<div>
|
|
The style of the used font. Default is "normal".
|
|
</div>
|
|
|
|
<h3>[property:string weight]</h3>
|
|
<div>
|
|
The weight of the used font. Default is "normal".
|
|
</div>
|
|
|
|
<h3>[property:string face]</h3>
|
|
<div>
|
|
The name of the font. Default is "helvetiker".
|
|
</div>
|
|
|
|
<h3>[property:object faces]</h3>
|
|
<div>
|
|
All Fonts which are already loaded in.
|
|
</div>
|
|
|
|
<h3>[property:number size]</h3>
|
|
<div>
|
|
The size of the used Font. Default is 150.
|
|
</div>
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
|
|
<h3>[method:Object drawText]([page:string text])</h3>
|
|
<div>
|
|
text -- The text to draw.
|
|
</div>
|
|
<div>
|
|
Calculates the path and offset of the text in the used font. It returns an object like { paths : fontPaths, offset : width }.
|
|
</div>
|
|
|
|
<h3>[method:Array Triangulate]([page:Array contour], [page:Boolean indices])</h3>
|
|
<div>
|
|
contour -- Array of vector2 to define an contour <br />
|
|
indices -- A boolean indicating if you need to return indices.
|
|
</div>
|
|
<div>
|
|
Triangulates a contour into an array of faces.
|
|
</div>
|
|
|
|
<h3>[method:Object extractGlyphPoints]([page:string c], [page:string face], [page:number scale], [page:number offset], [page:Path path])</h3>
|
|
<div>
|
|
c -- The character to extract. <br />
|
|
face -- The face to use. <br />
|
|
scale -- The scale of the character. <br />
|
|
offset -- The offset of the character compared to begin of the path. <br />
|
|
path -- The path to which to add the character points.
|
|
</div>
|
|
<div>
|
|
This ectracts the glyphPoints of the character of the face and returns an object containing the path and the new offset.
|
|
</div>
|
|
|
|
<h3>[method:Array generateShapes]([page:string text], [page:Object parameters])</h3>
|
|
<div>
|
|
text -- The text to generate the shapes from.<br />
|
|
parameters -- The parameter containing <br />
|
|
size -- Default is 100.
|
|
curveSegments -- Default is 4.
|
|
font -- Default is "helvetiker".
|
|
weight -- Default is "normal".
|
|
style -- Default is "normal".
|
|
|
|
</div>
|
|
<div>
|
|
Generates shapes from the text and return them as an Array of [page:Shape].
|
|
</div>
|
|
|
|
<h3>[method:Object loadFace]([page:Object data])</h3>
|
|
<div>
|
|
data -- The data of the face.
|
|
</div>
|
|
<div>
|
|
This loads and saves the data of the face and return the data. When you add the font Data as javascriptfile, then this automatically get called. So there is no need to do this yourself.
|
|
</div>
|
|
|
|
<h3>[method:Object getFace]()</h3>
|
|
<div>
|
|
Returns the used font its data based on its style and weight.
|
|
</div>
|
|
|
|
<h2>Source</h2>
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
</body>
|
|
</html>
|