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

Unified Diff: samples/o3d-webgl/function.js

Issue 3020030: Fixes errors when loading animated meshes in simpleviewer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/o3d-webgl/curve.js ('k') | samples/o3d-webgl/pack.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/function.js
===================================================================
--- samples/o3d-webgl/function.js (revision 53860)
+++ samples/o3d-webgl/function.js (working copy)
@@ -66,21 +66,21 @@
* @private
* @type {o3d.ParamFloat}
*/
- this.input_param_ = this.createParam("input", "ParamFloat");
+ this.input_param_ = this.getParam("input");
/**
* ParamFunction whose value is a o3d.Function or subclass.
* @private
* @type {o3d.ParamFunction}
*/
- this.func_param_ = this.createParam("functionObject", "ParamFunction");
+ this.func_param_ = this.getParam("functionObject");
/**
* Read-only output value. Value is cached if input does not change.
* @private
* @type {o3d.ParamFloatOutput}
*/
- this.output_param_ = this.createParam("output", "ParamFloatOutput");
+ this.output_param_ = this.getParam("output");
/**
* Context value to allow faster evaluation for adjacent input values.
@@ -109,40 +109,22 @@
/**
* Read-only output value. Value is cached if input does not change.
- * @private
- * @type {o3d.ParamFloatOutput}
+ * @type {number}
*/
-o3d.FunctionEval.prototype.__defineGetter__("output",
- function() {
- return this.output_param_.value;
- });
+o3d.ParamObject.setUpO3DParam_(o3d.FunctionEval, "output", "ParamFloatOutput");
/**
* Read/write input value to the function.
- * @type {o3d.ParamFloat}
+ * @type {number}
*/
-o3d.FunctionEval.prototype.__defineGetter__("input",
- function() {
- return this.input_param_.value;
- });
-o3d.FunctionEval.prototype.__defineSetter__("input",
- function(newInput) {
- this.input_param_.value = newInput;
- });
+o3d.ParamObject.setUpO3DParam_(o3d.FunctionEval, "input", "ParamFloat");
/**
* o3d.Function object (or subclass) with evaluate function.
- * @private
* @type {o3d.Function}
*/
-o3d.FunctionEval.prototype.__defineGetter__("functionObject",
- function() {
- return this.func_param_.value;
- });
-o3d.FunctionEval.prototype.__defineSetter__("functionObject",
- function(newFunc) {
- this.func_param_.value = newFunc;
- });
+o3d.ParamObject.setUpO3DParam_(o3d.FunctionEval, "functionObject",
+ "ParamFunction");
/**
* Called by o3d.Param*Output whenever its value gets read.
« no previous file with comments | « samples/o3d-webgl/curve.js ('k') | samples/o3d-webgl/pack.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698