【问题标题】:Rendering sharp text as a three.js texture将清晰的文本渲染为 three.js 纹理
【发布时间】:2018-12-26 20:47:09
【问题描述】:

我有一个 512x512 的 SVG,我正在绘制一个像这样的圆形平面

    const texture = new THREE.TextureLoader().load('img/plane.svg');
​
    const material = new THREE.MeshBasicMaterial({
        transparent: true,
        map: texture,
        side: THREE.DoubleSide
    });
    const geometry = new THREE.CircleGeometry(5, 64);
    const plane = new THREE.Mesh(geometry, material);
    plane.rotation.x = -1;
    scene.add(plane);

它工作正常,但这个 SVG 上有一些文本,它是 在three.js中渲染时真的很模糊:

如何使这个尽可能清晰?

作为参考,这里是渲染为 512x512 png 的 SVG:

【问题讨论】:

    标签: javascript three.js textures


    【解决方案1】:

    …就在我决定在这里发帖时,我通过添加material.map.minFilter = THREE.LinearFilter;解决了我的问题

    【讨论】:

    猜你喜欢
    • 2012-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-24
    • 2017-02-18
    • 1970-01-01
    • 1970-01-01
    • 2022-01-25
    相关资源
    最近更新 更多