Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pcdeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class PCDEditor {

// Edit menu
const surfaceGridInput = this.qs('#surfaceGrid')
const voxelGridResInput = this.qs('#voxelGridRes')
const labelIdInput = this.qs('#labelID')

this.qs('#undo').onclick = () =>
Expand All @@ -228,6 +229,10 @@ class PCDEditor {
const grid = surfaceGridInput.value
pcdeditor.command(`add_surface ${grid}`).catch(this.logger)
}
this.qs('#voxelGrid').onclick = () => {
const res = voxelGridResInput.value
pcdeditor.command(`voxel_grid ${res}`).catch(this.logger)
}
this.qs('#unsetLabel').onclick = () =>
pcdeditor.command('label 0').catch(this.logger)
this.qs('#setLabel').onclick = () => {
Expand Down Expand Up @@ -781,6 +786,21 @@ class PCDEditor {
<button id="${id('createSurface')}">Create surface</button>
</div>
<hr/>
<div class="${id('foldMenuElem')}">
<div class="${id('foldMenuElem')}">
<label
for="${id('voxelGridRes')}"
class="${id('inputLabelShort')}"
>Grid</label>
<input
id="${id('voxelGridRes')}"
type="number" value="0.05" min="0.01" step="0.01" max="1"
style="width: 4em; text-align: center;"
/>
</div>
<button id="${id('voxelGrid')}">Reduce points</button>
</div>
<hr/>
<div class="${id('foldMenuElem')}">
<label class="${id('inputLabel')}">Label</label>
<div class="${id('foldMenuElem')}">
Expand Down
Loading