Property | Defined By | ||
---|---|---|---|
arcLengthPrecision : Number
Determines the quality of the alignment. | PathAlignModifier | ||
fast : Boolean
Omits arc-length parameterization yielding less precise, but faster results. | PathAlignModifier | ||
offset : Vector3D
Applies a vector offset to the mesh before it is modified
| PathAlignModifier | ||
pathLength : Number [read-only]
Returns the last calculated length of the path. | PathAlignModifier | ||
restrain : Boolean
Forces the y alignment to face only 1 direction. | PathAlignModifier |
Property | Defined By | ||
---|---|---|---|
ini : Init
Instance of the Init object used to hold and parse default property values
specified by the initialiser object in the 3d object constructor. | PathAlignModifier |
Method | Defined By | ||
---|---|---|---|
Creates a new PathAlignModifier object. | PathAlignModifier | ||
applyCached(index:uint):void
Performs the alignment from precalculations. | PathAlignModifier | ||
applyCachedAt(xOffset:Number = 0):void
See buildCacheAt();
| PathAlignModifier | ||
buildCache(divisions:Number):void
Traverses the entire path with a given offset,
storing the vertex positions. | PathAlignModifier | ||
buildCacheAt():void
Caches the warped vertex positions of the mesh at a given x offset. | PathAlignModifier | ||
execute():void
Performs the alignment. | PathAlignModifier | ||
findClosestCurveOffsetToPoint(point:Vector3D):Object
Given a point in space, this method finds the offset in
the curve that represents the closest point in the curve
to the specified point in space. | PathAlignModifier | ||
updatePath(path:Path, precision:Number = -1):Number
Updates the path of the alignment. | PathAlignModifier |
arcLengthPrecision | property |
arcLengthPrecision:Number
Determines the quality of the alignment. The value is used to arc length parameterize the path. Without this technique the alignment would produce undesired scaling and squashing of the text. The closer to zero, the better the quality of the alignment is, the larger the value the faster the performance of the aligment is.
public function get arcLengthPrecision():Number
public function set arcLengthPrecision(value:Number):void
fast | property |
public var fast:Boolean
Omits arc-length parameterization yielding less precise, but faster results. Defaults to false.
ini | property |
protected var ini:Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
offset | property |
public var offset:Vector3D
Applies a vector offset to the mesh before it is modified
pathLength | property |
pathLength:Number
[read-only] Returns the last calculated length of the path.
public function get pathLength():Number
restrain | property |
public var restrain:Boolean
Forces the y alignment to face only 1 direction. Defaults to false.
PathAlignModifier | () | Constructor |
public function PathAlignModifier(mesh:Mesh, path:Path, init:Object = null)
Creates a new PathAlignModifier
object. The inputed mesh will be cached,
so updates to the mesh will need a new instance of the aligner.
mesh:Mesh — A mesh containing the elements to be aligned.
| |
path:Path — A Segment or a Face containing the path's vector data for the alignment.
| |
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
applyCached | () | method |
public function applyCached(index:uint):void
Performs the alignment from precalculations. buildCache() must be called first. See buildCache().
Parameters
index:uint — uint Specifyes the index in the cached alignments to use,
or which snapshot.
|
applyCachedAt | () | method |
public function applyCachedAt(xOffset:Number = 0):void
See buildCacheAt();
Parameters
xOffset:Number (default = 0 ) — The x offset to restore.
|
buildCache | () | method |
public function buildCache(divisions:Number):void
Traverses the entire path with a given offset, storing the vertex positions. Could yield pretty intensive calculation. The idea is to use this to precalculate alignments for later used with applyCached().
Parameters
divisions:Number — The number of snapshots to take. If the length of the path is 100px,
a division of 50 would store alignment for an xOffset with 2px increment.
|
buildCacheAt | () | method |
public function buildCacheAt():void
Caches the warped vertex positions of the mesh at a given x offset. To recall positions cached in this way use applyCachedAt().
execute | () | method |
public function execute():void
Performs the alignment.
findClosestCurveOffsetToPoint | () | method |
public function findClosestCurveOffsetToPoint(point:Vector3D):Object
Given a point in space, this method finds the offset in the curve that represents the closest point in the curve to the specified point in space.
Parameters
point:Vector3D — Point The loose point in space.
|
Object — Number The offset in the curve that yields the closest
point in the curve to the specified point.
|
updatePath | () | method |
public function updatePath(path:Path, precision:Number = -1):Number
Updates the path of the alignment.
Parameters
path:Path — Element A Segment or a Face containing the path's vector data for the alignment.
| |
precision:Number (default = -1 ) — Number Sets the arcLengthPrecision value.
|
Number — Number The aproximated arc length of the path.
|