SceneObjectText
Extends: SceneObjectBillboard
Properties
drawable(DrawableText)
Constructor
new SceneObjectText(
name: string,
drawableObj: DrawableText,
): SceneObjectTextParameters
name(string)drawableObj(DrawableText)
Instance Methods
getBoundingPoints(cameraObj: Camera): dynamic
Text always has a real width/height, unlike SceneObjectPolygon/SceneObjectModel (see the comment on SceneObjectBillboard.computeBillboardWorldCorners()) - so this overrides the base SceneObject.getBoundingPoints() wrapper to always return the object's 4 world-space corners rather than the frustum check's single-point shortcut in screen-aligned draw modes.
Parameters
cameraObj(Camera)
Returns
dynamic— the object's 4 world-space corners
getUniqueRegionName(): string
Returns
string
getRegionWithIdToDraw(
rendererObj: BGE.Renderer,
): BGE.RendererHelpers.RegionWithId
Parameters
rendererObj(BGE.Renderer)
Returns
BGE.RendererHelpers.RegionWithId
didRegionToDrawChange(): boolean
Returns
boolean
getPinnedCornersOptions(): DrawPinnedCornersOptions
Returns
needsManualPretranslationForDirectMode(): boolean
Returns
boolean
isEligibleForFastDrawCheck(
drawMode: SceneObjectDrawMode,
): boolean
Rendered text is always a single flat quad, same as DrawableCircle/Image - so the same exact analytic check (#105/#163) applies: only the oriented modes ever pay for a temp bitmap at all (see the base class's default useTempBitmapMap), and only need to when this frame's projected quad isn't a plain rotated rectangle.
Parameters
drawMode(SceneObjectDrawMode)
Returns
boolean
drawToCanvas(
rendererObj: BGE.Renderer,
drawMode: SceneObjectDrawMode,
): boolean
oriented modes only reach here once usesTempBitmap() has already decided the fast path is safe - drawn via the base class's drawFastPath() instead of the inherited drawToTempBitmap/drawPinnedCorners path (correct but far more expensive - the whole point of this fast path).
Parameters
rendererObj(BGE.Renderer)drawMode(SceneObjectDrawMode)
Returns
boolean