3D Text Example TypeScript

3D Text Example TypeScript script details
Author
matas
Type
Typescript logo image
typescript
App Version
0.13.0
Visibility
public
Date Created
Sep 17, 2023, 10:37:39 AM
Last Edit Date
Dec 5, 2023, 4:22:20 PM

Script Details

The Code
const s = async () => { const inputs = new Bit.Advanced.Text3D.Text3DDto(); inputs.text = "Hello World! We are bitbybit.dev"; inputs.fontType = Bit.Advanced.Text3D.fontsEnum.Lugrasimo; inputs.fontSize = 3; const d = await bitbybit.advanced.text3d.create(inputs); const translated = await bitbybit.occt.transforms.translate({ shape: d.compound, translation: [d.advanceWidth / 2, 0, 0] }); const options = new Bit.Inputs.Draw.DrawOcctShapeOptions(); options.faceColour = "#ff0000"; options.edgeColour = "#aaaaaa"; bitbybit.draw.drawAnyAsync({ entity: translated, options }); } s();