-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
When I try to calcualte the boundingBox for the TextGeometry using .setFromObject method it returns an object with NaN valueses.
const geometry = createGeometry({
text: 'Lorem ipsum',
align: 'left',
width: 2000,
font: font,
});
const material = new RawShaderMaterial(SDFShader({
map: texture,
transparent: true,
color: 0xfffffff,
}))
const mesh = new Mesh(geometry, material);
const box = new Box3();
box.setFromObject(mesh);
console.log(box); // { min: { x: NaN, y: NaN, z: NaN }, max: { x: NaN, y: NaN, z: NaN } }UPDATE 1:
I found that three-bmfont-text attribute uses itemSize = 2. But Box3 expects Vector3 as well as itemSize = 3.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels