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

Side by Side Diff: samples/o3d-webgl/draw_element.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/draw_context.js ('k') | samples/o3d-webgl/file_request.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 16 matching lines...) Expand all
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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 DrawElement causes an Element to be Drawn with a particular material. 34 * A DrawElement causes an Element to be Drawn with a particular material.
35 * You can override other Effect parameters by adding corresponding params to 35 * You can override other Effect parameters by adding corresponding params to
36 * the DrawElement. 36 * the DrawElement.
37 * 37 *
38 * @param {!o3d.Material} opt_material The material used to render this element. 38 * @param {!o3d.Material} opt_material The material used to render this element.
39 * @constructor 39 * @constructor
40 */ 40 */
41 o3d.DrawElement = function(opt_material) { 41 o3d.DrawElement = function(opt_material) {
42 o3d.ParamObject.call(this); 42 o3d.ParamObject.call(this);
43 43
44 /** 44 /**
45 * The Material for this DrawElement. If it is null the material of 45 * The Material for this DrawElement. If it is null the material of
46 * owner will be used. 46 * owner will be used.
47 * @type {o3d.Material} 47 * @type {o3d.Material}
48 */ 48 */
49 this.material = opt_material || null; 49 this.material = opt_material || null;
50 50
51 /** 51 /**
52 * The current owner of this Draw Element. Set to null to stop being owned. 52 * The current owner of this Draw Element. Set to null to stop being owned.
53 * 53 *
54 * Note: DrawElements are referenced by the Pack they are created in 54 * Note: DrawElements are referenced by the Pack they are created in
55 * and their owner. If the DrawElement is removed from its Pack then 55 * and their owner. If the DrawElement is removed from its Pack then
56 * setting the owner to null will free the DrawElement. Or, visa 56 * setting the owner to null will free the DrawElement. Or, visa
57 * versa, if you set the DrawElement's owner to null then removing 57 * versa, if you set the DrawElement's owner to null then removing
58 * it from its Pack will free the DrawElement. 58 * it from its Pack will free the DrawElement.
59 * @type {o3d.Element} 59 * @type {o3d.Element}
60 */ 60 */
61 this.owner_ = null; 61 this.owner_ = null;
62 }; 62 };
63 o3d.inherit('DrawElement', 'ParamObject'); 63 o3d.inherit('DrawElement', 'ParamObject');
64 64
65 o3d.ParamObject.setUpO3DParam_(o3d.DrawElement, 'material', 'ParamMaterial'); 65 o3d.ParamObject.setUpO3DParam_(o3d.DrawElement, 'material', 'ParamMaterial');
66 66
OLDNEW
« no previous file with comments | « samples/o3d-webgl/draw_context.js ('k') | samples/o3d-webgl/file_request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698