Skip to content

Commit 27f9d37

Browse files
author
Samuel Rigaud
committed
Doc: Improve material displacementBias description
1 parent 0e8894c commit 27f9d37

15 files changed

+85
-56
lines changed

docs/api/en/materials/MeshDepthMaterial.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ <h3>[property:Float displacementScale]</h3>
8787
<h3>[property:Float displacementBias]</h3>
8888
<p>
8989
The offset of the displacement map's values on the mesh's vertices.
90-
Without a displacement map set, this value is not applied. Default is `0`.
90+
Without a displacement map set, this value is not applied. The formula is
91+
`position * displacementScale + displacementBias` so the bias is added
92+
after the scaling. Default is `0`.
9193
</p>
9294

9395
<h3>[property:Texture map]</h3>
9496
<p>
9597
The color map. May optionally include an alpha channel, typically combined
96-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
98+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
9799
Default is null.
98100
</p>
99101

@@ -108,7 +110,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
108110
Controls wireframe thickness. Default is `1`.<br /><br />
109111

110112
Due to limitations of the
111-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
113+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
112114
with the [page:WebGLRenderer WebGL] renderer on most platforms linewidth will always be `1` regardless of the set value.
113115
</p>
114116

docs/api/en/materials/MeshDistanceMaterial.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ <h3>[property:Float displacementScale]</h3>
8888
<h3>[property:Float displacementBias]</h3>
8989
<p>
9090
The offset of the displacement map's values on the mesh's vertices.
91-
Without a displacement map set, this value is not applied. Default is `0`.
91+
Without a displacement map set, this value is not applied. The formula is
92+
`position * displacementScale + displacementBias` so the bias is added
93+
after the scaling. Default is `0`.
9294
</p>
9395

9496
<h3>[property:Texture map]</h3>
9597
<p>
9698
The color map. May optionally include an alpha channel, typically combined
97-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
99+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
98100
Default is null.
99101
</p>
100102

docs/api/en/materials/MeshLambertMaterial.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ <h3>[property:Float displacementScale]</h3>
141141
<h3>[property:Float displacementBias]</h3>
142142
<p>
143143
The offset of the displacement map's values on the mesh's vertices.
144-
Without a displacement map set, this value is not applied. Default is `0`.
144+
Without a displacement map set, this value is not applied. The formula is
145+
`position * displacementScale + displacementBias` so the bias is added
146+
after the scaling. Default is `0`.
145147
</p>
146148

147149
<h3>[property:Color emissive]</h3>
@@ -192,7 +194,7 @@ <h3>[property:Float lightMapIntensity]</h3>
192194
<h3>[property:Texture map]</h3>
193195
<p>
194196
The color map. May optionally include an alpha channel, typically combined
195-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
197+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
196198
Default is null.
197199
</p>
198200

@@ -230,7 +232,7 @@ <h3>[property:Float refractionRatio]</h3>
230232
<p>
231233
The index of refraction (IOR) of air (approximately 1) divided by the
232234
index of refraction of the material. It is used with environment mapping
233-
modes [page:Textures THREE.CubeRefractionMapping] and [page:Textures THREE.EquirectangularRefractionMapping].
235+
modes [page:Textures THREE.CubeRefractionMapping] and [page:Textures THREE.EquirectangularRefractionMapping].
234236
The refraction ratio should not
235237
exceed `1`. Default is `0.98`.
236238
</p>
@@ -250,7 +252,7 @@ <h3>[property:String wireframeLinecap]</h3>
250252
"square". Default is 'round'.<br /><br />
251253

252254
This corresponds to the
253-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
255+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
254256
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
255257
</p>
256258

@@ -260,7 +262,7 @@ <h3>[property:String wireframeLinejoin]</h3>
260262
"miter". Default is 'round'.<br /><br />
261263

262264
This corresponds to the
263-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
265+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
264266
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
265267
</p>
266268

@@ -269,7 +271,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
269271
Controls wireframe thickness. Default is `1`.<br /><br />
270272

271273
Due to limitations of the
272-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
274+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
273275
with the [page:WebGLRenderer WebGL] renderer on most
274276
platforms linewidth will always be `1` regardless of the set value.
275277
</p>

docs/api/en/materials/MeshMatcapMaterial.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ <h3>[property:Float displacementScale]</h3>
109109
<h3>[property:Float displacementBias]</h3>
110110
<p>
111111
The offset of the displacement map's values on the mesh's vertices.
112-
Without a displacement map set, this value is not applied. Default is `0`.
112+
Without a displacement map set, this value is not applied. The formula is
113+
`position * displacementScale + displacementBias` so the bias is added
114+
after the scaling. Default is `0`.
113115
</p>
114116

115117
<h3>[property:Boolean flatShading]</h3>
@@ -124,7 +126,7 @@ <h3>[property:Boolean fog]</h3>
124126
<h3>[property:Texture map]</h3>
125127
<p>
126128
The color map. May optionally include an alpha channel, typically combined
127-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
129+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
128130
Default is null. The texture map color is modulated by the
129131
diffuse [page:.color].
130132
</p>

docs/api/en/materials/MeshNormalMaterial.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ <h3>[property:Float displacementScale]</h3>
8181
<h3>[property:Float displacementBias]</h3>
8282
<p>
8383
The offset of the displacement map's values on the mesh's vertices.
84-
Without a displacement map set, this value is not applied. Default is `0`.
84+
Without a displacement map set, this value is not applied. The formula is
85+
`position * displacementScale + displacementBias` so the bias is added
86+
after the scaling. Default is `0`.
8587
</p>
8688

8789
<h3>[property:Boolean flatShading]</h3>
@@ -125,7 +127,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
125127
Controls wireframe thickness. Default is `1`.<br /><br />
126128

127129
Due to limitations of the
128-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
130+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
129131
with the [page:WebGLRenderer WebGL] renderer on most
130132
platforms linewidth will always be `1` regardless of the set value.
131133
</p>

docs/api/en/materials/MeshPhongMaterial.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ <h3>[property:Float displacementScale]</h3>
139139
<h3>[property:Float displacementBias]</h3>
140140
<p>
141141
The offset of the displacement map's values on the mesh's vertices.
142-
Without a displacement map set, this value is not applied. Default is `0`.
142+
Without a displacement map set, this value is not applied. The formula is
143+
`position * displacementScale + displacementBias` so the bias is added
144+
after the scaling. Default is `0`.
143145
</p>
144146

145147
<h3>[property:Color emissive]</h3>
@@ -190,7 +192,7 @@ <h3>[property:Float lightMapIntensity]</h3>
190192
<h3>[property:Texture map]</h3>
191193
<p>
192194
The color map. May optionally include an alpha channel, typically combined
193-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
195+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
194196
Default is null. The texture map color is modulated by the
195197
diffuse [page:.color].
196198
</p>
@@ -230,7 +232,7 @@ <h3>[property:Float refractionRatio]</h3>
230232
<p>
231233
The index of refraction (IOR) of air (approximately 1) divided by the
232234
index of refraction of the material. It is used with environment mapping
233-
modes [page:Textures THREE.CubeRefractionMapping] and [page:Textures THREE.EquirectangularRefractionMapping].
235+
modes [page:Textures THREE.CubeRefractionMapping] and [page:Textures THREE.EquirectangularRefractionMapping].
234236
The refraction ratio should not exceed `1`. Default is `0.98`.
235237
</p>
236238

@@ -267,7 +269,7 @@ <h3>[property:String wireframeLinecap]</h3>
267269
"square". Default is 'round'.<br /><br />
268270

269271
This corresponds to the
270-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
272+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
271273
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
272274
</p>
273275

@@ -277,7 +279,7 @@ <h3>[property:String wireframeLinejoin]</h3>
277279
"miter". Default is 'round'.<br /><br />
278280

279281
This corresponds to the
280-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
282+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
281283
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
282284
</p>
283285

@@ -286,7 +288,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
286288
Controls wireframe thickness. Default is `1`.<br /><br />
287289

288290
Due to limitations of the
289-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
291+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
290292
with the [page:WebGLRenderer WebGL] renderer on most
291293
platforms linewidth will always be `1` regardless of the set value.
292294
</p>

docs/api/en/materials/MeshStandardMaterial.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1>[name]</h1>
3232
being somewhat more computationally expensive. [name] uses per-fragment
3333
shading.<br /><br />
3434

35-
Note that for best results you should always specify an [page:.envMap environment map]
35+
Note that for best results you should always specify an [page:.envMap environment map]
3636
when using this material.<br /><br />
3737

3838
For a non-technical introduction to the concept of PBR and how to set up a
@@ -50,7 +50,7 @@ <h1>[name]</h1>
5050
<p>
5151
Technical details of the approach used in three.js (and most other PBR
5252
systems) can be found is this
53-
[link:https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf paper from Disney]
53+
[link:https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf paper from Disney]
5454
(pdf), by Brent Burley.
5555
</p>
5656

@@ -165,9 +165,10 @@ <h3>[property:Float displacementScale]</h3>
165165
<h3>[property:Float displacementBias]</h3>
166166
<p>
167167
The offset of the displacement map's values on the mesh's vertices.
168-
Without a displacement map set, this value is not applied. Default is `0`.
168+
Without a displacement map set, this value is not applied. The formula is
169+
`position * displacementScale + displacementBias` so the bias is added
170+
after the scaling. Default is `0`.
169171
</p>
170-
171172
<h3>[property:Color emissive]</h3>
172173
<p>
173174
Emissive (light) color of the material, essentially a solid color
@@ -226,7 +227,7 @@ <h3>[property:Float lightMapIntensity]</h3>
226227
<h3>[property:Texture map]</h3>
227228
<p>
228229
The color map. May optionally include an alpha channel, typically combined
229-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
230+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
230231
Default is null. The texture map color is modulated by the diffuse [page:.color].
231232
</p>
232233

@@ -293,7 +294,7 @@ <h3>[property:String wireframeLinecap]</h3>
293294
"square". Default is 'round'.<br /><br />
294295

295296
This corresponds to the
296-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
297+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
297298
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
298299
</p>
299300

@@ -303,7 +304,7 @@ <h3>[property:String wireframeLinejoin]</h3>
303304
"miter". Default is 'round'.<br /><br />
304305

305306
This corresponds to the
306-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
307+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
307308
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
308309
</p>
309310

@@ -312,7 +313,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
312313
Controls wireframe thickness. Default is `1`.<br /><br />
313314

314315
Due to limitations of the
315-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
316+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
316317
with the [page:WebGLRenderer WebGL] renderer on most
317318
platforms linewidth will always be `1` regardless of the set value.
318319
</p>

docs/api/en/materials/MeshToonMaterial.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ <h3>[property:Float displacementScale]</h3>
121121
<h3>[property:Float displacementBias]</h3>
122122
<p>
123123
The offset of the displacement map's values on the mesh's vertices.
124-
Without a displacement map set, this value is not applied. Default is `0`.
124+
Without a displacement map set, this value is not applied. The formula is
125+
`position * displacementScale + displacementBias` so the bias is added
126+
after the scaling. Default is `0`.
125127
</p>
126128

127129
<h3>[property:Color emissive]</h3>
@@ -150,7 +152,7 @@ <h3>[property:Boolean fog]</h3>
150152
<h3>[property:Texture gradientMap]</h3>
151153
<p>
152154
Gradient map for toon shading. It's required to set
153-
[page:Texture.minFilter] and [page:Texture.magFilter] to [page:Textures THREE.NearestFilter]
155+
[page:Texture.minFilter] and [page:Texture.magFilter] to [page:Textures THREE.NearestFilter]
154156
when using this type of texture. Default is `null`.
155157
</p>
156158

