diff options
author | Nivesh Rajbhandari | 2012-04-16 16:06:24 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-16 16:06:24 -0700 |
commit | c253192a08b499ea7be46fa5438d273e51f7ec5a (patch) | |
tree | 18a1f0e3679c0eb993a9dedb537035d3861f49ac /js/lib/rdge/materials/julia-material.js | |
parent | e19376c54eedd1f1c457ba405b2f110be376a559 (diff) | |
parent | 4b900ea5cd6bb77eb30cec8c03b9ec9fa662c1e9 (diff) | |
download | ninja-c253192a08b499ea7be46fa5438d273e51f7ec5a.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'js/lib/rdge/materials/julia-material.js')
-rw-r--r-- | js/lib/rdge/materials/julia-material.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/js/lib/rdge/materials/julia-material.js b/js/lib/rdge/materials/julia-material.js index 976dfad3..7aeec3dc 100644 --- a/js/lib/rdge/materials/julia-material.js +++ b/js/lib/rdge/materials/julia-material.js | |||
@@ -21,11 +21,7 @@ var JuliaMaterial = function JuliaMaterial() { | |||
21 | /////////////////////////////////////////////////////////////////////// | 21 | /////////////////////////////////////////////////////////////////////// |
22 | // Properties | 22 | // Properties |
23 | /////////////////////////////////////////////////////////////////////// | 23 | /////////////////////////////////////////////////////////////////////// |
24 | // no properties | 24 | // properties inherited from PulseMaterial |
25 | this._propNames = []; | ||
26 | this._propLabels = []; | ||
27 | this._propTypes = []; | ||
28 | this._propValues = []; | ||
29 | 25 | ||
30 | /////////////////////////////////////////////////////////////////////// | 26 | /////////////////////////////////////////////////////////////////////// |
31 | // Methods | 27 | // Methods |
@@ -50,12 +46,12 @@ var JuliaMaterial = function JuliaMaterial() { | |||
50 | if (world) this.setWorld( world ); | 46 | if (world) this.setWorld( world ); |
51 | 47 | ||
52 | // set up the shader | 48 | // set up the shader |
53 | this._shader = new jshader(); | 49 | this._shader = new RDGE.jshader(); |
54 | this._shader.def = JuliaMaterialDef; | 50 | this._shader.def = JuliaMaterialDef; |
55 | this._shader.init(); | 51 | this._shader.init(); |
56 | 52 | ||
57 | // set up the material node | 53 | // set up the material node |
58 | this._materialNode = createMaterialNode("juliaMaterial" + "_" + world.generateUniqueNodeID()); | 54 | this._materialNode = RDGE.createMaterialNode("juliaMaterial" + "_" + world.generateUniqueNodeID()); |
59 | this._materialNode.setShader(this._shader); | 55 | this._materialNode.setShader(this._shader); |
60 | 56 | ||
61 | this._time = 0; | 57 | this._time = 0; |
@@ -72,7 +68,7 @@ var JuliaMaterial = function JuliaMaterial() { | |||
72 | var material = this._materialNode; | 68 | var material = this._materialNode; |
73 | if (material) { | 69 | if (material) { |
74 | var technique = material.shaderProgram['default']; | 70 | var technique = material.shaderProgram['default']; |
75 | var renderer = g_Engine.getContext().renderer; | 71 | var renderer = RDGE.globals.engine.getContext().renderer; |
76 | if (renderer && technique) { | 72 | if (renderer && technique) { |
77 | if (this._shader && this._shader['default']) { | 73 | if (this._shader && this._shader['default']) { |
78 | this._shader['default'].u_time.set( [this._time] ); | 74 | this._shader['default'].u_time.set( [this._time] ); |
@@ -80,7 +76,7 @@ var JuliaMaterial = function JuliaMaterial() { | |||
80 | this._time = time; | 76 | this._time = time; |
81 | } | 77 | } |
82 | } | 78 | } |
83 | } | 79 | }; |
84 | } | 80 | } |
85 | 81 | ||
86 | /////////////////////////////////////////////////////////////////////////////////////// | 82 | /////////////////////////////////////////////////////////////////////////////////////// |