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
@Carnaux
Carnaux / Model to Marker size
Last active December 12, 2022 15:52
Jsartoolkit5 model centering method
let width = source_image_width;
let height = source_image_height;
let dpi = source_image_dpi;
// CONVERT PIXEL TO MM
let w = width / dpi * 2.54 * 10;
let h = height / dpi * 2.54 * 10;
// SCALE OBJECT
var box = new THREE.Box3().setFromObject( model );
diff --git a/src/ARnft.js b/src/ARnft.js
index eef64a7..f95e821 100644
--- a/src/ARnft.js
+++ b/src/ARnft.js
@@ -143,18 +143,22 @@ export default class ARnft {
addVideo (id, scale) {
const root = this.root
var ARVideo = document.getElementById(id)
+ ARVideo.play();
+
@taixingbi
taixingbi / index.html
Created April 24, 2020 12:38
OpenCV.js Video Processing
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<body>
<div id="container">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td></td>
<td>
<div class="text-center">
<span>Current Filter: </span><span id="filterName">Pass Through</span>
</div>
@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/
@ousttrue
ousttrue / CMakeLists.txt
Created June 3, 2019 13:39
emscripten glfw3 or webgl sample
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
PROJECT(em_gl VERSION 0.1.0)
LINK_DIRECTORIES(
$ENV{VCPKG_ROOT}/installed/x64-windows/lib
)
FILE(GLOB SRC
*.cpp
*.h
@rupeshtiwari
rupeshtiwari / Setting up Webpack for Typescript Project From Scratch.md
Last active March 18, 2024 16:36
Setting up Webpack for Typescript Project From Scratch

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.
@pirosuke
pirosuke / index.html
Created May 8, 2019 14:32
Image Convert With OpenCV.js
<html>
<head>
<title>OpenCV.js Test</title>
</head>
<body>
<table>
<tr>
<th>source</th>
<th>output</th>
</tr>
@pancx
pancx / GSoC_report.md
Last active November 28, 2020 22:20
[GSoC 2017] Improve and Extend the JavaScript Bindings for OpenCV
class LowPassFilter {
constructor(alpha) {
this.setAlpha(alpha);
this.y = null;
this.s = null;
}
setAlpha(alpha) {
if (alpha <= 0 || alpha > 1.0) {
throw new Error();
@derofim
derofim / source.cpp
Last active March 15, 2023 23:13
emscripten sdl2 + glm
/*
Draws on screen using opengl 3 in PC or openglES 2 in browser.
Precompile command : "D:\exarion\vendor\emscripten\SDK\emscripten\1.35.0\emcc" --clear-cache
Compile command : "D:\exarion\vendor\emscripten\SDK\emscripten\1.35.0\emcc" Source.cpp -s USE_SDL=2 -s FULL_ES2=1 -o test.html -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_SDL_IMAGE=2 -s USE_SDL_TTF=2 -s SDL2_IMAGE_FORMATS="['png']" -s EXPORTED_FUNCTIONS="['_main', '_mainLoop']" -std=c++11 -Werror -s WARN_ON_UNDEFINED_SYMBOLS=1 -s SIMD=1 -s NO_EXIT_RUNTIME=1 -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s SEPARATE_ASM=1 -I"D:\exarion\vendor\glm"
Run generated page in server.
*/
#include "SDL.h"
#ifdef __EMSCRIPTEN__