ItalicText

ceramic.Entityelements.ItalicText (Class)
Implements: ceramic.Component

A component that applies italic-style skewing to Text visuals.

This component simulates italic text by applying a horizontal skew transform to each glyph quad in a Text visual. This is useful when true italic fonts are not available or when a consistent italic angle is desired across different fonts.

Features

  • Applies uniform skew to all glyphs
  • Automatically updates when text content changes
  • Configurable skew angle

Usage Example

var text = new Text();
text.content = "Hello World";
text.component(new ItalicText());

// Adjust italic angle (default is 10 degrees)
var italic = text.component<ItalicText>();
italic.skewX = 15; // More pronounced italic

Instance Members

elements
entity: ceramic.Text

The Text entity this component is attached to. Automatically set when the component is bound.


elements
skewX: Float

The horizontal skew angle in degrees to apply to each glyph. Positive values skew to the right (standard italic). Default is 10 degrees.


elements
initializerName: String

elements
new(): Void

Private Members

elements
bindAsComponent(): Void

Called when this component is bound to a Text entity. Sets up listeners to apply italic transform when glyphs change.


elements
applyItalicTransform(): Void

Applies the italic skew transform to all glyph quads in the text. Called automatically when text content or skewX changes.


elements
setEntity(entity: ceramic.Entity): Void
Name Type
entity ceramic.Entity

elements
getEntity(): ceramic.Entity
Returns
ceramic.Entity

Metadata

Name Parameters
:build ceramic.macros.ComponentMacro.build()
:autoBuild ceramic.macros.ComponentMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()