Skip to content

Commit

Permalink
Updates to use A-Frame 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DougReeder committed Aug 7, 2024
1 parent 9d1dd02 commit 7c6bdbd
Show file tree
Hide file tree
Showing 31 changed files with 86 additions and 238 deletions.
4 changes: 2 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ by "7718" (https://sketchfab.com/7718) is licensed under Creative Commons Attrib
Hermit's Windmill (https://sketchfab.com/models/f7f354caaf50408fa3f3525eec716d7b)
by "doop" (https://sketchfab.com/doop) is licensed under Creative Commons Attribution

Tower (https://sketchfab.com/3d-models/tower-b08d8f5a40894169b851d269b18ebbbd)
by "beherca" (https://sketchfab.com/beherca) is licensed under Creative Commons Attribution
Tower Crane (https://sketchfab.com/3d-models/tower-crane-49851dc7a51b43bda6aea06856c26a85#download)
by "Chamod1999" (https://sketchfab.com/Chamodp) is licensed under Creative Commons Attribution

konoha tengu (https://sketchfab.com/3d-models/konoha-tengu-low-poly-realtime-character-892bfcdaba3d4a1899214f92ef5e9a63)
is copyrighted by Manoel Darocha Deoliveira
Expand Down
13 changes: 6 additions & 7 deletions arches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
<title>Arches - Elfland Glider</title>
<meta name="description" content="Collect all the stars">
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@^1.3.2/dist/aframe-environment-component.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@^1.3.7/dist/aframe-environment-component.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.0/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@6bebc86ee57f2ccc57637db442f1a36d31f5f61d/dist/aframe-glow-component.min.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@modernize/dist/aframe-glow-component.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Niconne" rel="stylesheet">
<script src="../dist/arches.js">
</script>
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">
</head>
<body>
<a-scene arches>
Expand Down
132 changes: 0 additions & 132 deletions assets/tower/source/tower.gltf

This file was deleted.

Binary file removed assets/tower/textures/stage_tower@512_0.jpeg
Binary file not shown.
15 changes: 7 additions & 8 deletions canyon/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@
<meta name="twitter:card" content="summary_large_image" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-simple-sun-sky@^1.2.3/simple-sun-sky.js"></script>
<script src="https://unpkg.com/aframe-dust-component@^1.1.0/aframe-dust-component.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^2.2.1/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@6bebc86ee57f2ccc57637db442f1a36d31f5f61d/dist/aframe-glow-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.1/dist/aframe-extras.loaders.min.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@modernize/dist/aframe-glow-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@7.5.0/dist/aframe-extras.loaders.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Niconne" rel="stylesheet">
<!--<script src="https://unpkg.com/aframe-fps-counter-component/dist/aframe-fps-counter-component.min.js"></script>-->
<script src="../dist/canyon.js" type="application/javascript"></script>
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">
</head>
<body>
<a-scene canyon background="color:#398bc5">
Expand Down Expand Up @@ -59,7 +58,7 @@
material="shader:canyon; src:#rock" class="landscape"></a-entity>


<a-dust num-points="512" dispersion="33" color="#101010"></a-dust>
<a-dust num-points="512" dispersion="50" color="#101010"></a-dust>

<a-entity class="powerup" position="2 -185 256" material="visible: false"
geometry="primitive:triangle; vertexA:-1.5 -1.5 -1.5; vertexB:1.5 -1.5 1.5; vertexC:1.5 1.5 -1.5">
Expand Down
9 changes: 4 additions & 5 deletions city/city.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// city.js - a domed arctic city, for Elfland Glider
// Copyright © 2019-2023 P. Douglas Reeder; Licensed under the GNU GPL-3.0
// Copyright © 2019–2024 P. Douglas Reeder; Licensed under the GNU GPL-3.0

import {isDesktop, setEnvironmentalSound} from "../src/elfland-utils";
import '../src/state.js'
Expand Down Expand Up @@ -172,10 +172,9 @@ AFRAME.registerComponent('city', {
if (isDesktop()) {
// This decoration does not need to be pre-loaded via the asset mgr
let towerEl = document.createElement('a-gltf-model');
towerEl.setAttribute('src', '../assets/tower/source/tower.gltf');
towerEl.setAttribute('position', '0 -3 0');
towerEl.setAttribute('rotation', '0 -135 0');
towerEl.setAttribute('scale', '15 15 15');
towerEl.setAttribute('src', './tower_crane.glb');
towerEl.setAttribute('position', '44 0 52');
towerEl.setAttribute('scale', '2 2 2');
towerEl.classList.add('landscape');
sceneEl.appendChild(towerEl);
}
Expand Down
15 changes: 7 additions & 8 deletions city/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
<meta name="twitter:card" content="summary_large_image" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-simple-sun-sky@^1.2.3/simple-sun-sky.js"></script>
<script src="https://unpkg.com/aframe-dust-component@^1.1.0/aframe-dust-component.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.0/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>

<script src="https://unpkg.com/aframe-shader-buildings@^2.0.0/dist/main.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@6bebc86ee57f2ccc57637db442f1a36d31f5f61d/dist/aframe-glow-component.min.js"></script>
<script src="https://unpkg.com/aframe-shader-buildings@^2.0.1/dist/main.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@modernize/dist/aframe-glow-component.min.js"></script>

<link href="https://fonts.googleapis.com/css?family=Niconne" rel="stylesheet">
<script src="../dist/city.js">
</script>
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">
</head>
<body>
<a-scene city background="color:#398bc5">
Expand Down Expand Up @@ -78,7 +77,7 @@
<a-entity geometry="primitive:triangle; vertexA:-1700 0 1600; vertexB:-1700 0 -5000; vertexC:-5000 0 1600"
material="shader:settlement; sunPosition:-1 0.75 1" class="landscape"></a-entity>

<a-dust num-points="512" dispersion="50" color="gray"></a-dust>
<a-dust num-points="512" dispersion="75" color="gray"></a-dust>


<a-entity id="armature" geometry="primitive: box; width: 2; height: 2; depth: 2" material="visible:false"
Expand Down
Binary file added city/tower_crane.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/arches.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/arches.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canyon.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canyon.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/city.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/city.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ginnungagap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ginnungagap.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/island.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/island.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tutorial.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tutorial.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yggdrasil.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yggdrasil.js.map

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions ginnungagap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
<title>Ginnungagap - Elfland Glider</title>
<meta name="description" content="Reflect on the choices that led you here">
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.0/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>

<script src="https://unpkg.com/aframe-particle-system-component@^1.1.3/dist/aframe-particle-system-component.min.js"></script>
<script src="../dist/ginnungagap.js"></script>
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">
<script src="https://cdn.jsdelivr.net/gh/c-frame/[email protected]/dist/aframe-particle-system-component.min.js"></script> <script src="../dist/ginnungagap.js"></script>
</head>
<body>
<a-scene background="color:#616279" ginnungagap pool__clouds="mixin:cloud; size:250; dynamic:true"
Expand Down
4 changes: 2 additions & 2 deletions island/aframe-island-component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// aframe-island-component.js - island terrain for Elfland Glider
// Copyright © 2018-2019 P. Douglas Reeder; Licensed under the GNU GPL-3.0
// Copyright © 2018–2024 P. Douglas Reeder; Licensed under the GNU GPL-3.0

import ImprovedNoise from "../src/ImprovedNoise.js"

Expand Down Expand Up @@ -74,7 +74,7 @@ AFRAME.registerComponent('island', {
texture.wrapT = THREE.ClampToEdgeWrapping;

// Create geometry.
var geometry = new THREE.PlaneBufferGeometry(1000, 1000, worldWidth - 1, worldDepth - 1);
var geometry = new THREE.PlaneGeometry(1000, 1000, worldWidth - 1, worldDepth - 1);
geometry.rotateX(-Math.PI / 2);
var vertices = geometry.attributes.position.array;
for (var i = 0, j = 0, l = vertices.length; i < l; i++, j += 3) {
Expand Down
13 changes: 6 additions & 7 deletions island/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@
<meta name="twitter:card" content="summary_large_image" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-simple-sun-sky@^1.2.3/simple-sun-sky.js"></script>
<script src="https://unpkg.com/aframe-dust-component@^1.1.0/aframe-dust-component.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.0/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>

<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@6bebc86ee57f2ccc57637db442f1a36d31f5f61d/dist/aframe-glow-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/DougReeder/aframe-glow@moderize/dist/aframe-glow-component.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Niconne" rel="stylesheet">
<script src="../dist/island.js"></script>

<!--<script src="https://unpkg.com/aframe-fps-counter-component/dist/aframe-fps-counter-component.min.js"></script>-->
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">
</head>
<body>
<a-scene island-world background="color:#398bc5">
Expand All @@ -56,7 +55,7 @@
<a-entity geometry="primitive:triangle; vertexA:-500 0 500; vertexB:-500 0 -7483; vertexC:-7483 0 500"
material="shader: flat; color:#006994;" class="landscape"></a-entity>

<a-dust num-points="512" dispersion="50" color="#f0c"></a-dust>
<a-dust num-points="512" dispersion="75" color="#f0c"></a-dust>

<a-entity id="nextQuestPortal" position="0 15 -500" scale="5 5 0"
link="href:../canyon; title: Canyon; image:../canyon/screenshot.png; on:hitstart; visualAspectEnabled:true"
Expand Down
6 changes: 3 additions & 3 deletions jasmine/aframe-stub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// aframe-stub.js - allows testing app code that uses A-Frame
// Copyright © 2017-2023 P. Douglas Reeder; Licensed under the GNU GPL-3.0
// Copyright © 2017–2024 P. Douglas Reeder; Licensed under the GNU GPL-3.0

var elementParam = {}; // keyed by name

Expand Down Expand Up @@ -80,15 +80,15 @@ var THREE = {
PlaneGeometry: function () {
this.attributes = {position: {array: []}};
},
PlaneBufferGeometry: function () {
BufferGeometry: function () {
this.attributes = {position: {array: []}};
},
MeshBasicMaterial: function () {},
Mesh: function () {}
};
THREE.Vector3.prototype.normalize = function () {};
THREE.Vector3.prototype.dot = function (other) {return this;};
THREE.PlaneBufferGeometry.prototype.rotateX = function () {};
THREE.PlaneGeometry.prototype.rotateX = function () {};

class MockElement {
constructor(attributes) {
Expand Down
17 changes: 1 addition & 16 deletions src/elfland-utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// elfland-utils.js - common functions for Elfland Glider
// Copyright © 2018-2019 P. Douglas Reeder; Licensed under the GNU GPL-3.0
// Copyright © 2018-2024 P. Douglas Reeder; Licensed under the GNU GPL-3.0


function goFullscreenLandscape() {
Expand Down Expand Up @@ -120,19 +120,4 @@ document.addEventListener('visibilitychange', () => {
}, false);


/** Web Monetization */
if (document.monetization) {
function handleMonetizationStart(evt) {
console.log("monetization started:", evt);
}
document.monetization.addEventListener('monetizationstart', handleMonetizationStart);

function handleMonetizationStop(evt) {
console.log("monetization stopped:", evt);
}
document.monetization.addEventListener('monetizationstop', handleMonetizationStop);
} else {
console.log("no monetization API");
}

export {goFullscreenLandscape, isDesktop, isMagicWindow, calcPosChange, placeholderTexture, setEnvironmentalSound, pokeEnvironmentalSound};
9 changes: 4 additions & 5 deletions tutorial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
<title>Tutorial - Elfland Glider</title>
<meta name="description" content="Learn to fly!">
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.core.min.js"></script>
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-button-controls@^1.1.0/aframe-button-controls.js"></script>
<script src="https://unpkg.com/aframe-state-component@^4.7.0/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.1/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-state-component@^7.1.1/dist/aframe-state-component.min.js"></script>
<script src="https://unpkg.com/aframe-dial@^1.2.2/dist/dial.js"></script>
<script src="https://unpkg.com/aframe-simple-sun-sky@^1.2.3/simple-sun-sky.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.0/dist/aframe-aabb-collider-component.min.js"></script>
<script src="https://unpkg.com/aframe-aabb-collider-component@^3.2.2/dist/aframe-aabb-collider-component.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Niconne" rel="stylesheet">

<script src="../dist/tutorial.js"></script>
<meta name="monetization" content="$ilp.uphold.com/jU9WUDJZNgQi">

<!--<script src="https://unpkg.com/aframe-fps-counter-component/dist/aframe-fps-counter-component.min.js"></script>-->
</head>
Expand Down
5 changes: 2 additions & 3 deletions tutorial/tutorial.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// tutorial.js - Learn to fly, in Elfland Glider
// Copyright © 2019 P. Douglas Reeder; Licensed under the GNU GPL-3.0
// Copyright © 2019, 2024 P. Douglas Reeder; Licensed under the GNU GPL-3.0

import {isDesktop} from "../src/elfland-utils";
import '../src/state.js'
Expand All @@ -9,8 +9,7 @@ import '../src/intro.js'
AFRAME.registerComponent('tutorial', {
init: function () {
let sceneEl = this.el;
sceneEl.emit('setState', {gliderPositionStart: {x: 0, y: 501, z: 0}});
sceneEl.emit('setState', {gliderPosition: {x: 0, y: 501, z: 0}});
sceneEl.emit('setState', {gliderPositionStart: {x: 0, y: 501, z: 0}, gliderPosition: {x: 0, y: 501, z: 0}});

for (let x = -2000; x <= 2000; x += 500) {
for (let z = -2000; z <= 2000; z += 500) {
Expand Down
Loading

0 comments on commit 7c6bdbd

Please sign in to comment.