build/browser/index.js
/**
     * reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive.
     * @hidden
     */
reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive.
@hidden
reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive . @hidden
function reduce(primitives) {
        for (var i = 0; i < primitives.length; i++) {
            var primitive = primitives[i];
            if (primitive.mode !== exports.BeginMode.TRIANGLE_STRIP) {
                throw new Error("mode (" + primitive.mode + ") must be TRIANGLE_STRIP");
            }
        }
        return primitives.reduce(function (previous, current) {
            var indices = [];
            copyIndices(previous, indices, 0);
            joinIndices(previous, current, indices);
            copyIndices(current, indices, max(previous.indices) + 1);
            var attributes = {};
            copyAttributes(previous, attributes);
            copyAttributes(current, attributes);
            return {
                mode: exports.BeginMode.TRIANGLE_STRIP,
                indices: indices,
                attributes: attributes
            };
        });
    }
function reduce ( primitives ) { for ( var i = 0 ; i < primitives . length ; i ++ ) { var primitive = primitives [ i ] ; if ( primitive . mode !== exports . BeginMode . TRIANGLE_STRIP ) { throw new Error ( "mode (" + primitive . mode + ") must be TRIANGLE_STRIP" ) ; } } return primitives . reduce ( function ( previous , current ) { var indices = [ ] ; copyIndices ( previous , indices , 0 ) ; joinIndices ( previous , current , indices ) ; copyIndices ( current , indices , max ( previous . indices ) + 1 ) ; var attributes = { } ; copyAttributes ( previous , attributes ) ; copyAttributes ( current , attributes ) ; return { mode : exports . BeginMode . TRIANGLE_STRIP , indices : indices , attributes : attributes } ; } ) ; }
reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive.
reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive .