-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mprcodes
committed
Mar 3, 2023
1 parent
9c1f761
commit 78cc2bd
Showing
35 changed files
with
2,052 additions
and
6,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.14.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 05. Transforming Objects | ||
|
||
I've set up a custom Vite config to use TypeScript and Sass. | ||
|
||
## Setup | ||
|
||
Run this following commands to install the dependencies, start the development server, and build for production: | ||
|
||
```bash | ||
# Install dependencies (only the first time) | ||
pnpm install | ||
|
||
# Run the local server at localhost:5173 | ||
pnpm dev | ||
|
||
# Build for production in the dist/ directory | ||
pnpm build | ||
``` | ||
|
||
## Lesson | ||
|
||
There are four properties to transform objects: `position`, `scale`, `rotation`, and `quaternion`. All these properties are compiled to matrices. | ||
|
||
All of the `Object3D` inheriting classes have those properties. For instance, `PerspectiveCamera` or `Mesh`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/svg+xml" href="/threejs-journey-logo.svg" /> | ||
<title>04 - Local Server</title> | ||
</head> | ||
<body> | ||
<canvas id="webgl"></canvas> | ||
|
||
<script src="/src/main.ts" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "vite-local-server", | ||
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"@types/three": "^0.149.0", | ||
"sass": "^1.58.3", | ||
"typescript": "^4.9.3", | ||
"vite": "^4.1.0" | ||
}, | ||
"dependencies": { | ||
"three": "^0.150.1" | ||
} | ||
} |
Oops, something went wrong.