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
A checked-off item doesn't mean "no problem here", it means "it was reviewed"
Problems can be noted in side issues that reference this issue, or through // REVIEW comments in the code
Specific Instructions
Greenhouse Effect is ready for code review. This sim is a bit unusual for a couple of reasons. One is that it is already available on the main site because it had been published as a prototype and then a decision was made to promote it to a full release. Another is that it contains all of the code for the Molecules and Light (M&L) sim, since one of the screens of Greenhouse Effect was supposed to be a variation of the M&L behavior, but that has not happened yet. So, for this review, please do not review any of the code in the "micro" directory. The primary functional difference between the code that was published a few months ago and the current code on master is that support for phet-io has been added to the 2nd and 3rd screens and improved in the first.
GitHub Issues
The following standard GitHub issues should exist. If these issues are missing, or have not been completed, pause code review until the issues have been created and addressed by the responsible dev.
model.md, see Complete model.md #325. Familiarize yourself with the model by reading model.md. Does it adequately describe the model, in terms appropriate for teachers? Has it been reviewed by the sim designer?
implementation-notes.md, see Complete implementation-notes.md #326. Familiarize yourself with the implementation by reading implementation-notes.md. Does it provide an overview that will be useful to future maintainers?
Does the html file size seem reasonable, compared to other similar sims?
Does the sim start up? (unbuilt and built versions)
Does the sim experience any assertion failures? (run with query parameter ea)
Does the sim pass a scenery fuzz test? (run with query parameters fuzz&ea)
Does the sim behave correctly when listener order is shuffled? (run with query parameters ea&listenerOrder=random and ea&listenerOrder=random&fuzz)
Does the sim output any deprecation warnings? Run with ?deprecationWarnings. Do not use deprecated methods in new code.
Memory Leaks
Does a heap comparison using Chrome Developer Tools indicate a memory leak? (This process is described here.) Test on a version built using grunt --minify.mangle=false. Compare to testing results done by the responsible developer. Results can be found in Test for memory leaks as part of code review #327.
❌ See Complete implementation-notes.md #326 and Identify things that are not disposable #336. For each common-code component (sun, scenery-phet, vegas, …) that opaquely registers observers or listeners, is there a call to that component’s dispose function, or is it obvious why it isn't necessary, or is there documentation about why dispose isn't called? An example of why no call to dispose is needed is if the component is used in a ScreenView that would never be removed from the scene graph. Note that it's also acceptable (and encouraged!) to describe what needs to be disposed in implementation-notes.md.
Are there leaks due to registering observers or listeners? The following guidelines should be followed unless documentation (in-line or in implementation-notes.md) describes why following them is not necessary.
AXON: Property.link or lazyLink is accompanied by unlink.
AXON: Multilink.multilink is accompanied by unmultilink.
AXON: Creation of Multilink is accompanied by dispose.
AXON: Creation of DerivedProperty is accompanied by dispose.
AXON: Emitter.addListener is accompanied by removeListener.
AXON: ObservableArrayDef.element*Emitter.addListener is accompanied by ObservableArrayDef.element*Emitter.removeListener
SCENERY: Node.addInputListener is accompanied by removeInputListener
TANDEM: Creation of an instrumented PhetioObject is accompanied by dispose.
Do all types that require a dispose function have one? This should expose a public dispose function that calls this.disposeMyType(), where disposeMyType is a private function declared in the constructor. MyType should exactly match the filename. See Identify things that are not disposable #336
Performance
Play with sim, identify any obvious performance issues. Examples: animation that slows down with large numbers of objects; animation that pauses or "hitches" during garbage collection.
If the sim uses WebGL, does it have a fallback? Does the fallback perform reasonably well? (run with query parameter webgl=false)
Usability
Are UI components sufficiently responsive? (especially continuous UI components, such as sliders)
Are pointer areas optimized, especially for touch? (run with query parameter showPointerAreas)
Do pointer areas overlap? (run with query parameter showPointerAreas) Overlap may be OK in some cases, depending on the z-ordering (if the front-most object is supposed to occlude pointer areas) and whether objects can be moved.
Internationalization
Does the sim behave correctly with dynamic layout, to support dynamic locale? Run with stringTest=dynamic and use the left/right arrow keys.
Are there any strings that are not internationalized, and does the sim layout gracefully handle internationalized strings that are shorter than the English strings? (run with query parameter stringTest=X. You should see nothing but 'X' strings.)
Does the sim layout gracefully handle internationalized strings that are longer than the English strings? (run with query parameters stringTest=double and stringTest=long)
Does the sim stay on the sim page (doesn't redirect to an external page) when running with the query parameter stringTest=xss? This test passes if sim does not redirect, OK if sim crashes or fails to fully start. Only test on one
desktop platform. For PhET-iO sims, additionally test ?stringTest=xss in Studio to make sure i18n strings didn't leak
to phetioDocumentation, see https://github.com/phetsims/phet-io/issues/1377
Avoid using concatenation to create strings that will be visible in the user interface. Use StringUtils.fillIn and a string pattern to ensure that strings are properly localized.
Use named placeholders (e.g. "{{value}} {{units}}") instead of numbered placeholders (e.g. "{0} {1}").
Make sure the string keys are all perfect. They are difficult to change after 1.0.0 is published. They should be
literal, they should be explicit, and they should be consistent. This will also be the PhET-iO phetioID name in Studio etc. See Use camelCase for string keys #290 for some additional information for this particular sim
Guidelines for string keys are:
(1) Strings keys should generally match their values. E.g.:
(2) If a string key would be exceptionally long, use a key name that is an abbreviated form of the string value, or that captures the purpose/essence of the value. E.g.:
// key is abbreviated"iWentToTheStore": {value: "I went to the store to get milk, eggs, butter, and sugar."},// key is based on purpose"describeTheScreen": {value: "The Play Area is a small room. The Control Panel has buttons, a checkbox, and radio buttons to change conditions in the room."}
(3) If string key names would collide, use your judgment to disambiguate. E.g.:
(4) String keys for screen names should have the general form "screen.{{screenName}}". E.g.:
"screen.explore": {"value": "Explore"},
(5) String patterns that contain placeholders (e.g. "My name is {{first}} {{last}}") should use keys that are unlikely to conflict with strings that might be needed in the future. For example, for "{{price}}" consider using key "pricePattern" instead of "price", if you think there might be a future need for a "price" string.
(6) It is acceptable to prefix families of strings with a prefix, like so:
The repository name should correspond to the sim title. For example, if the sim title is "Wave Interference", then the repository name should be "wave-interference".
Are all required files and directories present?
For a sim repository named “my-repo”, the general structure should look like this (where assets/, images/, mipmaps/ or sounds/ may be omitted if the sim doesn’t have those types of resource files).
*Any images used in model.md or implementation-notes.md should be added here. Images specific to aiding with documentation do not need their own license.
Verify that the same image file is not present in both images/ and mipmaps/. If you need a mipmap, use it for all occurrences of the image.
Is the js/ directory properly structured?
All JavaScript source should be in the js/ directory. There should be a subdirectory for each screen (this also applies for single-screen sims, where the subdirectory matches the repo name). For a multi-screen sim, code shared by 2 or more screens should be in a js/common/ subdirectory. Model and view code should be in model/ and view/ subdirectories for each screen and common/. For example, for a sim with screens “Introduction” and “Lab”, the general directory structure should look like this:
Do filenames use an appropriate prefix? Some filenames may be prefixed with the repository name,
e.g. MolarityConstants.js in molarity. If the repository name is long, the developer may choose to abbreviate the
repository name, e.g. EEConstants.js in expression-exchange. If the abbreviation is already used by another
repository, then the full name must be used. For example, if the "EE" abbreviation is already used by
expression-exchange, then it should not be used in equality-explorer. Whichever convention is used, it should be used
consistently within a repository - don't mix abbreviations and full names.
Is there a file in assets/ for every resource file in sound/ and images/? Note that there is not necessarily a
1:1 correspondence between asset and resource files; for example, several related images may be in the same .ai file.
Check license.json for possible documentation of why some resources might not have a corresponding asset file.
For simulations, was the README.md generated by grunt published-README or grunt unpublished-README? Common
code repos can have custom README files.
Does package.json refer to any dependencies that are not used by the sim?
Is the LICENSE file correct? (Generally GPL v3 for sims and MIT for common code,
see this thread for additional information).
Does .gitignore match the one in simula-rasa?
In GitHub, verify that all non-release branches have an associated issue that describes their purpose.
Are there any GitHub branches that are no longer needed and should be deleted?
Sim-specific query parameters (if any) should be identified and documented in one .js file in js/common/ or js/ (
if there is no common/). The .js file should be named {{PREFIX}}QueryParameters.js, for example
ArithmeticQueryParameters.js for the arithmetic repository, or FBQueryParameters.js for Function Builder (where
the FB prefix is used).
Query parameters that are public-facing should be identified using public: true in the schema.
All sims should use a color file named MyRepoColors.js or, if using abbreviations, MRColors.js, and
use ProfileColorProperty where appropriate, even if they have a single (default) profile (to support color editing
and PhET-iO Studio). The ColorProfile pattern was converted to *Colors.js files in PhET-iO instrumentation for ColorProfile scenery-phet#515. Please see GasPropertiesColors.js
for a good example.
Coding Conventions
Are coding conventions outlined in PhET's Coding Conventions Document followed and adhered to? This document
deals with PhET coding conventions. You do not need to exhaustively check every item in this section, nor do you
necessarily need to check these items one at a time. The goal is to determine whether the code generally meets PhET standards.
DOT/Utils.toFixed or DOT/Utils.toFixedNumber should be used instead of toFixed. JavaScript's toFixed is notoriously buggy. Behavior differs depending on browser, because the spec doesn't specify whether to round or floor.
IE11
IE is no longer supported. With that in mind remove IE-specific workarounds
Use string.includes and string.startsWith where possible.
Organization, Readability, and Maintainability
Does the organization and structure of the code make sense? Do the model and view contain types that you would expect (or guess!) by looking at the sim? Do the names of things correspond to the names that you see in the user interface?
Are appropriate design patterns used? See phet-software-design-patterns.md. If new or inappropriate patterns are identified, create an issue.
Is inheritance used where appropriate? Does the type hierarchy make sense?
Is there any unnecessary coupling? (e.g., by passing large objects to constructors, or exposing unnecessary properties/functions). (A separate issue was logged about this and subsequently addressed, see Unnecessary coupling #339.) In TypeScript, you can decouple by narrowing the API like so:
publicconstructor(tickMarksVisibleProperty: Property<boolean>,model: Pick<IntroModel,'changeWaterLevel'>,// <-- Note the call site can pass the whole model, but we declare we will only use this part of itwaterCup: WaterCup,modelViewTransform: ModelViewTransform2,providedOptions?: WaterCup3DNodeOptions){
Is there too much unnecessary decoupling? (e.g. by passing all of the properties of an object independently instead of passing the object itself)?
Are the source files reasonable in size? Scrutinize large files with too many responsibilities - can responsibilities be broken into smaller delegates? To see file sizes for TypeScript sims, run this shell command:
Are any significant chunks of code duplicated? In addition to manual identification, tools include: WebStorm Code > Analyze Code > Locate Duplicates and https://github.com/danielstjules/jsinspect. (An issue was logged about this as a result of the review and subsequently addressed, see Duplicate code #337.)
Is there anything that should be generalized and migrated to common code?
Are there any TODO or FIXME or REVIEW comments in the code? They should be addressed or promoted to GitHub issues.
Are there any magic numbers that should be factored out as constants and documented?
Are there any constants that are duplicated in multiple files that should be factored out into a {{REPO}}Constants.js file?
Is PhetColorScheme used where appropriate? Verify that the sim is not inventing/creating its own colors for things that have been standardized in PhetColorScheme. Identify any colors that might be worth adding to PhetColorScheme.
Are all dependent Properties modeled as DerivedProperty instead of Property?
All dynamics should be called from Sim.step(dt), do not use window.setTimeout or window.setInterval. This will help support Legends of Learning and PhET-iO.
Accessibility
This sim supports alternative input, and some amount of description has been implemented, but it is not complete. The general plan is that full description will be implemented "later", but it is not clear at this time when that will be. For the purposes of this review, code related to description should be largely ignored since it is likely to change quite a bit when the time is taken to fully implement it.
General
⚠️@pixelzoom reviewed pdomOrder. But I'm not familiar with description/describers, so I cannot evaluate.
Are accessibility features integrated well into the code? They should be added in a maintainable way, even if that requires upfront refactoring.
Alternative Input
Does the sim pass an accessibility fuzz test? (run with query parameters fuzzBoard&ea)
⚠️Looking at the keyboard help dialogs, I do not see any sim-specific shortcuts. So this checklist items seems to be "not applicable". Does this sim use specific keyboard shortcuts that overlap with global shortcuts? This includes the use of modifier keys like in Unintended zoom/keyboard behavior ratio-and-proportion#287. NOTE: There is currently no list of global shortcuts, and therefore no way to complete this checklist item. See Create a list of global keyboard shortcuts. phet-info#188.
PhET-iO
This section may be omitted if the sim has not been instrumented for PhET-iO, but is likely good to glance at no matter.
Does instrumentation follow the conventions described in PhET-iO Instrumentation Guide?
This could be an extensive bullet. At the very least, be sure to know what amount of instrumentation this sim
supports. Describing this further goes beyond the scope of this document.
PhET-iO instantiates different objects and wires up listeners that are not present in the PhET-branded simulation.
It needs to be tested separately for memory leaks. To help isolate the nature of the memory leak, this test should
be run separately from the PhET brand memory leak test. Test with a colorized Data Stream, and Studio (easily
accessed from phetmarks). Compare to testing results done by the responsible developer and previous releases. (see Test for memory leaks as part of code review #327 for memory test results)
Make sure unused PhetioObject instances are disposed, which unregisters their tandems. Some follow-up work was recommended as part of this review which has been completed, see Identify things that are not disposable #336.
Make sure JOIST dt values are used instead of Date.now() or other Date functions. Perhaps try phet.joist.elapsedTime. Though this has already been mentioned, it is necessary for reproducible playback via input
events and deserves a comment in this PhET-iO section.
Are random numbers using DOT/dotRandom as an imported module (not a global), and all doing so after modules are declared (non-statically)? For
example, the following methods (and perhaps others) should not be used: Math.random, _.shuffle, _.sample, _.random.
This also deserves re-iteration due to its effect on record/playback for PhET-iO.
Like JSON, keys for undefined values are omitted when serializing objects across frames. Consider this when
determining whether toStateObject should use null or undefined values.
PhET prefers to use the term "position" to refer to the physical (x,y) position of objects. This applies to both
brands, but is more important for the PhET-iO API. See location vs position phet-info#126
Are your IOType state methods violating the API of the core type by accessing private fields?
When defining a boolean Property to indicate whether something is enabled, use AXON/EnabledProperty. This
should be done in both the model and the view. If you're using a DerivedProperty, skip this item.
Do not use translated strings in phetioDocumentaton - it changes the PhET-iO API!
The text was updated successfully, but these errors were encountered:
Code review is done. The sim is in great shape. All issues that I created are linked above, and there were no "REVIEW" comments added to the code. Note the ❌ and ⚠️ annotations in the checklist above. Back to @jbphet...
PhET Code-Review Checklist (a.k.a "CRC")
// REVIEW
comments in the codeSpecific Instructions
Greenhouse Effect is ready for code review. This sim is a bit unusual for a couple of reasons. One is that it is already available on the main site because it had been published as a prototype and then a decision was made to promote it to a full release. Another is that it contains all of the code for the Molecules and Light (M&L) sim, since one of the screens of Greenhouse Effect was supposed to be a variation of the M&L behavior, but that has not happened yet. So, for this review, please do not review any of the code in the "micro" directory. The primary functional difference between the code that was published a few months ago and the current code on master is that support for phet-io has been added to the 2nd and 3rd screens and improved in the first.
GitHub Issues
The following standard GitHub issues should exist. If these issues are missing, or have not been completed, pause code review until the issues have been created and addressed by the responsible dev.
brands=phet
, see Test for memory leaks as part of code review #327brands=phet-io
(if the sim is instrumented for PhET-iO), see Test for memory leaks as part of code review #327Build and Run Checks
If any of these items fail, pause code review.
ea
)fuzz&ea
)ea&listenerOrder=random
andea&listenerOrder=random&fuzz
)?deprecationWarnings
. Do not use deprecated methods in new code.Memory Leaks
grunt --minify.mangle=false
. Compare to testing results done by the responsible developer. Results can be found in Test for memory leaks as part of code review #327.dispose
function, or is it obvious why it isn't necessary, or is there documentation about whydispose
isn't called? An example of why no call todispose
is needed is if the component is used in aScreenView
that would never be removed from the scene graph. Note that it's also acceptable (and encouraged!) to describe what needs to be disposed in implementation-notes.md.Property.link
orlazyLink
is accompanied byunlink
.Multilink.multilink
is accompanied byunmultilink
.Multilink
is accompanied bydispose
.DerivedProperty
is accompanied bydispose
.Emitter.addListener
is accompanied byremoveListener
.ObservableArrayDef.element*Emitter.addListener
is accompanied byObservableArrayDef.element*Emitter.removeListener
Node.addInputListener
is accompanied byremoveInputListener
PhetioObject
is accompanied bydispose
.dispose
function have one? This should expose a publicdispose
function that callsthis.disposeMyType()
, wheredisposeMyType
is a private function declared in the constructor.MyType
should exactly match the filename. See Identify things that are not disposable #336Performance
webgl=false
)Usability
showPointerAreas
)showPointerAreas
) Overlap may be OK in some cases, depending on the z-ordering (if the front-most object is supposed to occlude pointer areas) and whether objects can be moved.Internationalization
Does the sim behave correctly with dynamic layout, to support dynamic locale? Run with
stringTest=dynamic
and use the left/right arrow keys.Are there any strings that are not internationalized, and does the sim layout gracefully handle internationalized strings that are shorter than the English strings? (run with query parameter
stringTest=X
. You should see nothing but 'X' strings.)Does the sim layout gracefully handle internationalized strings that are longer than the English strings? (run with query parameters
stringTest=double
andstringTest=long
)Does the sim stay on the sim page (doesn't redirect to an external page) when running with the query parameter
stringTest=xss
? This test passes if sim does not redirect, OK if sim crashes or fails to fully start. Only test on onedesktop platform. For PhET-iO sims, additionally test
?stringTest=xss
in Studio to make sure i18n strings didn't leakto phetioDocumentation, see https://github.com/phetsims/phet-io/issues/1377
Avoid using concatenation to create strings that will be visible in the user interface. Use
StringUtils.fillIn
and a string pattern to ensure that strings are properly localized.Use named placeholders (e.g.
"{{value}} {{units}}"
) instead of numbered placeholders (e.g."{0} {1}"
).Make sure the string keys are all perfect. They are difficult to change after 1.0.0 is published. They should be
literal, they should be explicit, and they should be consistent. This will also be the PhET-iO phetioID name in Studio etc. See Use camelCase for string keys #290 for some additional information for this particular sim
Guidelines for string keys are:
(1) Strings keys should generally match their values. E.g.:
(2) If a string key would be exceptionally long, use a key name that is an abbreviated form of the string value, or that captures the purpose/essence of the value. E.g.:
(3) If string key names would collide, use your judgment to disambiguate. E.g.:
(4) String keys for screen names should have the general form
"screen.{{screenName}}"
. E.g.:(5) String patterns that contain placeholders (e.g.
"My name is {{first}} {{last}}"
) should use keys that are unlikely to conflict with strings that might be needed in the future. For example, for"{{price}}"
consider using key"pricePattern"
instead of"price"
, if you think there might be a future need for a"price"
string.(6) It is acceptable to prefix families of strings with a prefix, like so:
Nested substructure is not yet fully supported.
Repository Structure
The repository name should correspond to the sim title. For example, if the sim title is "Wave Interference", then the repository name should be "wave-interference".
Are all required files and directories present?
For a sim repository named “my-repo”, the general structure should look like this (where assets/, images/, mipmaps/ or sounds/ may be omitted if the sim doesn’t have those types of resource files).
*Any images used in model.md or implementation-notes.md should be added here. Images specific to aiding with documentation do not need their own license.
Verify that the same image file is not present in both images/ and mipmaps/. If you need a mipmap, use it for all occurrences of the image.
Is the js/ directory properly structured?
All JavaScript source should be in the js/ directory. There should be a subdirectory for each screen (this also applies for single-screen sims, where the subdirectory matches the repo name). For a multi-screen sim, code shared by 2 or more screens should be in a js/common/ subdirectory. Model and view code should be in model/ and view/ subdirectories for each screen and common/. For example, for a sim with screens “Introduction” and “Lab”, the general directory structure should look like this:
Do filenames use an appropriate prefix? Some filenames may be prefixed with the repository name,
e.g.
MolarityConstants.js
in molarity. If the repository name is long, the developer may choose to abbreviate therepository name, e.g.
EEConstants.js
in expression-exchange. If the abbreviation is already used by anotherrepository, then the full name must be used. For example, if the "EE" abbreviation is already used by
expression-exchange, then it should not be used in equality-explorer. Whichever convention is used, it should be used
consistently within a repository - don't mix abbreviations and full names.
Is there a file in assets/ for every resource file in sound/ and images/? Note that there is not necessarily a
1:1 correspondence between asset and resource files; for example, several related images may be in the same .ai file.
Check license.json for possible documentation of why some resources might not have a corresponding asset file.
For simulations, was the README.md generated by
grunt published-README
orgrunt unpublished-README
? Commoncode repos can have custom README files.
Does package.json refer to any dependencies that are not used by the sim?
Is the LICENSE file correct? (Generally GPL v3 for sims and MIT for common code,
see this thread for additional information).
Does .gitignore match the one in simula-rasa?
In GitHub, verify that all non-release branches have an associated issue that describes their purpose.
Are there any GitHub branches that are no longer needed and should be deleted?
Sim-specific query parameters (if any) should be identified and documented in one .js file in js/common/ or js/ (
if there is no common/). The .js file should be named
{{PREFIX}}QueryParameters.js
, for exampleArithmeticQueryParameters.js for the arithmetic repository, or FBQueryParameters.js for Function Builder (where
the
FB
prefix is used).Query parameters that are public-facing should be identified using
public: true
in the schema.All sims should use a color file named
MyRepoColors.js
or, if using abbreviations,MRColors.js
, anduse
ProfileColorProperty
where appropriate, even if they have a single (default) profile (to support color editingand PhET-iO Studio). The
ColorProfile
pattern was converted to*Colors.js
files inPhET-iO instrumentation for ColorProfile scenery-phet#515. Please see
GasPropertiesColors.js
for a good example.
Coding Conventions
deals with PhET coding conventions. You do not need to exhaustively check every item in this section, nor do you
necessarily need to check these items one at a time. The goal is to determine whether the code generally meets PhET standards.
TypeScript Conventions
Math Libraries
DOT/Utils.toFixed
orDOT/Utils.toFixedNumber
should be used instead oftoFixed
. JavaScript'stoFixed
is notoriously buggy. Behavior differs depending on browser, because the spec doesn't specify whether to round or floor.IE11
string.includes
andstring.startsWith
where possible.Organization, Readability, and Maintainability
TODO
orFIXME
orREVIEW
comments in the code? They should be addressed or promoted to GitHub issues.{{REPO}}Constants.js
file?PhetColorScheme
. Identify any colors that might be worth adding toPhetColorScheme
.DerivedProperty
instead ofProperty
?Accessibility
This sim supports alternative input, and some amount of description has been implemented, but it is not complete. The general plan is that full description will be implemented "later", but it is not clear at this time when that will be. For the purposes of this review, code related to description should be largely ignored since it is likely to change quite a bit when the time is taken to fully implement it.
General
Are accessibility features integrated well into the code? They should be added in a maintainable way, even if that requires upfront refactoring.
Alternative Input
fuzzBoard&ea
)PhET-iO
This section may be omitted if the sim has not been instrumented for PhET-iO, but is likely good to glance at no matter.
This could be an extensive bullet. At the very least, be sure to know what amount of instrumentation this sim
supports. Describing this further goes beyond the scope of this document.
It needs to be tested separately for memory leaks. To help isolate the nature of the memory leak, this test should
be run separately from the PhET brand memory leak test. Test with a colorized Data Stream, and Studio (easily
accessed from phetmarks). Compare to testing results done by the responsible developer and previous releases. (see Test for memory leaks as part of code review #327 for memory test results)
PhetioObject
instances are disposed, which unregisters their tandems. Some follow-up work was recommended as part of this review which has been completed, see Identify things that are not disposable #336.dt
values are used instead ofDate.now()
or other Date functions. Perhaps tryphet.joist.elapsedTime
. Though this has already been mentioned, it is necessary for reproducible playback via inputevents and deserves a comment in this PhET-iO section.
DOT/dotRandom
as an imported module (not a global), and all doing so after modules are declared (non-statically)? Forexample, the following methods (and perhaps others) should not be used:
Math.random
,_.shuffle
,_.sample
,_.random
.This also deserves re-iteration due to its effect on record/playback for PhET-iO.
undefined
values are omitted when serializing objects across frames. Consider this whendetermining whether
toStateObject
should usenull
orundefined
values.brands, but is more important for the PhET-iO API. See location vs position phet-info#126
AXON/EnabledProperty
. Thisshould be done in both the model and the view. If you're using a DerivedProperty, skip this item.
phetioDocumentaton
- it changes the PhET-iO API!The text was updated successfully, but these errors were encountered: