Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:mrdoob/three.js into cubeBlur
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish committed Dec 19, 2024
2 parents 4c777e8 + b1567a0 commit ad5cb2d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 30 deletions.
83 changes: 55 additions & 28 deletions manual/resources/threejs-material-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ const materials = [
'color',
'combine',
'envMap',
'envMapRotation',
'fog',
'lightMap',
'lightMapIntensity',
'map',
'reflectivity',
'refractionRatio',
'specularMap',
'wireframe',
'wireframeLinecap',
'wireframeLinejoin',
'wireframeLinewidth'
],
},
{
Expand All @@ -29,13 +34,16 @@ const materials = [
'bumpScale',
'color',
'combine',
'displacementBias',
'displacementMap',
'displacementScale',
'displacementBias',
'emissive',
'emissiveMap',
'emissiveIntensity',
'emissiveMap',
'envMap',
'envMapRotation',
'flatShading',
'fog',
'lightMap',
'lightMapIntensity',
'map',
Expand All @@ -46,6 +54,9 @@ const materials = [
'refractionRatio',
'specularMap',
'wireframe',
'wireframeLinecap',
'wireframeLinejoin',
'wireframeLinewidth'
],
},
{
Expand All @@ -59,13 +70,16 @@ const materials = [
'bumpScale',
'color',
'combine',
'displacementBias',
'displacementMap',
'displacementScale',
'displacementBias',
'emissive',
'emissiveMap',
'emissiveIntensity',
'emissiveMap',
'envMap',
'envMapRotation',
'flatShading',
'fog',
'lightMap',
'lightMapIntensity',
'map',
Expand All @@ -78,6 +92,9 @@ const materials = [
'specular',
'specularMap',
'wireframe',
'wireframeLinecap',
'wireframeLinejoin',
'wireframeLinewidth'
],
},
{
Expand All @@ -90,14 +107,17 @@ const materials = [
'bumpMap',
'bumpScale',
'color',
'displacementBias',
'displacementMap',
'displacementScale',
'displacementBias',
'emissive',
'emissiveMap',
'emissiveIntensity',
'emissiveMap',
'envMap',
'envMapIntensity',
'envMapRotation',
'flatShading',
'fog',
'lightMap',
'lightMapIntensity',
'map',
Expand All @@ -106,10 +126,12 @@ const materials = [
'normalMap',
'normalMapType',
'normalScale',
'refractionRatio',
'roughness',
'roughnessMap',
'wireframe',
'wireframeLinecap',
'wireframeLinejoin',
'wireframeLinewidth'
],
},
{
Expand All @@ -119,70 +141,75 @@ const materials = [
'alphaMap',
'aoMap',
'aoMapIntensity',
'anisotropy',
'anisotropyRotation',
'anisotropyMap',
'attenuationColor',
'attenuationDistance',
'bumpMap',
'bumpScale',
'clearcoat',
'clearcoatMap',
'clearcoatNormalMap',
'clearcoatNormalScale',
'clearcoatRoughness',
'clearcoatRoughnessMap',
'clearcoatNormalScale',
'clearcoatNormalMap',
'color',
'displacementBias',
'displacementMap',
'displacementScale',
'displacementBias',
'emissive',
'emissiveMap',
'emissiveIntensity',
'emissiveMap',
'envMap',
'envMapIntensity',
'envMapRotation',
'flatShading',
'fog',
'ior',
'iridescence',
'iridescenceMap',
'iridescenceIOR',
'iridescenceThicknessRange',
'iridescenceMap',
'iridescenceThicknessMap',
'iridescenceThicknessRange',
'lightMap',
'lightMapIntensity',
'ior',
'map',
'metalness',
'metalnessMap',
'normalMap',
'normalMapType',
'normalScale',
'refractionRatio',
'reflectivity',
'roughness',
'roughnessMap',
'sheen',
'sheenColor',
'sheenColorMap',
'sheenRoughness',
'sheenRoughnessMap',
'specularColor',
'specularColorMap',
'specularIntensity',
'specularIntensityMap',
'thickness',
'thicknessMap',
'transmission',
'transmissionMap',
'attenuationDistance',
'attenuationColor',
'anisotropy',
'anisotropyRotation',
'anisotropyMap',
'specularIntensity',
'specularIntensityMap',
'specularColor',
'specularColorMap',
'wireframe',
'reflectivity',
'wireframeLinecap',
'wireframeLinejoin',
'wireframeLinewidth'
],
},
];

const allProperties = {};
const allProperties = new Set();
materials.forEach( ( material ) => {

material.properties.forEach( ( property ) => {

allProperties[ property ] = true;
allProperties.add( property );

} );

Expand Down Expand Up @@ -222,7 +249,7 @@ const thead = addElem( 'thead', table );

}

Object.keys( allProperties ).sort().forEach( ( property ) => {
Array.from( allProperties ).sort().forEach( ( property ) => {

const tr = addElem( 'tr', table );
addElem( 'td', tr, property );
Expand Down
40 changes: 38 additions & 2 deletions src/renderers/common/nodes/Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,49 @@ class Nodes extends DataMap {

getEnvironmentNode( scene ) {

return scene.environmentNode || this.get( scene ).environmentNode || null;
let environmentNode = null;

if ( scene.environmentNode && scene.environmentNode.isNode ) {

environmentNode = scene.environmentNode;

} else {

const sceneData = this.get( scene );

if ( sceneData.environmentNode ) {

environmentNode = sceneData.environmentNode;

}

}

return environmentNode;

}

getBackgroundNode( scene ) {

return scene.backgroundNode || this.get( scene ).backgroundNode || null;
let backgroundNode = null;

if ( scene.backgroundNode && scene.backgroundNode.isNode ) {

backgroundNode = scene.backgroundNode;

} else {

const sceneData = this.get( scene );

if ( sceneData.backgroundNode ) {

backgroundNode = sceneData.backgroundNode;

}

}

return backgroundNode;

}

Expand Down

0 comments on commit ad5cb2d

Please sign in to comment.