fixing bugs and updating examples
This commit is contained in:
parent
28b8765045
commit
889a7d2f34
@ -63,14 +63,14 @@
|
||||
viewer.scene.addPointCloud(e.pointcloud);
|
||||
e.pointcloud.position.z = 0;
|
||||
let material = e.pointcloud.material;
|
||||
material.size = 1;
|
||||
material.pointSizeType = Potree.PointSizeType.FIXED;
|
||||
material.activeAttributeName = "classification";
|
||||
material.size = 0.8;
|
||||
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
material.activeAttributeName = "RGBA";
|
||||
|
||||
viewer.scene.view.position.set(694991.9150582966, 3916274.3733733483, 76.41774609890476);
|
||||
viewer.scene.view.lookAt(694878.4097257275, 3916332.0674868184, 14.497470898558227);
|
||||
|
||||
//viewer.fitToScreen();
|
||||
viewer.scene.view.setView(
|
||||
[694517.403, 3899262.595, 10642.698],
|
||||
[694878.410, 3916332.067, 14.497],
|
||||
);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -51,13 +51,13 @@
|
||||
<img src="examples/thumbnails/lion_las.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
<a href="lion_laz.html" target="_blank">
|
||||
<a href="ept.html" target="_blank">
|
||||
<img src="examples/thumbnails/lion_las.png" width="100%" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Toolbar</th><th>Basic Viewer</th><th>Heidentor</th><th>Lion</th><th>Lion LAS</th><th>Lion LAZ</th>
|
||||
<th>Toolbar</th><th>Basic Viewer</th><th>Heidentor</th><th>Lion</th><th>Lion LAS</th><th>EPT</th>
|
||||
</tr><tr>
|
||||
<td>
|
||||
<a href="ca13.html" target="_blank">
|
||||
@ -80,19 +80,15 @@
|
||||
<img src="examples/thumbnails/meshes.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
<a href="lines.html" target="_blank">
|
||||
<img src="examples/thumbnails/lines.png" width="100%" />
|
||||
<a href="multiple_pointclouds.html" target="_blank">
|
||||
<img src="examples/thumbnails/multiple_point_clouds.png" width="100%" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>CA13</th><th>Clipping Volume</th><th>Elevation Profile</th><th>Measurements</th><th>Meshes</th><th>Lines</th>
|
||||
<th>CA13</th><th>Clipping Volume</th><th>Elevation Profile</th><th>Measurements</th><th>Meshes</th><th>Multiple Point Clouds</th>
|
||||
</tr><tr>
|
||||
<td>
|
||||
<a href="multiple_pointclouds.html" target="_blank">
|
||||
<img src="examples/thumbnails/multiple_point_clouds.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
<a href="features_sorvilier.html" target="_blank">
|
||||
<img src="examples/thumbnails/features_sorvilier.png" width="100%" />
|
||||
</a>
|
||||
@ -112,16 +108,16 @@
|
||||
<a href="animation_paths.html" target="_blank">
|
||||
<img src="examples/thumbnails/animation_paths.png" width="100%" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Multiple Point Clouds</th><th>Features (Sorvilier)</th><th>Features (CA13)</th><th>Annotations</th><th>Hierarchical Annotations</th><th>Animation Path</th>
|
||||
</tr><tr>
|
||||
<td>
|
||||
</td><td>
|
||||
<a href="shapefiles.html" target="_blank">
|
||||
<img src="examples/thumbnails/shapefiles.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Features (Sorvilier)</th><th>Features (CA13)</th><th>Annotations</th><th>Hierarchical Annotations</th><th>Animation Path</th><th>Shapefiles</th>
|
||||
</tr><tr>
|
||||
<td>
|
||||
<a href="cesium_ca13.html" target="_blank">
|
||||
<img src="examples/thumbnails/cesium_ca13.png" width="100%" />
|
||||
</a>
|
||||
@ -141,26 +137,18 @@
|
||||
<a href="embedded_iframe.html" target="_blank">
|
||||
<img src="examples/thumbnails/embedded_iframe.png" width="100%" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Shapefiles</th><th>Cesium CA13</th><th>Cesium Retz</th><th>Cesium Sorvilier</th><th>Custom Sidebar Section</th><th>Embedded Iframe</th>
|
||||
</tr><tr>
|
||||
<td>
|
||||
</td><td>
|
||||
<a href="gradient_colors.html" target="_blank">
|
||||
<img src="examples/thumbnails/gradient_colors.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
<a href="light_animated.html" target="_blank">
|
||||
<img src="examples/thumbnails/light_animated.png" width="100%" />
|
||||
</a>
|
||||
</td><td>
|
||||
<a href="light_ca13.html" target="_blank">
|
||||
<img src="examples/thumbnails/light_ca13.png" width="100%" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gradient Colors</th><th>Animated Light</th><th>Light CA13</th>
|
||||
<th>Cesium CA13</th><th>Cesium Retz</th><th>Cesium Sorvilier</th><th>Custom Sidebar Section</th><th>Embedded Iframe</th><th>Gradient Colors</th>
|
||||
</tr><tr>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
@ -59,7 +59,7 @@
|
||||
viewer.setMinNodeSize(0);
|
||||
viewer.loadSettingsFromURL();
|
||||
|
||||
viewer.setDescription("");
|
||||
viewer.setDescription(`Heidentor point cloud courtesy of <a href="http://archpro.lbg.ac.at/" target="_blank">Ludwig Boltzmann Institute - Archeological Prospection and Virtual Archeology</a> (26M points)`);
|
||||
|
||||
viewer.loadGUI(() => {
|
||||
viewer.setLanguage('en');
|
||||
|
||||
@ -12,14 +12,13 @@
|
||||
{"thumb": "thumbnails/heidentor.png", "label": "Heidentor", "url": "heidentor.html"},
|
||||
{"thumb": "thumbnails/lion.png", "label": "Lion", "url": "lion.html"},
|
||||
{"thumb": "thumbnails/lion_las.png", "label": "Lion LAS", "url": "lion_las.html"},
|
||||
{"thumb": "thumbnails/lion_las.png", "label": "Lion LAZ", "url": "lion_laz.html"},
|
||||
{"thumb": "thumbnails/lion_las.png", "label": "EPT", "url": "ept.html"},
|
||||
{"thumb": "thumbnails/ca13.png", "label": "CA13", "url": "ca13.html"},
|
||||
|
||||
{"thumb": "thumbnails/clipping_volume.png", "label": "Clipping Volume", "url": "clipping_volume.html"},
|
||||
{"thumb": "thumbnails/elevation_profile.png", "label": "Elevation Profile", "url": "elevation_profile.html"},
|
||||
{"thumb": "thumbnails/measurements.png", "label": "Measurements", "url": "measurements.html"},
|
||||
{"thumb": "thumbnails/meshes.png", "label": "Meshes", "url": "meshes.html"},
|
||||
{"thumb": "thumbnails/lines.png", "label": "Lines", "url": "lines.html"},
|
||||
{"thumb": "thumbnails/multiple_point_clouds.png", "label": "Multiple Point Clouds", "url": "multiple_pointclouds.html"},
|
||||
|
||||
{"thumb": "thumbnails/features_sorvilier.png", "label": "Features (Sorvilier)", "url": "features_sorvilier.html"},
|
||||
@ -34,9 +33,7 @@
|
||||
{"thumb": "thumbnails/cesium_sorvilier.png", "label": "Cesium Sorvilier", "url": "cesium_sorvilier.html"},
|
||||
{"thumb": "thumbnails/custom_sidebar_section.png", "label": "Custom Sidebar Section", "url": "custom_sidebar_section.html"},
|
||||
{"thumb": "thumbnails/embedded_iframe.png", "label": "Embedded Iframe", "url": "embedded_iframe.html"},
|
||||
{"thumb": "thumbnails/gradient_colors.png", "label": "Gradient Colors", "url": "gradient_colors.html"},
|
||||
{"thumb": "thumbnails/light_animated.png", "label": "Animated Light", "url": "light_animated.html"},
|
||||
{"thumb": "thumbnails/light_ca13.png", "label": "Light CA13", "url": "light_ca13.html"}
|
||||
{"thumb": "thumbnails/gradient_colors.png", "label": "Gradient Colors", "url": "gradient_colors.html"}
|
||||
],
|
||||
"showcase": [
|
||||
{"thumb": "thumbnails/chiller.jpg", "label": "Chiller", "url": "showcase/chiller.html"},
|
||||
|
||||
@ -143,7 +143,7 @@ export class LasLazBatcher{
|
||||
let indices = new Uint8Array(e.data.indices);
|
||||
|
||||
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
|
||||
geometry.addAttribute('RGBA', new THREE.BufferAttribute(colors, 4, true));
|
||||
geometry.addAttribute('color', new THREE.BufferAttribute(colors, 4, true));
|
||||
geometry.addAttribute('intensity', new THREE.BufferAttribute(intensities, 1));
|
||||
geometry.addAttribute('classification', new THREE.BufferAttribute(classifications, 1));
|
||||
geometry.addAttribute('return number', new THREE.BufferAttribute(returnNumbers, 1));
|
||||
|
||||
@ -53,7 +53,7 @@ export class EptBinaryLoader {
|
||||
|
||||
if (e.data.color) {
|
||||
let color = new Uint8Array(e.data.color);
|
||||
g.addAttribute('RGBA', new THREE.BufferAttribute(color, 4, true));
|
||||
g.addAttribute('color', new THREE.BufferAttribute(color, 4, true));
|
||||
}
|
||||
if (e.data.intensity) {
|
||||
let intensity = new Float32Array(e.data.intensity);
|
||||
|
||||
@ -122,7 +122,7 @@ export class EptLazBatcher {
|
||||
|
||||
g.addAttribute('position',
|
||||
new THREE.BufferAttribute(positions, 3));
|
||||
g.addAttribute('RGBA',
|
||||
g.addAttribute('color',
|
||||
new THREE.BufferAttribute(colors, 4, true));
|
||||
g.addAttribute('intensity',
|
||||
new THREE.BufferAttribute(intensities, 1));
|
||||
|
||||
@ -117,7 +117,7 @@ export class PointCloudMaterial extends THREE.RawShaderMaterial {
|
||||
intensityRange: { type: "fv", value: [Infinity, -Infinity] },
|
||||
|
||||
intensity_gbc: { type: "fv", value: [1, 0, 0]},
|
||||
rgb_gbc: { type: "fv", value: [1, 0, 0]},
|
||||
uRGB_gbc: { type: "fv", value: [1, 0, 0]},
|
||||
// intensityGamma: { type: "f", value: 1 },
|
||||
// intensityContrast: { type: "f", value: 0 },
|
||||
// intensityBrightness:{ type: "f", value: 0 },
|
||||
@ -784,12 +784,12 @@ export class PointCloudMaterial extends THREE.RawShaderMaterial {
|
||||
}
|
||||
|
||||
get rgbGamma () {
|
||||
return this.uniforms.rgb_gbc.value[0];
|
||||
return this.uniforms.uRGB_gbc.value[0];
|
||||
}
|
||||
|
||||
set rgbGamma (value) {
|
||||
if (this.uniforms.rgb_gbc.value[0] !== value) {
|
||||
this.uniforms.rgb_gbc.value[0] = value;
|
||||
if (this.uniforms.uRGB_gbc.value[0] !== value) {
|
||||
this.uniforms.uRGB_gbc.value[0] = value;
|
||||
this.dispatchEvent({
|
||||
type: 'material_property_changed',
|
||||
target: this
|
||||
@ -798,12 +798,12 @@ export class PointCloudMaterial extends THREE.RawShaderMaterial {
|
||||
}
|
||||
|
||||
get rgbContrast () {
|
||||
return this.uniforms.rgb_gbc.value[2];
|
||||
return this.uniforms.uRGB_gbc.value[2];
|
||||
}
|
||||
|
||||
set rgbContrast (value) {
|
||||
if (this.uniforms.rgb_gbc.value[2] !== value) {
|
||||
this.uniforms.rgb_gbc.value[2] = value;
|
||||
if (this.uniforms.uRGB_gbc.value[2] !== value) {
|
||||
this.uniforms.uRGB_gbc.value[2] = value;
|
||||
this.dispatchEvent({
|
||||
type: 'material_property_changed',
|
||||
target: this
|
||||
@ -812,12 +812,12 @@ export class PointCloudMaterial extends THREE.RawShaderMaterial {
|
||||
}
|
||||
|
||||
get rgbBrightness () {
|
||||
return this.uniforms.rgb_gbc.value[1];
|
||||
return this.uniforms.uRGB_gbc.value[1];
|
||||
}
|
||||
|
||||
set rgbBrightness (value) {
|
||||
if (this.uniforms.rgb_gbc.value[1] !== value) {
|
||||
this.uniforms.rgb_gbc.value[1] = value;
|
||||
if (this.uniforms.uRGB_gbc.value[1] !== value) {
|
||||
this.uniforms.uRGB_gbc.value[1] = value;
|
||||
this.dispatchEvent({
|
||||
type: 'material_property_changed',
|
||||
target: this
|
||||
|
||||
@ -168,7 +168,6 @@ class ProfilePointCloudEntry{
|
||||
this.currentBatch.geometry.drawRange.count++;
|
||||
}
|
||||
|
||||
//for(let attribute of Object.values(this.currentBatch.geometry.attributes)){
|
||||
for(let key of Object.keys(this.currentBatch.geometry.attributes)){
|
||||
let attribute = this.currentBatch.geometry.attributes[key];
|
||||
attribute.updateRange.offset = updateRange.start;
|
||||
|
||||
@ -21,6 +21,8 @@ export class Sidebar{
|
||||
this.measuringTool = viewer.measuringTool;
|
||||
this.profileTool = viewer.profileTool;
|
||||
this.volumeTool = viewer.volumeTool;
|
||||
|
||||
this.dom = $("#sidebar_root");
|
||||
}
|
||||
|
||||
createToolIcon(icon, title, callback){
|
||||
@ -1291,7 +1293,9 @@ export class Sidebar{
|
||||
|
||||
initAppearance(){
|
||||
|
||||
$('#sldPointBudget').slider({
|
||||
const sldPointBudget = this.dom.find('#sldPointBudget');
|
||||
|
||||
sldPointBudget.slider({
|
||||
value: this.viewer.getPointBudget(),
|
||||
min: 100 * 1000,
|
||||
max: 10 * 1000 * 1000,
|
||||
@ -1299,7 +1303,7 @@ export class Sidebar{
|
||||
slide: (event, ui) => { this.viewer.setPointBudget(ui.value); }
|
||||
});
|
||||
|
||||
$('#sldFOV').slider({
|
||||
this.dom.find('#sldFOV').slider({
|
||||
value: this.viewer.getFOV(),
|
||||
min: 20,
|
||||
max: 100,
|
||||
@ -1333,7 +1337,7 @@ export class Sidebar{
|
||||
|
||||
this.viewer.addEventListener('point_budget_changed', (event) => {
|
||||
$('#lblPointBudget')[0].innerHTML = Utils.addCommas(this.viewer.getPointBudget());
|
||||
$('#sldPointBudget').slider({value: this.viewer.getPointBudget()});
|
||||
sldPointBudget.slider({value: this.viewer.getPointBudget()});
|
||||
});
|
||||
|
||||
this.viewer.addEventListener('fov_changed', (event) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user