[React/Three.js] VSCode에서 Three.js 자동완성

cherry_·2023년 7월 6일

처음에 자동완성이 안 되어서 매우 슬펐다.
코드를 작성할 때마다 내 오타력을 실감하는 순간이란....

방법은 의외로 쉬웠다.

three.js 를 끌고오면 된다!
내가 따라한 튜토리얼이 그냥 import three.js 해서 쓰는 거라 안 된 거였음

https://threejs.org/

  1. 왼쪽 하단에 download 눌러주시고
  2. zip 파일 해제
  3. /build/three.js 파일을 내 프로젝트에 복붙
  4. 끌어다 쓰면 완성
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>My first three.js app</title>
		<style>
			body { margin: 0; }
			canvas { display: block; }
		</style>
	</head>
	<body>
		<script src="../src/three.js"></script>
		<script src="../src/main.js"></script>
	</body>
</html>


편안.............

0개의 댓글