aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/fly-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/fly-material.js')
-rw-r--r--js/lib/rdge/materials/fly-material.js9
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 81cd1522..712a38ac 100644
--- a/js/lib/rdge/materials/fly-material.js
+++ b/js/lib/rdge/materials/fly-material.js
@@ -49,12 +49,12 @@ var FlyMaterial = function FlyMaterial() {
49 if (world) this.setWorld( world ); 49 if (world) this.setWorld( world );
50 50
51 // set up the shader 51 // set up the shader
52 this._shader = new jshader(); 52 this._shader = new RDGE.jshader();
53 this._shader.def = flyMaterialDef; 53 this._shader.def = flyMaterialDef;
54 this._shader.init(); 54 this._shader.init();
55 55
56 // set up the material node 56 // set up the material node
57 this._materialNode = createMaterialNode("flyMaterial" + "_" + world.generateUniqueNodeID()); 57 this._materialNode = RDGE.createMaterialNode("flyMaterial" + "_" + world.generateUniqueNodeID());
58 this._materialNode.setShader(this._shader); 58 this._materialNode.setShader(this._shader);
59 59
60 this._time = 0; 60 this._time = 0;
@@ -70,7 +70,7 @@ var FlyMaterial = function FlyMaterial() {
70 this.updateTexture(); 70 this.updateTexture();
71 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); 71 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
72 this.update( 0 ); 72 this.update( 0 );
73 } 73 };
74}; 74};
75 75
76/////////////////////////////////////////////////////////////////////////////////////// 76///////////////////////////////////////////////////////////////////////////////////////
@@ -78,7 +78,8 @@ var FlyMaterial = function FlyMaterial() {
78 78
79// shader spec (can also be loaded from a .JSON file, or constructed at runtime) 79// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
80var flyMaterialDef = 80var flyMaterialDef =
81{'shaders': 81{
82 'shaders':
82 { 83 {
83 'defaultVShader':"assets/shaders/Basic.vert.glsl", 84 'defaultVShader':"assets/shaders/Basic.vert.glsl",
84 'defaultFShader':"assets/shaders/Fly.frag.glsl" 85 'defaultFShader':"assets/shaders/Fly.frag.glsl"