Skip to content

noops-challenge/vexbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vexbot

👋 Meet Vexbot

Ah, Vexbot. It's not really vexing—just very orderly. With every request, Vexbot will send you up to a thousand lines—two pairs of coordinates and a speed.

↗ What can you do?

Just lines? Sure, you could just draw one line...

single-line

But when you draw a thousand it starts to get interesting...

many-lines

And when you start layering them...

lines-buildup

Or you could ask the nice Vexbot to connect all the lines for you...

connected-lines

And we haven't even gotten into what happens when you animate lines individually...

What's next? That's up to you!

✨ A few ideas

There are millions of things you can do with Vexbot, but here are a few ideas to get you started:

  • Bring it to life: With the connected parameter turned on, our little Vexbot gives you a thousand-jointed creature you can makewriggle across your screen.
  • Pickup Sticks: Ever play the game? Now's your chance to build it.
  • Don't touch the lines: Add a hero whom you navigate around the lines to a destination.

Have an idea of your own? Create an issue and we'll add it to the list.

🤖 API basics

You can request up to 1,000 pairs of coordinates, specify the magnitude and whether you want your lines connected, and set maximum x and y boundaries.

There's a single endpoint: api.noopschallenge.com/vexbot

The endpoint accepts five parameters, all optional:

  • count (optional, numeric): Between 1 and 1000. Number of lines to return.
  • magnitude (optional, numeric): Between 1 and 100,000. Maximum length of lines.
  • connected (optional, numeric boolean): 1 or 0. If connected===1, then the b coordinate of each line will be the a coordinate of the next.
  • width (optional, numeric): Between 10 and 100,000. Maximum width of returned points.
  • height (optional, numeric): Between 10 and 100,000. Maximum height of returned points.

The endpoint returns a JSON object with an array named vectors of n length. Each item in the vectors has three properties: a, b, and speed.

Example return for a single line:

{
  "vectors": [
    {
      "a": {
        "x": 743,
        "y": 147
      },
      "b": {
        "x": 60,
        "y": 601
      },
      "speed": 71
    }
  ]
}

Read the complete API documentation.

More about Vexbot here: https://noopschallenge.com/challenges/vexbot

About

Vextbot sends you nothing but vectors—two coordinates and a speed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published