Skip to content

WavePlacement

ClassTextStudioTextStudio
public class WavePlacement : IPlacementContextStrategy, IPlacementStrategy

Wave placement: applies a sine wave offset to layout Y positions. The local tangent of the sine curve is stored in tangent so the hub’s rotation module can align glyphs to the slope when rotate is on.

The Text Studio hub supplies its preview-controlled evaluation time so playback speed, pause, restart, scrubbing, and Raw authoring all produce deterministic placement. Direct strategy callers retain the real-time clock used by the original public placement contract.

public float amplitude

Returns

System.Single

public float frequency

Returns

System.Single

public float phase

Returns

System.Single

public float speed

Returns

System.Single

ComputePlacements(Vector3[], GlyphPlacement[], int)

Section titled “ComputePlacements(Vector3[], GlyphPlacement[], int)”
public void ComputePlacements(Vector3[] layoutPositions, GlyphPlacement[] placements, int glyphCount)

Compute placements for all visible glyphs.

Parameters

Name Type Description
layoutPositions UnityEngine.Vector3[] Input: baseline positions from the layout engine.
placements TextStudio.GlyphPlacement[] Output: final 3D placements.
glyphCount System.Int32 Number of glyphs.

ComputePlacements(in PlacementContext, GlyphPlacement[])

Section titled “ComputePlacements(in PlacementContext, GlyphPlacement[])”
public void ComputePlacements(in PlacementContext context, GlyphPlacement[] placements)

Writes placements for every visible glyph using its current layout and line metadata.

Parameters

Name Type
context TextStudio.PlacementContext
placements TextStudio.GlyphPlacement[]

public WavePlacement()

public PlacementMode Mode { get; }

Returns

TextStudio.PlacementMode