Skip to content

Commit 62b34dc

Browse files
authored
Merge pull request BabylonJS#4 from torchesburn/decal-map-uv-seam-fix
chore: formatting
2 parents 8d72eba + 9528e24 commit 62b34dc

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

packages/dev/core/src/Meshes/meshUVSpaceRenderer.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ export class MeshUVSpaceRenderer {
198198
// Create the diffuse render target texture if it doesn't exist
199199
if (!this.texture && !this._options.uvEdgeBlending && !this._decalTexture) {
200200
this._updateRTT();
201-
} else if(this.texture && !this._userCreatedTextureSetup && !this._options.uvEdgeBlending && !this._decalTexture) {
201+
} else if (this.texture && !this._userCreatedTextureSetup && !this._options.uvEdgeBlending && !this._decalTexture) {
202202
this._updateRTT();
203-
} else if(this.texture && !this._userCreatedTextureSetup && this._options.uvEdgeBlending && !this._decalTexture) {
203+
} else if (this.texture && !this._userCreatedTextureSetup && this._options.uvEdgeBlending && !this._decalTexture) {
204204
this._createDecalDiffuseRTT();
205-
} else if(!this.texture && this._options.uvEdgeBlending && !this._decalTexture) {
205+
} else if (!this.texture && this._options.uvEdgeBlending && !this._decalTexture) {
206206
this._createDecalDiffuseRTT();
207207
}
208208

@@ -214,7 +214,6 @@ export class MeshUVSpaceRenderer {
214214
const projectionMatrix = this._createProjectionMatrix(position, normal, size, angle);
215215
shader.setMatrix("projMatrix", projectionMatrix);
216216

217-
218217
if (!this._options.uvEdgeBlending) {
219218
if (this.texture instanceof RenderTargetTexture) {
220219
this.texture.render();
@@ -233,7 +232,7 @@ export class MeshUVSpaceRenderer {
233232
* Creates a texture RTT if one doesn't exist,
234233
*/
235234
_updateRTT() {
236-
if(!this.texture) {
235+
if (!this.texture) {
237236
this.texture = this._createRenderTargetTexture(this._options.width, this._options.height);
238237
} else {
239238
this._userCreatedTextureSetup = true;
@@ -356,12 +355,8 @@ export class MeshUVSpaceRenderer {
356355
texture.setMaterialForRendering(this._mesh, MeshUVSpaceRenderer._GetShader(this._scene));
357356

358357
this._decalTexture = texture;
359-
if(!this.texture) {
360-
this.texture = new RenderTargetTexture(
361-
this._mesh.name + "_finalUVSpaceTexture",
362-
{ width: this._options.width, height: this._options.height },
363-
this._scene,
364-
);
358+
if (!this.texture) {
359+
this.texture = new RenderTargetTexture(this._mesh.name + "_finalUVSpaceTexture", { width: this._options.width, height: this._options.height }, this._scene);
365360
this._textureCreatedInternally = true;
366361
}
367362
}

0 commit comments

Comments
 (0)