Fix commenti e continuo reorg codice
This commit is contained in:
@@ -73,6 +73,9 @@
|
||||
modelPath: 'https://iis01.egalware.com/Test3D/THREEJS_DOORS/Door_models',
|
||||
fName: getUrlParameter('src')
|
||||
}
|
||||
|
||||
// init controllo
|
||||
WGL.initcall(options);
|
||||
|
||||
// Reading URL parameters -------------------------------------------------------------------------
|
||||
function getUrlParameter( name) {
|
||||
@@ -140,8 +143,6 @@
|
||||
WGL.toggleRotation();
|
||||
}
|
||||
|
||||
WGL.initcall(options);
|
||||
|
||||
// Event Listner -------------------------------------------------------------------
|
||||
// KEY
|
||||
document.addEventListener( "keypress", function( event) {
|
||||
@@ -164,6 +165,18 @@
|
||||
else if ( event.key.toLowerCase() === 'g')
|
||||
toggleGrid();
|
||||
}) ;
|
||||
|
||||
// Elements
|
||||
var helpButton = document.getElementById( "helpButton") ;
|
||||
var infoDiv = document.getElementById( "infoDiv") ;
|
||||
infoDiv.style.display = "none";
|
||||
helpButton.addEventListener( "click", function() {
|
||||
if ( infoDiv.style.display === "none")
|
||||
infoDiv.style.display = "block" ;
|
||||
else
|
||||
infoDiv.style.display = "none";
|
||||
}) ;
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Generated
Vendored
+33
-23
@@ -67,8 +67,16 @@ const gridGroup = new THREE.Group() ;
|
||||
const frameGroup = new THREE.Group() ;
|
||||
|
||||
|
||||
//init();
|
||||
/*
|
||||
* Oggetto principale gestione WebGL Door visualizer
|
||||
*/
|
||||
class webgl_original {
|
||||
|
||||
/**
|
||||
* Metodo Init con visualizzazzione dati
|
||||
* @param {string} modelPath Percorso base recupero modello 3dm
|
||||
* @param {string} fName Nome del modello 3dm da visualizzare
|
||||
*/
|
||||
async initcall({ modelPath, fName}) {
|
||||
PATH = modelPath;
|
||||
FILE_NAME = fName;
|
||||
@@ -83,49 +91,65 @@ class webgl_original {
|
||||
console.log('init done in : ' + timeElapsed);
|
||||
}
|
||||
|
||||
// reset posizione camera
|
||||
/**
|
||||
* reset posizione camera
|
||||
*/
|
||||
resetCamera()
|
||||
{
|
||||
myResetCamera();
|
||||
}
|
||||
|
||||
// imposta vista isometrica/ortografica
|
||||
/**
|
||||
* imposta vista isometrica/ortografica
|
||||
*/
|
||||
setCameraOrtho()
|
||||
{
|
||||
mySetCameraOrtho()
|
||||
}
|
||||
|
||||
// imposta vista prospettica
|
||||
/**
|
||||
* imposta vista prospettica
|
||||
*/
|
||||
setCameraPersp()
|
||||
{
|
||||
mySetCameraPersp()
|
||||
}
|
||||
|
||||
// toggle visualizzaizone cubo
|
||||
/**
|
||||
* toggle visualizzazione cubo
|
||||
*/
|
||||
toggleCube()
|
||||
{
|
||||
myToggleCubeVisibility();
|
||||
}
|
||||
|
||||
// toggle visualizzazione frame assi
|
||||
/**
|
||||
* toggle visualizzazione frame assi
|
||||
*/
|
||||
toggleFrame()
|
||||
{
|
||||
myToggleFrameVisibility();
|
||||
}
|
||||
|
||||
// toggle visualizzazione griglia
|
||||
/**
|
||||
* toggle visualizzazione griglia
|
||||
*/
|
||||
toggleGrid()
|
||||
{
|
||||
myToggleGridVisibility();
|
||||
}
|
||||
|
||||
// toggle visualizzazione quotature
|
||||
/**
|
||||
* toggle visualizzazione quotature
|
||||
*/
|
||||
toggleQuotes()
|
||||
{
|
||||
myToggleQuote()
|
||||
}
|
||||
|
||||
// toggle rotazione
|
||||
/**
|
||||
* toggle rotazione
|
||||
*/
|
||||
toggleRotation()
|
||||
{
|
||||
myToggleRotation()
|
||||
@@ -407,17 +431,3 @@ function mySetCameraPersp() {
|
||||
function myResetCamera() {
|
||||
setCameraPosition() ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Elements
|
||||
var helpButton = document.getElementById( "helpButton") ;
|
||||
var infoDiv = document.getElementById( "infoDiv") ;
|
||||
infoDiv.style.display = "none";
|
||||
helpButton.addEventListener( "click", function() {
|
||||
if ( infoDiv.style.display === "none")
|
||||
infoDiv.style.display = "block" ;
|
||||
else
|
||||
infoDiv.style.display = "none";
|
||||
}) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user