Revert "JS: Optimize: Make Input.getValueString() non-virtual"

This reverts commit bef3410dbd611776b332b14577465d73d6a6dafd

This breaks dynamically updating Entity names in input strings when they are
renamed at runtime.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: expose substream input as a public method

Other user-defined distributions will want to seed themselves using the global
substream.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Add the Output "SimTime" to Entity

Signed-off-by: Harry King <harry.king@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Add new object "Assign" to Basic Objects

Signed-off-by: Harry King <harry.king@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: remove use of the Palette class from the Object palette

Move towards Strings returned from ObjectType.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: build a list of palette names rather than iterating over the Palette objects

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: kill the Palette class, do all grouping using a String in ObjectType

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Add binding power to unary expressions in ExpParser

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Convert RenderManager rate limiting to locking object

This is simply more readable and understandable than the atomic longs.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Fix bug in assert guard

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Re-order main RenderManager loop

This includes two fixes.

First, the view is updated before the camera
controls, which fixes a simtime caching bug.

Second, clear 'redraw' sooner to ensure redraw requests that coincide
with draws are properly queued.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Renderer now holds camera references instead of RenderWindow

This prevents a race condition where camera updates occur before
a RenderWindow is open.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: ExpParser no longer needs 'this' or 'obj' to be square quoted

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: remove the NonZeroProb keyword from the legacy ProbabilityDistribution

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: refuse to define Entities whose name contains a delimiter character

refuse space, tab, { and }

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Prevent race condition in RenderManager

Renderer.getOpenWindows() had a race condition in it. Instead use the
number of window camera controls as a better proxy for the number of open
windows.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Remove redundant code in Renderer

QueueRedraw() is exactly equivalent to the code removed.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Improved thread locking in renderer

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Remove race condition in display code

Clear the redraw flag before processing render messages to avoid a race
where messages are added while message processing.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: small cosmetic cleanup in renderer loop

- add early break out of loop on shutdown
- add temp vars to avoid repeated getter calls
- mark the GLWindow ref as final

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>