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: 8 additions & 13 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49106,11 +49106,16 @@ const _errorMap = new WeakMap();
* textures for rendering.
*
* Note that {@link Texture#flipY} and {@link Texture#premultiplyAlpha} are ignored with image bitmaps.
* They needs these configuration on bitmap creation unlike regular images need them on uploading to GPU.
* These options need to be configured via {@link ImageBitmapLoader#setOptions} prior to loading,
* unlike regular images which can be configured on the Texture to set these options on GPU upload instead.
*
* You need to set the equivalent options via {@link ImageBitmapLoader#setOptions} instead.
* To match the default behaviour of {@link Texture}, the following options are needed:
*
* Also note that unlike {@link FileLoader}, this loader avoids multiple concurrent requests to the same URL only if `Cache` is enabled.
* ```js
* { imageOrientation: 'flipY', premultiplyAlpha: 'none' }
* ```
*
* Also note that unlike {@link FileLoader}, this loader will only avoid multiple concurrent requests to the same URL if {@link Cache} is enabled.
*
* ```js
* const loader = new THREE.ImageBitmapLoader();
Expand Down Expand Up @@ -77262,16 +77267,6 @@ class WebGLRenderer {

}

// https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512

if ( material.isMeshGouraudMaterial && material.envMap !== null ) {

m_uniforms.envMap.value = envMap;

m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;

}

if ( material.isMeshStandardMaterial && material.envMap === null && scene.environment !== null ) {

m_uniforms.envMapIntensity.value = scene.environmentIntensity;
Expand Down
11 changes: 8 additions & 3 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -49104,11 +49104,16 @@ const _errorMap = new WeakMap();
* textures for rendering.
*
* Note that {@link Texture#flipY} and {@link Texture#premultiplyAlpha} are ignored with image bitmaps.
* They needs these configuration on bitmap creation unlike regular images need them on uploading to GPU.
* These options need to be configured via {@link ImageBitmapLoader#setOptions} prior to loading,
* unlike regular images which can be configured on the Texture to set these options on GPU upload instead.
*
* You need to set the equivalent options via {@link ImageBitmapLoader#setOptions} instead.
* To match the default behaviour of {@link Texture}, the following options are needed:
*
* Also note that unlike {@link FileLoader}, this loader avoids multiple concurrent requests to the same URL only if `Cache` is enabled.
* ```js
* { imageOrientation: 'flipY', premultiplyAlpha: 'none' }
* ```
*
* Also note that unlike {@link FileLoader}, this loader will only avoid multiple concurrent requests to the same URL if {@link Cache} is enabled.
*
* ```js
* const loader = new THREE.ImageBitmapLoader();
Expand Down
10 changes: 0 additions & 10 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18207,16 +18207,6 @@ class WebGLRenderer {

}

// https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512

if ( material.isMeshGouraudMaterial && material.envMap !== null ) {

m_uniforms.envMap.value = envMap;

m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;

}

if ( material.isMeshStandardMaterial && material.envMap === null && scene.environment !== null ) {

m_uniforms.envMapIntensity.value = scene.environmentIntensity;
Expand Down
2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions build/three.webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8791,22 +8791,6 @@ const vertexStage = ( node ) => varying( node );
addMethodChaining( 'toVarying', varying );
addMethodChaining( 'toVertexStage', vertexStage );

// Deprecated

addMethodChaining( 'varying', ( ...params ) => { // @deprecated, r173

warn( 'TSL: .varying() has been renamed to .toVarying().' );
return varying( ...params );

} );

addMethodChaining( 'vertexStage', ( ...params ) => { // @deprecated, r173

warn( 'TSL: .vertexStage() has been renamed to .toVertexStage().' );
return varying( ...params );

} );

/**
* Converts the given color value from sRGB to linear-sRGB color space.
*
Expand Down
2 changes: 1 addition & 1 deletion build/three.webgpu.min.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions build/three.webgpu.nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8791,22 +8791,6 @@ const vertexStage = ( node ) => varying( node );
addMethodChaining( 'toVarying', varying );
addMethodChaining( 'toVertexStage', vertexStage );

// Deprecated

addMethodChaining( 'varying', ( ...params ) => { // @deprecated, r173

warn( 'TSL: .varying() has been renamed to .toVarying().' );
return varying( ...params );

} );

addMethodChaining( 'vertexStage', ( ...params ) => { // @deprecated, r173

warn( 'TSL: .vertexStage() has been renamed to .toVertexStage().' );
return varying( ...params );

} );

/**
* Converts the given color value from sRGB to linear-sRGB color space.
*
Expand Down
2 changes: 1 addition & 1 deletion build/three.webgpu.nodes.min.js

Large diffs are not rendered by default.

42 changes: 33 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#asin">asin</a></li>
<li><a href="TSL.html#assign">assign</a></li>
<li><a href="TSL.html#atan">atan</a></li>
<li><a href="TSL.html#atan2">atan2</a></li>
<li><a href="TSL.html#atomicAdd">atomicAdd</a></li>
<li><a href="TSL.html#atomicAnd">atomicAnd</a></li>
<li><a href="TSL.html#atomicFunc">atomicFunc</a></li>
Expand Down Expand Up @@ -1028,7 +1027,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#builtinAOContext">builtinAOContext</a></li>
<li><a href="TSL.html#builtinShadowContext">builtinShadowContext</a></li>
<li><a href="TSL.html#bumpMap">bumpMap</a></li>
<li><a href="TSL.html#burn">burn</a></li>
<li><a href="TSL.html#bypass">bypass</a></li>
<li><a href="TSL.html#cache">cache</a></li>
<li><a href="TSL.html#cameraFar">cameraFar</a></li>
Expand Down Expand Up @@ -1082,7 +1080,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#degrees">degrees</a></li>
<li><a href="TSL.html#deltaTime">deltaTime</a></li>
<li><a href="TSL.html#denoise">denoise</a></li>
<li><a href="TSL.html#densityFog">densityFog</a></li>
<li><a href="TSL.html#densityFogFactor">densityFogFactor</a></li>
<li><a href="TSL.html#depth">depth</a></li>
<li><a href="TSL.html#depthBase">depthBase</a></li>
Expand All @@ -1096,15 +1093,13 @@ <h2>TSL</h2>
<li><a href="TSL.html#dispersion">dispersion</a></li>
<li><a href="TSL.html#distance">distance</a></li>
<li><a href="TSL.html#div">div</a></li>
<li><a href="TSL.html#dodge">dodge</a></li>
<li><a href="TSL.html#dof">dof</a></li>
<li><a href="TSL.html#dot">dot</a></li>
<li><a href="TSL.html#dotScreen">dotScreen</a></li>
<li><a href="TSL.html#drawIndex">drawIndex</a></li>
<li><a href="TSL.html#dynamicBufferAttribute">dynamicBufferAttribute</a></li>
<li><a href="TSL.html#emissive">emissive</a></li>
<li><a href="TSL.html#equal">equal</a></li>
<li><a href="TSL.html#equals">equals</a></li>
<li><a href="TSL.html#equirectUV">equirectUV</a></li>
<li><a href="TSL.html#exp">exp</a></li>
<li><a href="TSL.html#exp2">exp2</a></li>
Expand Down Expand Up @@ -1281,7 +1276,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#outline">outline</a></li>
<li><a href="TSL.html#output">output</a></li>
<li><a href="TSL.html#outputStruct">outputStruct</a></li>
<li><a href="TSL.html#overlay">overlay</a></li>
<li><a href="TSL.html#overloadingFn">overloadingFn</a></li>
<li><a href="TSL.html#packHalf2x16">packHalf2x16</a></li>
<li><a href="TSL.html#packSnorm2x16">packSnorm2x16</a></li>
Expand Down Expand Up @@ -1323,7 +1317,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#radians">radians</a></li>
<li><a href="TSL.html#rand">rand</a></li>
<li><a href="TSL.html#range">range</a></li>
<li><a href="TSL.html#rangeFog">rangeFog</a></li>
<li><a href="TSL.html#rangeFogFactor">rangeFogFactor</a></li>
<li><a href="TSL.html#reciprocal">reciprocal</a></li>
<li><a href="TSL.html#reference">reference</a></li>
Expand Down Expand Up @@ -1354,7 +1347,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#samplerComparison">samplerComparison</a></li>
<li><a href="TSL.html#saturate">saturate</a></li>
<li><a href="TSL.html#saturation">saturation</a></li>
<li><a href="TSL.html#screen">screen</a></li>
<li><a href="TSL.html#screenCoordinate">screenCoordinate</a></li>
<li><a href="TSL.html#screenDPR">screenDPR</a></li>
<li><a href="TSL.html#screenSize">screenSize</a></li>
Expand Down Expand Up @@ -1398,7 +1390,6 @@ <h2>TSL</h2>
<li><a href="TSL.html#storage">storage</a></li>
<li><a href="TSL.html#storageBarrier">storageBarrier</a></li>
<li><a href="TSL.html#storageElement">storageElement</a></li>
<li><a href="TSL.html#storageObject">storageObject</a></li>
<li><a href="TSL.html#storageTexture">storageTexture</a></li>
<li><a href="TSL.html#struct">struct</a></li>
<li><a href="TSL.html#sub">sub</a></li>
Expand Down Expand Up @@ -1525,6 +1516,7 @@ <h2>Global</h2>
<li><a href="global.html#ByteType">ByteType</a></li>
<li><a href="global.html#CineonToneMapping">CineonToneMapping</a></li>
<li><a href="global.html#ClampToEdgeWrapping">ClampToEdgeWrapping</a></li>
<li><a href="global.html#Compatibility">Compatibility</a></li>
<li><a href="global.html#ConstantAlphaFactor">ConstantAlphaFactor</a></li>
<li><a href="global.html#ConstantColorFactor">ConstantColorFactor</a></li>
<li><a href="global.html#CubeReflectionMapping">CubeReflectionMapping</a></li>
Expand Down Expand Up @@ -2093,6 +2085,38 @@ <h2>Global</h2>

}

// Sort results: exact matches first, then classes before members
const searchLower = v.toLowerCase();
results.sort( ( a, b ) => {

const aName = a.title.split( /[#~]/ ).pop().toLowerCase();
const bName = b.title.split( /[#~]/ ).pop().toLowerCase();
const aIsClass = ! a.title.includes( '#' ) && ! a.title.includes( '~' );
const bIsClass = ! b.title.includes( '#' ) && ! b.title.includes( '~' );

// Exact match on class name (highest priority)
const aExactClass = aIsClass && aName === searchLower;
const bExactClass = bIsClass && bName === searchLower;
if ( aExactClass !== bExactClass ) return aExactClass ? - 1 : 1;

// Class starts with search term
const aStartsClass = aIsClass && aName.startsWith( searchLower );
const bStartsClass = bIsClass && bName.startsWith( searchLower );
if ( aStartsClass !== bStartsClass ) return aStartsClass ? - 1 : 1;

// Exact match on member name
const aExact = aName === searchLower;
const bExact = bName === searchLower;
if ( aExact !== bExact ) return aExact ? - 1 : 1;

// Classes before members
if ( aIsClass !== bIsClass ) return aIsClass ? - 1 : 1;

// Alphabetically
return a.title.localeCompare( b.title );

} );

// Display results
if ( results.length > 0 ) {

Expand Down
13 changes: 8 additions & 5 deletions docs/pages/ImageBitmapLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ <h1 translate="no">ImageBitmapLoader</h1>
An <code>ImageBitmap</code> provides an asynchronous and resource efficient pathway to prepare
textures for rendering.</p>
<p>Note that <a href="Texture.html#flipY">Texture#flipY</a> and <a href="Texture.html#premultiplyAlpha">Texture#premultiplyAlpha</a> are ignored with image bitmaps.
They needs these configuration on bitmap creation unlike regular images need them on uploading to GPU.</p>
<p>You need to set the equivalent options via <a href="ImageBitmapLoader.html#setOptions">ImageBitmapLoader#setOptions</a> instead.</p>
<p>Also note that unlike <a href="FileLoader.html">FileLoader</a>, this loader avoids multiple concurrent requests to the same URL only if <code>Cache</code> is enabled.</p></div>
<h2>Code Example</h2>
<div translate="no"><pre><code class="language-js">const loader = new THREE.ImageBitmapLoader();
These options need to be configured via <a href="ImageBitmapLoader.html#setOptions">ImageBitmapLoader#setOptions</a> prior to loading,
unlike regular images which can be configured on the Texture to set these options on GPU upload instead.</p>
<p>To match the default behaviour of <a href="Texture.html">Texture</a>, the following options are needed:</p>
<p>Also note that unlike <a href="FileLoader.html">FileLoader</a>, this loader will only avoid multiple concurrent requests to the same URL if <a href="Cache.html">Cache</a> is enabled.</p>
<pre><code class="language-js">const loader = new THREE.ImageBitmapLoader();
loader.setOptions( { imageOrientation: 'flipY' } ); // set options if needed
const imageBitmap = await loader.loadAsync( 'image.png' );
const texture = new THREE.Texture( imageBitmap );
texture.needsUpdate = true;
</code></pre></div>
<h2>Code Example</h2>
<div translate="no"><pre><code class="language-js">{ imageOrientation: 'flipY', premultiplyAlpha: 'none' }
</code></pre></div>
</header>
<article>
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/Quaternion.html
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ <h3 class="name name-method" id="setFromUnitVectors" translate="no">.<a href="#s
<h3 class="name name-method" id="slerp" translate="no">.<a href="#slerp">slerp</a><span class="signature">( qb : <span class="param-type"><a href="Quaternion.html">Quaternion</a></span>, t : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="Quaternion.html">Quaternion</a></span> </h3>
<div class="method">
<div class="description">
<p>Performs a spherical linear interpolation between quaternions.</p>
<p>Performs a spherical linear interpolation between this quaternion and the target quaternion.</p>
</div>
<table class="params">
<tbody>
Expand All @@ -611,7 +611,7 @@ <h3 class="name name-method" id="slerp" translate="no">.<a href="#slerp">slerp</
<strong>t</strong>
</td>
<td class="description last">
<p>The interpolation factor in the closed interval <code>[0, 1]</code>.</p>
<p>The interpolation factor. A value in the range <code>[0,1]</code> will interpolate. A value outside the range <code>[0,1]</code> will extrapolate.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -832,7 +832,7 @@ <h3 class="name name-method" id=".slerpFlat" translate="no">.<a href="#.slerpFla
<strong>t</strong>
</td>
<td class="description last">
<p>The interpolation factor in the range <code>[0,1]</code>.</p>
<p>The interpolation factor. A value in the range <code>[0,1]</code> will interpolate. A value outside the range <code>[0,1]</code> will extrapolate.</p>
</td>
</tr>
</tbody>
Expand Down
22 changes: 22 additions & 0 deletions docs/pages/Renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,28 @@ <h3 class="name name-method" id="getViewport" translate="no">.<a href="#getViewp
<dt class="tag-returns"><strong>Returns:</strong> The viewport definition.</dt>
</dl>
</div>
<h3 class="name name-method" id="hasCompatibility" translate="no">.<a href="#hasCompatibility">hasCompatibility</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
<div class="method">
<div class="description">
<p>Checks if the given compatibility is supported by the selected backend. If the
renderer has not been initialized, this method always returns <code>false</code>.</p>
</div>
<table class="params">
<tbody>
<tr>
<td class="name">
<strong>name</strong>
</td>
<td class="description last">
<p>The compatibility's name.</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-returns"><strong>Returns:</strong> Whether the compatibility is supported or not.</dt>
</dl>
</div>
<h3 class="name name-method" id="hasFeature" translate="no">.<a href="#hasFeature">hasFeature</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
<div class="method">
<div class="description">
Expand Down
Loading
Loading