Skip to content

Commit c056772

Browse files
committed
Update three to r90 initial pass
1 parent 98a5b56 commit c056772

File tree

9 files changed

+80
-36
lines changed

9 files changed

+80
-36
lines changed

js/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@jupyter-widgets/base": "^1.1.8",
3535
"bluebird": "^3.5.1",
3636
"jupyter-dataserializers": "^1.1.0",
37-
"three": "^0.88.0",
37+
"three": "^0.90.0",
3838
"underscore": "^1.8.3"
3939
},
4040
"keywords": [

js/scripts/generate-wrappers.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ const IGNORE_FILES = [
4848
'**/polyfills.js', // Polyfill of JS methods, nothing to export
4949
'**/utils.js', // Utility functions, no objects to export
5050
'**/constants.js', // Processed into enums in separate script
51-
'**/animation/KeyframeTrackConstructor.js', // Sub-part of one object, ignore
52-
'**/animation/KeyframeTrackPrototype.js', // Sub-part of one object, ignore
5351
'**/audio/AudioContext.js', // JS API for audio, nothing to expose
5452
'**/core/Face3.js', // Implemented as trait only, not widget model
5553
'**/geometries/Geometries.js', // index.js like file, nothing new here
@@ -71,14 +69,18 @@ const IGNORE_FILES = [
7169
'**/renderers/webgl/WebGLFlareRenderer.js',
7270
'**/renderers/webgl/WebGLMorphtargets.js',
7371
'**/renderers/webgl/WebGLRenderLists.js',
72+
'**/renderers/webgl/WebGLRenderStates.js',
7473
'**/renderers/webgl/WebGLSpriteRenderer.js',
7574
'**/renderers/webgl/WebGLTextures.js',
7675
'**/renderers/webgl/WebGLUniforms.js',
7776
'**/renderers/webgl/WebGLUtils.js',
7877
'**/renderers/webvr/**',
7978
'**/renderers/shaders/**',
79+
'**/extras/curves/Curves.js', // index.js like file, nothing new here
80+
'**/loaders/LoaderUtils.js', // Only functions, nothing to export
81+
'**/extras/Earcut.js', // Only functions, nothing to export
82+
'**/extras/ShapeUtils.js', // Only functions, nothing to export
8083
'**/extras/core/Interpolations.js', // Only functions, nothing to export
81-
'**/extras/core/PathPrototype.js', // Sub-part of one object, ignore
8284
'**/textures/CanvasTexture.js' // Canvases are not referenceable from python
8385
];
8486

js/scripts/three-class-config.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -479,12 +479,6 @@ module.exports = {
479479
Uniform: {
480480
relativePath: './core/Uniform',
481481
},
482-
SceneUtils: {
483-
relativePath: './extras/SceneUtils',
484-
},
485-
ShapeUtils: {
486-
relativePath: './extras/ShapeUtils',
487-
},
488482
AmbientLight: {
489483
relativePath: './lights/AmbientLight',
490484
superClass: 'Light',
@@ -544,6 +538,11 @@ module.exports = {
544538
RectAreaLight: {
545539
relativePath: './lights/RectAreaLight',
546540
superClass: 'Light',
541+
properties: {
542+
width: new Types.Float(10),
543+
height: new Types.Float(10),
544+
},
545+
constructorArgs: [ 'color', 'intensity', 'width', 'height' ],
547546
},
548547
SpotLight: {
549548
relativePath: './lights/SpotLight',
@@ -595,6 +594,9 @@ module.exports = {
595594
ImageLoader: {
596595
relativePath: './loaders/ImageLoader',
597596
},
597+
ImageBitmapLoader: {
598+
relativePath: './loaders/ImageBitmapLoader',
599+
},
598600
JSONLoader: {
599601
relativePath: './loaders/JSONLoader',
600602
},
@@ -665,23 +667,24 @@ module.exports = {
665667
depthFunc: new Types.Enum('DepthMode', 'LessEqualDepth'),
666668
depthTest: new Types.Bool(true),
667669
depthWrite: new Types.Bool(true),
670+
dithering: new Types.Bool(false),
671+
flatShading: new Types.Bool(false),
668672
fog: new Types.Bool(true),
669673
lights: new Types.Bool(true),
670674
name: new Types.String(''),
675+
opacity: new Types.Float(1.0),
671676
overdraw: new Types.Float(0),
672677
polygonOffset: new Types.Bool(false),
673678
polygonOffsetFactor: new Types.Float(0),
674679
polygonOffsetUnits: new Types.Float(0),
675680
precision: new Types.String(null, {nullable: true}),
676681
premultipliedAlpha: new Types.Bool(false),
677-
dithering: new Types.Bool(false),
678-
flatShading: new Types.Bool(false),
682+
shadowSide: new Types.Enum('Side', null, {nullable: true}),
679683
side: new Types.Enum('Side', 'FrontSide'),
680684
transparent: new Types.Bool(false),
681685
type: new Types.String(''),
682686
vertexColors: new Types.Enum('Colors', 'NoColors'),
683687
visible: new Types.Bool(true),
684-
opacity: new Types.Float(1.0),
685688
},
686689
propsDefinedByThree: [ 'type' ]
687690
},
@@ -896,8 +899,8 @@ module.exports = {
896899
morphNormals: new Types.Bool(false),
897900
morphTargets: new Types.Bool(false),
898901
flatShading: new Types.Bool(false),
899-
//shading: new Types.Enum('Shading', 'SmoothShading'), // Deprecated in three
900902
skinning: new Types.Bool(false),
903+
uniformsNeedUpdate: new Types.Bool(false),
901904
vertexShader: new Types.String(''),
902905
wireframe: new Types.Bool(false),
903906
wireframeLinewidth: new Types.Float(1.0),
@@ -1041,9 +1044,6 @@ module.exports = {
10411044
LOD: {
10421045
relativePath: './objects/LOD',
10431046
},
1044-
LensFlare: {
1045-
relativePath: './objects/LensFlare',
1046-
},
10471047
Line: {
10481048
relativePath: './objects/Line',
10491049
superClass: 'Object3D',
@@ -1106,7 +1106,8 @@ module.exports = {
11061106
superClass: 'Object3D',
11071107
constructorArgs: [ 'material' ],
11081108
properties: {
1109-
material: new Types.ThreeType('SpriteMaterial'),
1109+
material: new Types.ThreeType('SpriteMaterial'),
1110+
center: new Types.Vector2(0.5, 0.5),
11101111
},
11111112
propsDefinedByThree: ['skeleton'],
11121113
},
@@ -1932,8 +1933,6 @@ module.exports = {
19321933
properties: {
19331934
enabled: new Types.Bool(false),
19341935
type: new Types.Enum('ShadowTypes', 'PCFShadowMap'),
1935-
renderReverseSided: new Types.Bool(false),
1936-
renderSingleSided: new Types.Bool(true),
19371936
}
19381937
},
19391938
// TODO:

js/scripts/three-enum-config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict'
1+
'use strict';
22

33
// BLENDING EQUATIONS
44

@@ -140,6 +140,20 @@ var CompressedTextureFormats = [
140140
"RGBA_PVRTC_4BPPV1_Format",
141141
"RGBA_PVRTC_2BPPV1_Format",
142142
"RGB_ETC1_Format",
143+
'RGBA_ASTC_4x4_Format',
144+
'RGBA_ASTC_5x4_Format',
145+
'RGBA_ASTC_5x5_Format',
146+
'RGBA_ASTC_6x5_Format',
147+
'RGBA_ASTC_6x6_Format',
148+
'RGBA_ASTC_8x5_Format',
149+
'RGBA_ASTC_8x6_Format',
150+
'RGBA_ASTC_8x8_Format',
151+
'RGBA_ASTC_10x5_Format',
152+
'RGBA_ASTC_10x6_Format',
153+
'RGBA_ASTC_10x8_Format',
154+
'RGBA_ASTC_10x10_Format',
155+
'RGBA_ASTC_12x10_Format',
156+
'RGBA_ASTC_12x12_Format',
143157
];
144158

145159
// Texture Encodings

js/src/_base/enums.js

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//
22
// This file auto-generated with generate-enums.js
3-
// Date: Wed Nov 15 2017 17:14:48 GMT+0100 (W. Europe Standard Time)
43
//
54

65

@@ -129,15 +128,29 @@ var DepthFormats = {
129128
};
130129

131130
var CompressedTextureFormats = {
132-
2001: 'RGB_S3TC_DXT1_Format',
133-
2002: 'RGBA_S3TC_DXT1_Format',
134-
2003: 'RGBA_S3TC_DXT3_Format',
135-
2004: 'RGBA_S3TC_DXT5_Format',
136-
2100: 'RGB_PVRTC_4BPPV1_Format',
137-
2101: 'RGB_PVRTC_2BPPV1_Format',
138-
2102: 'RGBA_PVRTC_4BPPV1_Format',
139-
2103: 'RGBA_PVRTC_2BPPV1_Format',
140-
2151: 'RGB_ETC1_Format',
131+
33776: 'RGB_S3TC_DXT1_Format',
132+
33777: 'RGBA_S3TC_DXT1_Format',
133+
33778: 'RGBA_S3TC_DXT3_Format',
134+
33779: 'RGBA_S3TC_DXT5_Format',
135+
35840: 'RGB_PVRTC_4BPPV1_Format',
136+
35841: 'RGB_PVRTC_2BPPV1_Format',
137+
35842: 'RGBA_PVRTC_4BPPV1_Format',
138+
35843: 'RGBA_PVRTC_2BPPV1_Format',
139+
36196: 'RGB_ETC1_Format',
140+
37808: 'RGBA_ASTC_4x4_Format',
141+
37809: 'RGBA_ASTC_5x4_Format',
142+
37810: 'RGBA_ASTC_5x5_Format',
143+
37811: 'RGBA_ASTC_6x5_Format',
144+
37812: 'RGBA_ASTC_6x6_Format',
145+
37813: 'RGBA_ASTC_8x5_Format',
146+
37814: 'RGBA_ASTC_8x6_Format',
147+
37815: 'RGBA_ASTC_8x8_Format',
148+
37816: 'RGBA_ASTC_10x5_Format',
149+
37817: 'RGBA_ASTC_10x6_Format',
150+
37818: 'RGBA_ASTC_10x8_Format',
151+
37819: 'RGBA_ASTC_10x10_Format',
152+
37820: 'RGBA_ASTC_12x10_Format',
153+
37821: 'RGBA_ASTC_12x12_Format',
141154
};
142155

143156
var TextureEncodings = {

js/src/examples/controls/OrbitControls.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,10 @@ var OrbitControls = function ( object, domElement ) {
790790
event.preventDefault();
791791
event.stopPropagation();
792792

793+
scope.dispatchEvent( startEvent );
794+
793795
handleMouseWheel( event );
794796

795-
scope.dispatchEvent( startEvent ); // not sure why these are here...
796797
scope.dispatchEvent( endEvent );
797798

798799
}

js/src/examples/controls/TrackballControls.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ var TrackballControls = function ( object, domElement ) {
528528

529529
if ( _this.enabled === false ) return;
530530

531+
if ( _this.noZoom === true ) return;
532+
531533
event.preventDefault();
532534
event.stopPropagation();
533535

pythreejs/enums.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""
22
This file auto-generated with generate-enums.js
3-
Date: Wed Nov 15 2017 17:14:48 GMT+0100 (W. Europe Standard Time)
43
"""
54

65
class EnumNamespace:
@@ -155,6 +154,20 @@ def __repr__(self):
155154
RGBA_PVRTC_4BPPV1_Format='RGBA_PVRTC_4BPPV1_Format',
156155
RGBA_PVRTC_2BPPV1_Format='RGBA_PVRTC_2BPPV1_Format',
157156
RGB_ETC1_Format='RGB_ETC1_Format',
157+
RGBA_ASTC_4x4_Format='RGBA_ASTC_4x4_Format',
158+
RGBA_ASTC_5x4_Format='RGBA_ASTC_5x4_Format',
159+
RGBA_ASTC_5x5_Format='RGBA_ASTC_5x5_Format',
160+
RGBA_ASTC_6x5_Format='RGBA_ASTC_6x5_Format',
161+
RGBA_ASTC_6x6_Format='RGBA_ASTC_6x6_Format',
162+
RGBA_ASTC_8x5_Format='RGBA_ASTC_8x5_Format',
163+
RGBA_ASTC_8x6_Format='RGBA_ASTC_8x6_Format',
164+
RGBA_ASTC_8x8_Format='RGBA_ASTC_8x8_Format',
165+
RGBA_ASTC_10x5_Format='RGBA_ASTC_10x5_Format',
166+
RGBA_ASTC_10x6_Format='RGBA_ASTC_10x6_Format',
167+
RGBA_ASTC_10x8_Format='RGBA_ASTC_10x8_Format',
168+
RGBA_ASTC_10x10_Format='RGBA_ASTC_10x10_Format',
169+
RGBA_ASTC_12x10_Format='RGBA_ASTC_12x10_Format',
170+
RGBA_ASTC_12x12_Format='RGBA_ASTC_12x12_Format',
158171
)
159172

160173
TextureEncodings = EnumNamespace(

0 commit comments

Comments
 (0)