Skip to content

Commit e7216b0

Browse files
authored
Merge pull request #185 from vidartf/examples
Have examples notebook use scale for resizing ball
2 parents be116d1 + e29e66b commit e7216b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/source/extending.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Python::
4444
import pythreejs
4545

4646
class CubicLattice(pythreejs.Blackbox):
47+
_model_name: traitlets.Unicode('CubicLatticeModel').tag(sync=True)
4748
_model_module = traitlets.Unicode('my_module_name').tag(sync=True)
4849

4950
basis = traitlets.List(

examples/Examples.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"metadata": {},
4848
"outputs": [],
4949
"source": [
50-
"ball.geometry.radius = 0.5"
50+
"ball.scale = (0.5,) * 3"
5151
]
5252
},
5353
{
@@ -59,7 +59,7 @@
5959
"import time, math\n",
6060
"ball.material.color = '#4400dd'\n",
6161
"for i in range(1, 150, 2):\n",
62-
" ball.geometry.radius = i / 100.\n",
62+
" ball.scale = (i / 100.,) * 3\n",
6363
" ball.position = [math.cos(i / 10.), math.sin(i / 50.), i / 100.]\n",
6464
" time.sleep(.05)"
6565
]

0 commit comments

Comments
 (0)