Skip to content

Instantly share code, notes, and snippets.

Avatar

Einar Öberg inear

View GitHub Profile
View gist:3c6417e97c7bd635af65e61f59fabec0
<template>
<transition name="fade">
<div class="mapInfoModal" v-if="show">
<div class="mapInfoModalFrame">
<div class="close" @click="onCloseClick">x</div>
<div class="mapInfoModalContent">
Text content
</div>
<div class="arrow"></div>
</div>
View gist:c962cfb452602d8c652454bb1630936e
// -----JS CODE-----
// @input float duration
// @input Component.SpriteVisual light1
// @input Component.SpriteVisual light2
// @input Component.SpriteVisual light3
var lights = [self.light1,self.light2,self.light3];
var mouthEvent = self.script.createEvent("MouthWasJustOpenedEvent");
View obbLoader
using UnityEngine;
using System.Collections;
public class DownloadObbExample : MonoBehaviour {
// http://yuandraismiraldi.net/code/2013/12/15/splitting-apk-to-expansion-package-for-google-play-in-unity-4
#if UNITY_ANDROID && !UNITY_EDITOR && USE_SPLIT_BINARY && !DONT_USE_SPLIT_BINARY
/*
void OnGUI() {
if (!GooglePlayDownloader.RunningOnAndroid()) {
GUI.Label(new Rect(10, 10, Screen.width - 10, 20), "Use GooglePlayDownloader only on Android device!");
View gist:cea680389d9e21bf7e19d8ce8897367b
// Named materials properties
export default {
// MM Tile
'MM_Tiles_MAT': {
color: 865390,
emissive: 2435913
},
// MM Tile, MM World
'MM_GreyDark_MAT': {
color: 7897489,
View detector
'use strict';
var $html = $('html');
var ua = navigator.userAgent;
var rtcSupported = require('peer-data').supported;
function _modernizr(feature) {
return $html.hasClass(feature);
}
View lambert-custom
var vertexShader = [
'#define LAMBERT',
'varying vec3 vLightFront;',
'varying vec3 vPosition;',
'varying vec3 vNormal;',
'#ifdef DOUBLE_SIDED',
' varying vec3 vLightBack;',
'#endif',
THREE.ShaderChunk['common'],
View FrameNumberToBinary.jsx
{
// Demo Palette.jsx
//
// This script creates and shows a floating palette.
//var bitLayers = new Array();
var bitWidth = 5; // width of the shape representing binary
var bitHeight = 8; // height of the shape representing binary
var bitSpacing = 7; // spacing between shapes
var bitBGHeight = 0; // do not set, calculated below
View gist:271a3dd66812281d3c47
THREE.Geometry.prototype.computeVertexNormalsWithCrease = function (maxSmoothAngle)
{
var v, vl, f, fl, face,
faceIndicesPerVertex = [];
for (v = 0, vl = this.vertices.length; v < vl; v ++) {
faceIndicesPerVertex.push([])
}
View trollshow-config.js
'use strict';
var LocationBase = require('../location-base'),
Buckets = require('./../buckets/index.js'),
detector = require('../../utils/detector'),
CanvasSequence = require('../../utils/canvas-sequence'),
BucketComponents = require('./../buckets/components/index.js');
var useSmallImage = detector.isMobile&&!detector.isTablet;
View gist:7616849
#!/bin/bash
# uses imagemagick to stich together all images in a folder.
# ex command: ./spriter.sh rivendell-title jpg 640 400
if [ $# -gt 3 ]
then
folder=$1;
name=$1; # output will be placed in a folder named this