private float[] generateTextureUv() {
        int size = ParticleSystem.TEXTURE_COORDS_DATA_SIZE * 6;

        final float[] thisUvData = new float[size];

        final float u0 = 0f;
        final float v0 = 0f;
        final float u1 = 1f;
        final float v1 = 1f;

        final int elementsPerPoint = ParticleSystem.TEXTURE_COORDS_DATA_SIZE;

        int offset = 0;

        //  1---2
        //  | / |
        //  3---4

        final float[] p1 = {u1, v0};
        final float[] p2 = {u0, v0};
        final float[] p3 = {u1, v1};
        final float[] p4 = {u0, v1};

        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p1[i];
        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p3[i];
        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p2[i];

        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p3[i];
        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p4[i];
        for (int i = 0; i < elementsPerPoint; i++)
            thisUvData[offset++] = p2[i];

        return thisUvData;
    }
Started by Artem Kholodnyi on 11/29/15 6:13 PM -- com.yalantis.starwarsdemo.particlesys
demo/src/main/java/com/yalantis/starwarsdemo/particlesys/ParticlesGenerator.java