Skip to content

Instantly share code, notes, and snippets.

@TeeTeeHaa
TeeTeeHaa / Graphics.js
Created Apr 19, 2011
minimalistic test case for an issue of EaselJS
View Graphics.js
/*
* Graphics by Grant Skinner. Dec 5, 2010
* Visit http://easeljs.com/ for documentation, updates and examples.
*
*
* Copyright (c) 2010 Grant Skinner
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@TeeTeeHaa
TeeTeeHaa / index.html
Created Jun 5, 2011
another minimalistic test case for rect of EaselJS not being pixel precise
View index.html
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- note: without doctype internet explorer 9 uses quirks mode which does not know what canvas is -->
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>EaselJS Size Test</title>
<script type="text/javascript" src="easel.js"></script>
<script>
function init()
@TeeTeeHaa
TeeTeeHaa / code.js
Created Jun 24, 2012
example for issue in node-static 0.5.9
View code.js
function onload()
{
// Firefox
document.getElementById("test").textContent = "good :)";
// Internet Explorer
document.getElementById("test").innerText = "good :)";
}
View nodeNotFinishing.js
// Example code straight from http://nodejs.org/ front page, slightly modified.
// Run with node.js (e.x. v.0.8.11 on Windows 7) and open website (once) with
// a browser which uses keep-alive connections (e.x. Firefox 18.0 on Windows 7).
// The program will not finish until the browser is closed :( because of the
// kept-alive connection. Not knowing that reason, how to debug the cause for
// the "not finishing" of the program?
var http = require('http');
var server = http.createServer(function(req, res)
{
@TeeTeeHaa
TeeTeeHaa / index.html
Last active Jul 1, 2020
Pixi.js 5.3.0 visual glitches in PIXI.TilingSprite from PIXI.Spritesheet
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>Pixi.js TilingSprite from Spritesheet</title>
</head>
<body style="box-sizing: border-box; margin: 0; overflow: hidden;">
</body>
<script src="https://pixijs.download/v5.3.0/pixi.min.js"></script>
@TeeTeeHaa
TeeTeeHaa / main.ts
Created Dec 7, 2020
minimal code example to show warnings when building Colyseus server with webpack
View main.ts
/// <reference types="node" />
import { Server } from "colyseus";
const port = 3000;
const gameServer = new Server();
gameServer.listen(port);