Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/away/containers/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand All @@ -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";
}

Expand Down
17 changes: 9 additions & 8 deletions src/away/core/base/BitmapData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/away/prefabs/PrimitiveCylinderPrefab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down