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
17 changes: 17 additions & 0 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13650,6 +13650,19 @@ class Object3D extends EventDispatcher {
*/
this.customDistanceMaterial = undefined;

/**
* Whether the 3D object is supposed to be static or not. If set to `true`, it means
* the 3D object is not going to be changed after the initial renderer. This includes
* geometry and material settings. A static 3D object can be processed by the renderer
* slightly faster since certain state checks can be bypassed.
*
* Only relevant in context of {@link WebGPURenderer}.
*
* @type {boolean}
* @default false
*/
this.static = false;

/**
* An object that can be used to store custom data about the 3D object. It
* should not hold references to functions as these will not be cloned.
Expand Down Expand Up @@ -14563,6 +14576,7 @@ class Object3D extends EventDispatcher {
if ( this.visible === false ) object.visible = false;
if ( this.frustumCulled === false ) object.frustumCulled = false;
if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;
if ( this.static !== false ) object.static = this.static;
if ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData;

object.layers = this.layers.mask;
Expand Down Expand Up @@ -14861,6 +14875,8 @@ class Object3D extends EventDispatcher {
this.frustumCulled = source.frustumCulled;
this.renderOrder = source.renderOrder;

this.static = source.static;

this.animations = source.animations.slice();

this.userData = JSON.parse( JSON.stringify( source.userData ) );
Expand Down Expand Up @@ -49000,6 +49016,7 @@ class ObjectLoader extends Loader {
if ( data.visible !== undefined ) object.visible = data.visible;
if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;
if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;
if ( data.static !== undefined ) object.static = data.static;
if ( data.userData !== undefined ) object.userData = data.userData;
if ( data.layers !== undefined ) object.layers.mask = data.layers;

Expand Down
17 changes: 17 additions & 0 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13648,6 +13648,19 @@ class Object3D extends EventDispatcher {
*/
this.customDistanceMaterial = undefined;

/**
* Whether the 3D object is supposed to be static or not. If set to `true`, it means
* the 3D object is not going to be changed after the initial renderer. This includes
* geometry and material settings. A static 3D object can be processed by the renderer
* slightly faster since certain state checks can be bypassed.
*
* Only relevant in context of {@link WebGPURenderer}.
*
* @type {boolean}
* @default false
*/
this.static = false;

/**
* An object that can be used to store custom data about the 3D object. It
* should not hold references to functions as these will not be cloned.
Expand Down Expand Up @@ -14561,6 +14574,7 @@ class Object3D extends EventDispatcher {
if ( this.visible === false ) object.visible = false;
if ( this.frustumCulled === false ) object.frustumCulled = false;
if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;
if ( this.static !== false ) object.static = this.static;
if ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData;

object.layers = this.layers.mask;
Expand Down Expand Up @@ -14859,6 +14873,8 @@ class Object3D extends EventDispatcher {
this.frustumCulled = source.frustumCulled;
this.renderOrder = source.renderOrder;

this.static = source.static;

this.animations = source.animations.slice();

this.userData = JSON.parse( JSON.stringify( source.userData ) );
Expand Down Expand Up @@ -48998,6 +49014,7 @@ class ObjectLoader extends Loader {
if ( data.visible !== undefined ) object.visible = data.visible;
if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;
if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;
if ( data.static !== undefined ) object.static = data.static;
if ( data.userData !== undefined ) object.userData = data.userData;
if ( data.layers !== undefined ) object.layers.mask = data.layers;

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

Large diffs are not rendered by default.

163 changes: 46 additions & 117 deletions build/three.webgpu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.webgpu.min.js

Large diffs are not rendered by default.

163 changes: 46 additions & 117 deletions build/three.webgpu.nodes.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.webgpu.nodes.min.js

Large diffs are not rendered by default.

22 changes: 1 addition & 21 deletions src/materials/nodes/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { modelViewMatrix } from '../../nodes/accessors/ModelNode.js';
import { vertexColor } from '../../nodes/accessors/VertexColorNode.js';
import { premultiplyAlpha } from '../../nodes/display/BlendModes.js';
import { subBuild } from '../../nodes/core/SubBuildNode.js';
import { error, warn } from '../../utils.js';
import { error } from '../../utils.js';

/**
* Base class for all node materials.
Expand Down Expand Up @@ -398,26 +398,6 @@ class NodeMaterial extends Material {
*/
this.contextNode = null;

// Deprecated properties

Object.defineProperty( this, 'shadowPositionNode', { // @deprecated, r176

get: () => {

return this.receivedShadowPositionNode;

},

set: ( value ) => {

warn( 'NodeMaterial: ".shadowPositionNode" was renamed to ".receivedShadowPositionNode".' );

this.receivedShadowPositionNode = value;

}

} );

}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/renderers/common/RenderObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,7 @@ class RenderObject {

// geometry attribute
attribute = geometry.getAttribute( nodeAttribute.name );

attributesId[ nodeAttribute.name ] = attribute.version;
attributesId[ nodeAttribute.name ] = attribute.id;

}

Expand Down
Loading