Skip to content

Instantly share code, notes, and snippets.

@TeeTeeHaa
TeeTeeHaa / main.ts
Created December 7, 2020 20:05
minimal code example to show warnings when building Colyseus server with webpack
/// <reference types="node" />
import { Server } from "colyseus";
const port = 3000;
const gameServer = new Server();
gameServer.listen(port);
@TeeTeeHaa
TeeTeeHaa / index.html
Last active July 1, 2020 20:18
Pixi.js 5.3.0 visual glitches in PIXI.TilingSprite from PIXI.Spritesheet
<!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>
// 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 / code.js
Created June 24, 2012 15:33
example for issue in node-static 0.5.9
function onload()
{
// Firefox
document.getElementById("test").textContent = "good :)";
// Internet Explorer
document.getElementById("test").innerText = "good :)";
}
@TeeTeeHaa
TeeTeeHaa / index.html
Created June 5, 2011 09:58
another minimalistic test case for rect of EaselJS not being pixel precise
<?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 / Graphics.js
Created April 19, 2011 19:03
minimalistic test case for an issue of EaselJS
/*
* 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