|
AboutAdjusts
Learn more about using Adjusts in Avatar Core.
(Last updated for ver 0.2.0) Adjust objects represent visual transforms used for Feature Art, not too unlike flash.geom.Transform.matrix. Adjusts determine the position, size and rotation Art used in Features. API: Adjust Class In This Document: Adjusting ArtBy default, Art for Features is un-scaled, un-rotated, and is positioned at 0,0 of the AvatarDisplay object rendering it (not accounting for x, y offsets used by the Art instance). By assigning an Adjust object to a Feature, the position, size, and rotation can be changed further. Feature position is defined by Adjust.x and Adjust.y. Rotation is handled by Adjust.rotation. Size is handled relatively by percent (scale) where 1 is 100% scale. Scale can be set uniformly through Adjust.scale or separately for both the x and y axis using scaleX and scaleY. The following example moves the feature represented by image.jpg to 25,25 within an AvatarDisplay object, and scales it 200% of its normal size. <Feature> <Art src="image.jpg" /> <Adjust x="25" y="25" scale="2" /> <Feature> Adjusts work on any and all Art objects used for a Feature. If a Feature's art consists of a container Art with multiple other child Art objects, each are changed based on the values specified by an Adjust. Inherited AdjustsWhen a Feature specifies another Feature as its parent, it inherits Adjust characteristics from that parent. In fact, Adjust values are the only characteristic of a parent Feature that affects the child. Unlike the display list in Flash, not all characteristics of a parent Adjust is inherited. Position and rotation are, but scale is not. Scale will still affect position, however. Where to go from here |
Sign in to add a comment