-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robot Generator #928
Robot Generator #928
Conversation
@wa1ker38552 is attempting to deploy a commit to the Hack Club Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey! Sick idea, but this piece isn't randomly generated after each run! I understand you would like to use an API, and that is fine, but we are looking for pieces with more complexity made from the user! I would like to see you do more with this art, and would be happy to re-review once updated! |
It is randomly generated, the robots are generated using a seed value and processed on my own server (hence the ip in the bookmarklet). Does this fit the requirements? |
I just realized that it doesn't need a bookmarklet. Here is code that you can just run by itself const width = 125;
const height = 125;
setDocDimensions(width, height);
function drawAt(x, y) {
const line = []
const size = 1
line.push([[x, y], [x+size, y]]);
line.push([[x, y], [x, y+size]]);
line.push([[x, y+size], [x+size, y+size]]);
line.push([[x+size, y], [x+size, y+size]]);
line.push([[x, y], [x+size, y+size]]);
line.push([[x, y+size], [x+size, y]]);
drawLines(line)
}
var request = new XMLHttpRequest();
request.open("GET", "https://api.codetabs.com/v1/proxy?quest=http://154.53.63.206:9000/generate", false);
request.send(null)
let graph = JSON.parse(request.responseText)
graph.forEach(function(point) {
drawAt(point[0], point[1])
}) |
Hey! Unfortunately, I cannot approve this since you are using an API to generate the art, and your code only draws said given generated art. I need to see something that you created, your code! |
Hi there! I’m closing this PR for now to clear up the repo. Could you implement your server API code directly in the Blot editor? Once you’ve made your edits/improvements, please make a new PR and we can review it there!! |
uh, that's the problem, I can't, because I do image processing using PIL which isn't possible client side |
Automatically generates an image of a robot using an API. For some reason, drawLines doesn't work unless in the main thread so I wrote a bookmarklet to assist this program. Just create the bookmarklet, paste the code in for the bookmark and for the site and it should automatically run.