diff options
author | Eric Guzman | 2012-04-05 18:42:40 -0700 |
---|---|---|
committer | Eric Guzman | 2012-04-05 18:42:40 -0700 |
commit | 8ff9dde2053e41d85bb27d9c91808a30e551a138 (patch) | |
tree | 8eec67d632d82d3052ed470096eda13fd50a55c8 /js/lib/rdge/materials/fly-material.js | |
parent | 4631d54ffb4942378835689e9f5d70ed95610822 (diff) | |
parent | 7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff) | |
download | ninja-8ff9dde2053e41d85bb27d9c91808a30e551a138.tar.gz |
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/lib/rdge/materials/fly-material.js')
-rw-r--r-- | js/lib/rdge/materials/fly-material.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/lib/rdge/materials/fly-material.js b/js/lib/rdge/materials/fly-material.js index bd92ecd8..37bef66a 100644 --- a/js/lib/rdge/materials/fly-material.js +++ b/js/lib/rdge/materials/fly-material.js | |||
@@ -48,12 +48,12 @@ var FlyMaterial = function FlyMaterial() { | |||
48 | if (world) this.setWorld( world ); | 48 | if (world) this.setWorld( world ); |
49 | 49 | ||
50 | // set up the shader | 50 | // set up the shader |
51 | this._shader = new jshader(); | 51 | this._shader = new RDGE.jshader(); |
52 | this._shader.def = flyMaterialDef; | 52 | this._shader.def = flyMaterialDef; |
53 | this._shader.init(); | 53 | this._shader.init(); |
54 | 54 | ||
55 | // set up the material node | 55 | // set up the material node |
56 | this._materialNode = createMaterialNode("flyMaterial" + "_" + world.generateUniqueNodeID()); | 56 | this._materialNode = RDGE.createMaterialNode("flyMaterial" + "_" + world.generateUniqueNodeID()); |
57 | this._materialNode.setShader(this._shader); | 57 | this._materialNode.setShader(this._shader); |
58 | 58 | ||
59 | this._time = 0; | 59 | this._time = 0; |
@@ -65,7 +65,7 @@ var FlyMaterial = function FlyMaterial() { | |||
65 | this.updateTexture(); | 65 | this.updateTexture(); |
66 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); | 66 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); |
67 | this.update( 0 ); | 67 | this.update( 0 ); |
68 | } | 68 | }; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | /////////////////////////////////////////////////////////////////////////////////////// | 71 | /////////////////////////////////////////////////////////////////////////////////////// |
@@ -73,7 +73,8 @@ var FlyMaterial = function FlyMaterial() { | |||
73 | 73 | ||
74 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 74 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
75 | var flyMaterialDef = | 75 | var flyMaterialDef = |
76 | {'shaders': | 76 | { |
77 | 'shaders': | ||
77 | { | 78 | { |
78 | 'defaultVShader':"assets/shaders/Basic.vert.glsl", | 79 | 'defaultVShader':"assets/shaders/Basic.vert.glsl", |
79 | 'defaultFShader':"assets/shaders/Fly.frag.glsl" | 80 | 'defaultFShader':"assets/shaders/Fly.frag.glsl" |