Skip to content

Commit

Permalink
working 2d version based on moderngl
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir Aides committed Aug 7, 2020
1 parent 284ce91 commit 8f132d5
Show file tree
Hide file tree
Showing 20 changed files with 1,508 additions and 794 deletions.
24 changes: 14 additions & 10 deletions examples/02-hello-jupylet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@
"outputs": [],
"source": [
"@app.event\n",
"def on_draw():\n",
"def render(ct, dt):\n",
" app.window.clear()\n",
" hello.draw()\n",
" \n",
" \n",
"@app.run_me_again_and_again(1/30)\n",
"def scroll(dt):\n",
" hello.x -= 1\n",
"@app.run_me_many(1/24)\n",
"def scroll(ct, dt):\n",
" hello.x -= dt * 48\n",
" if hello.x < -220:\n",
" hello.x = app.width"
]
Expand All @@ -97,7 +97,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bcb256c655034da6982e1e4e3aaad9be",
"model_id": "56304510722e48619183527a56e58421",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -137,7 +137,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.8.5"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down Expand Up @@ -268,7 +268,8 @@
"state": {
"_view_count": 0,
"format": "JPEG",
"layout": "IPY_MODEL_77ce2305d9084f71abe1f0699139bdc7"
"layout": "IPY_MODEL_77ce2305d9084f71abe1f0699139bdc7",
"value": {}
}
},
"448cb6d3d195433cb9abd75deff556a7": {
Expand Down Expand Up @@ -409,7 +410,8 @@
"state": {
"_view_count": 1,
"format": "JPEG",
"layout": "IPY_MODEL_cd5f53b36bf648e0a8718a5d279c1295"
"layout": "IPY_MODEL_cd5f53b36bf648e0a8718a5d279c1295",
"value": {}
}
},
"bd30995616c94f5a95b540a29fb0453d": {
Expand All @@ -428,7 +430,8 @@
"state": {
"_view_count": 0,
"format": "JPEG",
"layout": "IPY_MODEL_448cb6d3d195433cb9abd75deff556a7"
"layout": "IPY_MODEL_448cb6d3d195433cb9abd75deff556a7",
"value": {}
}
},
"c3450332a52845bc9747077c0c71b95b": {
Expand Down Expand Up @@ -459,7 +462,8 @@
"state": {
"_view_count": 0,
"format": "JPEG",
"layout": "IPY_MODEL_c3450332a52845bc9747077c0c71b95b"
"layout": "IPY_MODEL_c3450332a52845bc9747077c0c71b95b",
"value": {}
}
}
},
Expand Down
Loading

0 comments on commit 8f132d5

Please sign in to comment.