THREE.InstancedBufferGeometry,THREE.MultiMaterial和groups

时间:2016-05-17 15:58:17

标签: three.js buffer-geometry

在将addGroupTHREE.InstancedBufferGeometry一起使用时,我需要澄清THREE.MultiMaterial方法的用法。

这是r75,源代码如下:

THREE.InstancedBufferGeometry.prototype.addGroup = function ( start, count, instances ) {
    this.groups.push( {
        start: start,
        count: count,
        instances: instances
    } );
};

我看不到其他字段"实例"除了" copy"方法。没有" materialIndex"此群组中的字段,例如THREE.BufferGeometry

如果我尝试渲染类似 Mesh( InstancedBufferGeometry, MultiMaterial ) 的内容不起作用,我会收到来自"可见"的错误小组材料中的字段。

instances中使用materialIndex替换addGroup的工作正常,但必须是instances字段的另一种用途。我不明白这一点,或者这可能是一个错误。

在three.js页面中发帖:https://github.com/mrdoob/three.js/issues/8912

0 个答案:

没有答案