• C
    Options to particleNoiseTex and particleSpriteText (#9324) · 1a7d9e0b
    Claudio Gamboa 提交于
    Added support to options particleNoiseTex and particleSpriteTex. In this way it is possible to load a texture before and use it always in  all instances.  
    
    Dunno if you will agree with this pull request, but the reason to create it is because I'm using a lot of GPUParticleSystem instances and I need to improve all the requests to textures that this component is doing. 
    
    Now I just need to do: 
    ```js 
    // .... 
    var textureLoader = new THREE.TextureLoader();
    var particleNoiseTex = textureLoader.load("images/perlin-512.png");
    var particleSpriteTex = textureLoader.load("images/particle2.png");
    
    // ... 
    // each time I need to instance GPUParticleSystem 
    
    	var particleSystem = new THREE.GPUParticleSystem({
    			maxParticles: 200,
    			particleNoiseTex: particleNoiseTex, 
       			particleSpriteTex: particleSpriteTex
    		});
    // .... 
    ```
    1a7d9e0b
GPUParticleSystem.js 15.6 KB