Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] Physics "applets" in HTML5/JavaScript



I've given links to some moderately complex GlowScript programs. For
perspective, here's a minimal program, which creates a default-sized WebGL
canvas, displays a white 3D cube, and enables the mouse events ctrl-drag to
rotate the camera and alt-drag to zoom the camera:

GlowScript 1.0
box()

That's it. You can of course change the defaults (canvas size, box
dimensions, position, orientation, color, and opacity). But simple things
can be done simply.

Because the program resides at glowscript.org, you don't have to have your
own web site in order to let others run the program. You can just email a
link, as I've done in previous notes.

The first statement, "GlowScript 1.0", is inserted for you when you create
a new program. The version number means that the program will continue to
work in the future even with an incompatible change to GlowScript syntax in
later versions, because the version 1.0 libraries will always be available.
(There were earlier versions that still work.) The version number changes
slowly, because new features that don't conflict with existing syntax just
get added to the current library, which is instantly available because it
is in the cloud; you don't have to update anything.

Bruce