Skip to content

Commit e089e23

Browse files
committed
Minor adjustments
1 parent c10b1b2 commit e089e23

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

js/src/examples/controls/OrbitControls.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ var OrbitControls = function ( object, domElement ) {
354354

355355
var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
356356

357-
if ( scope.object.type == 'PerspectiveCamera' ) {
357+
if ( scope.object.type === 'PerspectiveCamera' ) {
358358

359359
// perspective
360360
var position = scope.object.position;
@@ -368,7 +368,7 @@ var OrbitControls = function ( object, domElement ) {
368368
panLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix );
369369
panUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix );
370370

371-
} else if ( scope.object.type == 'OrthographicCamera' ) {
371+
} else if ( scope.object.type === 'OrthographicCamera' ) {
372372

373373
// orthographic
374374
panLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix );
@@ -388,11 +388,11 @@ var OrbitControls = function ( object, domElement ) {
388388

389389
function dollyIn( dollyScale ) {
390390

391-
if ( scope.object.type == 'PerspectiveCamera' ) {
391+
if ( scope.object.type === 'PerspectiveCamera' ) {
392392

393393
scale /= dollyScale;
394394

395-
} else if ( scope.object.type == 'OrthographicCamera' ) {
395+
} else if ( scope.object.type === 'OrthographicCamera' ) {
396396

397397
scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) );
398398
scope.object.updateProjectionMatrix();
@@ -409,11 +409,11 @@ var OrbitControls = function ( object, domElement ) {
409409

410410
function dollyOut( dollyScale ) {
411411

412-
if ( scope.object.type == 'PerspectiveCamera' ) {
412+
if ( scope.object.type === 'PerspectiveCamera' ) {
413413

414414
scale *= dollyScale;
415415

416-
} else if ( scope.object.type == 'OrthographicCamera' ) {
416+
} else if ( scope.object.type === 'OrthographicCamera' ) {
417417

418418
scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) );
419419
scope.object.updateProjectionMatrix();

pythreejs/core/Renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, scene, camera, controls=None, **kwargs):
3939
super(Renderer, self).__init__(
4040
scene=scene,
4141
camera=camera,
42-
controls=controls or None,
42+
controls=controls or [],
4343
**kwargs)
4444
link((self, 'width'), (self, '_width'))
4545
link((self, 'height'), (self, '_height'))

0 commit comments

Comments
 (0)