Skip to content

Commit 7d9b2ee

Browse files
committed
fix issue with buffer geometries
1 parent 672a0e8 commit 7d9b2ee

File tree

407 files changed

+489
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+489
-431
lines changed

examples/Geometries.ipynb

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 1,
66
"metadata": {
77
"collapsed": true
88
},
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "code",
18-
"execution_count": null,
18+
"execution_count": 2,
1919
"metadata": {
2020
"collapsed": true
2121
},
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"cell_type": "code",
35-
"execution_count": null,
35+
"execution_count": 3,
3636
"metadata": {
3737
"collapsed": true
3838
},
@@ -64,7 +64,7 @@
6464
},
6565
{
6666
"cell_type": "code",
67-
"execution_count": null,
67+
"execution_count": 4,
6868
"metadata": {
6969
"collapsed": true
7070
},
@@ -320,7 +320,7 @@
320320
},
321321
{
322322
"cell_type": "code",
323-
"execution_count": null,
323+
"execution_count": 5,
324324
"metadata": {
325325
"collapsed": true
326326
},
@@ -487,6 +487,39 @@
487487
"nbconvert_exporter": "python",
488488
"pygments_lexer": "ipython2",
489489
"version": "2.7.12"
490+
},
491+
"widgets": {
492+
"state": {
493+
"3ec33f1cde5041fdabb5a7efd3926203": {
494+
"views": [
495+
{
496+
"cell_index": 21
497+
}
498+
]
499+
},
500+
"6f0798cc817445569aa683dc064a2a26": {
501+
"views": [
502+
{
503+
"cell_index": 1
504+
}
505+
]
506+
},
507+
"c1230cf989224b9d87abc940c5ae1540": {
508+
"views": [
509+
{
510+
"cell_index": 2
511+
}
512+
]
513+
},
514+
"c57eb908d4b84ebb83462b0031dac650": {
515+
"views": [
516+
{
517+
"cell_index": 4
518+
}
519+
]
520+
}
521+
},
522+
"version": "1.2.0"
490523
}
491524
},
492525
"nbformat": 4,

