This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (1) абстрактный класс | |
abstract class Animal { | |
// (2) приватные свойства | |
// (3) статическое свойство класса | |
private static animalCounter: number = 0; | |
// (4) защищенные свойства и методы | |
protected name: string; | |
protected age: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
// (1) абстрактный класс | |
class Animal { | |
// (2) приватные свойства | |
private: | |
// (3) статическое свойство класса | |
static size_t animalCounter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using OpenTK.Graphics.OpenGL; | |
using OpenTK.Graphics; | |
using OpenTK; | |
namespace MitsubishiSign | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
OlderNewer