Skip to content

Commit ad5cb2d

Browse files
committed
Merge branch 'dev' of github.com:mrdoob/three.js into cubeBlur
2 parents 4c777e8 + b1567a0 commit ad5cb2d

File tree

2 files changed

+93
-30
lines changed

2 files changed

+93
-30
lines changed

manual/resources/threejs-material-table.js

+55-28
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ const materials = [
99
'color',
1010
'combine',
1111
'envMap',
12+
'envMapRotation',
13+
'fog',
1214
'lightMap',
1315
'lightMapIntensity',
1416
'map',
1517
'reflectivity',
1618
'refractionRatio',
1719
'specularMap',
1820
'wireframe',
21+
'wireframeLinecap',
22+
'wireframeLinejoin',
23+
'wireframeLinewidth'
1924
],
2025
},
2126
{
@@ -29,13 +34,16 @@ const materials = [
2934
'bumpScale',
3035
'color',
3136
'combine',
37+
'displacementBias',
3238
'displacementMap',
3339
'displacementScale',
34-
'displacementBias',
3540
'emissive',
36-
'emissiveMap',
3741
'emissiveIntensity',
42+
'emissiveMap',
3843
'envMap',
44+
'envMapRotation',
45+
'flatShading',
46+
'fog',
3947
'lightMap',
4048
'lightMapIntensity',
4149
'map',
@@ -46,6 +54,9 @@ const materials = [
4654
'refractionRatio',
4755
'specularMap',
4856
'wireframe',
57+
'wireframeLinecap',
58+
'wireframeLinejoin',
59+
'wireframeLinewidth'
4960
],
5061
},
5162
{
@@ -59,13 +70,16 @@ const materials = [
5970
'bumpScale',
6071
'color',
6172
'combine',
73+
'displacementBias',
6274
'displacementMap',
6375
'displacementScale',
64-
'displacementBias',
6576
'emissive',
66-
'emissiveMap',
6777
'emissiveIntensity',
78+
'emissiveMap',
6879
'envMap',
80+
'envMapRotation',
81+
'flatShading',
82+
'fog',
6983
'lightMap',
7084
'lightMapIntensity',
7185
'map',
@@ -78,6 +92,9 @@ const materials = [
7892
'specular',
7993
'specularMap',
8094
'wireframe',
95+
'wireframeLinecap',
96+
'wireframeLinejoin',
97+
'wireframeLinewidth'
8198
],
8299
},
83100
{
@@ -90,14 +107,17 @@ const materials = [
90107
'bumpMap',
91108
'bumpScale',
92109
'color',
110+
'displacementBias',
93111
'displacementMap',
94112
'displacementScale',
95-
'displacementBias',
96113
'emissive',
97-
'emissiveMap',
98114
'emissiveIntensity',
115+
'emissiveMap',
99116
'envMap',
100117
'envMapIntensity',
118+
'envMapRotation',
119+
'flatShading',
120+
'fog',
101121
'lightMap',
102122
'lightMapIntensity',
103123
'map',
@@ -106,10 +126,12 @@ const materials = [
106126
'normalMap',
107127
'normalMapType',
108128
'normalScale',
109-
'refractionRatio',
110129
'roughness',
111130
'roughnessMap',
112131
'wireframe',
132+
'wireframeLinecap',
133+
'wireframeLinejoin',
134+
'wireframeLinewidth'
113135
],
114136
},
115137
{
@@ -119,70 +141,75 @@ const materials = [
119141
'alphaMap',
120142
'aoMap',
121143
'aoMapIntensity',
144+
'anisotropy',
145+
'anisotropyRotation',
146+
'anisotropyMap',
147+
'attenuationColor',
148+
'attenuationDistance',
122149
'bumpMap',
123150
'bumpScale',
124151
'clearcoat',
125152
'clearcoatMap',
153+
'clearcoatNormalMap',
154+
'clearcoatNormalScale',
126155
'clearcoatRoughness',
127156
'clearcoatRoughnessMap',
128-
'clearcoatNormalScale',
129-
'clearcoatNormalMap',
130157
'color',
158+
'displacementBias',
131159
'displacementMap',
132160
'displacementScale',
133-
'displacementBias',
134161
'emissive',
135-
'emissiveMap',
136162
'emissiveIntensity',
163+
'emissiveMap',
137164
'envMap',
138165
'envMapIntensity',
166+
'envMapRotation',
167+
'flatShading',
168+
'fog',
169+
'ior',
139170
'iridescence',
140-
'iridescenceMap',
141171
'iridescenceIOR',
142-
'iridescenceThicknessRange',
172+
'iridescenceMap',
143173
'iridescenceThicknessMap',
174+
'iridescenceThicknessRange',
144175
'lightMap',
145176
'lightMapIntensity',
146-
'ior',
147177
'map',
148178
'metalness',
149179
'metalnessMap',
150180
'normalMap',
151181
'normalMapType',
152182
'normalScale',
153-
'refractionRatio',
183+
'reflectivity',
154184
'roughness',
155185
'roughnessMap',
156186
'sheen',
157187
'sheenColor',
158188
'sheenColorMap',
159189
'sheenRoughness',
160190
'sheenRoughnessMap',
191+
'specularColor',
192+
'specularColorMap',
193+
'specularIntensity',
194+
'specularIntensityMap',
161195
'thickness',
162196
'thicknessMap',
163197
'transmission',
164198
'transmissionMap',
165-
'attenuationDistance',
166-
'attenuationColor',
167-
'anisotropy',
168-
'anisotropyRotation',
169-
'anisotropyMap',
170-
'specularIntensity',
171-
'specularIntensityMap',
172-
'specularColor',
173-
'specularColorMap',
174199
'wireframe',
175-
'reflectivity',
200+
'wireframeLinecap',
201+
'wireframeLinejoin',
202+
'wireframeLinewidth'
176203
],
177204
},
178205
];
179206

180-
const allProperties = {};
207+
const allProperties = new Set();
181208
materials.forEach( ( material ) => {
182209

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

185-
allProperties[ property ] = true;
212+
allProperties.add( property );
186213

187214
} );
188215

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

223250
}
224251

225-
Object.keys( allProperties ).sort().forEach( ( property ) => {
252+
Array.from( allProperties ).sort().forEach( ( property ) => {
226253

227254
const tr = addElem( 'tr', table );
228255
addElem( 'td', tr, property );

src/renderers/common/nodes/Nodes.js

+38-2
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,49 @@ class Nodes extends DataMap {
199199

200200
getEnvironmentNode( scene ) {
201201

202-
return scene.environmentNode || this.get( scene ).environmentNode || null;
202+
let environmentNode = null;
203+
204+
if ( scene.environmentNode && scene.environmentNode.isNode ) {
205+
206+
environmentNode = scene.environmentNode;
207+
208+
} else {
209+
210+
const sceneData = this.get( scene );
211+
212+
if ( sceneData.environmentNode ) {
213+
214+
environmentNode = sceneData.environmentNode;
215+
216+
}
217+
218+
}
219+
220+
return environmentNode;
203221

204222
}
205223

206224
getBackgroundNode( scene ) {
207225

208-
return scene.backgroundNode || this.get( scene ).backgroundNode || null;
226+
let backgroundNode = null;
227+
228+
if ( scene.backgroundNode && scene.backgroundNode.isNode ) {
229+
230+
backgroundNode = scene.backgroundNode;
231+
232+
} else {
233+
234+
const sceneData = this.get( scene );
235+
236+
if ( sceneData.backgroundNode ) {
237+
238+
backgroundNode = sceneData.backgroundNode;
239+
240+
}
241+
242+
}
243+
244+
return backgroundNode;
209245

210246
}
211247

0 commit comments

Comments
 (0)