An object can have a custom `valueOf` function to compute its value as a primitive (string, number, boolean, or function(!)). It gets called when the object is used in a context that expects a primitive type, such as an expression or an explicit primitive conversion like `Number`.

The argument for that case is: `{ valueOf: function() { return 125 } }`.


On Sep 19, 2013, at 9:40 AM, eric79 <notifications@github.com> wrote:

> In support/client/lib/vwf/model/threejs.js:
> 
> > @@ -1188,6 +1189,24 @@ define( [ "module", "vwf/model", "vwf/utility", "vwf/utility/color" ], function(
> >                          // Need to reset the viewport or you just get a blank screen
> >                          this.state.kernel.dispatchEvent( nodeID, "resetViewport" );
> >                      }
> > +                    if ( propertyName == 'shadowMapCullFace') {
> > +                        if ( node && node.renderer ) {
> > +                            value = Number( propertyValue );
> That's great information! Thank you! By the way, what on earth does that last conversion on the list do?
> 
> ** {} parses to "123"?
> 
> —
> Reply to this email directly or view it on GitHub.
> 
>