Code Monkey home page Code Monkey logo

atomic-interactions's People

Contributors

aadish avatar aaronsamuel137 avatar agustinvallejo avatar arouinfar avatar chandrashekarbemagoni avatar chrisklus avatar jbphet avatar jessegreenberg avatar jonathanolson avatar katiewoe avatar notsiddhartha avatar phet-dev avatar phet-steele avatar pixelzoom avatar samreid avatar saurabhtotey avatar zepumph avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

aki-labs

atomic-interactions's Issues

Alignment of radio buttons

According to the design document, the radio buttons in the top menu should be aligned horizontally with the radio buttons in the Forces menu:

Design:
image

Currently, they are too far to the left. Please shift the top radio buttons to the right to fix this alignment issue.

Increase vertical spacing of text in top menu + menu height

Please increase the vertical spacing between text labels to more closely match the original specification:
screenshot 2015-04-16 12 02 46

Notice, for example, that the Atom Diameter label is currently vertically too close to the Custom Attraction radio button, and should have more buffer space between them:
screenshot 2015-04-16 12 04 34

ALSO, this will be easier if the total height of the top menu is increased, again to match the specifications. Notice that when both menus are fully open (as shown above), the bottom menu extends nearly to the bottom of the screen in the design mockup. In the current sim, the top menu is smaller than the spec.

Arrows frozen in size when paused

Current sim behaviour does not match the Java sim.

When the sim is paused, and the atom is moved the Force arrows should still change in proportion to the relative positions of the atoms.

For example, if I display the total force arrow, and then pause the sim, I see this:
screen shot 2015-03-03 at 5 20 16 pm

With the sim still paused, if I move the atoms to a different position, the force arrows should change in response, but instead, I see this, which incorrectly represents the forces on the atoms as unchanged:
screen shot 2015-03-03 at 5 21 15 pm

Only if I press Play or Step-Forward do the correct force arrows appear, like so (very small, and pointing towards each other):
screen shot 2015-03-03 at 5 22 24 pm

Custom attraction should not reset to initial settings (unless Reset-All used)

Currently, the Custom attraction settings (i.e. diameter and strength) reset to their initial settings when switching to another pair of atoms and then back to Custom. Note: This was unfortunately the behavior of the Java sim as well.

It makes more sense if settings and the position of the sliders would remain unchanged unless the student changes them deliberately or hits reset-all, so that a student or instructor can draw comparisons more readily.

Behaviour should be more similar to the weaker-stronger slider in Acid-Base Solutions, which retains its position even when the toggle switch turns off/removes the slider.

Overlap between touch areas for Forces menu + Hide Forces radio button

To conserve vertical space when we did the layout, we placed the Hide Forces option on the 'title' area of the Forces accordion box.

Unfortunately, the default behaviour of the accordion box is that touching anywhere in the 'title' bar opens/closes the accordion box. This seems to take priority, so it is basically impossible on a touch device to select 'Hide Forces'.

We either need to change the layout to add in title space (essentially using the layout in the Interactions screen of states of matter), or limit the open/close behaviour of the accordion box to only the touch area around the minimize "button".

@jbphet Can you comment on whether latter option is feasible, considering that the accordion box is a common component? If this is not currently an option, we might want to discuss if there are likely other sims that will need this functionality in future?

Size and alignment of "Pinned" and "Moving" labels does not match spec

The design document shows the following, where the heading fonts are significantly smaller than the radio button label font:
screen shot 2015-02-25 at 4 53 08 pm

Please...
(1) Adjust the size and position of the pin graphic to match the design
(2) Reduce the font size for the 'Pinned' and 'Moving' labels to match the design
(3) Adjust the alignment of these labels (so that they are left aligned with the column below, as shown in the design document).
(4) If possible, more closely match the spacing between columns shown in the design.

Pushpin changes position when custom attraction is the first option selected

If the sim is loaded and then the Custom Attraction option is selected, the pushpin graphic changes position - which should not happen.
screenshot 2015-04-16 10 30 34

This does not happen if another atom combination is selected first (e.g. select Neon-Argon before selecting Custom Attraction), and the pushpin goes back to the correct position if another atom pair is selected and then we return to Custom.

This is how it should look:
screenshot 2015-04-16 10 30 40

Rounded corners on top and bottom menus are different

Is it possible to ensure that the rounding of the corners in the top (atoms) and bottom (forces) menus are the same, and match the design specifications more closely:

Specifications from design doc:
image

Current sim corners:
screenshot 2015-04-16 11 58 48

Placement and size of Return Atom button does not match spec

Design spec shows the following:
screen shot 2015-02-25 at 10 36 46 pm

Please...
(1) Increase the font size of the 'Return Atom' label to match spec (should be the same size as the axis labels of the graph), and increase the button size to fit.
(2) Align the left-edge of the button with the left edge of the pinned atom, as shown.

Fix alignment of pause/play button

Increase spacing between Slow Motion/Normal radio buttons and the "Play" button to better match the design document:
playpause-16

This should also fix the overlapping touch areas between these controls.

Also, adjust spacing between Play and "step forward" buttons to minimize or eliminate overlap between the touch areas.

Atom color gradient should match Java sim (and design spec)

The design spec and Java sim show atoms fading more quickly to black (or transparent), like so:
screen shot 2015-03-02 at 1 43 43 pm
screen shot 2015-03-02 at 1 47 43 pm

The current version of the sim does not look like it matches the either the gradient or color (this is most noticeable for Argon, but the colors are also slightly different for Neon etc.):
screen shot 2015-03-02 at 1 43 53 pm
screen shot 2015-03-02 at 1 50 04 pm

Hand graphic on moveable atom should remain visible until an atom is moved

Just like the "Move the atom" text/arrow in the Java sim, the hand graphic in the new sim should only disappear after an atom is moved (either by the user directly moving it, or by the user moving the dot on the graph):
screen shot 2015-03-03 at 5 37 33 pm

If the user switches which atoms are in use before moving an atom (i.e. clicks on the radio buttons in the atoms list at the right), this should have no effect on whether the hand is visible.

Sliders for Custom Attraction: size + alignment don't match design spec

The design document shows the the Custom attraction sliders like so:
screen shot 2015-02-25 at 2 54 47 pm

The sliders in the current version look like this instead:
screen shot 2015-02-25 at 2 53 28 pm

Please...
(1) Increase the slider width to match the design doc, and align the heading of each slider (e.g. Atom Diameter) to the left-edge of the radio button (and adjust the slider left-edge and labels appropriately).

(2) Remove the labels "small" and "large" from the Atom diameter slider, as shown in the design doc, and decrease vertical spacing in response to this.

arrow options duplicated 3 times

For the arrows in ForcesControlPanel, the options are duplicated 3 times:

    var totalForceArrow = new ArrowNode( 25, 0, 0, 0, {
      fill: '#49B649',
      headHeight: 12,
      headWidth: 20,
      tailWidth: 8
    } );
    var attractiveArrow = new ArrowNode( 25, 0, 0, 0, {
      fill: '#FC9732',
      headHeight: 12,
      headWidth: 20,
      tailWidth: 8
    } );

    var repulsiveArrow = new ArrowNode( 0, 0, 25, 0, {
      fill: '#FD17FF',
      headHeight: 12,
      headWidth: 20,
      tailWidth: 8
    } );

Everything except the fill should be factored out into common options. Then use _.extend to provide the fill.

Appearance of labels in forces menu doesn't match design spec

(1) The text "Hide Forces" and "Total Force" should be left-aligned with the straight edge of the bracket for the last radio button.

(2) Slightly decrease the font size for the Attractive and Repulsive labels, in order to increase the spacing between the first two radio buttons.

See this snapshot from the design doc:
screen shot 2015-02-25 at 7 44 12 pm

Interaction potential for adjustable attraction too deep

At the strongest setting, the epsilon arrow extends beyond the boundaries of the interaction potential graph and obscures the axis label. In the Java sim, the maximum well depth does not allow for this to happen. When the interaction strength is at its strongest, there should be no overlap between the epsilon arrow and the horizontal axis.

dev.4:
image

Desired maximum depth:
image

Appearance of the graph does not match design spec

The image below shows the current sim (at 1024 x 670 aspect ratio) on top, aligned with a copy of the design spec at the same size overlaid on it (at the bottom), for comparison:
screen shot 2015-02-25 at 8 40 21 pm

