Skip to content

Instantly share code, notes, and snippets.

@pjanik
Created November 28, 2012 14:08
Show Gist options
  • Save pjanik/4161541 to your computer and use it in GitHub Desktop.
Save pjanik/4161541 to your computer and use it in GitHub Desktop.
{
"title": "onPropertyChange Demo",
"publicationStatus": "public",
"subtitle": "",
"about": "",
"models": [
{
"id": "simple-ke-shading$0",
"url": "/imports/legacy-mw-content/converted/conversion-and-physics-examples/simple-ke-shading$0.json",
"viewOptions": {
"controlButtons": "play_reset"
},
"onLoad": [
"onPropertyChange('timePs', function(t) {",
" alert('Time [ps]: ' + t); ",
"});"
]
}
],
"outputs": [
{
"name": "timePs",
"units": "ps",
"label": "Time in Ps",
"value": [
"return Math.round(getTime() / 1000);"
]
}
],
"components": [
{
"type": "checkbox",
"id": "temperature-control",
"text": "Temperature Control (property link)",
"property": "temperatureControl"
},
{
"type": "checkbox",
"id": "temperature-control-action",
"text": "Temperature Control (action defined)",
"onClick": "set({temperatureControl: value})"
}
],
"layout": {
"bottom": [
"temperature-control",
"temperature-control-action"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment