добавлен русский перевод и улучшен интерфейс

- Добавлен перевод элементов интерфейса и подсказок на русский язык
- Обновлена обработка схемы классификации
- Улучшена функциональность иерархического слайдера
- Оптимизирована структура и организация боковой панели
- Обновлены примеры с учетом новых возможностей
This commit is contained in:
Georgy Shive 2025-05-21 14:28:39 +07:00
parent c306cffdc3
commit ade30b7595
6 changed files with 40 additions and 37 deletions

View File

@ -30,12 +30,12 @@
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');">
<span style="position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 10000">
<input type="button" value="Default Scheme" onclick="setDefaultScheme()"/>
<input type="button" value="Tree Scheme" onclick="setTreeScheme()"/>
<input type="button" value="Random Scheme" onclick="setRandomScheme()"/>
<input type="button" value="Схема по умолчанию" onclick="setDefaultScheme()"/>
<input type="button" value="Схема деревьев" onclick="setTreeScheme()"/>
<input type="button" value="Случайная схема" onclick="setRandomScheme()"/>
</span>
</div>
<div id="potree_sidebar_container"> </div>

View File

@ -18,7 +18,7 @@
"classification": {
"0": {
"visible": true,
"name": "никогда не классифицировано",
"name": "прежде не классифицировано",
"color": [0.5, 0.5, 0.5, 1]
},
"1": {

View File

@ -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] },
}
};

View File

@ -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;
}

View File

@ -1,15 +1,14 @@
<div id="sidebar_root" class="">
<div id="sidebar_header">
<span id="potree_branding" class="potree_sidebar_brand">
<a href="http://potree.org" target="_blank">potree.org</a>
<span style="margin: 0px 3px; color: #9AA1A4"> – </span>
<a href="https://github.com/potree/potree" target="_blank">github</a>
<a href="https://cybercode.pro/" target="_blank">КиберКод</a>
<span style="flex-grow: 1"></span>
<span id="potree_version_number" style="color: #9AA1A4; font-size: 80%; font-weight: 100"></span>
</span>
<div id="potree_languages" style="font-family:arial;"></div>
</div>
<div>
@ -22,7 +21,7 @@
<li><span data-i18n="appearance.nb_max_pts"></span>: <span id="lblPointBudget"></span> <div id="sldPointBudget"></div></li>
<li><span data-i18n="appearance.field_view"></span>: <span id="lblFOV"></span><div id="sldFOV"></div></li>
<div class="divider"><span>Eye-Dome освещение</span></div>
<div class="divider"><span>Обводка по глубине(EDL)</span></div>
<li>
<label>

View File

@ -910,7 +910,7 @@ export class Sidebar{
let onReturnNumberChanged = (event) => {
let [from, to] = this.viewer.filterReturnNumberRange;
lblReturnNumber[0].innerHTML = `${from} to ${to}`;
lblReturnNumber[0].innerHTML = `от ${from} до ${to}`;
sldReturnNumber.slider({values: [from, to]});
};
@ -935,7 +935,7 @@ export class Sidebar{
let onNumberOfReturnsChanged = (event) => {
let [from, to] = this.viewer.filterNumberOfReturnsRange;
lblNumberOfReturns[0].innerHTML = `${from} to ${to}`;
lblNumberOfReturns[0].innerHTML = `от ${from} до ${to}`;
sldNumberOfReturns.slider({values: [from, to]});
};
@ -1123,7 +1123,7 @@ export class Sidebar{
showInput: true,
preferredFormat: 'rgb',
cancelText: '',
chooseText: 'Apply',
chooseText: 'Применить',
move: color => {
let rgb = color.toRgb();
const c = [rgb.r / 255, rgb.g / 255, rgb.b / 255, 1];
@ -1142,12 +1142,13 @@ export class Sidebar{
const addToggleAllButton = () => { // toggle all button
const element = $(`
<li>
<label style="whitespace: nowrap">
<label style="white-space: nowrap">
<input id="toggleClassificationFilters" type="checkbox" checked/>
<span>show/hide all</span>
<span>Показать/скрыть всё</span>
</label>
</li>
`);
let elInput = element.find('input');
@ -1161,10 +1162,10 @@ export class Sidebar{
const addInvertButton = () => {
const element = $(`
<li>
<input type="button" value="invert" />
<input type="button" value="Инвертировать" />
</li>
`);
let elInput = element.find('input');
elInput.click( () => {
@ -1236,7 +1237,7 @@ export class Sidebar{
content.slideToggle();
});
});
/*
let languages = [
["RU", "ru"],
["EN", "en"],
@ -1259,8 +1260,7 @@ export class Sidebar{
elLanguages.append($(document.createTextNode(' - ')));
}
}
*/
// to close all, call
// $(".accordion > div").hide()
@ -1475,10 +1475,11 @@ export class Sidebar{
let elCameraProjection = $(`
<selectgroup id="camera_projection_options">
<option id="camera_projection_options_perspective" value="PERSPECTIVE">Perspective</option>
<option id="camera_projection_options_orthigraphic" value="ORTHOGRAPHIC">Orthographic</option>
<option id="camera_projection_options_perspective" value="PERSPECTIVE">С глубиной</option>
<option id="camera_projection_options_orthographic" value="ORTHOGRAPHIC">Без глубины</option>
</selectgroup>
`);
elNavigation.append(elCameraProjection);
elCameraProjection.selectgroup({ title: "Проекция камеры" });
@ -1536,7 +1537,8 @@ export class Sidebar{
{
let elSplatQuality = $("#splat_quality_options");
elSplatQuality.selectgroup({title: "Splat Quality"});
elSplatQuality.selectgroup({ title: "Качество точек" });
elSplatQuality.find("input").click( (e) => {
if(e.target.value === "standard"){