Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Robot Generator #928

wants to merge 1 commit into from

Conversation

wa1ker38552
Copy link

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.

Snapshot (2)
Snapshot (3)
Snapshot (1)

Copy link

vercel bot commented Sep 29, 2024

@wa1ker38552 is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

art/robot-caden/index.js looks like art! preview it in the editor

@Dongathan-Jong
Copy link
Collaborator

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!

@Dongathan-Jong Dongathan-Jong self-assigned this Oct 3, 2024
@wa1ker38552
Copy link
Author

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?

@wa1ker38552
Copy link
Author

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])
})

@Dongathan-Jong
Copy link
Collaborator

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!

@M0HID
Copy link
Collaborator

M0HID commented Oct 5, 2024

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!!

@M0HID M0HID closed this Oct 5, 2024
@wa1ker38552
Copy link
Author

uh, that's the problem, I can't, because I do image processing using PIL which isn't possible client side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants