Skip to content

Commit

Permalink
partial instrumentation, phetsims/ph-scale#92
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 30, 2020
1 parent 3ae8b5d commit 2de6329
Show file tree
Hide file tree
Showing 2 changed files with 279 additions and 0 deletions.
143 changes: 143 additions & 0 deletions js/phet-io/ph-scale-basics-phet-io-elements-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,149 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioStudioControl": true,
"phetioTypeName": "ActionIO<NumberIO>"
},
"phScaleBasics.macroScreen.model.drainFaucet.enabledProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.drainFaucet.flowRateProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScaleBasics.macroScreen.model.dropper.dispensingProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.dropper.emptyProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.dropper.enabledProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.dropper.flowRateProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScaleBasics.macroScreen.model.dropper.visibleProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.pHMeter.probe.positionProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<Vector2IO>"
},
"phScaleBasics.macroScreen.model.pHMeter.valueProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<NumberIO>>"
},
"phScaleBasics.macroScreen.model.waterFaucet.enabledProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScaleBasics.macroScreen.model.waterFaucet.flowRateProperty": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScaleBasics.macroScreen.view": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
Expand Down
136 changes: 136 additions & 0 deletions js/phet-io/ph-scale-basics-phet-io-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,19 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "FunctionIO(NullableIO<FocusIO>,NullableIO<NullableIO<FocusIO>>)=>VoidIO"
},
"FunctionIO(NullableIO<NumberIO>,NullableIO<NullableIO<NumberIO>>)=>VoidIO": {
"documentation": "Wrapper for the built-in JS function type.<br><strong>Arguments:</strong> NullableIO<NumberIO>, NullableIO<NullableIO<NumberIO>><br><strong>Return Type:</strong> VoidIO",
"events": [],
"methodOrder": [],
"methods": {},
"parameterTypes": [
"NullableIO<NumberIO>",
"NullableIO<NullableIO<NumberIO>>",
"VoidIO"
],
"supertype": "ObjectIO",
"typeName": "FunctionIO(NullableIO<NumberIO>,NullableIO<NullableIO<NumberIO>>)=>VoidIO"
},
"FunctionIO(NullableIO<SceneryEventIO>)=>VoidIO": {
"documentation": "Wrapper for the built-in JS function type.<br><strong>Arguments:</strong> NullableIO<SceneryEventIO><br><strong>Return Type:</strong> VoidIO",
"events": [],
Expand Down Expand Up @@ -410,6 +423,19 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "FunctionIO(StringIO,StringIO)=>VoidIO"
},
"FunctionIO(Vector2IO,NullableIO<Vector2IO>)=>VoidIO": {
"documentation": "Wrapper for the built-in JS function type.<br><strong>Arguments:</strong> Vector2IO, NullableIO<Vector2IO><br><strong>Return Type:</strong> VoidIO",
"events": [],
"methodOrder": [],
"methods": {},
"parameterTypes": [
"Vector2IO",
"NullableIO<Vector2IO>",
"VoidIO"
],
"supertype": "ObjectIO",
"typeName": "FunctionIO(Vector2IO,NullableIO<Vector2IO>)=>VoidIO"
},
"NodeIO": {
"documentation": "The base type for graphical and potentially interactive objects. NodeIO has nested PropertyIO values for visibility, pickability and opacity.<br><br>Pickable can take one of three values:<br><ul><li>null: pass-through behavior. Nodes with input listeners are pickable, but nodes without input listeners won't block events for nodes behind it.</li><li>false: The node cannot be interacted with, and it blocks events for nodes behind it.</li><li>true: The node can be interacted with (if it has an input listener).</li></ul>For more about Scenery node pickability, please see <a href=\"http://phetsims.github.io/scenery/doc/implementation-notes#pickability\">http://phetsims.github.io/scenery/doc/implementation-notes#pickability</a>",
"events": [],
Expand Down Expand Up @@ -462,6 +488,17 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "NullableIO<NullableIO<FocusIO>>"
},
"NullableIO<NullableIO<NumberIO>>": {
"documentation": "A wrapper to wrap another IOType, adding support for null.",
"events": [],
"methodOrder": [],
"methods": {},
"parameterTypes": [
"NullableIO<NumberIO>"
],
"supertype": "ObjectIO",
"typeName": "NullableIO<NullableIO<NumberIO>>"
},
"NullableIO<NumberIO>": {
"documentation": "A wrapper to wrap another IOType, adding support for null.",
"events": [],
Expand Down Expand Up @@ -495,6 +532,17 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "NullableIO<StringIO>"
},
"NullableIO<Vector2IO>": {
"documentation": "A wrapper to wrap another IOType, adding support for null.",
"events": [],
"methodOrder": [],
"methods": {},
"parameterTypes": [
"Vector2IO"
],
"supertype": "ObjectIO",
"typeName": "NullableIO<Vector2IO>"
},
"NumberIO": {
"documentation": "Wrapper for the built-in JS number type (floating point, but also represents integers)",
"events": [],
Expand Down Expand Up @@ -934,6 +982,50 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "PropertyIO<NullableIO<FocusIO>>"
},
"PropertyIO<NullableIO<NumberIO>>": {
"documentation": "Observable values that send out notifications when the value changes. This differs from the traditional listener pattern in that added listeners also receive a callback with the current value when the listeners are registered. This is a widely-used pattern in PhET-iO simulations.",
"events": [
"changed"
],
"methodOrder": [
"link",
"lazyLink"
],
"methods": {
"getValue": {
"documentation": "Gets the current value.",
"parameterTypes": [],
"returnType": "NullableIO<NumberIO>"
},
"lazyLink": {
"documentation": "Adds a listener which will be called when the value changes. This method is like \"link\", but without the current-value callback on registration. The listener takes two arguments, the new value and the previous value.",
"parameterTypes": [
"FunctionIO(NullableIO<NumberIO>,NullableIO<NullableIO<NumberIO>>)=>VoidIO"
],
"returnType": "VoidIO"
},
"link": {
"documentation": "Adds a listener which will be called when the value changes. On registration, the listener is also called with the current value. The listener takes two arguments, the new value and the previous value.",
"parameterTypes": [
"FunctionIO(NullableIO<NumberIO>,NullableIO<NullableIO<NumberIO>>)=>VoidIO"
],
"returnType": "VoidIO"
},
"setValue": {
"documentation": "Sets the value of the Property. If the value differs from the previous value, listeners are notified with the new value.",
"invocableForReadOnlyElements": false,
"parameterTypes": [
"NullableIO<NumberIO>"
],
"returnType": "VoidIO"
}
},
"parameterTypes": [
"NullableIO<NumberIO>"
],
"supertype": "ObjectIO",
"typeName": "PropertyIO<NullableIO<NumberIO>>"
},
"PropertyIO<NumberIO>": {
"documentation": "Observable values that send out notifications when the value changes. This differs from the traditional listener pattern in that added listeners also receive a callback with the current value when the listeners are registered. This is a widely-used pattern in PhET-iO simulations.",
"events": [
Expand Down Expand Up @@ -1022,6 +1114,50 @@ window.phet.phetio.phetioTypes = assert &&
"supertype": "ObjectIO",
"typeName": "PropertyIO<StringIO>"
},
"PropertyIO<Vector2IO>": {
"documentation": "Observable values that send out notifications when the value changes. This differs from the traditional listener pattern in that added listeners also receive a callback with the current value when the listeners are registered. This is a widely-used pattern in PhET-iO simulations.",
"events": [
"changed"
],
"methodOrder": [
"link",
"lazyLink"
],
"methods": {
"getValue": {
"documentation": "Gets the current value.",
"parameterTypes": [],
"returnType": "Vector2IO"
},
"lazyLink": {
"documentation": "Adds a listener which will be called when the value changes. This method is like \"link\", but without the current-value callback on registration. The listener takes two arguments, the new value and the previous value.",
"parameterTypes": [
"FunctionIO(Vector2IO,NullableIO<Vector2IO>)=>VoidIO"
],
"returnType": "VoidIO"
},
"link": {
"documentation": "Adds a listener which will be called when the value changes. On registration, the listener is also called with the current value. The listener takes two arguments, the new value and the previous value.",
"parameterTypes": [
"FunctionIO(Vector2IO,NullableIO<Vector2IO>)=>VoidIO"
],
"returnType": "VoidIO"
},
"setValue": {
"documentation": "Sets the value of the Property. If the value differs from the previous value, listeners are notified with the new value.",
"invocableForReadOnlyElements": false,
"parameterTypes": [
"Vector2IO"
],
"returnType": "VoidIO"
}
},
"parameterTypes": [
"Vector2IO"
],
"supertype": "ObjectIO",
"typeName": "PropertyIO<Vector2IO>"
},
"RichTextIO": {
"documentation": "The tandem IO type for the scenery RichText node",
"events": [],
Expand Down

0 comments on commit 2de6329

Please sign in to comment.