Selaa lähdekoodia

Merge pull request #16893 from Mugen87/dev34

Box3Helper: Fix ctor color parameter.
Michael Herzog 6 vuotta sitten
vanhempi
commit
2d7032f0e6
2 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. 1 2
      src/helpers/Box3Helper.d.ts
  2. 2 2
      src/helpers/Box3Helper.js

+ 1 - 2
src/helpers/Box3Helper.d.ts

@@ -1,11 +1,10 @@
-import { Object3D } from './../core/Object3D';
 import { Box3 } from './../math/Box3';
 import { Color } from './../math/Color';
 import { LineSegments } from './../objects/LineSegments';
 
 export class Box3Helper extends LineSegments {
 
-	constructor( object?: Object3D, color?: Color );
+	constructor( box?: Box3, color?: Color );
 
 	box: Box3;
 

+ 2 - 2
src/helpers/Box3Helper.js

@@ -9,13 +9,13 @@ import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
 import { Object3D } from '../core/Object3D.js';
 
-function Box3Helper( box, hex ) {
+function Box3Helper( box, color ) {
 
 	this.type = 'Box3Helper';
 
 	this.box = box;
 
-	var color = ( hex !== undefined ) ? hex : 0xffff00;
+	color = color || 0xffff00;
 
 	var indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );