Skip to content

Instantly share code, notes, and snippets.

zwcloud / TinyTween.cs
Created Sep 28, 2021 — forked from kellygravelyn/TinyTween.cs
A single file tween library in C# with support built in for XNA and Unity data types. MIT License.
View TinyTween.cs
// TinyTween.cs
// Copyright (c) 2013 Nick Gravelyn
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
zwcloud / CustomAssetInspector.cs
Created Jul 24, 2021 — forked from StephenHodgson/CustomAssetInspector.cs
Unity custom inspector window to render markdown language as text asset.
View CustomAssetInspector.cs
using System;
using System.IO;
using UnityEditor;
using UnityEngine;
public class CustomAssetInspector : Editor
public override void OnInspectorGUI()
zwcloud / TextureScaler.cs
Created Jan 4, 2020
A unility class with functions to scale Texture2D Data, by petersvp from
View TextureScaler.cs
using UnityEngine;
/// A unility class with functions to scale Texture2D Data.
/// Scale is performed on the GPU using RTT, so it's blazing fast.
/// Setting up and Getting back the texture data is the bottleneck.
/// But Scaling itself costs only 1 draw call and 1 RTT State setup!
/// WARNING: This script override the RTT Setup! (It sets a RTT!)
/// Note: This scaler does NOT support aspect ratio based scaling. You will have to do it yourself!
zwcloud / Program.ts
Created Mar 1, 2019
Trying rxjs with javascriptcore.
View Program.ts
/// <reference types="rx" />
class Program
static main(): void
Rx.Observable.range(1, 10).subscribe(x => console.log(x));
zwcloud / ImageComparer.cs
Last active Oct 13, 2018 — forked from tocsoft/ImageComparer.cs
Compare 2 images using ImageSharp
View ImageComparer.cs
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
using SixLabors.ImageSharp.Processing;
using System;
using Xunit;
namespace ImageSharp.Extension
/// <summary>
zwcloud / Dog.cs
Created Nov 21, 2016
An example on embedding Mono runtime in C/C++.
View Dog.cs
using System;
public class Dog
static public void Type()
Console.WriteLine("a Dog!");
public void Bark()
zwcloud /
Created Nov 11, 2015
MaxScript that convert a mesh into text.
tmesh = $Mesh0
num_verts = $Mesh0.numverts
num_faces = $Mesh0.numfaces
format "%,%\n" num_verts num_faces
units.MetricType = #meters
for v = 1 to num_verts do
vert = getVert tmesh v
if(abs vert.x < 0.001f) then vert.x = 0f
if(abs vert.y < 0.001f) then vert.y = 0f
zwcloud /
Last active Oct 29, 2015





zwcloud / SFMLDragableWindow.cs
Last active Dec 6, 2015
a SFML dragable window demo
View SFMLDragableWindow.cs
using System;
using SFML.System;
using SFML.Window;
namespace DragableWindow
class DragableWindow : Window
private Vector2i grabbedOffset;
private bool grabbedWindow;
zwcloud / SFMLDragableWindow.cpp
Created Oct 25, 2015
SFML dragable window demo
View SFMLDragableWindow.cpp
//By Hapax from
#include <SFML/Graphics.hpp>
int main()
sf::RenderWindow window(sf::VideoMode(800, 600), "", sf::Style::None);
sf::Vector2i grabbedOffset;
bool grabbedWindow = false;
while (window.isOpen())
sf::Event event;