Skip to content

Commit

Permalink
Updated builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored and iSvmo committed Nov 7, 2022
1 parent 4c25f77 commit 6546280
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 16 deletions.
14 changes: 9 additions & 5 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30771,10 +30771,10 @@ class SpotLightHelper extends Object3D {
constructor(light, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'SpotLightHelper';
const geometry = new BufferGeometry();
const positions = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1];
for (let i = 0, j = 1, l = 32; i < l; i++, j++) {
Expand All @@ -30796,7 +30796,8 @@ class SpotLightHelper extends Object3D {
this.cone.material.dispose();
}
update() {
this.light.updateMatrixWorld();
this.light.updateWorldMatrix(true, false);
this.light.target.updateWorldMatrix(true, false);
const coneLength = this.light.distance ? this.light.distance : 1000;
const coneWidth = coneLength * Math.tan(this.light.angle);
this.cone.scale.set(coneWidth, coneWidth, coneLength);
Expand Down Expand Up @@ -30893,7 +30894,6 @@ class PointLightHelper extends Mesh {
});
super(geometry, material);
this.light = light;
this.light.updateMatrixWorld();
this.color = color;
this.type = 'PointLightHelper';
this.matrix = this.light.matrixWorld;
Expand Down Expand Up @@ -30921,6 +30921,7 @@ class PointLightHelper extends Mesh {
this.material.dispose();
}
update() {
this.light.updateWorldMatrix(true, false);
if (this.color !== undefined) {
this.material.color.set(this.color);
} else {
Expand All @@ -30946,10 +30947,10 @@ class HemisphereLightHelper extends Object3D {
constructor(light, size, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'HemisphereLightHelper';
const geometry = new OctahedronGeometry(size);
geometry.rotateY(Math.PI * 0.5);
this.material = new MeshBasicMaterial({
Expand Down Expand Up @@ -30982,6 +30983,7 @@ class HemisphereLightHelper extends Object3D {
}
colors.needsUpdate = true;
}
this.light.updateWorldMatrix(true, false);
mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate());
}
}
Expand Down Expand Up @@ -31092,10 +31094,10 @@ class DirectionalLightHelper extends Object3D {
constructor(light, size, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'DirectionalLightHelper';
if (size === undefined) size = 1;
let geometry = new BufferGeometry();
geometry.setAttribute('position', new Float32BufferAttribute([-size, size, 0, size, size, 0, size, -size, 0, -size, -size, 0, -size, size, 0], 3));
Expand All @@ -31118,6 +31120,8 @@ class DirectionalLightHelper extends Object3D {
this.targetLine.material.dispose();
}
update() {
this.light.updateWorldMatrix(true, false);
this.light.target.updateWorldMatrix(true, false);
_v1.setFromMatrixPosition(this.light.matrixWorld);
_v2.setFromMatrixPosition(this.light.target.matrixWorld);
_v3.subVectors(_v2, _v1);
Expand Down
14 changes: 9 additions & 5 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -30773,10 +30773,10 @@
constructor(light, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'SpotLightHelper';
const geometry = new BufferGeometry();
const positions = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1];
for (let i = 0, j = 1, l = 32; i < l; i++, j++) {
Expand All @@ -30798,7 +30798,8 @@
this.cone.material.dispose();
}
update() {
this.light.updateMatrixWorld();
this.light.updateWorldMatrix(true, false);
this.light.target.updateWorldMatrix(true, false);
const coneLength = this.light.distance ? this.light.distance : 1000;
const coneWidth = coneLength * Math.tan(this.light.angle);
this.cone.scale.set(coneWidth, coneWidth, coneLength);
Expand Down Expand Up @@ -30895,7 +30896,6 @@
});
super(geometry, material);
this.light = light;
this.light.updateMatrixWorld();
this.color = color;
this.type = 'PointLightHelper';
this.matrix = this.light.matrixWorld;
Expand Down Expand Up @@ -30923,6 +30923,7 @@
this.material.dispose();
}
update() {
this.light.updateWorldMatrix(true, false);
if (this.color !== undefined) {
this.material.color.set(this.color);
} else {
Expand All @@ -30948,10 +30949,10 @@
constructor(light, size, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'HemisphereLightHelper';
const geometry = new OctahedronGeometry(size);
geometry.rotateY(Math.PI * 0.5);
this.material = new MeshBasicMaterial({
Expand Down Expand Up @@ -30984,6 +30985,7 @@
}
colors.needsUpdate = true;
}
this.light.updateWorldMatrix(true, false);
mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate());
}
}
Expand Down Expand Up @@ -31094,10 +31096,10 @@
constructor(light, size, color) {
super();
this.light = light;
this.light.updateMatrixWorld();
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.color = color;
this.type = 'DirectionalLightHelper';
if (size === undefined) size = 1;
let geometry = new BufferGeometry();
geometry.setAttribute('position', new Float32BufferAttribute([-size, size, 0, size, size, 0, size, -size, 0, -size, -size, 0, -size, size, 0], 3));
Expand All @@ -31120,6 +31122,8 @@
this.targetLine.material.dispose();
}
update() {
this.light.updateWorldMatrix(true, false);
this.light.target.updateWorldMatrix(true, false);
_v1.setFromMatrixPosition(this.light.matrixWorld);
_v2.setFromMatrixPosition(this.light.target.matrixWorld);
_v3.subVectors(_v2, _v1);
Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -47986,13 +47986,14 @@ class SpotLightHelper extends Object3D {
super();

this.light = light;
this.light.updateMatrixWorld();

this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;

this.color = color;

this.type = 'SpotLightHelper';

const geometry = new BufferGeometry();

const positions = [
Expand Down Expand Up @@ -48035,7 +48036,8 @@ class SpotLightHelper extends Object3D {

update() {

this.light.updateMatrixWorld();
this.light.updateWorldMatrix( true, false );
this.light.target.updateWorldMatrix( true, false );

const coneLength = this.light.distance ? this.light.distance : 1000;
const coneWidth = coneLength * Math.tan( this.light.angle );
Expand Down Expand Up @@ -48188,7 +48190,6 @@ class PointLightHelper extends Mesh {
super( geometry, material );

this.light = light;
this.light.updateMatrixWorld();

this.color = color;

Expand Down Expand Up @@ -48234,6 +48235,8 @@ class PointLightHelper extends Mesh {

update() {

this.light.updateWorldMatrix( true, false );

if ( this.color !== undefined ) {

this.material.color.set( this.color );
Expand Down Expand Up @@ -48274,13 +48277,14 @@ class HemisphereLightHelper extends Object3D {
super();

this.light = light;
this.light.updateMatrixWorld();

this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;

this.color = color;

this.type = 'HemisphereLightHelper';

const geometry = new OctahedronGeometry( size );
geometry.rotateY( Math.PI * 0.5 );

Expand Down Expand Up @@ -48332,6 +48336,8 @@ class HemisphereLightHelper extends Object3D {

}

this.light.updateWorldMatrix( true, false );

mesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );

}
Expand Down Expand Up @@ -48485,13 +48491,14 @@ class DirectionalLightHelper extends Object3D {
super();

this.light = light;
this.light.updateMatrixWorld();

this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;

this.color = color;

this.type = 'DirectionalLightHelper';

if ( size === undefined ) size = 1;

let geometry = new BufferGeometry();
Expand Down Expand Up @@ -48529,6 +48536,9 @@ class DirectionalLightHelper extends Object3D {

update() {

this.light.updateWorldMatrix( true, false );
this.light.target.updateWorldMatrix( true, false );

_v1.setFromMatrixPosition( this.light.matrixWorld );
_v2.setFromMatrixPosition( this.light.target.matrixWorld );
_v3.subVectors( _v2, _v1 );
Expand Down

0 comments on commit 6546280

Please sign in to comment.