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
24 changes: 14 additions & 10 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -16410,6 +16410,14 @@ class WebGLRenderer {

}

let extensions, capabilities, state, info;
let properties, textures, environments, attributes, geometries, objects;
let programCache, materials, renderLists, renderStates, clipping, shadowMap;

let background, morphtargets, bufferRenderer, indexedBufferRenderer;

let utils, bindingStates, uniformsGroups;

try {

const contextAttributes = {
Expand Down Expand Up @@ -16453,21 +16461,19 @@ class WebGLRenderer {

}

initGLContext();

} catch ( e ) {

canvas.removeEventListener( 'webglcontextlost', onContextLost, false );
canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );
canvas.removeEventListener( 'webglcontextcreationerror', onContextCreationError, false );

error( 'WebGLRenderer: ' + e.message );
throw e;

}

let extensions, capabilities, state, info;
let properties, textures, environments, attributes, geometries, objects;
let programCache, materials, renderLists, renderStates, clipping, shadowMap;

let background, morphtargets, bufferRenderer, indexedBufferRenderer;

let utils, bindingStates, uniformsGroups;

function initGLContext() {

extensions = new WebGLExtensions( _gl );
Expand Down Expand Up @@ -16589,8 +16595,6 @@ class WebGLRenderer {

}

initGLContext();

// initialize internal render target for non-UnsignedByteType color buffer

if ( _outputBufferType !== UnsignedByteType ) {
Expand Down
328 changes: 183 additions & 145 deletions build/three.webgpu.js

Large diffs are not rendered by default.

328 changes: 183 additions & 145 deletions build/three.webgpu.nodes.js

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions examples/jsm/inspector/extensions/color-grading/LUT3DStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class LUT3DStyle {
flex-direction: column;
gap: 8px;
box-sizing: border-box;
color-scheme: dark;

/* Ultra-Subtle Transparent Blueprint / Checkerboard Grid Background */
background-color: transparent;
Expand Down Expand Up @@ -96,13 +97,16 @@ export class LUT3DStyle {
border: none !important;
outline: none;
cursor: pointer;
color-scheme: dark;
transition: color 0.15s;
}

.lut-dock-select option,
.lut-container select option {
background-color: #1e1e24;
color: #e0e0e0;
.lut-select option,
select option,
option {
background-color: #1e1e24 !important;
color: var(--text-primary, #e0e0e0) !important;
}

.lut-dock-select:hover {
Expand Down Expand Up @@ -620,7 +624,7 @@ export class LUT3DStyle {
flex-shrink: 0;
}

.lut-select, .lut-container select, .lut-toolbar select {
.lut-select, .lut-container select, .lut-toolbar select, select {
height: 22px;
font-family: var(--font-family, sans-serif);
font-size: 11px;
Expand All @@ -630,10 +634,17 @@ export class LUT3DStyle {
padding: 0 4px;
outline: none;
cursor: pointer;
color-scheme: dark;
flex-shrink: 1;
min-width: 40px;
}

.lut-select option,
select option {
background-color: #1e1e24 !important;
color: var(--text-primary, #e0e0e0) !important;
}

.lut-select-compact {
height: 20px;
font-size: 10.5px;
Expand Down
7 changes: 3 additions & 4 deletions examples/jsm/inspector/tabs/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ class Viewer extends Tab {

this.splitActive = true;
this.splitCanvasData = canvasData;
this.splitX = 0.5;

const renderer = this.inspector.getRenderer();
const mainCanvas = renderer.domElement;
Expand Down Expand Up @@ -756,13 +757,11 @@ class Viewer extends Tab {

} else {

const thickness = float( 1 ).div( this.splitUniforms.viewportWidth );
const isLine = screenUV.x.sub( this.splitUniforms.splitX ).abs().lessThan( thickness );
finalColor = Fn( () => {

screenUV.x.lessThan( this.splitUniforms.splitX ).discard();

return isLine.select( vec4( 0.29, 0.29, 0.35, 1.0 ), targetColorCtx );
return targetColorCtx;

} )();

Expand Down Expand Up @@ -978,7 +977,7 @@ class Viewer extends Tab {

}

if ( this.splitCanvasTarget.domElement.width !== rect.width || this.splitCanvasTarget.domElement.height !== rect.height ) {
if ( this.splitCanvasTarget.width !== rect.width || this.splitCanvasTarget.height !== rect.height ) {

this.splitCanvasTarget.setSize( rect.width, rect.height );

Expand Down
47 changes: 43 additions & 4 deletions examples/jsm/inspector/ui/Style.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class Style {
pointer-events: none;
z-index: 1000;
overflow: hidden;
color-scheme: dark;
}

:scope * {
Expand Down Expand Up @@ -1437,6 +1438,7 @@ export class Style {
font-family: var(--font-mono);
width: 100%;
box-sizing: border-box;
color-scheme: dark;
}

.param-control input:focus {
Expand Down Expand Up @@ -2019,6 +2021,16 @@ export class Style {
background-color: rgba(255, 255, 255, 0.05);
}

select {
color-scheme: dark;
}

select option,
option {
background-color: #1e1e24;
color: var(--text-primary);
}

.select {
background: var(--profiler-background);
border: 1px solid var(--profiler-border);
Expand All @@ -2029,6 +2041,7 @@ export class Style {
font-size: 12px;
outline: none;
cursor: pointer;
color-scheme: dark;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
Expand Down Expand Up @@ -2099,27 +2112,53 @@ export class Style {
position: absolute;
top: 0;
bottom: 0;
width: 4px;
margin-left: -2px;
width: 0;
left: 50%;
background: var(--profiler-border);
background: transparent;
cursor: ew-resize;
pointer-events: auto !important;
z-index: 10;
touch-action: none;
transform: translateX(-50%);
}

.split-screen-line::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: -10px;
left: -12px;
width: 24px;
background: transparent;
cursor: ew-resize;
}

.split-screen-line::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: -7px;
width: 14px;
pointer-events: none;
background-image:
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M0 0 L14 0 L7 8 Z' fill='%239a9aab'/%3E%3C/svg%3E"),
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M0 8 L14 8 L7 0 Z' fill='%239a9aab'/%3E%3C/svg%3E");
background-position: top center, bottom center;
background-repeat: no-repeat;
opacity: 0.8;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
transition: opacity 0.2s, filter 0.2s;
}

.split-screen-line:hover::after {
opacity: 1;
background-image:
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M0 0 L14 0 L7 8 Z' fill='%2300aaff'/%3E%3C/svg%3E"),
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M0 8 L14 8 L7 0 Z' fill='%2300aaff'/%3E%3C/svg%3E");
filter: drop-shadow(0 0 4px rgba(0, 170, 255, 0.8));
}

/* Grid Mode styles for List component */
.list-scroll-wrapper:has(> .list-container.grid-mode) {
width: 100% !important;
Expand Down
17 changes: 15 additions & 2 deletions examples/jsm/loaders/usd/USDAParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
const DEF_MATCH_REGEX = /^def\s+(?:(\w+)\s+)?"?([^"]+)"?$/;
const VARIANT_STRING_REGEX = /^string\s+(\w+)$/;
const ATTR_MATCH_REGEX = /^(?:uniform\s+)?(\w+(?:\[\])?)\s+(.+)$/;
// Preserve metadata blocks without changing the legacy parseText value shape.
const VALUE_METADATA = Symbol( 'valueMetadata' );

// Spec types (must match USDCParser/USDComposer)
const SpecType = {
Expand Down Expand Up @@ -55,10 +57,12 @@ class USDAParser {

// see #28631

const values = rhs.slice( 0, - 1 );
const values = rhs.slice( 0, - 1 ).trim();
target[ lhs ] = values;

const meta = {};
if ( target[ VALUE_METADATA ] === undefined ) target[ VALUE_METADATA ] = {};
target[ VALUE_METADATA ][ lhs ] = meta;
stack.push( meta );

target = meta;
Expand Down Expand Up @@ -621,9 +625,18 @@ class USDAParser {
const relName = key.slice( 4 );
const relPath = path + '.' + relName;
const target = data[ key ].replace( /[<>]/g, '' );
const metadata = data[ VALUE_METADATA ]?.[ key ];
const fields = { targetPaths: [ target ] };

if ( metadata?.bindMaterialAs !== undefined ) {

fields.bindMaterialAs = this._parseString( String( metadata.bindMaterialAs ).trim() );

}

specsByPath[ relPath ] = {
specType: SpecType.Relationship,
fields: { targetPaths: [ target ] }
fields
};
continue;

Expand Down
5 changes: 1 addition & 4 deletions examples/jsm/loaders/usd/USDCParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,7 @@ class USDCParser {
const reader = this.reader;
reader.seek( section.start );

// Strings section has an 8-byte count prefix, but string indices stored
// elsewhere in the file are relative to the section start (not the data).
// So we read the entire section as uint32 values to maintain correct indexing.
const numStrings = Math.floor( section.size / 4 );
const numStrings = reader.readUint64();
this.strings = [];

for ( let i = 0; i < numStrings; i ++ ) {
Expand Down
Loading
Loading