Improved documentation

17 views
Skip to first unread message

Bruce Sherwood

unread,
Dec 8, 2017, 2:29:28 PM12/8/17
to Glowscript Users
The documentation on compound objects incorrectly stated that, as is the case with arrow, box, cone, cylinder, helix, and pyramid, changing the compound object's axis affected size.x, its length. This has never been true for compounds. As is the case with sphere and ring, changing a compound's axis has no effect on its size. The documentation for compound objects has been corrected.

In the documentation for canvases, here is better information on specifying a canvas:

Selecting a canvas: By default, any objects that you create go into the most recently created canvas, such as scene. If you create another canvas cvs, new objects will go into the cvs canvas. You can later execute scene.select() to make the scene canvas the one that new objects go into. You can find out which canvas is selected: current = canvas.get_selected() returns a reference to the canvas into which objects are currently being created. You can also specify which canvas to use when creating an object, as in box(canvas=cvs, .....).

In GlowScript VPython you can say canvas.selected = cvs, or current = canvas.selected, but unfortunately it doesn't seem possible to implement this syntax in VPython 7, so for compatibiity between GlowScript VPython and VPython 7 you may wish to use cvs.select() and canvas.get_selected() in GlowScript programs.


Reply all
Reply to author
Forward
0 new messages