Component:UVAtlasAnimator: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page UVAtlasAnimator (Component) to Component:UVAtlasAnimator: Creating component Namespace
Add info
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=UVAtlasAnimatorComponent.png
|Image=UVAtlasAnimatorComponent.png
|Name=UVAtlas Animator
|Name=UVAtlas Animator
}}
}}
The '''UVAtlasAnimator''' component is used primarily to drive texture animations on [[material]]s like GIFs. It can also be used as a sprite sheet to animate things like 2D mouths.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ScaleField|IField`1|TypeString0=IField<float2>|The texture's <code>TextureScale</code> field that should be driven
|ScaleField|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv0=true|The texture's <code>TextureScale</code> field that should be driven
|OffsetField|IField`1|TypeString1=IField<float2>|The texture's <code>TextureOffset</code> field that should be driven
|OffsetField|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv1=true|The texture's <code>TextureOffset</code> field that should be driven
|AtlasInfo|AtlasInfo|The [[AtlasInfo (Component)|AtlasInfo]] component that provides the size and frame amount for the atlas
|AtlasInfo|{{RootFieldType|RelayRef`1|[[Component:AtlasInfo|AtlasInfo]]}}|TypeAdv2=true|The [[AtlasInfo (Component)|AtlasInfo]] component that provides the size and frame amount for the atlas
|Frame|Int|Which frame of the atlas the texture scale and offset should be driven to
|Frame|Int|Which frame of the atlas the texture scale and offset should be driven to
}}
}}
Line 17: Line 17:
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and provide the component with the Scale and Offset fields of any [[Material]]. Then, set the material's image to a sprite sheet of a set of animation frames. Then provide a [[Component:AtlasInfo]] with the proper data. Finally, use a [[Component:TimeIntDriver]] to drive <code>Frame</code> to animate always, or set/drive <code>Frame</code> to the frame on the sheet you want in some other way like [[ProtoFlux]].


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
[[Category:ComponentStubs]]
* [[Component:AtlasInfo]]
[[Category:Components|UV Atlas Animator]]
* [[Component:TimeIntDriver]]
[[Category:Components:Transform:Drivers|UV Atlas Animator]]
* [[Component:UVAtlasAnimator]]
[[Category:Components:Transform:Drivers{{#translation:}}|UVAtlas Animator]]
[[Category:Components{{#translation:}}|UVAtlas Animator]]

Latest revision as of 18:40, 11 November 2024

Component image 
UVAtlas Animator component as seen in the Scene Inspector

The UVAtlasAnimator component is used primarily to drive texture animations on materials like GIFs. It can also be used as a sprite sheet to animate things like 2D mouths.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
ScaleField field drive of Float2 The texture's TextureScale field that should be driven
OffsetField field drive of Float2 The texture's TextureOffset field that should be driven
AtlasInfo direct RelayRef`1<AtlasInfo> The AtlasInfo component that provides the size and frame amount for the atlas
Frame Int Which frame of the atlas the texture scale and offset should be driven to

Usage

Attach to a slot and provide the component with the Scale and Offset fields of any Material. Then, set the material's image to a sprite sheet of a set of animation frames. Then provide a Component:AtlasInfo with the proper data. Finally, use a Component:TimeIntDriver to drive Frame to animate always, or set/drive Frame to the frame on the sheet you want in some other way like ProtoFlux.

Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


See Also