Skip to content

Commit

Permalink
blast old implementation notes, #66
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 26, 2017
1 parent 9f77a0b commit de6c8a8
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions doc/implementation-notes.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,2 @@

:GENERAL:

- Shelf, Scale & Number Line all use a add/remove/clear/populate mechanism for managing movable items. User draggable
items are managed at the top-most model level (i.e. URShoppingModel & RacingLabModel)

- Positioning & tween animation for all movable nodes is done in the common/model/Movable base class

- The touch area for all movable objects is currently the bounds of the image being used. This is problematic when
trying to adjust the touch area. Right now you have to resize the image (see Racing Lab checkered_flag.png).
There's got to be a better way to handle this.

- When profiling memory usage, if asserts are enabled the sim will leak memory because of the
SUN/buttons/RectangularPushButton's being used. Apparently SUN buttons dispose fails when assertions are enabled,
so the disposes are turned off if asserts are turned on (see sun/#212)

- FuzzMouse memory testing seems to stabilize around 30Mb, though I have a sneaking suspicion a few
URNumberLineMarkers are still not getting disposed of properly.

:SHOPPING & SHOPPING LAB:

- Most functionality is in common as the Shopping & Shopping Lab screens are very similar.

- The main models (Shelf, Scale & Number Line) are all derived from ItemCollection, which holds multiple arrays of items
(i.e. apples, carrots, etc.. ). Instances of individual items are moved from one model to another when a user drags them.
(e.g. from shelf to scale or vice versa). The item arrays are switched in each model when the itemTypeProperty changes.

- Any item that is not dragged to the scale drop zone is automatically moved back to the shelf. This is initiated in
common/shopping/model/URShoppingModel

:RACING LAB:

TODO
TODO see https://github.com/phetsims/unit-rates/issues/66

0 comments on commit de6c8a8

Please sign in to comment.