Skip to content

Commit

Permalink
Support for ImageBitmapLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
netpro2k committed Apr 5, 2019
1 parent 644c290 commit fadbf40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/media-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ AFRAME.registerComponent("media-video", {
// invert the geometry on the x-axis so that all of the faces point inward
geometry.scale(-1, 1, 1);
} else {
geometry = new THREE.PlaneGeometry();
geometry = new THREE.PlaneBufferGeometry();
material.side = THREE.DoubleSide;
}

Expand Down Expand Up @@ -758,7 +758,7 @@ AFRAME.registerComponent("media-image", {
// invert the geometry on the x-axis so that all of the faces point inward
geometry.scale(-1, 1, 1);
} else {
geometry = new THREE.PlaneGeometry();
geometry = new THREE.PlaneBufferGeometry(1, 1, 1, 1, texture.flipY);
material.side = THREE.DoubleSide;
}

Expand Down
3 changes: 3 additions & 0 deletions src/components/teleporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ AFRAME.registerComponent("teleporter", {
// Cylinder.
this.cylinder = document.createElement("a-entity");
this.cylinder.setAttribute("position", { x: 0, y: data.hitCylinderHeight / 2, z: 0 });
if (window.createImageBitmap !== undefined) {
this.cylinder.setAttribute("rotation", { x: 0, y: 0, z: 180 });
}
this.cylinder.setAttribute("geometry", {
primitive: "cylinder",
segmentsHeight: 1,
Expand Down

0 comments on commit fadbf40

Please sign in to comment.