Skip to content

Instantly share code, notes, and snippets.

View jjwall's full-sized avatar

Jake Wallace jjwall

View GitHub Profile
@apples
apples / vdom.lua
Last active March 4, 2020 06:21
Lua virtual DOM implementation (based on v1.0 of https://github.com/pomber/didact). NOW WITH HOOKS!
local linq = require('linq')
local class = require('class')
local component_base = class()
local function assign(dest, source)
for k,v in pairs(source) do
dest[k] = v
end
return dest
@ayamflow
ayamflow / texture-atlas.js
Last active November 21, 2023 01:22
threejs Texture Atlas (TexturePacker spritesheet)
import _ from 'underscore';
export default class TextureAtlas {
constructor(json, image) {
this._textures = {};
let texture = new THREE.Texture(image);
texture.needsUpdate = true;
let frames = json.frames;
_.keys(frames).forEach(function(key, i) {
@Rockncoder
Rockncoder / index.html
Created January 21, 2013 08:25
A simple way to handle PhoneGap/jQueryMobile deviceready issue. Index.html file.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title></title>
</head>
<body>