Skip to content

Instantly share code, notes, and snippets.

View Zemledelec's full-sized avatar
💭
The serving of nature can't bare any fuss

Michael Gevlich Zemledelec

💭
The serving of nature can't bare any fuss
View GitHub Profile
//MIT License
//Copyright (c) 2021 Felix Westin
//Source: https://github.com/Fewes/MinimalAtmosphere
//Ported to GLSL by Marcin Ignac
#ifndef ATMOSPHERE_INCLUDED
#define ATMOSPHERE_INCLUDED
// -------------------------------------
@TimvanScherpenzeel
TimvanScherpenzeel / support-table-webgl1-webgl2.md
Created April 5, 2018 07:52
Support table - WebGL & WebGL2 support
Device OS OS version Browser Browser version WebGL WebGL2
Apple iPad 5th iOS 11.0.3 Mobile Safari 11.0 X
Apple iPad Air 2 iOS 8.4 Mobile Safari 8.0 X
Apple iPad Mini 3 iOS 8.1.2 Mobile Safari 8.0 X
Apple iPad Pro iOS 11.2.1 Mobile Safari 11.0 X
Apple iPhone 5S iOS 8.1.3 Mobile Safari 8.0 X
Apple iPhone 6 Plus iOS 8.1 Mobile Safari 8.0 X
Apple iPhone 6 iOS 8.1.3 Mobile Safari 8.0 X
Apple iPhone 6S Plus iOS 9.0.1 Mobile Safari 9.0 X
@pascaldekloe
pascaldekloe / int64.js
Created April 22, 2017 11:02
Big-endian 64-bit integer decoding with TypedArray
// Unmarshals an Uint8Array as a signed 64-bit integer, big-endian.
function decodeInt64(data, i, allowImprecise) {
var v = 0, j = i + 7, m = 1;
if (data[i] & 128) {
// two's complement
for (var carry = 1; j >= i; --j, m *= 256) {
var b = (data[j] ^ 255) + carry;
carry = b >> 8;
v += (b & 255) * m;
}
@pascaldekloe
pascaldekloe / utf8.js
Last active September 9, 2023 05:21
JavaScript UTF-8 encoding and decoding with TypedArray
// This is free and unencumbered software released into the public domain.
// Marshals a string to an Uint8Array.
function encodeUTF8(s) {
var i = 0, bytes = new Uint8Array(s.length * 4);
for (var ci = 0; ci != s.length; ci++) {
var c = s.charCodeAt(ci);
if (c < 128) {
bytes[i++] = c;
continue;
@gpavlidi
gpavlidi / n3mtodae.c
Created February 4, 2012 23:19 — forked from praeclarum/n3mtodae.c
Converts Nokia 3D models to textured DAE models (http://maps3d.svc.nokia.com/webgl/index.html)
#include <io.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <Share.h>
#include <math.h>
@praeclarum
praeclarum / n3mtodae.c
Created January 21, 2012 06:55
Converts Nokia 3D models to DAE models (http://maps3d.svc.nokia.com/webgl/index.html)
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
struct xyz
{
float x, y, z;