1

我尝试加载 imageData 以在 threeJS 中创建纹理。我尝试这样,但它不起作用。

pMaterial =
new THREE.ParticleBasicMaterial({
    color: 0xFFFFFF,
    size: 20,
    map: THREE.DataTexture(
        myimageData
        ),
    blending: THREE.AdditiveBlending,
    transparent: true
});

谢谢你的帮助。

4

1 回答 1

3

它适用于以下代码。

var texture = new THREE.Texture(myImageData);
texture.needsUpdate = true;

particles = new THREE.Geometry(),
pMaterial =
new THREE.ParticleBasicMaterial({
    size: 20,
    map: texture,
    blending: THREE.AdditiveBlending,
    transparent: true
});
于 2012-11-23T07:34:56.003 回答