Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Krienas Dumblas Krienas

🏠
Working from home
View GitHub Profile
@Krienas
Krienas / cubeviewer.cs
Created Dec 31, 2016 — forked from notanimposter/cubeviewer.cs
3D rendering in Space Engineers (depends on drawlib.cs)
View cubeviewer.cs
public class CubeViewer {
private static int[][] cubeSides = new int[][] {
SEFix.arr(
1, 1,-1,
1, 1, 1,
-1, 1, 1,
-1, 1,-1
), SEFix.arr(
-1, 1,-1,
-1, 1, 1,
@Krienas
Krienas / drawlib.cs
Created Dec 31, 2016 — forked from notanimposter/drawlib.cs
Drawing library for SE v2.4
View drawlib.cs
public class SEFix {
public static T[] arr<T>(params T[] arg) {
return arg; //becuse SE is stupid
}
}
public class ColorUtils {
private static double oo64 = 1.0/64.0;
private static double[][] map = new double[][] {
new double[] { 0*oo64, 48*oo64, 12*oo64, 60*oo64, 3*oo64, 51*oo64, 15*oo64, 63*oo64},
new double[] {32*oo64, 16*oo64, 44*oo64, 28*oo64, 35*oo64, 19*oo64, 47*oo64, 31*oo64},
View SplClassLoader.php
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.