diff --git a/src/away/containers/View.ts b/src/away/containers/View.ts index 27f5c706..de951793 100644 --- a/src/away/containers/View.ts +++ b/src/away/containers/View.ts @@ -381,7 +381,8 @@ module away.containers if (this._pRenderer.x == value) return; - this._pRenderer.x == value; + this._pRenderer.x = value; + this._pRenderer._pStageGL.x = value; this._htmlElement.style.left = value + "px"; } @@ -398,7 +399,8 @@ module away.containers if (this._pRenderer.y == value) return; - this._pRenderer.y == value; + this._pRenderer.y = value; + this._pRenderer._pStageGL.y = value; this._htmlElement.style.top = value + "px"; } diff --git a/src/away/core/base/BitmapData.ts b/src/away/core/base/BitmapData.ts index 6023b8b5..81ad9d5c 100644 --- a/src/away/core/base/BitmapData.ts +++ b/src/away/core/base/BitmapData.ts @@ -179,14 +179,15 @@ module away.base if (this._imageData) { inputByteArray.position = 0; var i:number /*uint*/, j:number /*uint*/, index:number /*uint*/; - for (i = 0; i < rect.width; ++i) { - for (j = 0; j < rect.height; ++j) { - index = (i + rect.x + (j + rect.y)*this._imageCanvas.width)*4; - - this._imageData.data[index + 0] = inputByteArray.readUnsignedInt(); - this._imageData.data[index + 1] = inputByteArray.readUnsignedInt(); - this._imageData.data[index + 2] = inputByteArray.readUnsignedInt(); - this._imageData.data[index + 3] = inputByteArray.readUnsignedInt(); + for (i = rect.height-1; i >= 0; --i) { // height counter has to be in the outer loop, reversed y orientation + for (j = 0; j < rect.width; ++j) { + index = (j + rect.x + (i + rect.y)*this._imageCanvas.width)*4; + + var argb = away.utils.ColorUtils.float32ColorToARGB(inputByteArray.readUnsignedInt()); // readUnsignedInt returns a 32 bit color value + this._imageData.data[index + 0] = argb[3]; // B + this._imageData.data[index + 1] = argb[2]; // G + this._imageData.data[index + 2] = argb[1]; // R + this._imageData.data[index + 3] = argb[0]; // A } } } diff --git a/src/away/prefabs/PrimitiveCylinderPrefab.ts b/src/away/prefabs/PrimitiveCylinderPrefab.ts index e580d2fd..65b75385 100644 --- a/src/away/prefabs/PrimitiveCylinderPrefab.ts +++ b/src/away/prefabs/PrimitiveCylinderPrefab.ts @@ -319,7 +319,7 @@ module away.prefabs if (i > 0) { // add triangle - indices[fidx++] = nextVertexIndex; + indices[fidx++] = nextVertexIndex + 3; indices[fidx++] = nextVertexIndex + 1; indices[fidx++] = nextVertexIndex + 2; @@ -394,9 +394,9 @@ module away.prefabs if (i > 0) { // add triangle - indices[fidx++] = nextVertexIndex; indices[fidx++] = nextVertexIndex + 2; indices[fidx++] = nextVertexIndex + 1; + indices[fidx++] = nextVertexIndex + 3; nextVertexIndex += 2; }