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
104 changes: 71 additions & 33 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18979,11 +18979,11 @@ class BufferGeometry extends EventDispatcher {
this.indirect = null;

/**
* The offset, in bytes, into the indirect drawing buffer where the value data begins.
* The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset.
*
* Can only be used with {@link WebGPURenderer} and a WebGPU backend.
*
* @type {number}
* @type {number|Array<number>}
* @default 0
*/
this.indirectOffset = 0;
Expand Down Expand Up @@ -19101,7 +19101,7 @@ class BufferGeometry extends EventDispatcher {
* Sets the given indirect attribute to this geometry.
*
* @param {BufferAttribute} indirect - The attribute holding indirect draw calls.
* @param {number} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins.
* @param {number|Array<number>} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset.
* @return {BufferGeometry} A reference to this instance.
*/
setIndirect( indirect, indirectOffset = 0 ) {
Expand Down Expand Up @@ -25399,6 +25399,15 @@ class Skeleton {
*/
this.boneMatrices = null;

/**
* An array buffer holding the bone data of the previous frame.
* Required for computing velocity. Maintained in {@link SkinningNode}.
*
* @type {?Float32Array}
* @default null
*/
this.previousBoneMatrices = null;

/**
* A texture holding the bone data for use
* in the vertex shader.
Expand Down Expand Up @@ -35474,9 +35483,9 @@ class ExtrudeGeometry extends BufferGeometry {

// SETUP TNB variables

// TODO1 - have a .isClosed in spline?
const isClosed = extrudePath.isCatmullRomCurve3 ? extrudePath.closed : false;

splineTube = extrudePath.computeFrenetFrames( steps, false );
splineTube = extrudePath.computeFrenetFrames( steps, isClosed );

// log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);

Expand Down Expand Up @@ -45377,16 +45386,6 @@ class Light extends Object3D {
data.object.color = this.color.getHex();
data.object.intensity = this.intensity;

if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();

if ( this.distance !== undefined ) data.object.distance = this.distance;
if ( this.angle !== undefined ) data.object.angle = this.angle;
if ( this.decay !== undefined ) data.object.decay = this.decay;
if ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;

if ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();
if ( this.target !== undefined ) data.object.target = this.target.uuid;

return data;

}
Expand Down Expand Up @@ -45452,6 +45451,16 @@ class HemisphereLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.groundColor = this.groundColor.getHex();

return data;

}

}

const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();
Expand Down Expand Up @@ -46015,13 +46024,32 @@ class SpotLight extends Light {
this.decay = source.decay;

this.target = source.target.clone();

this.map = source.map;
this.shadow = source.shadow.clone();

return this;

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.distance = this.distance;
data.object.angle = this.angle;
data.object.decay = this.decay;
data.object.penumbra = this.penumbra;

data.object.target = this.target.uuid;

if ( this.map && this.map.isTexture ) data.object.map = this.map.toJSON( meta ).uuid;

data.object.shadow = this.shadow.toJSON();

return data;

}

}

const _projScreenMatrix = /*@__PURE__*/ new Matrix4();
Expand Down Expand Up @@ -46211,6 +46239,19 @@ class PointLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.distance = this.distance;
data.object.decay = this.decay;

data.object.shadow = this.shadow.toJSON();

return data;

}

}

/**
Expand Down Expand Up @@ -46575,6 +46616,17 @@ class DirectionalLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.shadow = this.shadow.toJSON();
data.object.target = this.target.uuid;

return data;

}

}

/**
Expand Down Expand Up @@ -47125,21 +47177,6 @@ class LightProbe extends Light {

}

/**
* Deserializes the light prove from the given JSON.
*
* @param {Object} json - The JSON holding the serialized light probe.
* @return {LightProbe} A reference to this light probe.
*/
fromJSON( json ) {

this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();
this.sh.fromArray( json.sh );

return this;

}

toJSON( meta ) {

const data = super.toJSON( meta );
Expand Down Expand Up @@ -48762,7 +48799,8 @@ class ObjectLoader extends Loader {

case 'LightProbe':

object = new LightProbe().fromJSON( data );
const sh = new SphericalHarmonics3().fromArray( data.sh );
object = new LightProbe( sh, data.intensity );

break;

Expand Down Expand Up @@ -56850,7 +56888,7 @@ class PointLightHelper extends Mesh {
/**
* The light being visualized.
*
* @type {HemisphereLight}
* @type {PointLight}
*/
this.light = light;

Expand Down
104 changes: 71 additions & 33 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -18977,11 +18977,11 @@ class BufferGeometry extends EventDispatcher {
this.indirect = null;

/**
* The offset, in bytes, into the indirect drawing buffer where the value data begins.
* The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset.
*
* Can only be used with {@link WebGPURenderer} and a WebGPU backend.
*
* @type {number}
* @type {number|Array<number>}
* @default 0
*/
this.indirectOffset = 0;
Expand Down Expand Up @@ -19099,7 +19099,7 @@ class BufferGeometry extends EventDispatcher {
* Sets the given indirect attribute to this geometry.
*
* @param {BufferAttribute} indirect - The attribute holding indirect draw calls.
* @param {number} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins.
* @param {number|Array<number>} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset.
* @return {BufferGeometry} A reference to this instance.
*/
setIndirect( indirect, indirectOffset = 0 ) {
Expand Down Expand Up @@ -25397,6 +25397,15 @@ class Skeleton {
*/
this.boneMatrices = null;

/**
* An array buffer holding the bone data of the previous frame.
* Required for computing velocity. Maintained in {@link SkinningNode}.
*
* @type {?Float32Array}
* @default null
*/
this.previousBoneMatrices = null;

/**
* A texture holding the bone data for use
* in the vertex shader.
Expand Down Expand Up @@ -35472,9 +35481,9 @@ class ExtrudeGeometry extends BufferGeometry {

// SETUP TNB variables

// TODO1 - have a .isClosed in spline?
const isClosed = extrudePath.isCatmullRomCurve3 ? extrudePath.closed : false;

splineTube = extrudePath.computeFrenetFrames( steps, false );
splineTube = extrudePath.computeFrenetFrames( steps, isClosed );

// log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);

Expand Down Expand Up @@ -45375,16 +45384,6 @@ class Light extends Object3D {
data.object.color = this.color.getHex();
data.object.intensity = this.intensity;

if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();

if ( this.distance !== undefined ) data.object.distance = this.distance;
if ( this.angle !== undefined ) data.object.angle = this.angle;
if ( this.decay !== undefined ) data.object.decay = this.decay;
if ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;

if ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();
if ( this.target !== undefined ) data.object.target = this.target.uuid;

return data;

}
Expand Down Expand Up @@ -45450,6 +45449,16 @@ class HemisphereLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.groundColor = this.groundColor.getHex();

return data;

}

}

const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();
Expand Down Expand Up @@ -46013,13 +46022,32 @@ class SpotLight extends Light {
this.decay = source.decay;

this.target = source.target.clone();

this.map = source.map;
this.shadow = source.shadow.clone();

return this;

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.distance = this.distance;
data.object.angle = this.angle;
data.object.decay = this.decay;
data.object.penumbra = this.penumbra;

data.object.target = this.target.uuid;

if ( this.map && this.map.isTexture ) data.object.map = this.map.toJSON( meta ).uuid;

data.object.shadow = this.shadow.toJSON();

return data;

}

}

const _projScreenMatrix = /*@__PURE__*/ new Matrix4();
Expand Down Expand Up @@ -46209,6 +46237,19 @@ class PointLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.distance = this.distance;
data.object.decay = this.decay;

data.object.shadow = this.shadow.toJSON();

return data;

}

}

/**
Expand Down Expand Up @@ -46573,6 +46614,17 @@ class DirectionalLight extends Light {

}

toJSON( meta ) {

const data = super.toJSON( meta );

data.object.shadow = this.shadow.toJSON();
data.object.target = this.target.uuid;

return data;

}

}

/**
Expand Down Expand Up @@ -47123,21 +47175,6 @@ class LightProbe extends Light {

}

/**
* Deserializes the light prove from the given JSON.
*
* @param {Object} json - The JSON holding the serialized light probe.
* @return {LightProbe} A reference to this light probe.
*/
fromJSON( json ) {

this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();
this.sh.fromArray( json.sh );

return this;

}

toJSON( meta ) {

const data = super.toJSON( meta );
Expand Down Expand Up @@ -48760,7 +48797,8 @@ class ObjectLoader extends Loader {

case 'LightProbe':

object = new LightProbe().fromJSON( data );
const sh = new SphericalHarmonics3().fromArray( data.sh );
object = new LightProbe( sh, data.intensity );

break;

Expand Down Expand Up @@ -56848,7 +56886,7 @@ class PointLightHelper extends Mesh {
/**
* The light being visualized.
*
* @type {HemisphereLight}
* @type {PointLight}
*/
this.light = light;

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

Large diffs are not rendered by default.

Loading
Loading