pc.extend(pc, function () {
    'use strict';

    var _typeSize = [];
    _typeSize[pc.ELEMENTTYPE_INT8   ] = 1;
    _typeSize[pc.ELEMENTTYPE_UINT8  ] = 1;
    _typeSize[pc.ELEMENTTYPE_INT16  ] = 2;
    _typeSize[pc.ELEMENTTYPE_UINT16 ] = 2;
    _typeSize[pc.ELEMENTTYPE_INT32  ] = 4;
    _typeSize[pc.ELEMENTTYPE_UINT32 ] = 4;
    _typeSize[pc.ELEMENTTYPE_FLOAT32] = 4;

    /**
     * @name pc.VertexFormat
     * @class A vertex format is a descriptor that defines the layout of vertex data inside
     * a {@link pc.VertexBuffer}.
     * @description Returns a new pc.VertexFormat object.
     * @param {pc.GraphicsDevice} graphicsDevice The graphics device used to manage this vertex format.
     * @param {Object[]} description An array of vertex attribute descriptions.
     * @param {Number} description[].semantic The meaning of the vertex element. This is used to link
     * the vertex data to a shader input. Can be:
     * <ul>
     *     <li>pc.SEMANTIC_POSITION</li>
     *     <li>pc.SEMANTIC_NORMAL</li>
     *     <li>pc.SEMANTIC_TANGENT</li>
     *     <li>pc.SEMANTIC_BLENDWEIGHT</li>
     *     <li>pc.SEMANTIC_BLENDINDICES</li>
     *     <li>pc.SEMANTIC_COLOR</li>
     *     <li>pc.SEMANTIC_TEXCOORD0</li>
     *     <li>pc.SEMANTIC_TEXCOORD1</li>
     *     <li>pc.SEMANTIC_TEXCOORD2</li>
     *     <li>pc.SEMANTIC_TEXCOORD3</li>
     *     <li>pc.SEMANTIC_TEXCOORD4</li>
     *     <li>pc.SEMANTIC_TEXCOORD5</li>
     *     <li>pc.SEMANTIC_TEXCOORD6</li>
     *     <li>pc.SEMANTIC_TEXCOORD7</li>
     * </ul>
     * If vertex data has a meaning other that one of those listed above, use the user-defined
     * semantics: pc.SEMANTIC_ATTR0 to pc.SEMANTIC_ATTR15.
     * @param {Number} description[].components The number of components of the vertex attribute.
     * Can be 1, 2, 3 or 4.
     * @param {Number} description[].type The data type of the attribute. Can be:
     * <ul>
     *     <li>pc.ELEMENTTYPE_INT8</li>
     *     <li>pc.ELEMENTTYPE_UINT8</li>
     *     <li>pc.ELEMENTTYPE_INT16</li>
     *     <li>pc.ELEMENTTYPE_UINT16</li>
     *     <li>pc.ELEMENTTYPE_INT32</li>
     *     <li>pc.ELEMENTTYPE_UINT32</li>
     *     <li>pc.ELEMENTTYPE_FLOAT32</li>
     * </ul>
     * @param {Boolean} description[].normalize If true, vertex attribute data will be mapped from a
     * 0 to 255 range down to 0 to 1 when fed to a shader. If false, vertex attribute data is left
     * unchanged. If this property is unspecified, false is assumed.
     * @example
     * // Specify 3-component positions (x, y, z)
     * var vertexFormat = new pc.VertexFormat(graphicsDevice, [
     *     { semantic: pc.SEMANTIC_POSITION, components: 3, type: pc.ELEMENTTYPE_FLOAT32 },
     * ]);
     * @example
     * // Specify 2-component positions (x, y), a texture coordinate (u, v) and a vertex color (r, g, b, a)
     * var vertexFormat = new pc.VertexFormat(graphicsDevice, [
     *     { semantic: pc.SEMANTIC_POSITION, components: 2, type: pc.ELEMENTTYPE_FLOAT32 },
     *     { semantic: pc.SEMANTIC_TEXCOORD0, components: 2, type: pc.ELEMENTTYPE_FLOAT32 },
     *     { semantic: pc.SEMANTIC_COLOR, components: 4, type: pc.ELEMENTTYPE_UINT8, normalize: true }
     * ]);
     * @author Will Eastcott
     */
    var VertexFormat = function (graphicsDevice, description) {
        var i, len, element;

        this.elements = [];
        this.hasUv0 = false;
        this.hasUv1 = false;
        this.hasColor = false;

        this.size = 0;
        for (i = 0, len = description.length; i < len; i++) {
            var elementDesc = description[i];
            element = {
                name: elementDesc.semantic,
                offset: 0,
                stride: 0,
                stream: -1,
                scopeId: graphicsDevice.scope.resolve(elementDesc.semantic),
                dataType: elementDesc.type,
                numComponents: elementDesc.components,
                normalize: (elementDesc.normalize === undefined) ? false : elementDesc.normalize,
                size: elementDesc.components * _typeSize[elementDesc.type]
            };
            this.elements.push(element);

            this.size += element.size;
            if (elementDesc.semantic===pc.SEMANTIC_TEXCOORD0) {
                this.hasUv0 = true;
            } else if (elementDesc.semantic===pc.SEMANTIC_TEXCOORD1) {
                this.hasUv1 = true;
            } else if (elementDesc.semantic===pc.SEMANTIC_COLOR) {
                this.hasColor = true;
            }
        }

        var offset = 0;
        for (i = 0, len = this.elements.length; i < len; i++) {
            element = this.elements[i];

            element.offset = offset;
            element.stride = this.size;

            offset += element.size;
        }
    };

    return {
        VertexFormat: VertexFormat
    };
}());

@@ -97,19 +97,16 @@
 YPE_INT8
-   
 %5D = 1;%0A 
@@ -138,18 +138,16 @@
 PE_UINT8
-  
 %5D = 1;%0A 
@@ -179,18 +179,16 @@
 PE_INT16
-  
 %5D = 2;%0A 
@@ -221,17 +221,16 @@
 E_UINT16
- 
 %5D = 2;%0A 
@@ -262,18 +262,16 @@
 PE_INT32
-  
 %5D = 4;%0A 
@@ -304,17 +304,16 @@
 E_UINT32
- 
 %5D = 4;%0A 
@@ -4121,16 +4121,106 @@
 ement);%0A
+            //This buffer will be accessed by a Float32Array and so must be 4 byte aligned
 %0A       
@@ -4233,24 +4233,34 @@
 his.size += 
+Math.ceil(
 element.size
@@ -4251,32 +4251,41 @@
 eil(element.size
+ / 4) * 4
 ;%0A            if
@@ -4298,35 +4298,37 @@
 entDesc.semantic
+ 
 ===
+ 
 pc.SEMANTIC_TEXC
@@ -4407,35 +4407,37 @@
 entDesc.semantic
+ 
 ===
+ 
 pc.SEMANTIC_TEXC
@@ -4524,19 +4524,21 @@
 semantic
+ 
 ===
+ 
 pc.SEMAN

Fix issue with creating skinned meshes (#999)