Skip to content

Commit

Permalink
Merge pull request #2281 from jeedom/alpha
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
zoic21 committed Aug 25, 2023
2 parents 9758b7b + c9e32b3 commit f28b18d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/three.js/controls/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ THREE.OrbitControls = function ( object, domElement ) {

if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return;

event.preventDefault();
//event.preventDefault();
event.stopPropagation();

handleMouseWheel( event );
Expand Down
8 changes: 6 additions & 2 deletions desktop/js/plan3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ if (!jeeFrontEnd.plan3d) {
antialias: true
})
jeeFrontEnd.plan3d.renderer.setSize(jeeFrontEnd.plan3d.SCREEN_WIDTH, jeeFrontEnd.plan3d.SCREEN_HEIGHT)
jeeFrontEnd.plan3d.container.appendChild(jeeFrontEnd.plan3d.renderer .domElement)
jeeFrontEnd.plan3d.container.appendChild(jeeFrontEnd.plan3d.renderer.domElement)
if (data.configuration.mtlfile && data.configuration.mtlfile != '') {
domUtils.showLoading()
var mtlLoader = new THREE.MTLLoader()
Expand All @@ -195,6 +195,9 @@ if (!jeeFrontEnd.plan3d) {
}, function(progress) {
document.getElementById('span_loadPercent3dPlan')?.remove()
document.body.insertAdjacentHTML('beforeend','<span id="span_loadPercent3dPlan" style="font-size:4em;z-index:9999;position:fixed;top: 40%;left : 47%;">2/2 : ' + Math.round((progress.loaded / progress.total) * 100) + '%' + '</span>')
if(progress.loaded == progress.total){
setTimeout( jeeFrontEnd.plan3d.render, 1000);
}
}, function(error) {
console.log(error)
})
Expand Down Expand Up @@ -227,10 +230,11 @@ if (!jeeFrontEnd.plan3d) {
}
jeeFrontEnd.plan3d.controls = new THREE.OrbitControls(jeeFrontEnd.plan3d.camera, jeeFrontEnd.plan3d.camera.domElement)
jeeFrontEnd.plan3d.controls.maxPolarAngle = 0.9 * Math.PI / 2
//jeeFrontEnd.plan3d.controls.addEventListener('change', render)
jeeFrontEnd.plan3d.controls.addEventListener('change', jeeFrontEnd.plan3d.render)
jeeFrontEnd.plan3d.scene.add(new THREE.HemisphereLight(0xffffbb, 0x080820, 0.5))
jeeFrontEnd.plan3d.renderer.render(jeeFrontEnd.plan3d.scene, jeeFrontEnd.plan3d.camera)
jeeFrontEnd.plan3d.animate()

}
})
}
Expand Down

0 comments on commit f28b18d

Please sign in to comment.