如何在缩放时謘pritewin10文本缩放大小不变

In three.js, when the mouse is zoomed, the text will be magnified and reduced accordingly.
var texture = new THREE.Texture( canvas );
var material = new THREE.SpriteMaterial ( { map: texture, transparent:false } );
var sprite = new THREE.Sprite( material );
How do you keep the text size from changing when the mouse is zoomed?
解决方案 The new behavior is for sprites to scale according to their distance from the perspective camera -- just like other objects do.
If you do not want them to scale, you can overlay a second scene of sprites, rendered with an orthographic camera. See .
It is called a "heads-up-display", or HUD.
three.js r.63
本文地址: &
var texture = new THREE.Texture(canvas);
var material = new THREE.SpriteMaterial({map:texture,transparent:false});
var sprite = new THREE.Sprite(material);
当鼠标放大时,文字大小如何变化?
解决方案 新的行为是精灵根据他们与透视相机的距离缩放 - 就像其他对象一样。
如果你不想让它们缩放,你可以重叠第二个sprites场景,用正交相机渲染。请参见。
它被称为“平视显示器”或HUD。
three.js r.63
本文地址: &
扫一扫关注官方微信

我要回帖

更多关于 文本缩放 的文章

 

随机推荐