Skip to content

Instantly share code, notes, and snippets.

<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>
// -----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");
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!");
// Named materials properties
export default {
// MM Tile
'MM_Tiles_MAT': {
color: 865390,
emissive: 2435913
},
// MM Tile, MM World
'MM_GreyDark_MAT': {
color: 7897489,
'use strict';
var $html = $('html');
var ua = navigator.userAgent;
var rtcSupported = require('peer-data').supported;
function _modernizr(feature) {
return $html.hasClass(feature);
}
var vertexShader = [
'#define LAMBERT',
'varying vec3 vLightFront;',
'varying vec3 vPosition;',
'varying vec3 vNormal;',
'#ifdef DOUBLE_SIDED',
' varying vec3 vLightBack;',
'#endif',
THREE.ShaderChunk['common'],
@inear
inear / FrameNumberToBinary.jsx
Created November 3, 2016 08:23
FrameNumerToBinory
{
// 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
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([])
}
@inear
inear / trollshow-config.js
Last active December 29, 2015 06:09
A config file for the location layer of http://middle-earth.thehobbit.com/trollshaw
'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;
@inear
inear / gist:7616849
Last active December 29, 2015 04:39
#!/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