Skip to content

Instantly share code, notes, and snippets.

View 8Observer8's full-sized avatar

Ivan 8Observer8

View GitHub Profile
@8Observer8
8Observer8 / SmoothFollow.cs
Last active August 29, 2015 14:26 — forked from Hamcha/SmoothFollow.cs
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
@8Observer8
8Observer8 / Program.cs
Created April 3, 2017 10:53 — forked from DanielSWolf/Program.cs
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
WebGl courses + tutorials
---------------------------------------
1. Great GLSL course
https://thebookofshaders.com/
https://thebookofshaders.com/?lan=ru (russian language)
2. WebGl basics
https://webglfundamentals.org
https://webglfundamentals.org/webgl/lessons/ru (russian language)
@8Observer8
8Observer8 / Float32_Base64_Encoding_Decoding.js
Created December 13, 2021 22:19 — forked from sketchpunk/Float32_Base64_Encoding_Decoding.js
Encode Float32Array to base64 , then decode it back
let verts = new Float32Array( [ 0, 2, 0, -1, 0.2, 0, 1, 0.2, 0 ] );
let v = base64_test( verts );
function base64_test( fary ){
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ENCODING TEST
console.log("Origin Data", fary );
let uint = new Uint8Array( fary.buffer );
console.log( "Convert F32 to Uint8 : Byte Length Test", fary.length * 4, uint.length );
@8Observer8
8Observer8 / sdl2_opengl_skeleton.py
Created September 3, 2022 19:56 — forked from kiwwisk/sdl2_opengl_skeleton.py
Skeleton for SDL2/OpenGL application in Python 3. Game loop has fixed time step, rendering is going at full speed.
#
# Skeleton for SDL2/OpenGL application in Python
# with fixed logic time step, rendering is going still at full speed.
#
# To turn debug logging messages on, run with -v parameter:
# python <script_name.py> -v
#
import argparse
import logging
@8Observer8
8Observer8 / AmmoProvider.ts
Created October 12, 2022 14:08 — forked from Sumechoo/AmmoProvider.ts
Class for simplified usage of typed Ammo.js API inside ES6 modules
import Ammo from 'ammojs-typed';
export class AmmoProvider {
private static api: typeof Ammo;
public static async getApi() {
if (!AmmoProvider.api) {
AmmoProvider.api = await Ammo();;
}
@8Observer8
8Observer8 / hello.s
Created February 13, 2023 03:23 — forked from mcandre/hello.s
64-bit GNU assembler Hello World for Windows
# Build:
#
# as -o hello.obj
# ld -o hello.exe hello.obj -L C:\\tools\\mingw64\\x86_64-w64-mingw32\\lib -lkernel32
#
# Requires MinGW
.extern GetStdHandle
.extern WriteFile
.extern ExitProcess
@8Observer8
8Observer8 / main.cpp
Created July 6, 2024 21:23 — forked from nus/main.cpp
An example of emscripten with WebSocket.
// $ em++ -lwebsocket.js -o index.html main.cpp
#include <emscripten/emscripten.h>
#include <emscripten/websocket.h>
#include <stdio.h>
EM_BOOL onopen(int eventType, const EmscriptenWebSocketOpenEvent *websocketEvent, void *userData) {
puts("onopen");
EMSCRIPTEN_RESULT result;