leonidas/transparency — Issue #15: Export Transparency to various popular frameworks
Author: miohtama
Created: 2012-02-21 06:57:44+00:00
State: open

To continue with issue #10

Please use UGLY full caps for globals: TRANSPARENCY (only if you are going to make it a forced global)

http://yuiblog.com/blog/2006/06/01/global-domination/

E.g. Three.js, Yahoo YUI does this and it is generally accepted best practice:

https://github.com/mrdoob/three.js/blob/master/src/Three.js

However, since globals are not that popular, I suggest you add minimal boilerplate to export Transparency in different ways

Through jQuery: $.transparency

Plain: window.TRANSPARENCY

require.js (asynchronous loading): var transparency = require("libs/transparency")

and so on...

I found an example: Mustache for Javascript does this

https://github.com/janl/mustache.js/tree/master/wrappers

Is Transparency a class or a namespace?