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
### Makefile --- | |
## Author: Kun Wang <ifreedom.cn@gmail.com> | |
## Version: $Id: Makefile,v 0.0 2011/03/23 10:57:42 ifreedom Exp $ | |
## Keywords: | |
## X-URL: | |
all: src c1 c2 c3 | |
src: |
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
#define FILTER_PI (3.1415926535897932384626433832795) | |
#define FILTER_2PI (2.0 * 3.1415926535897932384626433832795) | |
#define FILTER_4PI (4.0 * 3.1415926535897932384626433832795) | |
#define FILTER_SET_PARAM_IMP(type) int filter_##type##_set_param(void *this,double val,int flags) { \ | |
assert(this != NULL); \ | |
switch(flags) { \ | |
case FILTER_SET_WIDTH: \ | |
(Filter_##type *)this->width = val; \ | |
return 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
/* | |
Based on ObjExporter.cs, this "wrapper" lets you export to .OBJ directly from the editor menu. | |
This should be put in your "Editor"-folder. Use by selecting the objects you want to export, and select | |
the appropriate menu item from "Custom->Export". Exported models are put in a folder called | |
"ExportedObj" in the root of your Unity-project. Textures should also be copied and placed in the | |
same folder. */ | |
using UnityEngine; | |
using UnityEditor; |
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 UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
class CreatePrefabFromSelected : ScriptableObject | |
{ | |
const string menuTitle = "GameObject/Create Prefab From Selected"; | |
/// <summary> | |
/// Creates a prefab from the selected game object. |
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; | |
public class SplashScreen : MonoBehaviour | |
{ | |
public string levelToLoad = ""; // this has to correspond to a level (file>build settings) | |
public Texture2D splashLogo; // the logo to splash; | |
public float fadeSpeed = 0.3f; | |
public float waitTime = 0.5f; // seconds to wait before fading out | |
public bool waitForInput = false; // if true, this acts as a "press any key to continue" |
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
-- translate Markdown with code blocks into HTML | |
-- with syntax highlighting. | |
-- If article.md was the source, Lua was the language and we | |
-- wanted a preview: | |
-- lua prettify.lua article lua preview | |
-- Without the last argument it will just write out the HTML body. | |
-- Languages supported are 'lua', 'cpp', 'java' and 'go | |
-- Indented code blocks may begin with an explicit @lang name line; | |
-- if you do this then mark every code block explicitly | |
-- e.g |
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
Shader "FX/Water" { | |
Properties { | |
_WaveScale ("Wave scale", Range (0.02,0.15)) = 0.063 | |
_ReflDistort ("Reflection distort", Range (0,1.5)) = 0.44 | |
_RefrDistort ("Refraction distort", Range (0,1.5)) = 0.40 | |
_RefrColor ("Refraction color", COLOR) = ( .34, .85, .92, 1) | |
_Fresnel ("Fresnel (A) ", 2D) = "gray" {} | |
_BumpMap ("Bumpmap (RGB) ", 2D) = "bump" {} | |
WaveSpeed ("Wave speed (map1 x,y; map2 x,y)", Vector) = (19,9,-16,-7) | |
_ReflectiveColor ("Reflective color (RGB) fresnel (A) ", 2D) = "" {} |
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
(function () { | |
// | |
// hiless - LESS Syntax Highlighter | |
// | |
// Copyright (c) 2010 Alexis Sellier | |
// | |
// All elements which match this will be syntax highlighted. | |
var selector = 'code'; |
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
// Here is easy way to work with Kinect's motor, through OpenNI. No other | |
// drivers or libraries is required. | |
// The code is following: | |
// OpenNI includes | |
#include <XnUSB.h> | |
// Standard includes | |
#include <stdio.h> | |
#include <time.h> | |
/** |
OlderNewer