Please adjust the graph to better match the design as follows:

  • Decrease the width of the graph (keeping it aligned roughly with the current right-edge)
  • Decrease the height of the graph (without moving the bottom edge)
  • Increase the transparency of the gridlines
  • Increase the font size for the sigma and epsilon symbols
  • Slightly decrease the size of both zoom buttons
  • Remove thicker grey horizontal line which is overlaid on the 'zero' of the graph (i.e. the middle gridline should be the same appearance as all the other gridlines)
  • Re-align the pinned atom to the new left edge of the graph

Remove white border around option panels

The panels on the right-side of the screen (where you select the atoms or forces) both currently have a white stroke border around them which was not present in the mockup.

Can this be removed?

test i18n

Because of issues like #6 and #17, I don't think this sim has been tested for i18n compliance.

Alignment of horizontal axis label does not match design spec

The text "Distance between atoms" should be aligned in the center of the horizontal axis and there should be slightly more vertical space between the axis and the text.

See for example this image from page 4 of the design document:
startup appearance

Vs. the current dev version of the simulation:
screen shot 2015-02-25 at 2 50 57 pm

"look" problems with zoom buttons

Because the zoom buttons for the graph have a white background:
(1) they can't possibly highlight when the mouse is over them (there is no color brighter than white)
(2) they can't look 3D

Consider using a different background color.

Compare with the same scenery-phet.ZoomButton used in ph-scale:

screenshot_03
screenshot_02

Oxygen Oxygen problem while in slow motion

In 1.0.0-dev.2, while clicking and dragging the oxygen atoms into each other with slow motion enabled, they end up going crazy:

atoinc

Seen on Win 8.1 browsers and iPad 2 (iOS 7)

Troubleshooting information:
Name: Atomic Interactions
URL: http://www.colorado.edu/physics/phet/dev/html/atomic-interactions/1.0.0-dev.2/atomic-interactions_en.html
Version: 1.0.0-dev.2
Features missing: touch
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Language: en-US
Window: 1366x633
Pixel Ratio: 1/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
Vertex: attribs: 16 varying: 9 uniform: 254
Texture: size: 16384 imageUnits: 16 (vertex: 4, combined: 20)
Max viewport: 16384x16384
OES_texture_float: true

Horizontal adjustment arrow doesn't always stay with graph

This is an existing issue in the Java sim, and has been carried through to the HTML5.

In the Custom Attraction mode, if the interaction strength is adjusted to be very small, the horizontal adjustment arrow is now floating and not attached to the curve:
screen shot 2015-03-03 at 4 08 09 pm

This isn't ideal behaviour (it's best if the control stayed attached to the thing it controls), but is relatively low priority to fix.

Note that we're also likely moving the horizontal arrow control higher on the curve (see #24), so that may affect the position too.

Optimize horizontal scaling of graph (and atoms!)

Reducing the atom diameter due to the decreased vertical spacing in the sim, and to avoid overlap with the graph has resulted in changed horizontal scaling of the graph (since the graph is intended to align with the atoms, sigma scales according to atom diameter (except oxygen), and sigma determines the left edge placement of the curve on the plot).

The consequence is that we now have a graph that
(i) doesn't display the shape of the curve as well as the Java version [which is important for student learning], and
(ii) leaves a much longer "tail" of the curve at the right (where the force on the atom is very small, leading to the misperception that the atom is not moving at all nor attracted to the other atom).

We'll need to iterate a bit to find optimal size parameters, possibly allow for the atoms to overlap (or change the range of sigma values available), or otherwise tweak the sim to correct these issues.

