Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25834,6 +25834,15 @@ class InstancedMesh extends Mesh {
*/
this.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 );

/**
* Represents the local transformation of all instances of the previous frame.
* Required for computing velocity. Maintained in {@link InstanceNode}.
*
* @type {?InstancedBufferAttribute}
* @default null
*/
this.previousInstanceMatrix = null;

/**
* Represents the color of all instances. You have to set its
* {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data
Expand Down Expand Up @@ -25963,6 +25972,8 @@ class InstancedMesh extends Mesh {

this.instanceMatrix.copy( source.instanceMatrix );

if ( source.previousInstanceMatrix !== null ) this.previousInstanceMatrix = source.previousInstanceMatrix.clone();

if ( source.morphTexture !== null ) this.morphTexture = source.morphTexture.clone();
if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();

Expand Down Expand Up @@ -59913,7 +59924,6 @@ const UniformsLib = {
shadowMapSize: {}
} },

directionalShadowMap: { value: [] },
directionalShadowMatrix: { value: [] },

spotLights: { value: [], properties: {
Expand All @@ -59935,7 +59945,6 @@ const UniformsLib = {
} },

spotLightMap: { value: [] },
spotShadowMap: { value: [] },
spotLightMatrix: { value: [] },

pointLights: { value: [], properties: {
Expand All @@ -59955,7 +59964,6 @@ const UniformsLib = {
shadowCameraFar: {}
} },

pointShadowMap: { value: [] },
pointShadowMatrix: { value: [] },

hemisphereLights: { value: [], properties: {
Expand Down Expand Up @@ -68035,10 +68043,10 @@ function WebGLShadowMap( renderer, objects, capabilities ) {

if ( lights.length === 0 ) return;

if ( lights.type === PCFSoftShadowMap ) {
if ( this.type === PCFSoftShadowMap ) {

warn( 'WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.' );
lights.type = PCFShadowMap;
this.type = PCFShadowMap;

}

Expand Down Expand Up @@ -76879,12 +76887,9 @@ class WebGLRenderer {
uniforms.pointLightShadows.value = lights.state.pointShadow;
uniforms.hemisphereLights.value = lights.state.hemi;

uniforms.directionalShadowMap.value = lights.state.directionalShadowMap;
uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;
uniforms.spotShadowMap.value = lights.state.spotShadowMap;
uniforms.spotLightMatrix.value = lights.state.spotLightMatrix;
uniforms.spotLightMap.value = lights.state.spotLightMap;
uniforms.pointShadowMap.value = lights.state.pointShadowMap;
uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;
// TODO (abelnation): add area lights shadow info to uniforms

Expand Down
11 changes: 11 additions & 0 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -25832,6 +25832,15 @@ class InstancedMesh extends Mesh {
*/
this.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 );

/**
* Represents the local transformation of all instances of the previous frame.
* Required for computing velocity. Maintained in {@link InstanceNode}.
*
* @type {?InstancedBufferAttribute}
* @default null
*/
this.previousInstanceMatrix = null;

/**
* Represents the color of all instances. You have to set its
* {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data
Expand Down Expand Up @@ -25961,6 +25970,8 @@ class InstancedMesh extends Mesh {

this.instanceMatrix.copy( source.instanceMatrix );

if ( source.previousInstanceMatrix !== null ) this.previousInstanceMatrix = source.previousInstanceMatrix.clone();

if ( source.morphTexture !== null ) this.morphTexture = source.morphTexture.clone();
if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();

Expand Down
2 changes: 1 addition & 1 deletion build/three.core.min.js

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,6 @@ const UniformsLib = {
shadowMapSize: {}
} },

directionalShadowMap: { value: [] },
directionalShadowMatrix: { value: [] },

spotLights: { value: [], properties: {
Expand All @@ -875,7 +874,6 @@ const UniformsLib = {
} },

spotLightMap: { value: [] },
spotShadowMap: { value: [] },
spotLightMatrix: { value: [] },

pointLights: { value: [], properties: {
Expand All @@ -895,7 +893,6 @@ const UniformsLib = {
shadowCameraFar: {}
} },

pointShadowMap: { value: [] },
pointShadowMatrix: { value: [] },

hemisphereLights: { value: [], properties: {
Expand Down Expand Up @@ -8975,10 +8972,10 @@ function WebGLShadowMap( renderer, objects, capabilities ) {

if ( lights.length === 0 ) return;

if ( lights.type === PCFSoftShadowMap ) {
if ( this.type === PCFSoftShadowMap ) {

warn( 'WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.' );
lights.type = PCFShadowMap;
this.type = PCFShadowMap;

}

Expand Down Expand Up @@ -17819,12 +17816,9 @@ class WebGLRenderer {
uniforms.pointLightShadows.value = lights.state.pointShadow;
uniforms.hemisphereLights.value = lights.state.hemi;

uniforms.directionalShadowMap.value = lights.state.directionalShadowMap;
uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;
uniforms.spotShadowMap.value = lights.state.spotShadowMap;
uniforms.spotLightMatrix.value = lights.state.spotLightMatrix;
uniforms.spotLightMap.value = lights.state.spotLightMap;
uniforms.pointShadowMap.value = lights.state.pointShadowMap;
uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;
// TODO (abelnation): add area lights shadow info to uniforms

Expand Down
2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

Loading
Loading