Skip to content

Commit

Permalink
fixes introduced by bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Sep 26, 2023
1 parent c92ef8a commit d494db1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cityslingvr.arvr.social
cabanier.github.io/cityslingvr
14 changes: 0 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-155298280-1"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag("config", "UA-155298280-1");
</script>
<meta charset="utf-8" />
<meta name="keywords" content="WebXR, VR, City Sling VR" />
<title>City Sling VR Experience</title>
Expand Down
18 changes: 10 additions & 8 deletions tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ AFRAME.registerComponent("tile", {
for (const item of this.data.buildingTextures) {
treebuildingTextures.push(this.createThreeTexture(textureLoader, item, 20, 20));
}
/*

groundPlane = document.createElement("a-plane");
//plane.setAttribute("position", { x: 0, y: -1 * this.data.sidewalkHeight, z: 0 });
groundPlane.setAttribute("id", groundPlane);
Expand All @@ -53,13 +53,16 @@ AFRAME.registerComponent("tile", {
});
groundPlane.setAttribute("instanced-mesh", "");
this.el.appendChild(groundPlane);
*/

}

this.randState = TILE_COUNTER++;

this.addGround1();

let buildings = [this.addBuildings1.bind(this), this.addBuildings2.bind(this)];
buildings[this.nextRandElement(buildings)]();

this.__proto__.play = function emitChange () {};
},

Expand All @@ -73,7 +76,6 @@ AFRAME.registerComponent("tile", {
},

addGround1: function() {
/*
let plane = document.createElement("a-plane");
plane.setAttribute("position", { x: 0, y: -1 * this.data.sidewalkHeight, z: 0 });
plane.setAttribute("width", this.data.tileSize);
Expand All @@ -85,11 +87,7 @@ AFRAME.registerComponent("tile", {
shader: "flat",
depthWrite: false,
side: "front"
});*/

let plane = document.createElement("a-entity");
plane.setAttribute("position", { x: 0, y: -1 * this.data.sidewalkHeight, z: 0 });
plane.setAttribute("instanced-mesh-member", "mesh:#groundPlane");
});
this.el.appendChild(plane);

// sidewalk
Expand Down Expand Up @@ -141,6 +139,10 @@ AFRAME.registerComponent("tile", {
this.el.appendChild(roof);
},

addBuildings1: function() {
this.addBuilding(90, 90, 50 + 150 * this.nextRand(), 20 * this.nextRand() - 10, 20 * this.nextRand() - 10);
},

addBuildings2: function() {
this.addBuilding(50, 50, 40 + 100 * this.nextRand(), -35 - this.nextRand() * 8, -35 - this.nextRand() * 8);
this.addBuilding(50, 50, 60 + 90 * this.nextRand(), 35 + this.nextRand() * 8, -35 - this.nextRand() * 8);
Expand Down

0 comments on commit d494db1

Please sign in to comment.