You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
graphics-2d drawables: text alignment, outline, image crop and pivot #32
Which package or utils is this feature request for?
components
Feature
The graphics-2d drawables miss options the example games needed (NanoForge-dev/examples#18), each worked around in the game:
DrawableText2D (drawable-text-2d.ts): no width or alignment, so a text can't be centered (tic-tac-toe has its own CenterText2D and system); no bold or italic.
no pivot: it rotates around its top-left corner, so flappy-bird sets the Konva offset itself to turn the bird around its middle.
Ideal solution or implementation
DrawableText2D: width, align (left, center, right), fontStyle.
DrawableRect2D: stroke and strokeWidth with an optional fill, crop (x, y, width, height of the image), and a pivot (offsetX/offsetY, or a centered flag) used for rotation.
Activity