Skip to content

Instantly share code, notes, and snippets.

View kalwalt's full-sized avatar
⛰️
Working on the mountains!

Walter Perdan kalwalt

⛰️
Working on the mountains!
View GitHub Profile
@kalwalt
kalwalt / arNFT_module_example.html
Last active February 1, 2022 17:24
testing ARnft as a module in the script tag
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ARnft example showing a simple red cube</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1">
<link rel="stylesheet" href="css/nft-style.css">
</head>
@kalwalt
kalwalt / arNFT_babylonjs_example.html
Last active November 19, 2021 10:14
testing ARnft-babylonjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ARnft example showing a simple red cube</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1">
<link rel="stylesheet" href="css/nft-style.css">
</head>
@kalwalt
kalwalt / ARnft_event_example.html
Created November 18, 2021 20:15
ARnft_event_example test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ARnft event example showing a simple red cube</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1">
<link rel="stylesheet" href="css/nft-style.css">
</head>
@kalwalt
kalwalt / arMarkerControls_dispose_example.html
Last active October 11, 2021 16:42
A simple test to dispose a Marker Controls with the new ES6 branch
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="import" href="resources/index.css">
<!-- three.js library -->
<script src='vendor/three.js/build/three.min.js'></script>
<!-- ar.js -->
<script src="https://raw.githack.com/hatsumatsu/AR.js/ES6--dispose-methods/three.js/build/ar-threex.js"></script>
<script>THREEx.ArToolkitContext.baseURL = '../'</script>
<body style='font-family: Monospace;'><div style='position: absolute; top: 10px; width:100%; text-align: center; z-index: 1;'>
@kalwalt
kalwalt / arNFT_event_camera_example.html
Last active April 28, 2021 21:45
setting a obj position after marker Lost
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ARnft event example showing a simple red cube</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1">
<link rel="stylesheet" href="css/nft-style.css">
</head>
<body>
@kalwalt
kalwalt / gist:a5fb9230f21b9e39f6fbc872cf20c376
Last active November 15, 2020 17:21
download and unzip opencv-em.zip
curl --location "https://github.com/webarkit/opencv-em/releases/download/0.0.3/opencv-em-4.5.0-alpha-rc1.zip" -o opencv-em.zip
unzip -o opencv-em.zip -d opencv
cp -avr opencv/build_wasm/opencv ./
rm opencv-em.zip
docker exec emscripten npm run build-local
> jsartoolkit@0.0.0 build-local /src
> node tools/makem.js; echo Built at `date`
Running command: /emsdk_portable/emscripten/sdk/emcc -I/src/emscripten/artoolkit5/include -I/src/emscripten/zlib -I/src/build/ -I/src/emscripten/ -I/src/emscripten/artoolkit5/lib/SRC/KPM/FreakMatcher /src/emscripten/artoolkit5/lib/SRC/AR/arLabelingSub/*.c /src/emscripten/artoolkit5/lib/SRC/AR/*.c /src/emscripten/artoolkit5/lib/SRC/ARICP/*.c /src/emscripten/artoolkit5/lib/SRC/ARMulti/*.c /src/emscripten/artoolkit5/lib/SRC/Video/video.c /src/emscripten/artoolkit5/lib/SRC/ARUtil/log.c /src/emscripten/artoolkit5/lib/SRC/ARUtil/file_utils.c /src/emscripten/artoolkit5/lib/SRC/AR2/handle.c /src/emscripten/artoolkit5/lib/SRC/AR2/imageSet.c /src/emscripten/artoolkit5/lib/SRC/AR2/jpeg.c /src/emscripten/artoolkit5/lib/SRC/AR2/marker.c /src/emscripten/artoolkit5/lib/SRC/AR2/featureMap.c /src/emscripten/artoolkit5/lib/SRC/AR2/featureSet.c /src/emscripten/artoolkit5/lib/SRC/AR2/selectTemplate.c /sr
@kalwalt
kalwalt / threejs_worker.js
Created April 24, 2020 13:07
Testing a different lerp routine, does not work well...
function isMobile () {
return /Android|mobile|iPad|iPhone/i.test(navigator.userAgent)
}
var interpolationFactor = 0.8
const trackedMatrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var markers = {
pinball: {
@kalwalt
kalwalt / position.html
Created April 17, 2020 17:08
simplest example for retrieve position of the marker in AR.js
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<!-- three.js library -->
<script src='vendor/three.js/build/three.min.js'></script>
<!-- ar.js -->
<script src="../build/ar.js"></script>
<script>THREEx.ArToolkitContext.baseURL = '../'</script>
<body style='margin : 0px; overflow: hidden; font-family: Monospace;'><div style='position: absolute; top: 10px; width:100%; text-align: center; z-index: 1;'>
<a href="https://github.com/AR-js-org/AR.js/" target="_blank">AR.js</a> - three.js camera transform
@kalwalt
kalwalt / log-arStudio-14-04-2020.txt
Created April 14, 2020 15:36
log while upgrading arStudio
Live reload enabled.
litegl.js?version=0.64:12793 Uncaught ReferenceError: Raytracer is not defined
at litegl.js?version=0.64:12793
at litegl.js?version=0.64:13920
(anonymous) @ litegl.js?version=0.64:12793
(anonymous) @ litegl.js?version=0.64:13920
litegraph.js?version=0.64:16802 Uncaught SyntaxError: Unexpected token ';'
litescene.js?version=0.64:45071 Uncaught ReferenceError: LiteGraph is not defined
at litescene.js?version=0.64:45071
at litescene.js?version=0.64:59224