typescript(fourjs): first commit
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
7dce9eb842
commit
c19818b95b
15 changed files with 736 additions and 0 deletions
typescript/fourjs
21
typescript/fourjs/app.ts
Normal file
21
typescript/fourjs/app.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
const express = require("express");
|
||||
const app = express();
|
||||
const http = require("http").Server(app);
|
||||
|
||||
app.get("/",(req,res) => {
|
||||
res.sendFile(`${__dirname}/public/index.html`);
|
||||
});
|
||||
app.use("/public",express.static(__dirname + "/public"));
|
||||
|
||||
const port = 8000;
|
||||
|
||||
http.listen(port, () => {
|
||||
console.log(`>>Listeing on port ${port}`);
|
||||
});
|
||||
import {ShaderSender} from "./server/four/sender";
|
||||
|
||||
const sender = new ShaderSender(app,__dirname);
|
||||
sender.listen({
|
||||
vertex:"shaders/vertex.glsl",
|
||||
fragment:"shaders/fragment.glsl"
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue