not saying not saying
Hacker
@Mathman05
6
VRtetriscontrols(keyboard):
left and right keys- movement
up arrow- rotate
shift- hold
down-arrow- soft drop
space- hard drop
controls(Quest 2):
the right joystick is the arrow keys
right lower trigger+right upper trigger=hard drop
I don't remember the rest
344
2
6
Mathman05 FYI if you're looking to play this in VR you must open it up in the website, web XR doesn't work within I-frames1 year ago
controls(keyboard):
left and right keys- movement
up arrow- rotate
shift- hold
down-arrow- soft drop
space- hard drop
controls(Quest 2):
the right joy
HTML, CSS, JS
The website for my game https://vrtetris.mathman05.repl.co/ just doesn't load, I haven't changed anything about it, it just broke? is this a site-wide
HTML, CSS, JS
TheDNAHero I know people have already answered, but i just wanna say, nice job. This is really cool.1 year ago
CosmicBear https://7b7f042f-a418-4535-9cb4-aee0665ae9fb.id.repl.co/
id.repl.co domains are still fine.1 year ago
I like how pretty they are :D left click to zoom in on that point and right click to switch to the julia set for that position(also shown in the top l
HTML, CSS, JS
I've tried to report this a few months ago, and nothing happened. it still works. making SO many pop-ups. please where do I report this? (also DON'T o
HTML, CSS, JS
I'm trying to get a list of things in a folder in js HTML and css (only looking to use js though) I tried doing https://thefallenhero.mathman05.repl.c
Coder100 you can't.
If you have access to the server (which you don't) then you know exactly what requests are being served to.
Because you don't have access to the server, its not possible.2 years ago
I've been trying to get nix to work and I can't seem to get it working at all. anyone know how to get nix packages working?
JonkPank I have the same question; I created a repo with a super simple nix config, but Replit is completely ignoring it.10 months ago
Flyingcrabs side bar there is the package button click it and type your package then click the green install button and you installed it2 years ago
I've made multiplayer Tetris and thought you guys might like it :D it took about a week of free time to make it and I think I got it working well, if
HTML, CSS, JS
33
How do you handle a post request in node.js using express?
I've tried and everything so far has failed. anyone know how?
EpicGamer007
// First, make sure you have a request parser.
app.use(express.json()); // To accept json post requests
app.use(express.urlencoded({ extended: true })); // to accept urlencoded requests
app.post("/post-endpoint", (req, res) => { // this is for the post
console.log(req.body); // The post data will be here.
res.send("Recieved request!")
});
Now here, i will expain what to do on the frontend
Send it
The above code will be handled by the express.bodyparser and you will get a req.body w2 years ago
I've been trying to do a POST request to https://tetris-serverside.mathman05.repl.co/set/"+id but it gives me an error "TypeError: Failed to execute '
themining72 I don't think spaces are allowed, try changing your code to:
'theboard': true2 years ago
I want to be able to get a value from the node.js project and display it on the website. I've been trying with express(node.js) and fetch(Javascript)
Mathman05 just found it: app.use(require("cors")()); it just wanted this one line server side |:2 years ago
R2D2VaderBeef Here is code that should get your data:
async function getData() {
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
};
const response = await fetch('https://discbottest-2.mathman05.repl.co/', options);
const resdata = await response.json();
console.log(resdata); // resdata is now a JSON object with the response
}
getData();
This will not work on a different repl unless the response has a particular header: http2 years ago
Mathman05 More info: I'm trying to get information from https://discbottest-2.mathman05.repl.co but it can't seem to get it other node.js projects can see the information but javascript always errors2 years ago
I'm trying to do a get request in javascript to https://discbottest-2.mathman05.repl.co but nothing seems to work, in node.js I found a way to get it
Coder100 fetch is not natively supported by node, you have to install it
const fetch = require("node-fetch");
fetch("https://discbottest-2.mathman05.repl.co/").then(r => r.json()).then(console.log);
ez2 years ago
when I do
a=[1,2,3,4,5]
b=a
b[1]="yes"
console.log(a[1])
it prints yes. how do I make it make a copy and not just modify a's value?
Edit: I found some
xxpertHacker Shallow copy:
a = [...b];
and make sure to declare your variables with let, otherwise, good luck.2 years ago
Coder100 Objects and arrays are passed by reference. Refer to my tutorial for a fix:
https://replit.com/talk/learn/Deep-Cloning-Objects/851772 years ago
https://replit.com/@Mathman05/KnowingPunctualAddress#script.js I don't know why but my two canvases are overlapping, anyone know how to fix that?
I've been testing it, but now it just won't sign in. it just stalls. do I just need to wait longer, or is it something else?
Coder100 Wait up to an hour, maybe it will work tomorrow, but you can also fork the repl too2 years ago
I have a discord server that I have my bot on and I have a channel I would like it to post to, I can figure out how to get the channel. Does anyone kn
Coder100 You can get a channel by its name super easy
https://stackoverflow.com/questions/61064159/finding-a-discord-channel-id-using-its-name2 years ago
SixBeeps First get the channel ID
image
Then fetch the ID in code and send a message to it
client.channels.fetch('CHANNEL ID HERE')
.then(channel => channel.send("This is a message!"))
.catch(console.error);
`2 years ago
I have a username example#1234 how would I turn that into a user object?
I have pixel art, and i want to use it in one of my projects, due to wanting to reduce file size and how I make it the pixel art is a 5x5 image and dr
HTML, CSS, JS
Coder100 Your image has to be larger.
When an image is upscaled, it loses its quality. I won't bore you with exactly why, but it's something about pixels.
Anyways, what you should have done instead was create the image at a large size so when you downscale it, the quality is good.2 years ago
I want a link to https://repl.it/@Mathman05/canvastest#visuals.js
where the code is the only part and I can run it from other projects how would I do