ZaiZai 1 年之前
父節點
當前提交
52faeb3ec0
共有 3 個文件被更改,包括 8 次插入109 次删除
  1. 0 12
      index.html
  2. 3 9
      src/App.vue
  3. 5 88
      src/style.css

+ 0 - 12
index.html

@@ -5,18 +5,6 @@
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>泓创智诚3D桥梁模型</title>
     <title>泓创智诚3D桥梁模型</title>
-    <style >
-     body{
-          margin:0;
-          padding:0;
-          overflow: hidden;
-    }
-     body #app {
-         margin:1px;
-         padding:1px;
-         overflow: hidden;background: #080336;
-     }
-    </style>
   </head>
   </head>
   <body>
   <body>
     <div id="app"></div>
     <div id="app"></div>

+ 3 - 9
src/App.vue

@@ -3,15 +3,12 @@
 
 
 <script setup>
 <script setup>
 import * as THREE from 'three';
 import * as THREE from 'three';
-import Stats from 'three/addons/libs/stats.module.js';
 import {Sky} from 'three/addons/objects/Sky.js';
 import {Sky} from 'three/addons/objects/Sky.js';
 import {TrackballControls} from 'three/addons/controls/TrackballControls.js';
 import {TrackballControls} from 'three/addons/controls/TrackballControls.js';
 import {GLTFLoader} from "three/addons/loaders/GLTFLoader.js";
 import {GLTFLoader} from "three/addons/loaders/GLTFLoader.js";
 
 
+let container, camera, scene, renderer, controls, sun;
 
 
-let container, stats;
-let camera, scene, renderer;
-let controls, sun, css2Renderer;
 init();
 init();
 animate();
 animate();
 
 
@@ -96,8 +93,8 @@ function init() {
 
 
     updateSun();
     updateSun();
 
 
-    stats = new Stats();
-    container.appendChild(stats.dom);
+    //stats = new Stats();
+    //container.appendChild(stats.dom);
 
 
 
 
     //
     //
@@ -135,8 +132,6 @@ function onWindowResize() {
     renderer.setSize(window.innerWidth, window.innerHeight);
     renderer.setSize(window.innerWidth, window.innerHeight);
     renderer.setPixelRatio(window.devicePixelRatio);
     renderer.setPixelRatio(window.devicePixelRatio);
     controls.handleResize();
     controls.handleResize();
-    css2Renderer.setSize(window.innerWidth, window.innerHeight);
-
 }
 }
 
 
 function render() {
 function render() {
@@ -147,7 +142,6 @@ function animate() {
     requestAnimationFrame(animate);
     requestAnimationFrame(animate);
     render();
     render();
 
 
-    stats.update();
     controls.update();
     controls.update();
     renderer.render(scene, camera);
     renderer.render(scene, camera);
 }
 }

+ 5 - 88
src/style.css

@@ -1,89 +1,6 @@
-:root {
-  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
-  line-height: 1.5;
-  font-weight: 400;
-
-  color-scheme: light dark;
-  color: rgba(255, 255, 255, 0.87);
-  background-color: #242424;
-
-  font-synthesis: none;
-  text-rendering: optimizeLegibility;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  -webkit-text-size-adjust: 100%;
-}
-
-a {
-  font-weight: 500;
-  color: #646cff;
-  text-decoration: inherit;
-}
-a:hover {
-  color: #535bf2;
-}
-
-a {
-  font-weight: 500;
-  color: #646cff;
-  text-decoration: inherit;
-}
-a:hover {
-  color: #535bf2;
-}
-
-body {
-  margin: 0;
-  display: flex;
-  place-items: center;
-  min-width: 320px;
-  min-height: 100vh;
-}
-
-h1 {
-  font-size: 3.2em;
-  line-height: 1.1;
-}
-
-button {
-  border-radius: 8px;
-  border: 1px solid transparent;
-  padding: 0.6em 1.2em;
-  font-size: 1em;
-  font-weight: 500;
-  font-family: inherit;
-  background-color: #1a1a1a;
-  cursor: pointer;
-  transition: border-color 0.25s;
-}
-button:hover {
-  border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
-  outline: 4px auto -webkit-focus-ring-color;
-}
-
-.card {
-  padding: 2em;
-}
-
-#app {
-  /* max-width: 1280px; */
-  margin: 0 auto;
-  padding: 0;
-  text-align: center;
-}
-
-@media (prefers-color-scheme: light) {
-  :root {
-    color: #213547;
-    background-color: #ffffff;
-  }
-  a:hover {
-    color: #747bff;
-  }
-  button {
-    background-color: #f9f9f9;
-  }
+body,  #app {
+  margin:0;
+  padding:0;
+  overflow: hidden;
+  background: transparent;
 }
 }