diff --git a/.changeset/text3d-depth.md b/.changeset/text3d-depth.md new file mode 100644 index 0000000..4943601 --- /dev/null +++ b/.changeset/text3d-depth.md @@ -0,0 +1,5 @@ +--- +'@vosjs/core': patch +--- + +Fix text3d extrusion depth: TextGeometry's option is `depth` on current three (the legacy `height` alias is ignored and the extrusion fell back to the default 50, collapsing normalized text to a sliver). diff --git a/packages/core/src/compiler/generators/generateObjectsSetup.ts b/packages/core/src/compiler/generators/generateObjectsSetup.ts index 71214ad..d9547b7 100644 --- a/packages/core/src/compiler/generators/generateObjectsSetup.ts +++ b/packages/core/src/compiler/generators/generateObjectsSetup.ts @@ -64,7 +64,7 @@ export function generateObjectsSetup(config: any): string { const geo = new TextGeometry(a.text, { font, size: 1, - height: a.depth == null ? 0.25 : a.depth, + depth: a.depth == null ? 0.25 : a.depth, curveSegments: 8, bevelEnabled: a.bevel !== false, bevelThickness: 0.02,