Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: samples/o3d-webgl/material.js

Issue 3083012: Tidying up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/o3d-webgl/file_request.js ('k') | samples/o3d-webgl/named_object.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010, Google Inc. 2 * Copyright 2010, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 32
33 /** 33 /**
34 * A Material holds the various uniform parameters an Effect needs to render. 34 * A Material holds the various uniform parameters an Effect needs to render.
35 * For example a Lambert effect might need "diffuse", "ambient", "emissive". 35 * For example a Lambert effect might need "diffuse", "ambient", "emissive".
36 * The parameters needed on a Material will vary depending its Effect. 36 * The parameters needed on a Material will vary depending its Effect.
37 * Note that a material MUST have its drawList set in order for objects using it 37 * Note that a material MUST have its drawList set in order for objects using it
38 * to render. 38 * to render.
39 * 39 *
40 * @param {!o3d.State} opt_state The State used by this material. 40 * @param {!o3d.State} opt_state The State used by this material.
41 * @param {!o3d.Effect} opt_effect The Effect used by this material. 41 * @param {!o3d.Effect} opt_effect The Effect used by this material.
42 * @param {!o3d.DrawList} opt_draw_list The the DrawList used by this material. 42 * @param {!o3d.DrawList} opt_draw_list The the DrawList used by this material.
43 * @constructor 43 * @constructor
44 */ 44 */
45 o3d.Material = function(opt_state, opt_effect, opt_draw_list) { 45 o3d.Material = function(opt_state, opt_effect, opt_draw_list) {
46 o3d.ParamObject.call(this); 46 o3d.ParamObject.call(this);
47 /** 47 /**
48 * The State for this material. 48 * The State for this material.
49 * @type {o3d.State} 49 * @type {o3d.State}
(...skipping 11 matching lines...) Expand all
61 * @type {o3d.DrawList} 61 * @type {o3d.DrawList}
62 */ 62 */
63 this.drawList = opt_draw_list || null; 63 this.drawList = opt_draw_list || null;
64 }; 64 };
65 o3d.inherit('Material', 'ParamObject'); 65 o3d.inherit('Material', 'ParamObject');
66 66
67 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'effect', 'ParamEffect'); 67 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'effect', 'ParamEffect');
68 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'state', 'ParamState'); 68 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'state', 'ParamState');
69 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'drawList', 'ParamDrawList'); 69 o3d.ParamObject.setUpO3DParam_(o3d.Material, 'drawList', 'ParamDrawList');
70 70
OLDNEW
« no previous file with comments | « samples/o3d-webgl/file_request.js ('k') | samples/o3d-webgl/named_object.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698