我尝试加载imageData以在threeJS中创建纹理。 我尝试这样,但它不起作用。
pMaterial =
new THREE.ParticleBasicMaterial({
color: 0xFFFFFF,
size: 20,
map: THREE.DataTexture(
myimageData
),
blending: THREE.AdditiveBlending,
transparent: true
});
感谢您的帮助。
答案 0 :(得分: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
});