Package | away3d.modifiers |
Class | public class PathAlignModifier |
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 : Number3D
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 | ||
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 | ||
Updates the path of the alignment.
| PathAlignModifier |
arcLengthPrecision | property |
arcLengthPrecision:Number
[read-write]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.
Implementation 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:Number3D
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.
Implementation 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)
Parameters
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.
|
offset:Number3D | |
restrain:Boolean (default = false) | |
fast:Boolean (default = false) |
applyCached | () | method |
public function applyCached(index:uint):void
Performs the alignment from precalculations. buildCache() must be called first. See buildCache().
Parametersindex: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();
ParametersxOffset: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().
Parametersdivisions: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:Number3D):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.
Parameterspoint:Number3D — 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.
Parameterspath: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.
|