From 17262a82e4039c7bb55a7dcb6979208444adff62 Mon Sep 17 00:00:00 2001 From: Carolina Date: Tue, 10 May 2022 17:11:31 -0300 Subject: [PATCH 1/3] Add a warning when using ignored options with Dashed Lines update. --- packages/dev/core/src/Meshes/Builders/linesBuilder.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts index 0d70fce51a5..e2b01f1dd53 100644 --- a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts @@ -7,6 +7,7 @@ import type { FloatArray, Nullable } from "../../types"; import { LinesMesh } from "../../Meshes/linesMesh"; import type { Scene } from "../../scene"; import { VertexBuffer } from "../../Buffers/buffer"; +import { Tools } from "../../Misc"; declare type Material = import("../../Materials/material").Material; @@ -302,6 +303,9 @@ export function CreateDashedLines( p += 3; } }; + if (options.dashNb || options.dashSize || options.gapSize || options.useVertexAlpha || options.material) { + Tools.Warn("You have used an option other than points with the instance option. Please be aware that these other options will be ignored."); + } instance.updateMeshPositions(positionFunction, false); return instance; } From ef7f762999a931ee2ff8fc9130ba5209595000bc Mon Sep 17 00:00:00 2001 From: Carolina Date: Wed, 11 May 2022 13:21:20 -0300 Subject: [PATCH 2/3] fix import --- packages/dev/core/src/Meshes/Builders/linesBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts index e2b01f1dd53..43940a7f5db 100644 --- a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts @@ -7,7 +7,7 @@ import type { FloatArray, Nullable } from "../../types"; import { LinesMesh } from "../../Meshes/linesMesh"; import type { Scene } from "../../scene"; import { VertexBuffer } from "../../Buffers/buffer"; -import { Tools } from "../../Misc"; +import { Tools } from "../../Misc/tools"; declare type Material = import("../../Materials/material").Material; From 22382ac8675b983ead1e63ec363e22ec35f6c208 Mon Sep 17 00:00:00 2001 From: Carolina Herbster Date: Thu, 12 May 2022 09:37:42 -0300 Subject: [PATCH 3/3] swap tools for logger --- packages/dev/core/src/Meshes/Builders/linesBuilder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts index 43940a7f5db..f960992939e 100644 --- a/packages/dev/core/src/Meshes/Builders/linesBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/linesBuilder.ts @@ -7,7 +7,7 @@ import type { FloatArray, Nullable } from "../../types"; import { LinesMesh } from "../../Meshes/linesMesh"; import type { Scene } from "../../scene"; import { VertexBuffer } from "../../Buffers/buffer"; -import { Tools } from "../../Misc/tools"; +import { Logger } from "../../Misc/logger"; declare type Material = import("../../Materials/material").Material; @@ -304,7 +304,7 @@ export function CreateDashedLines( } }; if (options.dashNb || options.dashSize || options.gapSize || options.useVertexAlpha || options.material) { - Tools.Warn("You have used an option other than points with the instance option. Please be aware that these other options will be ignored."); + Logger.Warn("You have used an option other than points with the instance option. Please be aware that these other options will be ignored."); } instance.updateMeshPositions(positionFunction, false); return instance;