Skip to content

Instantly share code, notes, and snippets.

// eslint-disable-next-line func-names, no-underscore-dangle
this.engine._readTexturePixelsSync = function (texture, width, height, faceIndex, level, buffer, flushRenderer, noDataConversion) {
if (texture._hardwareTexture
&& texture._hardwareTexture.underlyingResource
&& texture._hardwareTexture.underlyingResource.__SPECTOR_Object_CustomData) {
const t = texture._hardwareTexture.underlyingResource;
// eslint-disable-next-line
console.log(`Exporting texture id ${t.__SPECTOR_Object_TAG.id}, format ${t.__SPECTOR_Object_CustomData.format}, compressed ${t.__SPECTOR_Object_CustomData.isCompressed}`);
}
var s=document.createElement('script');s.src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.js';document.head.appendChild(s);
@sergeystoma
sergeystoma / deps.js
Created December 21, 2012 03:10
Minimalistic dependency injection for nodejs
// Minimal nodejs dependency injection
// -----------------------------------
// Basic module, still basic node/commonjs, some_module.js:
//
// module.exports = {};
//
// Dependency registration, main.js:
//
// var deps = require('./deps'),
@sergeystoma
sergeystoma / hack.sh
Created March 31, 2012 16:39 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#