We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to calcualte the boundingBox for the TextGeometry using .setFromObject method it returns an object with NaN valueses.
boundingBox
TextGeometry
.setFromObject
NaN
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.
three-bmfont-text
attribute
Box3
Vector3
The text was updated successfully, but these errors were encountered:
I found that on the last iteration on this line z coordinate is undefined.
z
undefined
Sorry, something went wrong.
I think this PR solves this issue #5
You can give it a try with yarn add github:kig/three-bmfont-text#vec4-positions
yarn add github:kig/three-bmfont-text#vec4-positions
No branches or pull requests
When I try to calcualte the
boundingBox
for theTextGeometry
using.setFromObject
method it returns an object withNaN
valueses.UPDATE 1:
I found that
three-bmfont-text
attribute
uses itemSize = 2. ButBox3
expectsVector3
as well as itemSize = 3.The text was updated successfully, but these errors were encountered: