Skip to content

Instantly share code, notes, and snippets.

html, body {
width: 100%;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
background: #333;
}
#workspace {
0.1 : 25
0.2 : 33
0.3 : 4C
0.4 : 66
0.5 : 7F
0.6 : 99
0.7 : B2
0.8 : CC
0.9 : E5
{
houses: [
{
name: "なんとかライブハウス",
lat: 11.111,
lng: 99.999,
landmarks: [
{
name: "なんとか交差点",
var BitmapData = (function() {
function BitmapData(width, height) {
this.width = width;
this.height = height;
this.canvas = document.createElement('canvas');
this.canvas.setAttribute('width', this.width + 'px');
this.canvas.setAttribute('height', this.height + 'px');
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<p>姓:<input data-bind='value: firstName' /></p>
<p>名:<input data-bind='value: lastName' /></p>
$ npm init
$ npm install grunt --save-dev
$ npm install grunt-contrib-jade grunt-contrib-stylus grunt-contrib-watch --save-dev
@foo9
foo9 / gist:8994609
Last active March 8, 2018 04:04
pixi.js renderer resize
var STAGE_WIDTH = 320;
var STAGE_HEIGHT = 480;
var $window = $(window);
// XXX: debounce
$window.resize(onResize);
function onResize() {
var width;
@foo9
foo9 / gist:9069054
Created February 18, 2014 11:17
pixi.js empty texture
var emptyBase64;
var emptyTexture;
emptyBase64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bvkkAAAAAnRSTlMAAHaTzTgAAAAKSURBVHgBY2AAAAACAAFzdQEYAAAAAElFTkSuQmCC';
emptyTexture = PIXI.Texture.fromImage(emptyBase64);
filenames = Dir.glob("*.png")
filenames.each do |filename|
name = filename.gsub('_', '_0')
p name
File.rename(filename, name)
end