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
@fairlight1337
fairlight1337 / hsvrgb-cpp
Created June 2, 2014 07:39
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
@bluecube
bluecube / noise.py
Last active May 8, 2018 11:28
Remix of some ideas of perlin noise and simplex noise...
import math
import numpy
_permutation = numpy.array([ 6, 36, 184, 45, 107, 67, 2, 34, 82, 181, 110, 188, 69, 152, 142, 0,
224, 154, 236, 203, 157, 73, 171, 115, 138, 66, 252, 165, 155, 60, 229, 95,
141, 202, 58, 132, 76, 94, 160, 53, 170, 242, 235, 81, 139, 84, 240, 153,
130, 148, 228, 97, 105, 201, 135, 237, 62, 232, 163, 136, 143, 255, 147, 178,
204, 127, 227, 249, 253, 77, 145, 91, 19, 72, 24, 108, 144, 233, 101, 40,
20, 37, 200, 29, 54, 27, 55, 46, 234, 50, 213, 64, 17, 231, 25, 10,
70, 146, 205, 222, 80, 162, 59, 86, 12, 125, 192, 124, 246, 83, 114, 93,
@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__
class LowPassFilter {
constructor(alpha) {
this.setAlpha(alpha);
this.y = null;
this.s = null;
}
setAlpha(alpha) {
if (alpha <= 0 || alpha > 1.0) {
throw new Error();
@pancx
pancx / GSoC_report.md
Last active November 28, 2020 22:20
[GSoC 2017] Improve and Extend the JavaScript Bindings for OpenCV
@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>
@rupeshtiwari
rupeshtiwari / Setting up Webpack for Typescript Project From Scratch.md
Last active July 22, 2024 11:22
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.
@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
@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/
@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>