Skip to content

Commit

Permalink
feat: add initial HTML, CSS, and assets for shader project
Browse files Browse the repository at this point in the history
  • Loading branch information
andres112 committed Dec 26, 2024
1 parent 9585f0a commit 0c4fb8d
Show file tree
Hide file tree
Showing 9 changed files with 4,690 additions and 1 deletion.
Empty file added 21-shaders/dist/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions 21-shaders/dist/assets/index-Fi76PK1B.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*{margin:0;padding:0}html,body{overflow:hidden}.webgl{position:fixed;top:0;left:0;outline:none}
4,673 changes: 4,673 additions & 0 deletions 21-shaders/dist/assets/index-kardb8VX.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 21-shaders/dist/assets/index-kardb8VX.js.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions 21-shaders/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shaders</title>
<script type="module" crossorigin src="./assets/index-kardb8VX.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Fi76PK1B.css">
</head>
<body>
<canvas class="webgl"></canvas>
</body>
</html>
Binary file added 21-shaders/dist/textures/flag-french.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 21-shaders/dist/textures/flag_swiss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 21-shaders/src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const scene = new THREE.Scene();
* Textures
*/
const textureLoader = new THREE.TextureLoader();
const flagTexture = textureLoader.load('/textures/flag_swiss.png');
const flagTexture = textureLoader.load('textures/flag_swiss.png');

/**
* Test mesh
Expand Down
1 change: 1 addition & 0 deletions 21-shaders/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import glsl from 'vite-plugin-glsl'
export default {
root: 'src/', // Sources files (typically where index.html is)
publicDir: '../static/', // Path from "root" to static assets (files that are served as they are)
base: './',
server:
{
host: true, // Open to local network and display URL
Expand Down

0 comments on commit 0c4fb8d

Please sign in to comment.