Enable measure tool.

This commit is contained in:
kovacsv 2022-03-05 18:04:12 +01:00
parent 74342d1fd3
commit 9dda077063
8 changed files with 10 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -1,5 +1,4 @@
export const FeatureSet =
{
MeasureTool : false,
EnvironmentMap : false
};

View File

@ -15,7 +15,7 @@ function GetFaceWorldNormal (intersection)
function CreateMaterial ()
{
return new THREE.LineBasicMaterial ({
color : 0x000000,
color : 0x263238,
depthTest : false
});
}

View File

@ -19,7 +19,6 @@ import { HasDefaultMaterial, ReplaceDefaultMaterialColor } from '../engine/model
import { Direction } from '../engine/geometry/geometry.js';
import { CookieGetBoolVal, CookieSetBoolVal } from './cookiehandler.js';
import { ShadingType } from '../engine/threejs/threeutils.js';
import { FeatureSet } from './featureset.js';
import { MeasureTool } from './measuretool.js';
export const WebsiteUIState =
@ -567,15 +566,13 @@ export class Website
this.viewer.SetFixUpVector (false);
}
});
if (FeatureSet.MeasureTool) {
AddSeparator (this.toolbar, ['only_full_width', 'only_on_model']);
let measureToolButton = AddPushButton (this.toolbar, 'measure', 'Measure', ['only_full_width', 'only_on_model'], (isSelected) => {
HandleEvent ('measure_tool_activated', isSelected ? 'on' : 'off');
this.navigator.SetSelection (null);
this.measureTool.SetActive (isSelected);
});
this.measureTool.SetButton (measureToolButton);
}
AddSeparator (this.toolbar, ['only_full_width', 'only_on_model']);
let measureToolButton = AddPushButton (this.toolbar, 'measure', 'Measure', ['only_full_width', 'only_on_model'], (isSelected) => {
HandleEvent ('measure_tool_activated', isSelected ? 'on' : 'off');
this.navigator.SetSelection (null);
this.measureTool.SetActive (isSelected);
});
this.measureTool.SetButton (measureToolButton);
AddSeparator (this.toolbar, ['only_full_width', 'only_on_model']);
AddButton (this.toolbar, 'export', 'Export model', ['only_full_width', 'only_on_model'], () => {
let exportDialog = new ExportDialog ({

Binary file not shown.

View File

@ -1,6 +1,6 @@
@font-face {
font-family: "O3DVIcons";
src: url("O3DVIcons/O3DVIcons.woff?43ee2533396d2125f154730cabd87b6e") format("woff");
src: url("O3DVIcons/O3DVIcons.woff?8e8ff80e3f2f51d21873c070a35e0f3c") format("woff");
}
i[class^="icon-"]:before, i[class*=" icon-"]:before {

Binary file not shown.

View File

@ -1,6 +1,6 @@
@font-face {
font-family: "O3DVIcons";
src: url("./O3DVIcons.woff?43ee2533396d2125f154730cabd87b6e") format("woff");
src: url("./O3DVIcons.woff?8e8ff80e3f2f51d21873c070a35e0f3c") format("woff");
}
i[class^="icon-"]:before, i[class*=" icon-"]:before {