POV-Ray : Newsgroups : povray.pov4.discussion.general : Next Generation SDL: What's wrong with Lua, JavaScript, ... : Re: Next Generation SDL: What's wrong with Lua, JavaScript, ... Server Time
21 Apr 2024 07:40:59 EDT (-0400)
  Re: Next Generation SDL: What's wrong with Lua, JavaScript, ...  
From: clipka
Date: 13 Apr 2009 05:20:01
Message: <web.49e302cae7a64ad8d037e2230@news.povray.org>
SharkD <mik### [at] gmailcom> wrote:
> > temp = new Object();
> > temp.radius = 1;
> > temp.position= [0,0,1];
> > Sph = new Sphere(temp);
> >
> > This also matches what the ISO ECMAScript specification implies.
> >
> > So at the point e.g. the "position" property is set, it will still use the
> > standard getter/setter mechanism of the basic Object type.
> >
> > Furthermore, it will not act on the Sphere object at all - it will just create
> > yet another object that will be passed as one single parameter to the Sphere
> > object.
>
> Could you explain what the Sphere object is doing?

Um... it's... representing a sphere, maybe?!

Sorry, I have no idea what you're heading for. I just translated that JavaScript
construct

    Sph = new Sphere({ radius:1, position:[0,0,1] });

to a form making it clearer what is really happening there, regarding scope and
such issues.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.