Note also that the much deeper well for oxygen also creates some labelling issues, where the vertical arrow indicating epsilon is very close to the left-side of the curve (such that it is difficult to see) - hopefully the horizontal scaling changes will also ameliorate this problem (if not, we'll create a new issue for that, and possibly fudge the epsilon value to be much larger but not "realistically" large).

Adjustment controls on graph need to match design spec

Compare the mock-up:
screen shot 2015-03-03 at 5 55 00 pm

To the current HTML5 version:
screen shot 2015-03-03 at 5 57 07 pm

Note in particular that the horizontal green line should be thinner, the vertical arrow control should be vertically-centered on that line, and the green color of all of these adjustment controls should be more green (i.e. less yellow).

If possible, the arrow heads on both controls should also be a bit wider, but this not critical.

(tagging @arouinfar just to keep her in the loop, since this will also affect States of Matter)

fuzz testing errors - uncaught assertion and undefined property

I just ran the test-server, and Atomic Interactions is failing the fuzz test. Looks like there are two separate errors:

Uncaught Error: Assertion failed: Segment start is infinite
Error: Assertion failed: Segment start is infinite
    at window.assertions.assertFunction (http://localhost/git-dev/assert/js/assert.js:22:13)
    at Subpath.inherit.addSegmentDirectly (http://localhost/git-dev/kite/js/util/Subpath.js?bust=1440178647924:103:39)
    at http://localhost/git-dev/kite/js/util/Subpath.js?bust=1440178647924:120:17
    at Function.St (http://localhost/git-dev/sherpa/lib/lodash-2.4.1.min.js?bust=1440178647924:23:149)
    at Subpath.inherit.addSegment (http://localhost/git-dev/kite/js/util/Subpath.js?bust=1440178647924:119:9)
    at ArrowShape.inherit.addSegmentAndBounds (http://localhost/git-dev/kite/js/Shape.js?bust=1440178647924:784:29)
    at ArrowShape.inherit.lineToPoint (http://localhost/git-dev/kite/js/Shape.js?bust=1440178647924:146:14)
    at ArrowShape.inherit.lineTo (http://localhost/git-dev/kite/js/Shape.js?bust=1440178647924:136:44)
    at http://localhost/git-dev/scenery-phet/js/ArrowShape.js?bust=1440178647924:82:19
    at Function.St (http://localhost/git-dev/sherpa/lib/lodash-2.4.1.min.js?bust=1440178647924:23:149)

and:

Uncaught TypeError: Cannot read property 'getPositionReference' of undefined
TypeError: Cannot read property 'getPositionReference' of undefined
    at DualAtomModel.inherit.updateForces (http://localhost/git-dev/states-of-matter/js/atomic-interactions/model/DualAtomModel.js?bust=1440178647924:533:46)
    at DualAtomModel.inherit.positionChanged (http://localhost/git-dev/states-of-matter/js/atomic-interactions/model/DualAtomModel.js?bust=1440178647924:501:16)
    at Array. (http://localhost/git-dev/states-of-matter/js/atomic-interactions/view/GrabbableParticleNode.js?bust=1440178647924:88:23)
    at Property.inherit._notifyObservers (http://localhost/git-dev/axon/js/Property.js?bust=1440178647924:112:29)
    at NeonAtom.inherit.setPosition (http://localhost/git-dev/states-of-matter/js/common/model/particle/StatesOfMatterAtom.js?bust=1440178647924:44:29)
    at Object.GrabbableParticleNode.addInputListener.SimpleDragHandler.drag (http://localhost/git-dev/states-of-matter/js/atomic-interactions/view/GrabbableParticleNode.js?bust=1440178647924:74:40)
    at Object.SimpleDragHandler.dragListener.move (http://localhost/git-dev/scenery/js/input/SimpleDragHandler.js?bust=1440178647924:123:27)
    at Input.inherit.dispatchToPointer (http://localhost/git-dev/scenery/js/input/Input.js?bust=1440178647924:798:29)
    at Input.inherit.dispatchEvent (http://localhost/git-dev/scenery/js/input/Input.js?bust=1440178647924:766:14)
    at Input.inherit.branchChangeEvents (http://localhost/git-dev/scenery/js/input/Input.js?bust=1440178647924:692:16)

Width of top (atoms) options menu does not match spec

The top menu is narrower than the Forces menu in the current version:
screen shot 2015-02-25 at 3 31 46 pm

Please adjust the width of the top menu to match the spec by expanding the purple area (note alignment of both left and right edges), but do not move the radio buttons:
screen shot 2015-02-25 at 4 47 12 pm

Improve look of projector mode

Projector mode looks exactly as we specified in the design doc, but some polishing could be done to significantly improve the look.

(1) Have the gradient of the moveable atoms fade out to transparent instead of to black (this might actually be best generalized to the original atoms on black background, so that fewer changes need to be made or redrawn when we switch between modes).

(2) Add black stroke border to the control menus at the right side.

(3) possibly change the color of the zoom controls [but this might eventually be fixed in https://github.com//issues/18]

graph fails i18n test

I doubled the labels on the graph axes, to simulate translation to a different locale. Screenshot below of what it looks like. The placement of the labels is very obviously hardcoded for the English strings.

screenshot_01

Revise pushpin graphic

The pushpin looks more like it's floating on top of the atoms than pinning them, because the whole pin is visible (which looks great in the menu, but not great in context).

@arouinfar and I should probably discuss.

Overlapping touch areas in the graph

At small interaction strength, the touch areas on the graph for custom attraction settings become incredibly overlapped (both of the custom arrows, plus the bottom line (duplicates adjustment of interaction strength - we might consider amalgamating this with the vertical arrow control, rather than having duplicate controls that overlap), plus the graph marker indicating atom position).
screen shot 2015-03-02 at 2 56 29 pm

We'll likely need to make a couple of changes to ameliorate this - the easiest first step will be to move the horizontal (atom diameter) adjustment arrow vertically upwards on the curve to avoid overlap.

Not sure what to do about the overlap between the graph 'dot' and the vertical adjustment arrows.

atomic-interactions fails lint

Running "jshint:allFiles" (jshint) task
Linting ../states-of-matter/js/solid-liquid-gas/view/SolidLiquidGasPhaseControlNode.js ...ERROR
[L12:C13] W098: 'Circle' is defined but never used.
  var Circle = require( 'SCENERY/nodes/Circle' );
Linting ../states-of-matter/js/solid-liquid-gas/view/SolidLiquidGasPhaseControlNode.js ...ERROR
[L19:C11] W098: 'Path' is defined but never used.
  var Path = require( 'SCENERY/nodes/Path' );
Linting ../states-of-matter/js/solid-liquid-gas/view/SolidLiquidGasPhaseControlNode.js ...ERROR
[L21:C21] W098: 'RadialGradient' is defined but never used.
  var RadialGradient = require( 'SCENERY/util/RadialGradient' );
Linting ../states-of-matter/js/solid-liquid-gas/view/SolidLiquidGasPhaseControlNode.js ...ERROR
[L23:C12] W098: 'Shape' is defined but never used.
  var Shape = require( 'KITE/Shape' );

Warning: Task "jshint:allFiles" failed. Use --force to continue.

Aborted due to warnings.

Behavior of Oxygen-Oxygen case not consistent with Java sim

When the oxygen atom is moved in the Oxygen-Oxygen case, the behavior doesn't match the Java sim.

(1) When the moving atom is moved a very small distance, a "bond" vibration does correctly occur. BUT, the pinned (left) atom should only vibrate momentarily, and then it should stop. Only the moving (right) atom continues to vibrate back and forth.

(2) When the moving atom is moved even halfway up right side of the vertical part of the curve from a stationary position, often the atom escapes off-screen. Sometimes the return atom button appears AND THEN the atom returns in an instant and is "bonded" resulting in the expected vibrations. The distance moved to cause an escaped atom does not seem consistent, either.

(3) When bonded (and the moving atom is vibrating), the point on the graph fluctuates and jumps around much more than it did in the Java sim.

sim has no strings file

Broken by #15.

atomic-interactions has no strings file and it's title is defined in states-of-matter. This causes the build tasks that generate README.md to fail. (And unclear how Rosetta will behave for a sim with no strings file.)

Oxygen-Oxygen graph marker not visible at lowest point

When you switch to the Oxygen-Oxygen pair, the marker showing the position of the moveable atom is not visible on the graph even when fully zoomed out, and it should be, just as it is for any other pair of atoms.
screen shot 2015-03-02 at 3 59 43 pm

If needed, adjust the scaling of the vertical axis to make sure that the "dot" is visible on the graph when fully zoomed out.

Speed of moving atom significantly slower vs. Java sim

There is an issue causing the atom to move slower than it should in the HTML5 sim (dev 3), even during "Normal" speed motion.

Details:
I originally thought this was due to the changed graph dimensions, but I compared the two sims by moving the Neon atom so that the two Neon atoms are just touching, and timed how long it took to return to this position once released.

The HTML5 sim takes roughly twice as much time to return to the same position.

@jbphet suggested I run the sim w/ the profiler parameter, and that seems to show 58-60 fps throughout the motion of the atom, so I don't think it's a performance issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.