GlowScript 2.4 give an error when updating object.pos.x

12 views
Skip to first unread message

Bruce Sherwood

unread,
May 23, 2017, 11:20:02 PM5/23/17
to Glowscript Users
This very simple program currently gives an error when trying to update the sphere's position by changing object.pos.x:

GlowScript 2.4 VPython
scene.range = 10
b = sphere(pos=vec(1,0,0), radius=0.1, color=color.cyan)
for x in range(2,10,1):
    rate(1)
    b.pos.x = x

Yet if at glowscript.org I export the program, saving the export code to a file "test.html" on computers where the program fails at glowscript.org, the program works properly when I doubleclick the file, despite the fact that it loads its libraries from glowscript.org. This is highly baffling. Repeated attempts to upload software that works on my local Windows computer have made no difference. The problem seems to be independent of browser and shows up Windows, Mac, and Linux.

This behavior would seem to imply that there's something wrong in the way glowscript.org executes a program when starting from the edit page, though this works on my main computer when running locally (but fails on this same computer when running at glowscript.org). I've not seen a problem of this kind before and I'm baffled.

Bruce Sherwood

unread,
May 24, 2017, 10:17:53 AM5/24/17
to Glowscript Users
Now fixed. I found and fixed an error I had made. I now understand why programs failed at glowscript.org, but I don't understand why they succeeded on my test computer.
Reply all
Reply to author
Forward
0 new messages