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);
// (1) абстрактный класс
abstract class Animal {
// (2) приватные свойства
// (3) статическое свойство класса
private static animalCounter: number = 0;
// (4) защищенные свойства и методы
protected name: string;
protected age: number;
#include <iostream>
#include <string>
// (1) абстрактный класс
class Animal {
// (2) приватные свойства
private:
// (3) статическое свойство класса
static size_t animalCounter;
Chapter 02. Your First Step with WebGL<br>
ch02/HelloCanvas: https://jsfiddle.net/8Observer8/2gky294r/<br>
ch02/HelloPoint1: https://jsfiddle.net/8Observer8/cc72u1u5/<br>
ch02/HelloPoint2: https://jsfiddle.net/8Observer8/uxw657ud/<br>
ch02/ClickedPoints: https://jsfiddle.net/8Observer8/xf4fnc0o/<br>
ch02/ColoredPoints: https://jsfiddle.net/8Observer8/gkkmnpga/<br>
Chapter 03. Drawing and Transforming Triangles<br>
ch03/MultiPoint: https://jsfiddle.net/8Observer8/cty1120m/<br>
ch03/HelloTriangle: https://jsfiddle.net/8Observer8/wk4sksnw/<br>
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 / Camera.ts
Last active July 3, 2019 08:08
WebGL 3D Camera using TypeScript and glMatrix
import { mat4 } from 'gl-matrix';
export class Camera
{
private _gl: WebGLRenderingContext;
private _center: number[];
private _target: number[];
private _projMatrix: mat4;
private _viewMatrix: mat4;
private _uProjMatrix: WebGLUniformLocation;
@8Observer8
8Observer8 / Mitsubishi
Created January 30, 2020 23:43
Sign of Mitsubishi. C#, .NET 2.0, OpenGL 3.0, OpenTK
using System;
using OpenTK.Graphics.OpenGL;
using OpenTK.Graphics;
using OpenTK;
namespace MitsubishiSign
{
class Program
{
static void Main(string[] args)
@8Observer8
8Observer8 / main.py
Last active February 23, 2020 14:25
Exception in OOP version of First Triangle in Python, OpenGL 1.5, GLFW
import glfw
from OpenGL.GL import *
import numpy as np
class Window:
def __init__(self, width: int, height: int, title: str):
# Initializing glfw library
if not glfw.init():
raise Exception("glfw can not be initialized!")
import unittest
from grid import grid, is_winner
# python -m unittest discover tests
class TestGridWinner(unittest.TestCase):
def test_first_row_is_winner(self):
grid[0][0] = "x"
grid[0][1] = "x"