From 70cc1f06c30628b0231139b3b88973df346c3cef Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:47:43 -0500 Subject: [PATCH 1/3] Read points --- core/frontend/src/tile/GltfReader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/frontend/src/tile/GltfReader.ts b/core/frontend/src/tile/GltfReader.ts index 29f246b708e1..944b8487a058 100644 --- a/core/frontend/src/tile/GltfReader.ts +++ b/core/frontend/src/tile/GltfReader.ts @@ -1251,7 +1251,7 @@ export abstract class GltfReader { protected readMeshPrimitive(primitive: GltfMeshPrimitive, featureTable?: FeatureTable, pseudoRtcBias?: Vector3d): GltfPrimitiveData | undefined { const meshMode = JsonUtils.asInt(primitive.mode, GltfMeshMode.Triangles); - if (meshMode === GltfMeshMode.Points /* && !this._vertexTableRequired */) { + if (meshMode === GltfMeshMode.Points && !this._vertexTableRequired) { const pointCloud = this.readPointCloud2(primitive, undefined !== featureTable); if (pointCloud) return pointCloud; From 27078da02751c849b2a4e93f1b6881c70a88620f Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:48:53 -0500 Subject: [PATCH 2/3] no-sandbox --- test-apps/display-test-app/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-apps/display-test-app/package.json b/test-apps/display-test-app/package.json index e1c57f153795..58c67e57ef08 100644 --- a/test-apps/display-test-app/package.json +++ b/test-apps/display-test-app/package.json @@ -19,7 +19,9 @@ "lint-fix": "eslint --fix -f visualstudio \"./src/**/*.ts\" 1>&2", "lint-deprecation": "", "start": "cross-env NODE_ENV=development run-p start:webserver start:electron", + "start-no-sandbox": "cross-env NODE_ENV=development run-p start:webserver start:electron-no-sandbox", "start:electron": "electron ./lib/backend/DtaElectronMain.js --inspect --remote-debugging-port=9223", + "start:electron-no-sandbox": "electron ./lib/backend/DtaElectronMain.js --inspect --remote-debugging-port=9223 --no-sandbox", "start:webserver": "cross-env NODE_ENV=development vite", "start:mobile": "cross-env NODE_ENV=development vite --host", "start:backend": "node --max-http-header-size=16000 lib/backend/WebMain.js", From 2145a98ba845bb2b23f63ca23cf8796a41c0e891 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 16 Dec 2025 15:06:45 -0500 Subject: [PATCH 3/3] implement line style --- core/frontend/src/common/gltf/GltfSchema.ts | 4 +++- core/frontend/src/tile/GltfReader.ts | 24 ++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/core/frontend/src/common/gltf/GltfSchema.ts b/core/frontend/src/common/gltf/GltfSchema.ts index 74dcb7ad2c94..8d9bc148c7ae 100644 --- a/core/frontend/src/common/gltf/GltfSchema.ts +++ b/core/frontend/src/common/gltf/GltfSchema.ts @@ -495,7 +495,9 @@ export interface Gltf2Material extends GltfChildOfRootProperty { doubleSided?: boolean; extensions?: GltfExtensions & { // eslint-disable-next-line @typescript-eslint/naming-convention - BENTLEY_materials_point_style?: { diameter: number }; + BENTLEY_materials_point_style?: { diameter: number; }; + // eslint-disable-next-line @typescript-eslint/naming-convention + BENTLEY_materials_line_style?: { width?: number; pattern?: number; }; /** The [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) extension * indicates that the material should be displayed without lighting. The extension adds no additional properties; it is effectively a boolean flag. */ diff --git a/core/frontend/src/tile/GltfReader.ts b/core/frontend/src/tile/GltfReader.ts index 944b8487a058..ebdd517d7ef1 100644 --- a/core/frontend/src/tile/GltfReader.ts +++ b/core/frontend/src/tile/GltfReader.ts @@ -1191,14 +1191,28 @@ export abstract class GltfReader { } let width = 1; - if (isPointPrimitive && !isGltf1Material(material)) { - const pointStyle = material.extensions?.BENTLEY_materials_point_style; - if (pointStyle && pointStyle.diameter > 0 && Math.floor(pointStyle.diameter) === pointStyle.diameter) { - width = pointStyle.diameter; + let pattern = LinePixels.Solid; + if (!isGltf1Material(material)) { + if (isPointPrimitive) { + const pointStyle = material.extensions?.BENTLEY_materials_point_style; + if (pointStyle && pointStyle.diameter > 0 && Math.floor(pointStyle.diameter) === pointStyle.diameter) { + width = pointStyle.diameter; + } + } else { + const lineStyle = material.extensions?.BENTLEY_materials_line_style; + if (lineStyle) { + if (lineStyle.width && Math.floor(lineStyle.width) === lineStyle.width) { + width = lineStyle.width; + } + + if (undefined !== lineStyle.pattern) { + pattern = (lineStyle.pattern | (lineStyle.pattern << 16)) >>> 0; + } + } } } - return new DisplayParams(DisplayParams.Type.Mesh, color, color, width, LinePixels.Solid, FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping); + return new DisplayParams(DisplayParams.Type.Mesh, color, color, width, pattern, FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping); } private readMeshPrimitives(node: GltfNode, featureTable?: FeatureTable, thisTransform?: Transform, thisBias?: Vector3d, instances?: InstancedGraphicParams): GltfPrimitiveData[] {