From ade30b7595d2b9f148ebec5d6b517c72c2eeada0 Mon Sep 17 00:00:00 2001 From: Georgy Shive Date: Wed, 21 May 2025 14:28:39 +0700 Subject: [PATCH] =?UTF-8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=80=D1=83=D1=81=D1=81=D0=BA=D0=B8=D0=B9=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20=D0=B8=20=D1=83=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D1=88=D0=B5=D0=BD=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80?= =?UTF-8?q?=D1=84=D0=B5=D0=B9=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Добавлен перевод элементов интерфейса и подсказок на русский язык - Обновлена обработка схемы классификации - Улучшена функциональность иерархического слайдера - Оптимизирована структура и организация боковой панели - Обновлены примеры с учетом новых возможностей --- examples/classifications.html | 8 ++++---- examples/resources/sorvilier.json | 2 +- src/materials/ClassificationScheme.js | 25 ++++++++++++------------ src/viewer/HierarchicalSlider.js | 5 +++-- src/viewer/sidebar.html | 9 ++++----- src/viewer/sidebar.js | 28 ++++++++++++++------------- 6 files changed, 40 insertions(+), 37 deletions(-) diff --git a/examples/classifications.html b/examples/classifications.html index 7ba6131f..9dfeb7b4 100644 --- a/examples/classifications.html +++ b/examples/classifications.html @@ -30,12 +30,12 @@
- - - - + + + +
diff --git a/examples/resources/sorvilier.json b/examples/resources/sorvilier.json index 32192106..0ade7681 100644 --- a/examples/resources/sorvilier.json +++ b/examples/resources/sorvilier.json @@ -18,7 +18,7 @@ "classification": { "0": { "visible": true, - "name": "никогда не классифицировано", + "name": "прежде не классифицировано", "color": [0.5, 0.5, 0.5, 1] }, "1": { diff --git a/src/materials/ClassificationScheme.js b/src/materials/ClassificationScheme.js index 63b58734..9ba1348c 100644 --- a/src/materials/ClassificationScheme.js +++ b/src/materials/ClassificationScheme.js @@ -4,18 +4,19 @@ import * as THREE from "../../libs/three.js/build/three.module.js"; export const ClassificationScheme = { DEFAULT: { - 0: { visible: true, name: 'never classified' , color: [0.5, 0.5, 0.5, 1.0] }, - 1: { visible: true, name: 'unclassified' , color: [0.5, 0.5, 0.5, 1.0] }, - 2: { visible: true, name: 'ground' , color: [0.63, 0.32, 0.18, 1.0] }, - 3: { visible: true, name: 'low vegetation' , color: [0.0, 1.0, 0.0, 1.0] }, - 4: { visible: true, name: 'medium vegetation' , color: [0.0, 0.8, 0.0, 1.0] }, - 5: { visible: true, name: 'high vegetation' , color: [0.0, 0.6, 0.0, 1.0] }, - 6: { visible: true, name: 'building' , color: [1.0, 0.66, 0.0, 1.0] }, - 7: { visible: true, name: 'low point(noise)' , color: [1.0, 0.0, 1.0, 1.0] }, - 8: { visible: true, name: 'key-point' , color: [1.0, 0.0, 0.0, 1.0] }, - 9: { visible: true, name: 'water' , color: [0.0, 0.0, 1.0, 1.0] }, - 12: { visible: true, name: 'overlap' , color: [1.0, 1.0, 0.0, 1.0] }, - DEFAULT: { visible: true, name: 'default' , color: [0.3, 0.6, 0.6, 0.5] }, + 0: { visible: true, name: 'ранее не классифицировано', color: [0.5, 0.5, 0.5, 1.0] }, + 1: { visible: true, name: 'не классифицировано', color: [0.5, 0.5, 0.5, 1.0] }, + 2: { visible: true, name: 'земля', color: [0.63, 0.32, 0.18, 1.0] }, + 3: { visible: true, name: 'низкая растительность', color: [0.0, 1.0, 0.0, 1.0] }, + 4: { visible: true, name: 'средняя растительность', color: [0.0, 0.8, 0.0, 1.0] }, + 5: { visible: true, name: 'высокая растительность', color: [0.0, 0.6, 0.0, 1.0] }, + 6: { visible: true, name: 'здания', color: [1.0, 0.66, 0.0, 1.0] }, + 7: { visible: true, name: 'шумовые точки', color: [1.0, 0.0, 1.0, 1.0] }, + 8: { visible: true, name: 'ключевые точки', color: [1.0, 0.0, 0.0, 1.0] }, + 9: { visible: true, name: 'вода', color: [0.0, 0.0, 1.0, 1.0] }, + 12: { visible: true, name: 'перекрытия', color: [1.0, 1.0, 0.0, 1.0] }, + DEFAULT: + { visible: true, name: 'по умолчанию', color: [0.3, 0.6, 0.6, 0.5] }, } }; diff --git a/src/viewer/HierarchicalSlider.js b/src/viewer/HierarchicalSlider.js index 414492e7..7acf7b52 100644 --- a/src/viewer/HierarchicalSlider.js +++ b/src/viewer/HierarchicalSlider.js @@ -75,7 +75,8 @@ export class HierarchicalSlider{ addLevel(){ const elLevel = document.createElement("li"); - const elRange = document.createTextNode("Range: "); + const elRange = document.createTextNode("Диапазон: "); + const label = document.createElement("span"); const slider = document.createElement("div"); @@ -153,7 +154,7 @@ export class HierarchicalSlider{ let [min, max] = $(slider).slider("option", "values"); let strMin = format(min); let strMax = format(max); - let strLabel = `${strMin} to ${strMax}`; + let strLabel = `от ${strMin} до ${strMax}`; label.innerHTML = strLabel; } diff --git a/src/viewer/sidebar.html b/src/viewer/sidebar.html index a6cfc08b..c4f541b3 100644 --- a/src/viewer/sidebar.html +++ b/src/viewer/sidebar.html @@ -1,15 +1,14 @@