Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create npm package #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
.DS_Store

node_modules
14 changes: 13 additions & 1 deletion BadTVShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
* THE SOFTWARE.
*
*/
(function(root) {

THREE.BadTVShader = {
var THREE = root.THREE || require('three');

var BadTVShader = THREE.BadTVShader = {
uniforms: {
"tDiffuse": { type: "t", value: null },
"time": { type: "f", value: 0.0 },
Expand Down Expand Up @@ -135,3 +138,12 @@ THREE.BadTVShader = {
].join("\n")

};

if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = BadTVShader;
}
exports.BadTVShader = BadTVShader;
}

}(this));
14 changes: 13 additions & 1 deletion example/js/BadTVShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
* THE SOFTWARE.
*
*/
(function(root) {

THREE.BadTVShader = {
var THREE = root.THREE || require('three');

var BadTVShader = THREE.BadTVShader = {
uniforms: {
"tDiffuse": { type: "t", value: null },
"time": { type: "f", value: 0.0 },
Expand Down Expand Up @@ -135,3 +138,12 @@ THREE.BadTVShader = {
].join("\n")

};

if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = BadTVShader;
}
exports.BadTVShader = BadTVShader;
}

}(this));
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "bad-tv-shader",
"version": "0.0.0",
"description": "Simulates a bad TV via horizontal distortion and vertical roll.",
"main": "BadTVShader.js",
"repository": {
"type": "git",
"url": "https://github.com/felixturner/bad-tv-shader.git"
},
"keywords": [
"three.js",
"three",
"shader",
"webgl",
"tv"
],
"author": "felixturner",
"license": "MIT",
"bugs": {
"url": "https://github.com/felixturner/bad-tv-shader/issues"
},
"homepage": "https://github.com/felixturner/bad-tv-shader#readme",
"dependencies": {
"three": "^0.82.1"
}
}