#
luxiaotao1123
2022-08-19 92362aa0c308a4671c6460865608c382acc6f94d
views/sketh/js/InitCommon.js
@@ -167,7 +167,7 @@
   SCREEN_WIDTH = document.body.clientWidth; //window.innerWidth;
   SCREEN_HEIGHT = document.body.clientHeight; //window.innerHeight;
   renderer.setPixelRatio(pixelRatio);
   // renderer.setPixelRatio(pixelRatio);
   renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
   fontAspect = (SCREEN_WIDTH / 175) * (SCREEN_HEIGHT / 200);
@@ -282,27 +282,27 @@
   // since I use the lil-gui.min.js minified version of lil-gui without modern exports,
   //'g()' is 'GUI()' ('g' is the shortened version of 'GUI' inside the lil-gui.min.js file)
   gui = new g(); // same as gui = new GUI();
   // gui = new g(); // same as gui = new GUI();
   pixel_ResolutionController = gui.add(pixel_ResolutionObject, 'pixel_Resolution', 0.5, 1.0, 0.05).onChange(handlePixelResolutionChange);
   // pixel_ResolutionController = gui.add(pixel_ResolutionObject, 'pixel_Resolution', 0.5, 1.0, 0.05).onChange(handlePixelResolutionChange);
   if (!mouseControl)
      orthographicCamera_ToggleController = gui.add(orthographicCamera_ToggleObject, 'Orthographic_Camera', false).onChange(handleCameraProjectionChange);
   gui.domElement.style.userSelect = "none";
   gui.domElement.style.MozUserSelect = "none";
   // gui.domElement.style.userSelect = "none";
   // gui.domElement.style.MozUserSelect = "none";
   if (mouseControl)
   {
      gui.domElement.addEventListener("mouseenter", function (event)
      {
         ableToEngagePointerLock = false;
      }, false);
      gui.domElement.addEventListener("mouseleave", function (event)
      {
         ableToEngagePointerLock = true;
      }, false);
      // gui.domElement.addEventListener("mouseenter", function (event)
      // {
      //    ableToEngagePointerLock = false;
      // }, false);
      // gui.domElement.addEventListener("mouseleave", function (event)
      // {
      //    ableToEngagePointerLock = true;
      // }, false);
      window.addEventListener('wheel', onMouseWheel, false);
@@ -461,7 +461,7 @@
   // setup scene/demo-specific objects, variables, GUI elements, and data
   initSceneData();
   pixel_ResolutionController.setValue(pixelRatio);
   // pixel_ResolutionController.setValue(pixelRatio);
   if (!allowOrthographicCamera && !mouseControl)
   {
      orthographicCamera_ToggleController.domElement.hidden = true;
@@ -613,7 +613,7 @@
   // if GUI has been used, update
   if (needChangePixelResolution)
   {
      pixelRatio = pixel_ResolutionController.getValue();
      // pixelRatio = pixel_ResolutionController.getValue();
      onWindowResize();
      needChangePixelResolution = false;
   }