-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit e2319f8
Showing
9 changed files
with
3,388 additions
and
0 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,88 @@ | ||
# Node.js | ||
node_modules | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Vite | ||
dist | ||
.vite | ||
.cache | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# Editor Directories and Files | ||
.idea | ||
.vscode | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# Logs | ||
*.log | ||
|
||
# Temporary files and builds | ||
*.tmp | ||
*.temp | ||
*.swp | ||
*.pid | ||
*.seed | ||
*.bak | ||
*.orig | ||
|
||
# ESLint | ||
.eslintcache | ||
|
||
# Output of build tools | ||
out/ | ||
build/ | ||
coverage/ | ||
|
||
# NPM packages | ||
*.tgz | ||
|
||
# JetBrains IDE | ||
*.iml | ||
.idea/ | ||
|
||
# Windows | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Svelte/Vite HMR | ||
.svelte-kit | ||
|
||
# Miscellaneous | ||
*.local | ||
.env.local | ||
.env.*.local | ||
|
||
# Private keys and sensitive files | ||
.env | ||
.env.* | ||
*.pem | ||
|
||
# Ignore compressed files | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
*.7z | ||
|
||
# WebGL-related binaries | ||
*.obj | ||
*.mtl | ||
*.fbx | ||
*.blend | ||
|
||
# Image assets for game dev | ||
*.psd | ||
*.xcf | ||
*.kra | ||
|
||
# Ignore package-lock.json or yarn.lock if necessary | ||
# Uncomment the following lines if you don't want to track lock files | ||
# package-lock.json | ||
# yarn.lock | ||
|
||
temp |
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,10 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"printWidth": 200, | ||
"bracketSpacing": true, | ||
"arrowParens": "always", | ||
"endOfLine": "lf" | ||
} |
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,25 @@ | ||
// eslint.config.js | ||
export default [ | ||
{ | ||
ignores: ['node_modules/**'], | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
browser: true, // Enable browser globals | ||
}, | ||
plugins: { | ||
prettier: {}, | ||
import: {}, // Add import plugin | ||
}, | ||
rules: { | ||
'no-unused-vars': 'warn', | ||
'no-console': 'off', | ||
semi: ['error', 'always'], | ||
quotes: ['error', 'single'], | ||
'no-undef': 'error', | ||
}, | ||
}, | ||
]; |
Empty file.
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,16 @@ | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
canvas { | ||
display: block; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script type="module" src="./main.js"></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,21 @@ | ||
import * as TR from './node_modules/three/build/three.module.js'; | ||
console.log('gl hf'); | ||
|
||
const MAP_SIZE = 48; | ||
const g = { | ||
MAP_W: MAP_SIZE, | ||
MAP_H: MAP_SIZE, | ||
}; | ||
|
||
const scene = new TR.Scene(); | ||
const renderer = new TR.WebGLRenderer({ antialias: false }); | ||
renderer.setPixelRatio(window.devicePixelRatio); | ||
renderer.setSize(window.innerWidth, window.innerHeight); | ||
document.body.appendChild(renderer.domElement); | ||
|
||
const groundGeometry = new TR.PlaneGeometry(g.MAP_W, g.MAP_H); | ||
const groundMesh = new TR.Mesh(groundGeometry); | ||
scene.add(groundMesh); | ||
|
||
const camera = new TR.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, MAP_SIZE * 2); | ||
camera.lookAt(new TR.Vector3(0, 0, 0)); |
Oops, something went wrong.