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
/*** | |
* This script will anchor a GameObject to a relative screen position. | |
* This script is intended to be used with CameraFit.cs by Marcel Căşvan, available here: http://gamedev.stackexchange.com/a/89973/50623 | |
* | |
* Note: For performance reasons it's currently assumed that the game resolution will not change after the game starts. | |
* You could not make this assumption by periodically calling UpdateAnchor() in the Update() function or a coroutine, but is left as an exercise to the reader. | |
*/ | |
/* The MIT License (MIT) | |
Copyright (c) 2015, Eliot Lash |
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
/*** | |
* This script will anchor a GameObject to a relative screen position. | |
* This script is intended to be used with CameraFit.cs by Marcel Căşvan, available here: http://gamedev.stackexchange.com/a/89973/50623 | |
* | |
* Note: For performance reasons it's currently assumed that the game resolution will not change after the game starts. | |
* You could not make this assumption by periodically calling UpdateAnchor() in the Update() function or a coroutine, but is left as an exercise to the reader. | |
*/ | |
/* The MIT License (MIT) | |
Copyright (c) 2015, Eliot Lash |
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
^((?!WORD).)*$\r?\n? |
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
static void simpleDeform_bend(const float factor, const float dcut[3], float *co) | |
{ | |
float x = co[0], y = co[1], z = co[2]; | |
float theta, sint, cost; | |
theta = x*factor; | |
sint = sin(theta); | |
cost = cos(theta); | |
if(fabsf(factor) > 1e-7f) |
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
static void simpleDeform_twist(const float factor, const float *dcut, float *co) | |
{ | |
float x = co[0], y = co[1], z = co[2]; | |
float theta, sint, cost; | |
theta = z*factor; | |
sint = sin(theta); | |
cost = cos(theta); | |
co[0] = x*cost - y*sint; |
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 <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <vector> | |
#include <cmath> | |
#include <cstdio> | |
#include <limits> | |
#include <chrono> | |
#include <thread> | |
#include <mutex> |
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
// This script exports photoshop layers as individual PNGs. It also | |
// writes a JSON file that can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Setting defaults. | |
var writePngs = true; | |
var writeTemplate = false; | |
var writeJson = true; | |
var ignoreHiddenLayers = true; | |
var pngScale = 1; |
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
// This script exports photoshop layers as individual PNGs. It also | |
// writes a JSON file that can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Setting defaults. | |
var writePngs = true; | |
var writeTemplate = false; | |
var writeJson = true; | |
var ignoreHiddenLayers = true; | |
var pngScale = 1; |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class BezierMesh | |
{ | |
public Mesh mesh; | |
public List<Vector2> uvs; | |
// Calculate UVs for our tessellated vertices |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class BezierMesh | |
{ | |
public Mesh mesh; | |
public List<Vector2> uvs; | |
// Calculate UVs for our tessellated vertices |