Skip to content

makeText

makeText(opt): GameObj<BaseComps & RenderComps & TextComp>

Make an object with a text component. Maker extends makeRender

Parameters

ParameterType
optObjOpt & RenderOpt & TextOpt

Returns

GameObj<BaseComps & RenderComps & TextComp>

Example

const text = k.add(k.makeText(\{
text: "Hello, world!", // from makeText
size: 24, // from makeText
opacity: 0, // from makeRender
\}));
@group Object Makers
## Source
global.d.ts:8