Skip to content

Commit d02679c

Browse files
committed
Update example with latest changes
1 parent 27fe4ca commit d02679c

File tree

1 file changed

+25
-68
lines changed

1 file changed

+25
-68
lines changed

examples/BufferAttributes and BufferGeometry.ipynb

Lines changed: 25 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": 2,
16+
"execution_count": null,
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "code",
28-
"execution_count": 3,
28+
"execution_count": null,
2929
"metadata": {},
3030
"outputs": [],
3131
"source": [
@@ -40,20 +40,20 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 4,
43+
"execution_count": null,
4444
"metadata": {},
4545
"outputs": [],
4646
"source": [
4747
"b.array = [ \n",
4848
" [11, 12, 13],\n",
49-
" [21, 00, 23],\n",
49+
" [21, 0, 23],\n",
5050
" [31, 32, 33],\n",
5151
"]"
5252
]
5353
},
5454
{
5555
"cell_type": "code",
56-
"execution_count": 5,
56+
"execution_count": null,
5757
"metadata": {},
5858
"outputs": [],
5959
"source": [
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 6,
69+
"execution_count": null,
7070
"metadata": {},
7171
"outputs": [],
7272
"source": [
@@ -77,7 +77,7 @@
7777
},
7878
{
7979
"cell_type": "code",
80-
"execution_count": 7,
80+
"execution_count": null,
8181
"metadata": {},
8282
"outputs": [],
8383
"source": [
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"cell_type": "code",
100-
"execution_count": 8,
100+
"execution_count": null,
101101
"metadata": {},
102102
"outputs": [],
103103
"source": [
@@ -108,31 +108,16 @@
108108
},
109109
{
110110
"cell_type": "code",
111-
"execution_count": 16,
111+
"execution_count": null,
112112
"metadata": {},
113-
"outputs": [
114-
{
115-
"data": {
116-
"application/vnd.jupyter.widget-view+json": {
117-
"model_id": "e8e9822fd24d4155b35d135128267f4f",
118-
"version_major": "2",
119-
"version_minor": "0"
120-
},
121-
"text/plain": [
122-
"A Jupyter Widget"
123-
]
124-
},
125-
"metadata": {},
126-
"output_type": "display_data"
127-
}
128-
],
113+
"outputs": [],
129114
"source": [
130115
"geometry"
131116
]
132117
},
133118
{
134119
"cell_type": "code",
135-
"execution_count": 13,
120+
"execution_count": null,
136121
"metadata": {},
137122
"outputs": [],
138123
"source": [
@@ -149,56 +134,28 @@
149134
},
150135
{
151136
"cell_type": "code",
152-
"execution_count": 15,
137+
"execution_count": null,
153138
"metadata": {},
154139
"outputs": [],
155140
"source": [
156-
"geometry.attributes['position'] = vertices"
157-
]
158-
},
159-
{
160-
"cell_type": "code",
161-
"execution_count": 19,
162-
"metadata": {},
163-
"outputs": [
164-
{
165-
"data": {
166-
"text/plain": [
167-
"{'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
168-
" [ 2., -2., 2.],\n",
169-
" [ 1., 1., 1.],\n",
170-
" [ 1., 1., 1.],\n",
171-
" [-1., 1., 1.],\n",
172-
" [-1., -1., 1.]], dtype=float32), count=6, normalized=False, version=0)}"
173-
]
174-
},
175-
"execution_count": 19,
176-
"metadata": {},
177-
"output_type": "execute_result"
178-
}
179-
],
180-
"source": [
181-
"geometry.attributes"
141+
"vertices.array = np.array([\n",
142+
" [-1.0, -1.0, 1.0],\n",
143+
" [ 1.0, -1.0, 1.0],\n",
144+
" [ 1.0, 1.0, 1.0],\n",
145+
" \n",
146+
" [ 1.0, 1.0, 1.0],\n",
147+
" [-1.0, 1.0, 1.0],\n",
148+
" [-1.0, -1.0, 1.0],\n",
149+
" ])"
182150
]
183151
},
184152
{
185153
"cell_type": "code",
186-
"execution_count": 23,
154+
"execution_count": null,
187155
"metadata": {},
188-
"outputs": [
189-
{
190-
"data": {
191-
"text/plain": [
192-
"\"PlainBufferGeometry(attributes={'position': BufferAttribute(array=array([[-1., -1., 1.],\\n [ 2., -2., 2.],\\n [ 1., 1., 1.],\\n [ 1., 1., 1.],\\n [-1., 1., 1.],\\n [-1., -1., 1.]], dtype=float32), count=6, normalized=False, version=0)}, type='BufferGeometry')\""
193-
]
194-
},
195-
"execution_count": 23,
196-
"metadata": {},
197-
"output_type": "execute_result"
198-
}
199-
],
156+
"outputs": [],
200157
"source": [
201-
"repr(geometry)"
158+
"print(repr(geometry))"
202159
]
203160
},
204161
{

0 commit comments

Comments
 (0)