-
Notifications
You must be signed in to change notification settings - Fork 17
Getting Offset Overflows texture dimension on Three.js 0.136.0 #29
Copy link
Copy link
Open
Description
I just updated both my Three.js from 0.117 to 0.136 and also updated your libraries:
- "three.textsprite": "18.7.14"-> "@seregpie/three.text-sprite": "^3.2.0"
- @seregpie/three.text-texture": "^2.0.1 -> "@seregpie/three.text-sprite": "^3.2.0"
When adding the TextSprite object to the scene I'm getting "GI_INVALID_VALUE: Offset overflows texture dimensions." printed to console by the WEBGL driver:
Example code failing:
const spriteMD = new TextSprite({
color,
fontFamily: 'Arial Helvetica, sans-serif',
fontSize: 8,
text: (pt[0] - yofs).toFixed(0).toString(),
});
spriteMD.position.set(x + 1, y, z + 1);
scene.add(spriteMD);Using TextTexure and manually creating a sprite works on the other hand:
let texture = new TextTexture({
color: cssColor,
fontFamily: 'Arial Helvetica, sans-serif',
fontSize: 32,
text: y > starty ? y.toString() : y.toString() + ' [' + prefUnit + ']',
});
let material = new THREE.SpriteMaterial({
map: texture,
sizeAttenuation: false,
});
const sprite = new THREE.Sprite(material);
sprite.position.set(startx * SCALE, -y * SCALE, -endz * SCALE);
scene.add(sprite);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
