Skip to content

Instantly share code, notes, and snippets.

@pandr
pandr / strenge.js
Last active October 22, 2015 06:30
JavaScript Strenge
var fornavn = "Hans";
var efternavn = "Jensen";
var navn = fornavn + " " + efternavn; // "Hans Jensen"
var tom_streng = "";
var historie = "Der gik en hest";
var laengde = historie.length; // antal bogstaver i historien
var fundet = historie.indexOf("var");
var e = historie.charAt(1); // "e"
@pandr
pandr / FlyCamSmooth
Created March 10, 2015 23:27
Very smooth unity cam
using UnityEngine;
using System.Collections;
/*
* Based on http://www.blenderfreak.com/blog/post/flythrough-camera-smooth-movement-unity3d/
*
* Controls:
* WASD + R/F for Up/Down
* Mouse wheel control movement speed
* Mouse pointer is used for joystick like control of orientation
using UnityEngine;
using System.Collections;
public class Creator : MonoBehaviour {
// Use this for initialization
void Start () {
for (int h = 0; h < 10; h++)
{
float he = (float)h*0.1f;