You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/phet-software-design-patterns.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -759,17 +759,6 @@ mindful of the option naming to make sure that you don't cause name collisions.
759
759
Try to keep related options groups together, both for instantiation and `merge` statements. For examples, if you
760
760
have several options related to a11y, keep them together, don't interleave them with other options.
761
761
762
-
### Scenes
763
-
764
-
Author: @jessegreenberg
765
-
766
-
A "Scene" in a PhET simulation is a collection of elements presented to the user. When a new scene is selected,
767
-
elements of the previous scene will be swapped out for elements in the new scene. A single simulation Screen may have
768
-
multiple Scenes. The implementation of a Scene should adhere to the [Model-View-Controller (MVC)](https://github.com/phetsims/phet-info/blob/master/doc/phet-software-design-patterns.md#model-view-controller-mvc)
769
-
pattern and be implemented like any other component in a simulation. There is no base class called Scene which
770
-
combines a SceneModel and a SceneView. Instead, model information for a Scene should exist with the rest of the
771
-
simulation model and view code for a scene should exist with the rest of the simulation view code.
772
-
773
762
### Nesting
774
763
775
764
If using composition for your class, and you want to pass options into a subcomponent, you can nest
@@ -897,6 +886,17 @@ class MyPanel extends Panel {
897
886
898
887
(5) Use `config` judiciously and appropriately. If your API has too many parameters, don't immediately reach for `config` as the solution. Review your API to understand _why_ it has too many parameters, and possibly redesign.
899
888
889
+
## Scenes
890
+
891
+
Author: @jessegreenberg
892
+
893
+
A "Scene" in a PhET simulation is a collection of elements presented to the user. When a new scene is selected,
894
+
elements of the previous scene will be swapped out for elements in the new scene. A single simulation Screen may have
895
+
multiple Scenes. The implementation of a Scene should adhere to the [Model-View-Controller (MVC)](https://github.com/phetsims/phet-info/blob/master/doc/phet-software-design-patterns.md#model-view-controller-mvc)
896
+
pattern and be implemented like any other component in a simulation. There is no base class called Scene which
897
+
combines a SceneModel and a SceneView. Instead, model information for a Scene should exist with the rest of the
898
+
simulation model and view code for a scene should exist with the rest of the simulation view code.
0 commit comments