examples/test.ipynb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"source": [
3737
"# Geometries\n",
3838
"torus = TorusGeometry(radius=12, tube=3, radialSegments=16, tubularSegments=100)\n",
39-
"sphere = SphereGeometry(radius=12)"
39+
"sphere = SphereGeometry(radius=12, _flat=True)"
4040
]
4141
},
4242
{
@@ -47,7 +47,8 @@
4747
},
4848
"outputs": [],
4949
"source": [
50-
"bufferSphere = SphereBufferGeometry(radius=12, _flat=True)"
50+
"bufferSphere = SphereBufferGeometry(radius=12, _flat=True)\n",
51+
"bufferTorus = TorusBufferGeometry(radius=12, tube=3, radialSegments=16, tubularSegments=100)"
5152
]
5253
},
5354
{
@@ -63,7 +64,7 @@
6364
},
6465
{
6566
"cell_type": "code",
66-
"execution_count": 3,
67+
"execution_count": 10,
6768
"metadata": {
6869
"collapsed": false
6970
},
@@ -233,14 +234,14 @@
233234
},
234235
"widgets": {
235236
"state": {
236-
"0a809e8300f346eb862771f52c7a56e9": {
237+
"863c2ec7598c44f28affaee8c7ddf026": {
237238
"views": [
238239
{
239240
"cell_index": 5
240241
}
241242
]
242243
},
243-
"1b7dbab4e7bd42eb95a23627821497f7": {
244+
"ef6c66e71f2b4bef9ec5a041cfe2e36f": {
244245
"views": [
245246
{
246247
"cell_index": 4

js/scripts/three-class-config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,7 @@ module.exports = {
920920
heightSegments: new Types.Int(1),
921921
depthSegments: new Types.Int(1),
922922
},
923+
propsDefinedByThree: [ 'attributes', 'index' ],
923924
},
924925
BoxGeometry: {
925926
relativePath: './extras/geometries/BoxGeometry',
@@ -945,6 +946,7 @@ module.exports = {
945946
thetaStart: new Types.Float(0.0),
946947
thetaLength: new Types.Float(Math.PI * 2.0),
947948
},
949+
propsDefinedByThree: [ 'attributes', 'index' ],
948950
},
949951
CircleGeometry: {
950952
relativePath: './extras/geometries/CircleGeometry',
@@ -971,6 +973,7 @@ module.exports = {
971973
thetaStart: new Types.Float(0.0),
972974
thetaLength: new Types.Float(Math.PI * 2.0),
973975
},
976+
propsDefinedByThree: [ 'attributes', 'index' ],
974977
},
975978
CylinderGeometry: {
976979
relativePath: './extras/geometries/CylinderGeometry',
@@ -1026,6 +1029,7 @@ module.exports = {
10261029
phiStart: new Types.Float(0.0),
10271030
phiLength: new Types.Float(Math.PI * 2.0),
10281031
},
1032+
propsDefinedByThree: [ 'attributes', 'index' ],
10291033
},
10301034
LatheGeometry: {
10311035
relativePath: './extras/geometries/LatheGeometry',
@@ -1070,6 +1074,7 @@ module.exports = {
10701074
widthSegments: new Types.Int(1),
10711075
heightSegments: new Types.Int(1),
10721076
},
1077+
propsDefinedByThree: [ 'attributes', 'index' ],
10731078
},
10741079
PlaneGeometry: {
10751080
relativePath: './extras/geometries/PlaneGeometry',
@@ -1108,6 +1113,7 @@ module.exports = {
11081113
thetaStart: new Types.Float(0),
11091114
thetaLength: new Types.Float(Math.PI * 2),
11101115
},
1116+
propsDefinedByThree: [ 'attributes', 'index' ],
11111117
},
11121118
RingGeometry: {
11131119
relativePath: './extras/geometries/RingGeometry',
@@ -1190,6 +1196,7 @@ module.exports = {
11901196
tubularSegments: new Types.Int(6),
11911197
arc: new Types.Float(Math.PI * 2.0),
11921198
},
1199+
propsDefinedByThree: [ 'attributes', 'index' ],
11931200
},
11941201
TorusGeometry: {
11951202
relativePath: './extras/geometries/TorusGeometry',
@@ -1216,6 +1223,7 @@ module.exports = {
12161223
p: new Types.Int(2),
12171224
q: new Types.Int(3),
12181225
},
1226+
propsDefinedByThree: [ 'attributes', 'index' ],
12191227
},
12201228
TorusKnotGeometry: {
12211229
relativePath: './extras/geometries/TorusKnotGeometry',

js/src/_base/Three.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ var ThreeModel = widgets.DOMWidgetModel.extend({
999999
var result;
10001000
if (cached) {
10011001
result = cached;
1002-
result.array = new Float32Array(ba[0]);
1003-
result.itemSize = ba[1];
1002+
// result.array = new Float32Array(ba[0]);
1003+
// result.itemSize = ba[1];
10041004
} else {
10051005
result = new THREE.BufferAttribute(
10061006
ba[0], // array

js/src/_base/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:51 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:19 GMT-0700 (PDT)
44
//
55
// Load all three.js python wrappers
66
var loadedModules = [

js/src/animation/AnimationClip.autogen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:50 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:18 GMT-0700 (PDT)
44
//
55

66
var _ = require('underscore');

js/src/animation/AnimationMixer.autogen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:51 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:18 GMT-0700 (PDT)
44
//
55

66
var _ = require('underscore');

js/src/animation/AnimationObjectGroup.autogen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:51 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:18 GMT-0700 (PDT)
44
//
55

66
var _ = require('underscore');

js/src/animation/AnimationUtils.autogen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:51 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:18 GMT-0700 (PDT)
44
//
55

66
var _ = require('underscore');

js/src/animation/KeyframeTrack.autogen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// This file auto-generated with generate-wrappers.js
3-
// Date: Fri Oct 21 2016 15:47:51 GMT-0700 (PDT)
3+
// Date: Fri Oct 21 2016 15:59:18 GMT-0700 (PDT)
44
//
55

66
var _ = require('underscore');

0 commit comments

Comments
 (0)