当前位置: 首页 > web >正文

用tree.js渲染立方体 关闭msedge同时关闭node进程 compounds同时关闭

cnpm install three

 

我怎么在msedge debug这个html

被ai气死

手写lauch.json 

卧槽

忘记加“run”了

{"version": "0.2.0","configurations": [{"name": "Launch Edge with Vite Dev Server","type": "msedge","request": "launch","url": "http://localhost:5173",  // 默认 Vite 的开发服务器地址"webRoot": "${workspaceFolder}","postDebugTask": "Kill Vite Dev Server"},{"type": "node","request": "launch","name": "Debug vite","runtimeExecutable": "npm","args": ["run","dev"],"console": "integratedTerminal"}],"compounds": [{"name": "Debug vite and Launch Edge","configurations": ["Debug vite", "Launch Edge with Vite Dev Server"]}]
}
{"version": "2.0.0","tasks": [{"label": "Kill Vite Dev Server","type": "shell","command": "taskkill /F /IM node.exe"}]
}

 

 

{"dependencies": {"three": "^0.176.0"},"devDependencies": {"vite": "^6.3.5"},"scripts": {"dev": "vite"
}
}

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8" /><title>Three.js + Vite</title>
</head>
<body><canvas id="scene"></canvas><script type="module">import * as THREE from 'three';const scene = new THREE.Scene();const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('scene') });renderer.setSize(window.innerWidth, window.innerHeight);const geometry = new THREE.BoxGeometry();const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });const cube = new THREE.Mesh(geometry, material);scene.add(cube);camera.position.z = 5;function animate() {requestAnimationFrame(animate);cube.rotation.x += 0.01;cube.rotation.y += 0.01;renderer.render(scene, camera);}animate();</script>
</body>
</html>

http://www.xdnf.cn/news/5270.html

相关文章:

  • 企业安全 - 理论基础
  • [ctfshow web入门] web69
  • 湖南(源点咨询)市场调研 商业综合体定位调研分享(下篇)
  • Godot4.3类星露谷游戏开发之【时钟UI】
  • 5大B2B数字营销社群营销标杆案例TOB企业数字化营销内容营销AI营销培训讲师培训师专家顾问唐兴通分享
  • JavaScript基础-局部作用域
  • FHE与后量子密码学
  • 昇腾NPU容器内 apt 换源
  • hot100-子串-JS
  • torch.nn.init.uniform_
  • C 语言数据结构基石:一维数组的定义、访问与使用详解
  • MYSQL中的RR隔离级别实现原理,它是如何解决不可重复读
  • [sklearn机器学习概述]机器学习-part3
  • Dify使用总结
  • Android平台FFmpeg音视频开发深度指南
  • yarn npm pnpm
  • Flink 系列之十二 - Data Stream API的输出算子
  • cursor sign in 网页登录成功,sursor软件里一直登陆不成功没有登陆信息
  • 【LeetCode 热题 100】215. 数组中的第K个最大元素(Python 快速选择详解)
  • 高精度加减
  • 普通IT的股票交易成长史--股价起伏的真相-缺口(2)
  • 2010-2020年 分省工业品月度产量数据-社科数据
  • 分析AMD业绩突飞猛进的原因
  • [ctfshow web入门] web71
  • SpringBoot项目容器化进行部署,meven的docker插件远程构建docker镜像
  • gvm安装go报错ERROR: Failed to use installed version
  • Linux进程信号的捕捉处理方式
  • 【Java学习】枚举(匿名类详解)
  • 基于大模型的新型隐球菌脑膜炎智能诊疗全流程系统设计与实现的技术方案文档
  • CD37.【C++ Dev】string类的模拟实现(上)