Skip to content

Commit

Permalink
Manual: update material feature table (#30164)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
  • Loading branch information
s-rigaud and Samuel Rigaud authored Dec 19, 2024
1 parent 428eb72 commit f28ec3c
Showing 1 changed file with 55 additions and 28 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

0 comments on commit f28ec3c

Please sign in to comment.