 			var xyzStream 		: VertexStream 	= vertexStream.getStreamByComponent(VertexComponent.XYZ);
 			var format 			: VertexFormat 	= xyzStream.format;
 			var xyzVertexSize 	: uint 			= format.numBytesPerVertex;
-			var offset			: uint 			= format.getOffsetForComponent(VertexComponent.XYZ);
+			var offsetInBytes	: uint 			= format.getBytesOffsetForComponent(VertexComponent.XYZ);
+			var stride			: uint			= VertexComponent.XYZ.numProperties;
 			
 			var localDirectionX : Number 		= localDirection.x;
 			var localDirectionY	: Number 		= localDirection.y;

			var edge2Y 			: Number 		= .0;
			var edge2Z 			: Number 		= .0;	
			
			for (var verticeIndex : uint = 0; verticeIndex < numVertices; verticeIndex += 3)
			{
				indicesData.position = verticeIndex * 2;
				
				xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offset
				v0X = xyzData.readFloat();
				v0Y = xyzData.readFloat();
				v0Z = xyzData.readFloat();

				xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offset;
				v1X = xyzData.readFloat();
				v1Y = xyzData.readFloat();
				v1Z = xyzData.readFloat();
				
				xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offset;
				v2X = xyzData.readFloat();
				v2Y = xyzData.readFloat();
				v2Z = xyzData.readFloat();

				{
					indicesData.position = triangleIndice * 2;
					
					xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offsetInBytes
					v0X = xyzData.readFloat();
					v0Y = xyzData.readFloat();
					v0Z = xyzData.readFloat();
					
					xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offsetInBytes;
					v1X = xyzData.readFloat();
					v1Y = xyzData.readFloat();
					v1Z = xyzData.readFloat();
					
					xyzData.position = indicesData.readUnsignedShort() * xyzVertexSize + offsetInBytes;
					v2X = xyzData.readFloat();
					v2Y = xyzData.readFloat();
					v2Z = xyzData.readFloat();
