【问题标题】:Change Extrude Amount textGeometry Three.js更改拉伸量 textGeometry Three.js
【发布时间】:2018-05-22 16:46:46
【问题描述】:

我已使用https://threejs.org/docs/#api/geometries/TextGeometry 中的代码将文本添加到我的场景中

我不知道如何更改挤出深度,这比我想要的要“厚”得多。这是我正在使用的确切代码:

var loader = new THREE.FontLoader();
loader.load( 'fonts/font.json', function ( font ) {
var textGeometry = new THREE.TextGeometry( 'WELCOME', {
    font: font,
    size: 4,
    height: 8,
    amount: 8,//attempt to change the depth but doesn't work
} );

是否可以更改文本几何图形的拉伸量?

【问题讨论】:

  • documentation 说:height — 浮动。挤出文本的厚度。默认为 50。

标签: three.js


【解决方案1】:

同时应用heightamount 不起作用。 amountExtrudeGeometry 的一个选项,而 height 是为 TextGeometry 设计的。

TextGeometry 在内部使用 ExtrudeGeometry 进行几何生成。在这种情况下,height 映射到 amount

三个.js R92

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-07
    • 2014-04-15
    • 2019-08-13
    • 1970-01-01
    • 1970-01-01
    • 2013-03-26
    • 2016-12-04
    相关资源
    最近更新 更多