Mercurial > hg > orthanc-stl
comparison Sources/viewer.js @ 10:549ba7ada071
make the viewer use the /instances/.../stl route
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 20 Jul 2023 12:34:32 +0200 |
parents | 0f03a8a0bd6f |
children | dd0cd39e6259 |
comparison
equal
deleted
inserted
replaced
9:8b265e711351 | 10:549ba7ada071 |
---|---|
63 light2.position.set(10, 10, 10); | 63 light2.position.set(10, 10, 10); |
64 scene.add(light2); | 64 scene.add(light2); |
65 | 65 |
66 const loader = new STLLoader() | 66 const loader = new STLLoader() |
67 loader.load( | 67 loader.load( |
68 '../../instances/' + instanceId + '/content/0042-0011', | 68 //'../../instances/' + instanceId + '/content/0042-0011', |
69 '../../instances/' + instanceId + '/stl', | |
69 function (geometry) { | 70 function (geometry) { |
70 const frustumSize = 200; | 71 const frustumSize = 200; |
71 | 72 |
72 geometry.computeBoundingBox(); | 73 geometry.computeBoundingBox(); |
73 geometry.translate(-(geometry.boundingBox.min.x + geometry.boundingBox.max.x) / 2.0, | 74 geometry.translate(-(geometry.boundingBox.min.x + geometry.boundingBox.max.x) / 2.0, |