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
31 changes: 22 additions & 9 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44099,6 +44099,12 @@ class Loader {
*/
this.requestHeader = {};

if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {

__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );

}

}

/**
Expand Down Expand Up @@ -50177,7 +50183,7 @@ class Audio extends Object3D {
/**
* Defines the source type.
*
* The property is automatically by one of the `set*()` methods.
* The property is automatically set by one of the `set*()` methods.
*
* @type {('empty'|'audioNode'|'mediaNode'|'mediaStreamNode'|'buffer')}
* @readonly
Expand Down Expand Up @@ -53653,6 +53659,12 @@ class AnimationMixer extends EventDispatcher {
*/
this.timeScale = 1.0;

if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {

__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );

}

}

_bindAction( action, prototypeAction ) {
Expand Down Expand Up @@ -77665,6 +77677,10 @@ class WebGLRenderer {
const textureFormat = texture.format;
const textureType = texture.type;

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

if ( ! capabilities.textureFormatReadable( textureFormat ) ) {

error( 'WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );
Expand All @@ -77683,10 +77699,6 @@ class WebGLRenderer {

if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );

}
Expand Down Expand Up @@ -77747,6 +77759,11 @@ class WebGLRenderer {
const textureFormat = texture.format;
const textureType = texture.type;

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );


if ( ! capabilities.textureFormatReadable( textureFormat ) ) {

throw new Error( 'THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.' );
Expand All @@ -77763,10 +77780,6 @@ class WebGLRenderer {
_gl.bindBuffer( _gl.PIXEL_PACK_BUFFER, glBuffer );
_gl.bufferData( _gl.PIXEL_PACK_BUFFER, buffer.byteLength, _gl.STREAM_READ );

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), 0 );

// reset the frame buffer to the currently set buffer before waiting
Expand Down
14 changes: 13 additions & 1 deletion build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -44097,6 +44097,12 @@ class Loader {
*/
this.requestHeader = {};

if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {

__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );

}

}

/**
Expand Down Expand Up @@ -50175,7 +50181,7 @@ class Audio extends Object3D {
/**
* Defines the source type.
*
* The property is automatically by one of the `set*()` methods.
* The property is automatically set by one of the `set*()` methods.
*
* @type {('empty'|'audioNode'|'mediaNode'|'mediaStreamNode'|'buffer')}
* @readonly
Expand Down Expand Up @@ -53651,6 +53657,12 @@ class AnimationMixer extends EventDispatcher {
*/
this.timeScale = 1.0;

if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {

__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );

}

}

_bindAction( action, prototypeAction ) {
Expand Down
2 changes: 1 addition & 1 deletion build/three.core.min.js

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18594,6 +18594,10 @@ class WebGLRenderer {
const textureFormat = texture.format;
const textureType = texture.type;

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

if ( ! capabilities.textureFormatReadable( textureFormat ) ) {

error( 'WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );
Expand All @@ -18612,10 +18616,6 @@ class WebGLRenderer {

if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );

}
Expand Down Expand Up @@ -18676,6 +18676,11 @@ class WebGLRenderer {
const textureFormat = texture.format;
const textureType = texture.type;

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );


if ( ! capabilities.textureFormatReadable( textureFormat ) ) {

throw new Error( 'THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.' );
Expand All @@ -18692,10 +18697,6 @@ class WebGLRenderer {
_gl.bindBuffer( _gl.PIXEL_PACK_BUFFER, glBuffer );
_gl.bufferData( _gl.PIXEL_PACK_BUFFER, buffer.byteLength, _gl.STREAM_READ );

// when using MRT, select the correct color buffer for the subsequent read command

if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );

_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), 0 );

// reset the frame buffer to the currently set buffer before waiting
Expand Down
2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ <h3>Loaders</h3>
<h3>Materials</h3>
<ul>
<li><a href="LDrawConditionalLineMaterial.html">LDrawConditionalLineMaterial</a></li>
<li><a href="MeshPostProcessingMaterial.html">MeshPostProcessingMaterial</a></li>
<li><a href="WoodNodeMaterial.html">WoodNodeMaterial</a></li>
</ul>
<h3>Math</h3>
Expand Down Expand Up @@ -1050,6 +1049,7 @@ <h2>TSL</h2>
<li><a href="TSL.html#clearcoat">clearcoat</a></li>
<li><a href="TSL.html#clearcoatNormalView">clearcoatNormalView</a></li>
<li><a href="TSL.html#clearcoatRoughness">clearcoatRoughness</a></li>
<li><a href="TSL.html#clipSpace">clipSpace</a></li>
<li><a href="TSL.html#clipping">clipping</a></li>
<li><a href="TSL.html#clippingAlpha">clippingAlpha</a></li>
<li><a href="TSL.html#code">code</a></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h3 class="name" id="source" translate="no">.<a href="#source">source</a><span c
<h3 class="name" id="sourceType" translate="no">.<a href="#sourceType">sourceType</a><span class="type-signature"> : 'empty' | 'audioNode' | 'mediaNode' | 'mediaStreamNode' | 'buffer'</span> <span class="type-signature">(readonly) </span></h3>
<div class="description">
<p>Defines the source type.</p>
<p>The property is automatically by one of the <code>set*()</code> methods.</p>
<p>The property is automatically set by one of the <code>set*()</code> methods.</p>
<p>Default is <code>'empty'</code>.</p>
</div>
</div>
Expand Down
28 changes: 28 additions & 0 deletions docs/pages/InstanceNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ <h3 class="name" id="isStorageMatrix" translate="no">.<a href="#isStorageMatrix"
<p>Tracks whether the matrix data is provided via a storage buffer.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="previousInstanceMatrixNode" translate="no">.<a href="#previousInstanceMatrixNode">previousInstanceMatrixNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
<div class="description">
<p>The previous instance matrices. Required for computing motion vectors.</p>
<p>Default is <code>null</code>.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="updateType" translate="no">.<a href="#updateType">updateType</a><span class="type-signature"> : string</span> </h3>
<div class="description">
Expand All @@ -125,6 +132,27 @@ <h3 class="name" id="updateType" translate="no">.<a href="#updateType">updateTyp
</dl>
</div>
<h2 class="subsection-title">Methods</h2>
<h3 class="name name-method" id="getPreviousInstancedPosition" translate="no">.<a href="#getPreviousInstancedPosition">getPreviousInstancedPosition</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
<div class="method">
<div class="description">
<p>Computes the transformed/instanced vertex position of the previous frame.</p>
</div>
<table class="params">
<tbody>
<tr>
<td class="name">
<strong>builder</strong>
</td>
<td class="description last">
<p>The current node builder.</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-returns"><strong>Returns:</strong> The instanced position from the previous frame.</dt>
</dl>
</div>
<h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span> </h3>
<div class="method">
<div class="description">
Expand Down
8 changes: 8 additions & 0 deletions docs/pages/InstancedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ <h3 class="name" id="morphTexture" translate="no">.<a href="#morphTexture">morph
<p>Default is <code>null</code>.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="previousInstanceMatrix" translate="no">.<a href="#previousInstanceMatrix">previousInstanceMatrix</a><span class="type-signature"> : <a href="InstancedBufferAttribute.html">InstancedBufferAttribute</a></span> </h3>
<div class="description">
<p>Represents the local transformation of all instances of the previous frame.
Required for computing velocity. Maintained in <a href="InstanceNode.html">InstanceNode</a>.</p>
<p>Default is <code>null</code>.</p>
</div>
</div>
<h2 class="subsection-title">Methods</h2>
<h3 class="name name-method" id="computeBoundingBox" translate="no">.<a href="#computeBoundingBox">computeBoundingBox</a><span class="signature">()</span> </h3>
<div class="method">
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/MRTNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Code Example</h2>
<div translate="no"><pre><code class="language-js">const mrtNode = mrt( {
output: output,
normal: normalView
} ) );
} ) ;
</code></pre></div>
</header>
<article>
Expand Down
10 changes: 10 additions & 0 deletions docs/pages/NodeBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -2847,6 +2847,16 @@ <h3 class="name name-method" id="isVector" translate="no">.<a href="#isVector">i
<dt class="tag-returns"><strong>Returns:</strong> Whether the given type is a vector type or not.</dt>
</dl>
</div>
<h3 class="name name-method" id="needsPreviousData" translate="no">.<a href="#needsPreviousData">needsPreviousData</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
<div class="method">
<div class="description">
<p>Returns <code>true</code> if data from the previous frame are required. Relevant
when computing motion vectors with <a href="VelocityNode.html">VelocityNode</a>.</p>
</div>
<dl class="details">
<dt class="tag-returns"><strong>Returns:</strong> Whether data from the previous frame are required or not.</dt>
</dl>
</div>
<h3 class="name name-method" id="needsToWorkingColorSpace" translate="no">.<a href="#needsToWorkingColorSpace">needsToWorkingColorSpace</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : boolean</span> <span class="type-signature">(abstract) </span></h3>
<div class="method">
<div class="description">
Expand Down
7 changes: 7 additions & 0 deletions docs/pages/NodeMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ <h3 class="name" id="maskNode" translate="no">.<a href="#maskNode">maskNode</a><
<p>Default is <code>null</code>.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="maskShadowNode" translate="no">.<a href="#maskShadowNode">maskShadowNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;bool></span> </h3>
<div class="description">
<p>This node can be used to implement a shadow mask for the material.</p>
<p>Default is <code>null</code>.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="mrtNode" translate="no">.<a href="#mrtNode">mrtNode</a><span class="type-signature"> : <a href="MRTNode.html">MRTNode</a></span> </h3>
<div class="description">
Expand Down
22 changes: 0 additions & 22 deletions docs/pages/SkinningNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,28 +220,6 @@ <h3 class="name name-method" id="getSkinnedPosition" translate="no">.<a href="#g
<dt class="tag-returns"><strong>Returns:</strong> The transformed vertex position.</dt>
</dl>
</div>
<h3 class="name name-method" id="needsPreviousBoneMatrices" translate="no">.<a href="#needsPreviousBoneMatrices">needsPreviousBoneMatrices</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
<div class="method">
<div class="description">
<p>Returns <code>true</code> if bone matrices from the previous frame are required. Relevant
when computing motion vectors with <a href="VelocityNode.html">VelocityNode</a>.</p>
</div>
<table class="params">
<tbody>
<tr>
<td class="name">
<strong>builder</strong>
</td>
<td class="description last">
<p>The current node builder.</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-returns"><strong>Returns:</strong> Whether bone matrices from the previous frame are required or not.</dt>
</dl>
</div>
<h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
<div class="method">
<div class="description">
Expand Down
16 changes: 16 additions & 0 deletions docs/pages/TSL.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ <h3 class="name" id="clearcoatRoughness" translate="no">.<a href="#clearcoatRoug
<p>TSL object that represents the shader variable <code>ClearcoatRoughness</code>.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="clipSpace" translate="no">.<a href="#clipSpace">clipSpace</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
<div class="description">
<p>TSL object that represents the clip space position of the current rendered object.</p>
</div>
</div>
<div class="member">
<h3 class="name" id="dashSize" translate="no">.<a href="#dashSize">dashSize</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
<div class="description">
Expand Down Expand Up @@ -12033,6 +12039,16 @@ <h3 class="name" id="ShadowMapConfig" translate="no">.<a href="#ShadowMapConfig"
<p>Whether to globally enable shadows or not.</p>
</td>
</tr>
<tr>
<td class="name">
<strong>transmitted</strong>
<br>
<span class="param-type">boolean</span>
</td>
<td class="description last">
<p>Whether to enable light transmission through non-opaque materials.</p>
</td>
</tr>
<tr>
<td class="name">
<strong>type</strong>
Expand Down
7 changes: 7 additions & 0 deletions docs/pages/WGSLNodeBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ <h3 class="name" id="uniformGroups" translate="no">.<a href="#uniformGroups">uni
another dictionary which manages UBOs per group ('render','frame','object').</p>
</div>
</div>
<div class="member">
<h3 class="name" id="uniformGroupsBindings" translate="no">.<a href="#uniformGroupsBindings">uniformGroupsBindings</a><span class="type-signature"> : Object.&lt;string, {index: number, id: number}></span> </h3>
<div class="description">
<p>A dictionary that holds the assigned binding indices for each uniform group.
This ensures the same binding index is used across all shader stages.</p>
</div>
</div>
<h2 class="subsection-title">Methods</h2>
<h3 class="name name-method" id="buildCode" translate="no">.<a href="#buildCode">buildCode</a><span class="signature">()</span> </h3>
<div class="method">
Expand Down
10 changes: 10 additions & 0 deletions docs/pages/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -3853,6 +3853,16 @@ <h3 class="name" id="ShadowMapConfig" translate="no">.<a href="#ShadowMapConfig"
<p>Whether to globally enable shadows or not.</p>
</td>
</tr>
<tr>
<td class="name">
<strong>transmitted</strong>
<br>
<span class="param-type">boolean</span>
</td>
<td class="description last">
<p>Whether to enable light transmission through non-opaque materials.</p>
</td>
</tr>
<tr>
<td class="name">
<strong>type</strong>
Expand Down
Loading
Loading