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
var teapotMesh = {"verts":[{"x":5.929688,"y":4.125,"z":0},{"x":5.387188,"y":4.125,"z":2.7475},{"x":5.2971,"y":4.494141,"z":2.70917},{"x":5.832031,"y":4.494141,"z":0},{"x":5.401602,"y":4.617188,"z":2.753633},{"x":5.945313,"y":4.617188,"z":0},{"x":5.614209,"y":4.494141,"z":2.844092},{"x":6.175781,"y":4.494141,"z":0},{"x":5.848437,"y":4.125,"z":2.94375},{"x":6.429688,"y":4.125,"z":0},{"x":3.899688,"y":4.125,"z":4.97},{"x":3.830352,"y":4.494141,"z":4.900664},{"x":3.910782,"y":4.617188,"z":4.981094},{"x":4.074414,"y":4.494141,"z":5.144727},{"x":4.254687,"y":4.125,"z":5.325},{"x":1.677188,"y":4.125,"z":6.4575},{"x":1.638858,"y":4.494141,"z":6.367412},{"x":1.68332,"y":4.617188,"z":6.471914},{"x":1.77378,"y":4.494141,"z":6.684522},{"x":1.873438,"y":4.125,"z":6.91875},{"x":-1.070312,"y":4.125,"z":7},{"x":-1.070312,"y":4.494141,"z":6.902344},{"x":-1.070312,"y":4.617188,"z":7.015625},{"x":-1.070312,"y":4.494141,"z":7.246094},{"x":-1.070312,"y":4.125,"z":7.5},{"x":-1.070312,"y":4.125,"z":7},{"x":-4.007656,"y":4.125,"z":6 |
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
var meshBox = { | |
verts : [ | |
v(-0.5,-0.5,-0.5), v(0.5,-0.5,-0.5), v(0.5,0.5,-0.5), v(-0.5,0.5,-0.5), // front | |
v(-0.5,-0.5,0.5), v(0.5,-0.5,0.5), v(0.5,0.5,0.5), v(-0.5,0.5,0.5), // back | |
], | |
tris : [ | |
0,1,2, 2,3,0, // front | |
4,5,6, 6,7,4, // back | |
0,3,4, 4,3,7, // left | |
1,2,5, 5,6,2, // right |
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 setup() | |
{ | |
createCanvas(700, 500); | |
background(220); | |
strokeWeight(10); | |
} | |
function transform(shape, angle, factor) | |
{ | |
shape.x += shape.size * Math.cos(shape.angle); |
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 setup() | |
{ | |
createCanvas(700, 400); | |
background(255); | |
} | |
var deg60 = Math.PI/3; | |
function addVector(x,y,angle,length) | |
{ |
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
var blob = []; | |
function setup() | |
{ | |
createCanvas(800, 400); | |
background(128); | |
fill(100,12,12); | |
noStroke(); } | |
function draw() { if(mouseIsPressed) |
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 setup() { | |
createCanvas(400, 400); | |
} | |
var pilop = 38; | |
var pilned = 40; | |
var pilhøjre = 39; | |
var pilvenstre = 37; | |
var x = 2; | |
var y = 2; |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
interface IBitStreamWriter | |
{ | |
void SeekZero(); |
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
// somewhere in your charactercontroller | |
public bool m_UseFeetIK = true; | |
public float m_FeetIkOffset = 0.0f; | |
void OnAnimatorIK() | |
{ | |
if (m_Animator) | |
{ | |
if (m_IsGrounded && m_UseFeetIK) |
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
// Simple fps controller for unity | |
// To use, build this: | |
// | |
// Capsule | |
// Camera | |
// | |
// Put this script AND a CharacterController on the Capsule | |
// Link up camera to the "player_cam" property of this script | |
// Make sure Camera is positioned at (locally) 0, 0, 0 and with no rotation and scale |
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
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" |
NewerOlder