Compare commits

...

3 Commits

Author SHA1 Message Date
Giulio De Pasquale
c87e44e609 Init buono 2022-12-07 17:24:06 +01:00
Giulio De Pasquale
e2cfc9d86c Init tailwind 2022-12-06 16:51:13 +01:00
Giulio De Pasquale
71ad3b3174 Remove readme 2022-12-06 16:50:35 +01:00
24 changed files with 21918 additions and 48 deletions

1
.gitignore vendored
View File

@ -8,7 +8,6 @@ pnpm-debug.log*
lerna-debug.log* lerna-debug.log*
node_modules node_modules
dist
dist-ssr dist-ssr
*.local *.local

View File

@ -1,47 +0,0 @@
# Svelte + Vite
This template should help get you started developing with Svelte in Vite.
## Recommended IDE Setup
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
## Need an official Svelte framework?
Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
## Technical considerations
**Why use this over SvelteKit?**
- It brings its own routing solution which might not be preferable for some users.
- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
This template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
**Why include `.vscode/extensions.json`?**
Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
**Why enable `checkJs` in the JS template?**
It is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.
**Why is HMR not preserving my local component state?**
HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
```js
// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)
```

BIN
dist/assets/doom1.wad vendored Normal file

Binary file not shown.

1296
dist/assets/websockets-doom.html vendored Normal file

File diff suppressed because one or more lines are too long

8908
dist/assets/websockets-doom.js vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
dist/assets/websockets-doom.wasm vendored Executable file

Binary file not shown.

1
dist/assets/websockets-doom.wasm.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/css/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
style.css

2
dist/css/98.css vendored Normal file

File diff suppressed because one or more lines are too long

BIN
dist/css/ms_sans_serif.woff vendored Normal file

Binary file not shown.

BIN
dist/css/ms_sans_serif.woff2 vendored Normal file

Binary file not shown.

BIN
dist/css/ms_sans_serif_bold.woff vendored Normal file

Binary file not shown.

BIN
dist/css/ms_sans_serif_bold.woff2 vendored Normal file

Binary file not shown.

45
dist/default.cfg vendored Normal file
View File

@ -0,0 +1,45 @@
use_libsamplerate 0
force_software_renderer 0
startup_delay 2000
show_diskicon 1
crispy_soundfix 1
grabmouse 0
fullscreen 0
sfx_volume 8
music_volume 8
show_messages 1
key_right 25
key_left 24
key_up 17
key_down 31
key_strafeleft 30
key_straferight 32
key_fire 57
key_use 18
key_strafe 46
key_speed 42
key_strafe_alt 46
key_speed_alt 42
key_fullscreen 33
use_mouse 1
use_joystick 0
screenblocks 10
detaillevel 0
snd_channels 8
snd_musicdevice 3
snd_sfxdevice 3
snd_sbport 0
snd_sbirq 0
snd_sbdma 0
snd_mport 0
usegamma 0
chatmacro0 "No"
chatmacro1 "I'm ready to kick butt!"
chatmacro2 "I'm OK."
chatmacro3 "I'm not looking too good!"
chatmacro4 "Help!"
chatmacro5 "You suck!"
chatmacro6 "Next time, scumbag..."
chatmacro7 "Come here!"
chatmacro8 "I'll take care of it."
chatmacro9 "Yes"

BIN
dist/doom1.wad vendored Normal file

Binary file not shown.

110
dist/index.html vendored Normal file
View File

@ -0,0 +1,110 @@
<head>
<link rel="stylesheet" href="/css/98.css">
<link rel="stylesheet" href="/css/style.css">
</head>
<div class="bg-gray-800">
<div class="container m-auto">
<div class="window h-full">
<div class="title-bar">
<div class="title-bar-text">Doom 95</div>
<div class="title-bar-controls">
<button aria-label="Minimize" />
<button aria-label="Maximize" />
<button aria-label="Close" />
</div>
</div>
<div class="window-body w-full h-full m-0">
<div id="container" class="noselect m-0">
<canvas class="frame w-full h-full" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1" />
</div>
<script>
var commonArgs = [
"-iwad",
"doom1.wad",
"-window",
"-nogui",
"-nomusic",
"-config",
"default.cfg",
"-servername",
"doomflare",
];
var Module = {
onRuntimeInitialized: () => {
console.log("TEST");
callMain(commonArgs);
},
noInitialRun: true,
preRun: () => {
Module.FS.createPreloadedFile(
"",
"doom1.wad",
"doom1.wad",
true,
true
);
Module.FS.createPreloadedFile(
"",
"default.cfg",
"default.cfg",
true,
true
);
},
printErr: function (text) {
if (arguments.length > 1)
text = Array.prototype.slice.call(arguments).join(" ");
console.error(text);
},
canvas: (function () {
var canvas = document.getElementById("canvas");
canvas.addEventListener(
"webglcontextlost",
function (e) {
alert("WebGL context lost. You will need to reload the page.");
e.preventDefault();
},
false
);
return canvas;
})(),
print: function (text) {
console.log(text);
},
setStatus: function (text) {
console.log(text);
},
totalDependencies: 0,
monitorRunDependencies: function (left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(
left
? "Preparing... (" +
(this.totalDependencies - left) +
"/" +
this.totalDependencies +
")"
: "All downloads complete."
);
},
};
window.onerror = function (event) {
Module.setStatus("Exception thrown, see JavaScript console");
Module.setStatus = function (text) {
if (text) Module.printErr("[post-exception status] " + text);
};
};
</script>
<script type="text/javascript" src="websockets-doom.js"></script>
</div>
<div class="status-bar">
<p class="status-bar-field">CPU Usage: 666%</p>
</div>
</div>
</div>
</div>

1296
dist/websockets-doom.html vendored Normal file

File diff suppressed because one or more lines are too long

8908
dist/websockets-doom.js vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
dist/websockets-doom.wasm vendored Executable file

Binary file not shown.

1
dist/websockets-doom.wasm.map vendored Normal file

File diff suppressed because one or more lines are too long

1331
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

8
package.json Normal file
View File

@ -0,0 +1,8 @@
{
"devDependencies": {
"tailwindcss": "^3.2.4"
},
"scripts": {
"build": "npx tailwindcss -i ./src/style.css -o ./dist/css/style.css --watch"
}
}

3
src/style.css Normal file
View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

8
tailwind.config.js Normal file
View File

@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["dist/*.{html,js,htm}"],
theme: {
extend: {},
},
plugins: [],
}