Skip to content

Instantly share code, notes, and snippets.

View nicolocarpignoli's full-sized avatar

Nicolò Carpignoli nicolocarpignoli

View GitHub Profile
@nicolocarpignoli
nicolocarpignoli / guideline.md
Last active April 24, 2020 14:07
Some simple rules to manage AR.js org issues

The aim is to manage issues on AR.js new official repository: https://github.com/AR-js-org/AR.js/

You should:

  • sometimes, sporadically, give a look to the old repository https://github.com/jeromeetienne/AR.js/: you will not be able to close/open issues in there, I cannot give you technically those permissions, but you can left a comment if you find someone is opening new issues (they should not, that repo is deprecated). A message could be the following:
Please open issues on the new repository of AR.js: https://github.com/AR-js-org/AR.js/
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>GeoAR.js demo</title>
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/aframe-look-at-component.min.js"></script>
<script src='https://raw.githack.com/jeromeetienne/AR.js/2.1.4/aframe/build/aframe-ar.js'></script>
<script>
artoolkitNft.min.js:1 [warning] *** Camera Parameter resized from 640, 480. ***
put_char @ artoolkitNft.min.js:1
write @ artoolkitNft.min.js:1
write @ artoolkitNft.min.js:1
doWritev @ artoolkitNft.min.js:1
_fd_write @ artoolkitNft.min.js:1
___wasi_fd_write @ artoolkitNft.min.js:1
Bw @ artoolkitNft.min.js:6
ex @ artoolkitNft.min.js:6
window.onload = () => {
const button = document.querySelector('button[data-action="change"]');
button.innerText = '﹖';
let places = staticLoadPlaces();
renderPlaces(places);
};
function staticLoadPlaces() {
return [
window.onload = () => {
let places = staticLoadPlaces();
renderPlaces(places);
};
function staticLoadPlaces() {
return [
{
name: 'Magnemite',
location: {
window.onload = () => {
const button = document.querySelector('button[data-action="change"]');
button.innerText = '﹖';
let places = staticLoadPlaces();
renderPlaces(places);
};
function staticLoadPlaces() {
window.onload = () => {
// setTimeout is a temporary fix
const button = document.querySelector('button[data-action="change"]');
button.innerText = '﹖';
setTimeout(() => {
let places = staticLoadPlaces();
renderPlaces(places);
}, 3000);
.centered {
height: 20%;
justify-content: center;
position: fixed;
bottom: 0%;
display: flex;
flex-direction: row;
width: 100%;
margin: 0px auto;
left: 0;
.centered {
height: 20%;
justify-content: center;
position: fixed;
bottom: 0%;
display: flex;
flex-direction: row;
width: 100%;
margin: 0px auto;
left: 0;
// this click listener has to be added simply to a click event on an a-entity element
const clickListener = function (ev) {
ev.stopPropagation();
ev.preventDefault();
const name = ev.target.getAttribute('name');
const el = ev.detail.intersection && ev.detail.intersection.object.el;
if (el && el === ev.target) {
// after click, we are adding a label with the name of the place