public virtual AsVertexData clone(int vertexID, int numVertices)
        {
            if (numVertices < 0 || vertexID + numVertices > mNumVertices)
            {
                numVertices = mNumVertices - vertexID;
            }
            AsVertexData clone = new AsVertexData(0, mPremultipliedAlpha);

            clone.mNumVertices = numVertices;
            clone.mRawData     = mRawData.slice(vertexID * ELEMENTS_PER_VERTEX, numVertices * ELEMENTS_PER_VERTEX);
            clone.mRawData.setOwnProperty("_fixed", true);
            return(clone);
        }
Exemplo n.º 2
0
        public virtual AsQuadBatch clone()
        {
            AsQuadBatch clone = new AsQuadBatch();

            clone.mVertexData   = mVertexData.clone(0, mNumQuads * 4);
            clone.mIndexData    = mIndexData.slice(0, mNumQuads * 6);
            clone.mNumQuads     = mNumQuads;
            clone.mTinted       = mTinted;
            clone.mTexture      = mTexture;
            clone.mSmoothing    = mSmoothing;
            clone.mSyncRequired = true;
            clone.setBlendMode(getBlendMode());
            clone.setAlpha(getAlpha());
            return(clone);
        }