@@ -165,7 +167,7 @@ <h3>[property:Float lightMapIntensity]</h3>
165167
<h3>[property:Texture map]</h3>
166168
<p>
167169
The color map. May optionally include an alpha channel, typically combined
168-
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
170+
with [page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest].
169171
Default is null. The texture map color is modulated by the diffuse [page:.color].
170172
</p>
171173

@@ -205,7 +207,7 @@ <h3>[property:String wireframeLinecap]</h3>
205207
"square". Default is 'round'.<br /><br />
206208

207209
This corresponds to the
208-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
210+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
209211
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
210212
</p>
211213

@@ -215,7 +217,7 @@ <h3>[property:String wireframeLinejoin]</h3>
215217
"miter". Default is 'round'.<br /><br />
216218

217219
This corresponds to the
218-
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
220+
[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
219221
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
220222
</p>
221223

@@ -224,7 +226,7 @@ <h3>[property:Float wireframeLinewidth]</h3>
224226
Controls wireframe thickness. Default is `1`.<br /><br />
225227

226228
Due to limitations of the
227-
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
229+
[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
228230
with the [page:WebGLRenderer WebGL] renderer on most
229231
platforms linewidth will always be `1` regardless of the set value.
230232
</p>

docs/api/fr/materials/MeshDepthMaterial.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ <h3>[property:Texture displacementMap]</h3>
6868
<h3>[property:Float displacementScale]</h3>
6969
<p>
7070
Dans quelle mesure la carte de déplacement affecte le maillage (où le noir n'est pas un déplacement,
71-
et le blanc est le déplacement maximal). Sans ensemble de cartes de déplacement, cette valeur n'est pas appliquée.
72-
La valeur par défaut est 1.
71+
et le blanc est le déplacement maximal). Sans carte de déplacement, cette valeur n'est pas appliquée.
72+
La valeur par défaut est `1`.
7373
</p>
7474

7575
<h3>[property:Float displacementBias]</h3>
7676
<p>
7777
Le décalage des valeurs de la carte de déplacement sur les sommets du maillage.
78-
Sans ensemble de cartes de déplacement, cette valeur n'est pas appliquée. La valeur par défaut est 0.
78+
Sans carte de déplacement, cette valeur n'est pas appliquée. La formule est
79+
`position * displacementScale + displacementBias` donc le biais est ajouté
80+
après la mise à l'échelle. La valeur par défaut est `0`.
7981
</p>
8082

8183
<h3>[property:Texture map]</h3>

docs/api/fr/materials/MeshDistanceMaterial.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ <h3>[property:Texture displacementMap]</h3>
7474
<h3>[property:Float displacementScale]</h3>
7575
<p>
7676
Dans quelle mesure la carte de déplacement affecte le maillage (où le noir n'est pas un déplacement,
77-
et le blanc est le déplacement maximal). Sans ensemble de cartes de déplacement, cette valeur n'est pas appliquée.
78-
La valeur par défaut est 1.
77+
et le blanc est le déplacement maximal). Sans carte de déplacement, cette valeur n'est pas appliquée.
78+
La valeur par défaut est `1`.
7979
</p>
8080

8181
<h3>[property:Float displacementBias]</h3>
8282
<p>
8383
Le décalage des valeurs de la carte de déplacement sur les sommets du maillage.
84-
Sans ensemble de cartes de déplacement, cette valeur n'est pas appliquée. La valeur par défaut est 0.
84+
Sans carte de déplacement, cette valeur n'est pas appliquée. La formule est
85+
`position * displacementScale + displacementBias` donc le biais est ajouté
86+
après la mise à l'échelle. La valeur par défaut est `0`.
8587
</p>
8688

8789
<h3>[property:Texture map]</h3>

0 commit comments

Comments
 (0)