# 1.0.0-dev.19 12/22/14 12/22/14 #17 implement molecules in Game boxes using CanvasNode 12/21/14 localize '?' in Game # 1.0.0-dev.18 12/18/14 12/17/14 #18 remove leakStep query parameter for memory-leak debugging 12/17/14 remove workaround for ArrowButton leak in NumberSpinner 12/17/14 sun gradient leak was fixed, sun#146 12/17/14 scenery gradient leak was fixed, scenery#328 # 1.0.0-dev.17 12/17/14 12/16/14 #17 cache the Before/After boxes (and stuff below them) for each reaction, reduced work in animation loop to ~1ms on Chrome 12/16/14 #17 cache equations at the top of the 'Sandwiches' and 'Molecules' screens, they are relatively expensive to create (~30% savings on Chrome) 12/16/14 #17, #24 reimplement HBracketNode using arc instead of quadraticCurveTo, presumably making the stroked shape less expensive to compute 12/16/14 #18 move leakStep memory-leak test to RPALScreenView, so that it applies to both 'Sandwiches' and 'Molecules' screens, in case those screens have different issues 12/16/14 #18 change leakTest to leakStep, integer that specifies number of animation steps to wait before automatically switching sandwich equations 12/15/14 #18 add 'leakTest' query parameter, iterates through sandwiches to test for memory leaks 12/15/14 #18 rename DynamicIcon to SubstanceIcon to associate it with Substance, document memory issue in implementation-notes.txt 12/15/14 #18 fix memory leak in RandomBox by using DynamicIcon 12/15/14 #18 fix memory leak in SandwichesEquationNode by using DynamicIcon 12/15/14 #18 fix memory leak in DynamicIcon, must explicitly remove icon from its parent 12/14/14 fix JSdoc for array, use {Type[]} 12/14/14 #18 add memoryDebug output for first 2 screens 12/14/14 fix: create 'Check' button immediately, so that GameButtons has well-defined bounds for layout 12/14/14 #18 fix problem that was resulting in calls to disposed instances of ChallengeNode 12/14/14 #18 add debug output for instantiation and disposal of challenges, 'memoryDebug' query parameter 12/14/14 #18 after calling dispose on any object, set it to null (to induce errors for calls to disposed objects) 12/9/14 add Reaction.toString, useful for debugging # 1.0.0-dev.16 12/9/14 12/9/14 #22 Game: reduce button opacity to 0.65, face opacity to 0.5, delete query parameters 12/9/14 #20 delete 'randomOffset' query parameter, keep default at 8 12/9/14 #18 document all axon link calls as (a) must be unlinked in dispose, (b) unnecessary because property is owned by instance, or (c) unnecessary because observer exists for sim lifetime 12/9/14 #18 unlink from checkButtonEnabledProperty in GameButtons.dispose, even though it's not really necessary 12/9/14 #18 fix memory leak in ChallengeNode, was not unlinking from model.playState 12/9/14 #18 delete DevAnswerNode to reduce axon coupling, handle 'cheat' feature in ChallengeNode 12/9/14 use !!getQueryParameter for boolean query parameters # 1.0.0-dev.15 12/9/14 12/9/14 #22 add query parameters for experimenting with opacity of buttons and face in Game (buttonsOpacity, faceOpacity) 12/9/14 #18 reduce axon dependencies: eliminate use of DynamicIcon in RandomBox, axon.Property in RandomBox.CellNode 12/9/14 #17 fix vertical position of '?' in challenges, broken in previous commit 12/9/14 #18 use DynamicIcon only for products in SandwichesEquationNode, to reduce axon linkage 12/9/14 rename SubstanceIcon to DynamicIcon, since it has no dependency on Substance 12/8/14 more detailed doc for 'dev' query parameter 12/8/14 add 'cheat' query parameter, which shows challenge answer at bottom center of screen 12/8/14 #7 remove 'equation' query parameter, locate equation at top of screen in 'Sandwiches' and 'Molecules' screens # 1.0.0-dev.14 12/8/14 12/8/14 #21 set proper initial icon for sandwich in 'Cheese' and 'Meat & Cheese' equations, so that 'Rest All' works properly 12/8/14 #17 create NumberNodes on demand, so that they aren't created for first 2 screens, and to improve performance of "next challenge" (<1% gain) 12/8/14 #17 defer adding NumberNodes to scenegraph until they are needed, to improve performance of "next challenge" (<2% gain) 12/8/14 #17 create face on demand, to improve performance of "next challenge" (<5% gain) 12/8/14 #17 create game buttons on demand, to improve performance of "next challenge" (20% gain) 12/8/14 move color for game buttons to RPALColors.GAME_BUTTON 12/8/14 #19 add RPALColors.BOX_FILL, so it's easy to change the box fill for the entire sim 12/8/14 #8 remove 'coefficients' query parameter, use spinners for custom sandwich equation 11/26/14 misc cleanup in GameModel 11/26/14 eliminate the need for BeforeProperty by making GameModel solely responsible for setting GamePhase 11/26/14 decided not to migrate anything to common code, defer until something herein is needed by another sim 11/26/14 misc documentation tweaks 11/26/14 #5 code review completed 11/26/14 #15 use _.random in ChallengeFactory 11/26/14 #14 make instance variables private that are not used outside of GameView constructor 11/26/14 #13 simplify implementation of GameGuess 11/25/14 rename Reaction.update to updateQuantities, to be more descriptive # 1.0.0-dev.13 11/25/14 11/25/14 #12 add mission default for options.titleNode in StacksAccordionBox 11/25/14 #11 fix: show molecule symbols below boxes in 'Molecules' and 'Games' screens (steal some vertical space to make this work in Game) 11/25/14 #11 provide default value for Quantities options.showSymbols, propagate correctly in BeforeAfterNode 11/24/14 clean up how points are awarded in GameModel 11/24/14 document read-only properties and fields in GameModel # 1.0.0-dev.12 11/24/14 11/24/14 fix memory leak, call GameButtons.dispose to unlink from model.playStateProperty 11/24/14 clear best times on Game 'Reset All' 11/24/14 move all state-change responsibilities into GameModel to reduce coupling and prevent order dependencies (major change!) 11/24/14 move responsibility for computing points and score into GameModel 11/24/14 remove redundant @param challenge from ChallengeNode constructor 11/24/14 when 'hide molecules' is on, hide the Before/After box, so we don't see its stroke 11/24/14 make Game boxes a little wider, since we have the space and there's a lot of stuff in them 11/24/14 add ability to specify Before/After box size per screen 11/24/14 center UI in first 2 screens 11/24/14 change request: make HideBox dashed line look more like mockups (required making boxes slightly wider) 11/24/14 change request: use stroke:'black', lineWidth:1 for equation background in 'Game' screen 11/24/14 change request: use a thicker stroke on molecule in the navbar icon for 'Molecules' screen 11/24/14 QuantitiesNode: delete options.beforeBoxLeft, change options.afterBoxLeft to afterBoxXOffset 11/24/14 get rid of BoxItem 11/24/14 promote 'leftover' to a first-class part of a Reaction, instead of a Reactant property 11/20/14 rename guessIsValidProperty to checkButtonEnabledProperty 11/20/14 remove redundant @param challenge from GameButtons constructor 11/20/14 rename SubstanceNode to SubstanceIcon 11/20/14 rename Substance.node to Substance.icon 11/20/14 rename options.maxImageSize to minIconSize throughout 11/20/14 move HideBox to common/view, fix bug with visibility of 'Hide numbers' box 11/20/14 factor out box size to RPALConstants.BEFORE_AFTER_BOX_SIZE 11/20/14 rename VisibilityControl to VisibilityRadioButtons 11/20/14 add gridPositionProperty to RandomBox inner type 11/20/14 rename PreProperty to BeforeProperty 11/20/14 delete dev options from main.js 11/20/14 doc cleanup 11/20/14 rename RPALBaseView to RPALScreenView 11/20/14 rename ReactionChoiceNode to ReactionRadioButtons 11/20/14 QuantitiesNode: move constructor param to options 11/20/14 rename ChallengeType to BoxType, so that it's not specific to the Game screen 11/20/14 absorb RPALBrackets into QuantitiesNode 11/20/14 factor out common code in BeforeAfterNode and ChallengeNode into QuantitiesNode 11/19/14 factor out duplicate bracket code into RPALBrackets 11/19/14 factor out duplicate code for creating BoxItems into factory functions 11/19/14 simplify horizontal-layout code for 'After', will always have at least 3 items (>=1 product + >=2 reactants) 11/19/14 Game: center '?' in space above buttons # 1.0.0-dev.11 11/19/14 11/19/14 Game: add 'randomOffset' query parameter, for setting how much molecules are offset from grid cells 11/19/14 delete unused query params 11/19/14 'Game' screen feature complete 11/19/14 formalize 'items' in BoxItem 11/19/14 clean up RandomBox 11/19/14 Game: refine random placement of molecules in boxes 11/19/14 Game: put PCl5 (biggest molecule) first in ChallengeFactory.LEVEL2_POOL, to speed layout debugging 11/19/14 Game: first stab at random placement of molecules in boxes 11/19/14 change constructor signature for SubstanceNode, use it in StackNode 11/18/14 Game: show points (next to face) in yellow with black stroke, so that they stand out 11/18/14 Sandwiches fix: restore 'No reaction' when we don't have a valid sandwich 11/18/14 Game: fix stale reference to challengeNode on Reset All 11/18/14 Game: fix Reset All for radio buttons 11/18/14 Game: center face in negative space above buttons 11/18/14 Game: compute height and location of 'hide' boxes 11/18/14 dev: relocate 'Replay' and 'Skip' buttons, change labels to '<' and '>' 11/18/14 dev: shorten the answer string to just the quantities 11/18/14 dev: start with correct answer only when 'playAll' query parameter is present 11/18/14 Game: add icons, spinner and static numbers below boxes 11/18/14 factor out colors used to fill panels, stroke boxes 11/18/14 Game: add equation background, as in design doc 11/17/14 horizontally align arrows in Game 11/17/14 increase horizontal spacing in Game equation 11/17/14 Game: baby steps towards GridBox 11/17/14 add boxes for 'hide molecules' and 'hide numbers' features 11/17/14 add '?' to before/after box until the user makes a valid guess 11/17/14 factor 'valid guess' logic out of GameButtons 11/17/14 dev: default to correct answer when running with 'dev' query param 11/17/14 don't reset challenge.reaction when resetting a challenge (eg, for 'Replay') 11/17/14 fix clone methods for initializing a game guess 11/17/14 wire up ChallengeNode.dispose 11/17/14 add more UI components to ChallengeNode 11/17/14 add GameButtons.dispose 11/17/14 delete SandwichesBeforeAfterNode subtype, handle dynamic images in base type 11/17/14 replace Substance.getWrappedNode with SubstanceNode, handle image update 11/17/14 no need to keep track of productImagesNodes in BeforeAfterNode 11/17/14 add factory function StacksAccordionBox.item, to formally define "items" 11/17/14 compute and store x positions for each "item" in StacksAccordionBox 11/13/14 factor out StacksAccordionBox 11/12/14 set scoreboard margins 11/12/14 remove enum-value experiment 11/12/14 enum values: use {} for production, use strings for debugging 11/12/14 remove checks for existence of Object.freeze in enums 11/12/14 remove workaround in enums for assert issue scenery#300 11/10/14 specify height of icon in HiddenBox, compute scale 11/10/14 dev: fix 'Replay' button 11/10/14 restore Game screen # 1.0.0-dev.10 11/10/14 11/10/14 dev version with Game removed for preliminary interviews 11/10/14 when doing a removeChild, also call dispose if supported 11/10/14 address memory leak in SandwichesEquationNode, call dispose on spinners/pickers 11/6/14 fix how options are provided to NITROGLYCERIN molecule nodes 11/6/14 add 'coefficients' query parameter to use 'spinners' (default) or 'pickers' in custom sandwich equation 11/6/14 put equation at top by default in first 2 screens 11/5/14 encapsulate mutually-exclusive buttons in GameButtons 11/4/14 change interface to GameModel.computePoints 11/4/14 write implementation-notes.txt, revise model.txt 11/4/14 port doc/model.txt 11/4/14 adjust layout of 'Molecules' screen so that brackets don't shift vertically when switching reactions 11/4/14 create box that is placed over 'hidden' elements in game challenges 11/1/14 dev: move 'Replay' and 'Skip' buttons to rightBottom of screen 11/1/14 dev: move 'Test' button to level-selection screen 11/1/14 move all dev code to js/dev/ 11/1/14 consolidate dev-related string representations of various things in DevStringUtils 11/1/14 eliminate duplicate 'dev' code in GameGuess 11/1/14 clean up VisibilityControl for game 11/1/14 create RPALSymbols from an array of strings 11/1/14 simplify layout of Game screen icon by using LayoutBox 11/1/14 generalize and rename GamePhaseProperty to PreProperty 11/1/14 add workaround for scenery#300, conditionally freeze enums when assertions are enabled # 1.0.0-dev.9 10/31/14 10/31/14 dev: delete 'Skip All' button 10/31/14 temporary UI for testing the game 10/31/14 move MoleculesEquationNode to common/view/, since it's used in 2 screens 10/31/14 generalize MoleculesEquationNode, for use in Game screen 10/31/14 replace faked title-bar with new sun.AccordionBox title-bar feature 10/30/14 give internal names to enums 10/30/14 make label optional for horizontal brackets 10/30/14 add curve to tip of horizontal brackets 10/30/14 temporary layout of face in game 10/30/14 curved ends on horizontal brackets 10/29/14 format all code 10/29/14 give names to statics collections 10/29/14 clean up handling of equation in ReactionBarNode 10/29/14 add ReactionFactory.moleculeNodeConstructors, so we don't have to import all nodes elsewhere 10/29/14 doc equals and clone 10/29/14 defer creation of Game elements (model and view) until needed, to improve sim startup time 10/27/14 move RPALFont to common/view/ 10/27/14 fix GameGuess creation 10/27/14 fix Reactant.clone 10/27/14 add temporary spinners, so we can make a guess 10/27/14 add ubiquitous Game elements: face, buttons (Check, Try Again, Show Answer, Next) 10/27/14 dev: add dev-mode stuff to Game last, so that it's on top 10/27/14 create stub for ChallengeView 10/27/14 dev: add challenge type (before/after) to displayed answer 10/24/14 improve test for quantity-range violations, use maxQuantity 10/24/14 move responsibility for creation of Nodes for sandwich ingredients into SandwichNode 10/24/14 set default scale in SandwichNode 10/24/14 document all PropertySet members 10/24/14 rename RPALBaseModel and RPALBaseView 10/24/14 factor out ReactionModel base type for first 2 screens 10/24/14 push more common stuff into ReactionView 10/24/14 dev: with 'playAll', always return reactions in the same order 10/24/14 dev: with 'playAll', zero-products test is irrelevant, so skip it 10/24/14 dev: display challenge answer at bottom-center of Game screen 10/24/14 use unicode char for reaction arrow in debug strings 10/24/14 dev: add 'Test' button to dev controls, for running sanity check on challenge generation 10/24/14 when choosing a challenge that has zero-products, put disqualified reactions back into the pool 10/24/14 dev: implement 'playAll' query parameter, for playing all possible reactions for each Game level 10/23/14 dev: add various test buttons to Game screen 10/23/14 restore Game screen # 1.0.0-dev.8 10/22/14 10/23/14 dev version with Game removed for preliminary interviews 10/23/14 implement game reward # 1.0.0-dev.7 10/22/14 10/22/14 add 'Under Construction' placeholder for challenge view in PlayNode 10/22/14 ensure that all sandwiches are the same width, so that changing sandwich recipe doesn't cause sandwich to move horizontally 10/22/14 move sandwich-specific code out of BeforeAfterNode 10/22/14 add convenience function Substance.getWrappedNode (a substance's Node appears in the scenegraph multiple times) 10/22/14 i18n: limit width of labels below horizontal brackets 10/22/14 i18n: scale level-selection button labels to be no wider than icons 10/22/14 i18n: scale radio buttons to fit in 25% of blue bar 10/22/14 i18n: scale box titles (Before, After) to fit in 75% of box width 10/22/14 use the same Before/After box margin for all sandwich choices # 1.0.0-dev.6 10/21/14 10/21/14 fix ChallengeFactory.test 10/21/14 add 'testGame' query parameter, runs a sanity test on challenge generation 10/21/14 expand touch areas for radio buttons 10/21/14 fold IconFactory into SettingsNode, since all of its functions should be private to SettingsNode 10/21/14 add 'eye' icons to VisibilityControl 10/21/14 #3 drop P4 + 10Cl2 -> 4PCl5, since it has a coefficient greater than our quantity range 10/20/14 adjust size of scoreboard font 10/20/14 add visibility controls to game settings 10/20/14 ensure that icons are the same size on all level-selection buttons, so they scale uniformly 10/20/14 flesh out PlayNode 10/20/14 flesh out ResultsNode 10/20/14 implement the reset of GameModel, based on graphing-lines.LineGameModel instead of a direct Java port 10/20/14 replace HBox and VBox with LayoutNode throughout 10/20/14 create icons for level-selection buttons 10/20/14 first pass at level-selection interface for Game 10/20/14 make GameModel extend PropertySet 10/20/14 replace ChallengeVisibility enum with 2 booleans 10/20/14 completed porting ChallengeFactory.test 10/17/14 started porting ChallengeFactory.test (incomplete) 10/17/14 port big chunks of the Game model from Java (untested by seems to pass requirejs) 10/17/14 add clone to Reactant and Product, for Game 10/16/14 increase vertical space between sandwich ingredients by 1 pixel 10/14/14 rename BeforeAfterNode 10/14/14 factor out commonality in ScreenView subtypes into ReactionView 10/14/14 include Java team in credits 10/14/14 clean up ScreenView subtypes # 1.0.0-dev.5 10/14/14 10/14/14 fix node stack for leftovers 10/14/14 display 'No "Reaction"' as multi-line text, constrain to approximate width of max-size sandwich and its coefficient 10/14/14 reduce horizontal spacing in equations 10/14/14 make the 'no reaction' dashed rectangle the same size as the area occupied by max-size sandwich and its coefficient 10/14/14 add missing '1' coefficient on right side of sandwich equations 10/14/14 port two-product reactions from Java 10/14/14 port single-product reactions from Java 10/14/14 rename MoleculeStackNode to SubstanceStackNode, simplify constructor 10/14/14 collapse Molecule into Substance, MoleculeFactory into ReactionFactory 10/14/14 use thisBlah consistently 10/14/14 clean up and checking in clients of SandwichRecipe 10/14/14 better encapsulation of "sandwiches" analogy in SandwichRecipe type 10/14/14 clean up factories a bit, wrt "sandwiches" analogy # 1.0.0-dev.4 10/14/14 10/14/14 try a dashed square to represent "no reaction" 10/14/14 Sandwiches: keep the same amount of vertical spacing below boxes for all 'reactions', so that things don't move up and down 10/13/14 simplify interleaving of ingredients in SandwichNode 10/13/14 fix: layout of products below 'After' box sometimes doesn't leave enough vertical space for max-size sandwich # 1.0.0-dev.3 10/13/14 10/13/14 'Sandwiches' and 'Molecules' screens feature complete 10/13/14 always add the most prevalent ingredient first when making a sandwich, to maximize interleaving 10/13/14 cleanup options to SandwichesBoxesNode 10/13/14 delete Reaction.fireStateChanged, no longer needed 10/13/14 update custom sandwich image below 'after' box 10/13/14 split equation into SandwichesEquationNode and MoleculesEquationNode, they are sufficiently different 10/13/14 move dispose to prototype 10/13/14 use _.max to compute max height of collections of nodes 10/13/14 adjust layout of stuff below boxes to accommodate dynamic custom sandwich image 10/13/14 update stacks of molecules in the before/after boxes if their visual representation changes (for custom sandwich) 10/13/14 make equation responsible for deciding what to display when custom sandwich formula is not well-defined 10/13/14 when the custom sandwich formula is not well-defined, still require a {Node} with well-defined bounds 10/13/14 change the custom sandwich image based on the coefficients of the reactants 10/13/14 handle custom sandwich as a special case, since it's so different than static reactions 10/13/14 add createEquationNode parameter to ReactionBarNode 10/13/14 add NumberPickers for reactant coefficients in "custom sandwich" equation 10/13/14 adjust EquationNode layout 10/13/14 add mutable reactant coefficients to Reaction for "custom sandwich" 10/13/14 and Substance.coefficient mutable to support "custom sandwich" and game challenges 10/13/14 make Molecule.node mutable to support "custom sandwich" 10/1/14 use new JSdoc convention for @param (primitive types, arrays, Property type qualifier) 10/1/14 rename unlink to dispose, function to be called when disposing of an instance of this object 10/1/14 generalize IntegerSpinner to NumberSpinner, add options.decimalPlaces 10/1/14 generalize IntegerNode to NumberNode, add options.decimalPlaces 10/1/14 mutate IntegerNode options after value is set, so that positioning is accurate 9/8/14 use {Object} instead of {*} as type expression for options param 9/4/14 factor out common options for brackets 9/4/14 support any type of Node for the bracket label 9/4/14 simplify interface to ReactionBarNode 9/4/14 move Reset All button to lower-right in Game screen 9/4/14 put double quotes around "Reaction" in box titles of Sandwiches screen 9/3/14 fix algorithm for creating sandwich node, a slice of bread was being left out 9/2/14 add instanceof checks in equals # 1.0.0-dev.2 9/2/14 9/2/14 set left and top of ReactionBoxesNode, so that it doesn't jump around when switching reactions 9/2/14 reduce width of boxes so that 'reactants' bracket doesn't interfere with 'Reset All' button for custom sandwich 9/2/14 fix computation of maxImageHeight in ReactionBoxesNode, so that y-margin is correct 9/2/14 create placeholder for custom sandwich, to evaluate worst-case layout 9/2/14 reduce size of sandwich components 9/2/14 add stroke around content inside accordion boxes 8/29/14 implement MoleculeFactory.createSandwichNode 8/29/14 use sun.AccordionBox 8/28/14 first pass at 'Sandwiches' screen 8/28/14 move 'Reset All' button to lower left # 1.0.0-dev.1 8/26/14 8/26/14 'Molecules' screen is feature-complete 8/26/14 fix 'Reset All' for quantities 8/26/14 add stacked molecules inside boxes 8/26/14 reduce size of 'Rest All' button 8/26/14 use a more subtle stroke for boxes 8/26/14 add labels (titles) to collapsed boxes 8/26/14 add collapsed version of boxes, wire up to expand/collapse buttons 8/26/14 add expand/collapse buttons, not wired up yet 8/26/14 unlink from reaction properties when switching equations, to prevent memory leak 8/26/14 add ability to unlink spinners and value displays from quantity value properties 8/26/14 #2 standardize capitalization of labels 8/25/14 first pass at Before-After boxes, doesn't show molecules in boxes yet 8/25/14 RPALFont 8/25/14 IntegerNode 8/25/14 IntegerSpinner 8/22/14 BracketNode 8/18/14 scale equation if it's too wide to fit in the available space in the blue control bar 8/18/14 add option to show either molecule symbol or node in equations 8/18/14 add support for 'equation' query parameter, which determines whether equation is at 'top' or 'bottom' of screen 8/18/14 EquationNode 8/18/14 control panel for selecting reaction 8/18/14 misc model changes 7/29/14 port string files from Java 6/24/14 ported majority of the model 6/23/14 add all strings shown in design doc to English strings file 6/23/14 programmatically create 'Molecules' screen icon 6/23/14 create sim skeleton 6/22/14 create GitHub repository