Giter VIP home page Giter VIP logo

fractal.parts's Introduction

Build Twitter Follow

Design and view beautiful fractals. This site is serverless (AWS Lambda, Aurora) with a React frontend. See backend/ or frontend/ for more information.

Thanks to Jason Lynch and Owen Littlejohns for their early comments and testing.

fractal.parts's People

Contributors

dependabot[bot] avatar elliotpenson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

odinmorningstar

fractal.parts's Issues

Fuzzy Handles

Reproduce by creating a rectangle with an odd width/height.

Clear example:

clear

Fuzzy example:

fuzzy

Show Confirmation Before Builder Exit

Create a utility that adds a listener to the beforeunload event. This will cause a message to be shown to the user before they reload or exit the site.

window.addEventListener('beforeunload', event => {
  event.preventDefault();
  event.returnValue = '';
});

Call this utility in the componentDidMount method of Create. Remove the listener when the user publishes the fractal.

Use CloudFront

  • Make the API Edge Optimized
  • Create a distribution for static assets in S3

Implement "Snapping"

Lines should appear when the side of a shape line up with the side of another shape. Additionally, the shape should sort of "jump" to meet the point.

Implement Ascending/Descending Sorting

Currently, api.fractal.parts/fractals lets one specify a sort parameter. Results after always returned in ascending order. In this ticket, enable descending order with a - prefix.

Keep Lambdas Warm

Create a scheduled Lambda that runs every five minutes. The Lambda should hit all three api.fractal.parts endpoints (GET /fractals, POST /fractals, GET /fractals/{key}). As part of this ticket, add a parameter to each Lambda (e.g. warming, healthcheck).

Of course this Lambda will not fix all cold starts. Scale outs will still have cold start problems.

Connect API: Fractal Viewer

When the user navigates to fractal.parts/<title>, the site should GET /fractals/<title>. If the fractal is found, render the attractor. If the fractal is not found, display a 404 page.

Implement Infinite Attractor Zoom

Fractals display fine structure; the attractor shows irregularity at arbitrarily small scales. Users of fractal.parts should be able to infinitely zoom in on a fractal. Fractals will need to be rendered lazily.

Change Mouse on Hover

Shapes should show the move cursor. Handles should show the appropriate resize cursor.

Implement Fractal GET/POST

POST /fractals should save the given fractal in a DynamoDB table. GET /fractals/<id> should retrieve the fractal with the given ID from the database.

Negative Width/Height

Negative width/height causes a shape to be unclickable. Reproduce by dragging a handle beyond the opposite handle.

Show the Recursive Fractal Progression

In the viewer, users should also be able to see the original template. Ideally, they should also be able to see a progression from template to attractor: https://en.wikipedia.org/wiki/Iterated_function_system#/media/File:Ifs-construction.png.

Unanswered questions:

  • Should this be a quick animation between template/attractor states? Or should this be a slider where the user can control the speed and pause?
  • Should the viewer display both directions (Template -> Attractor and Attractor -> Template)?
  • Should this also appear in the builder as well?

Connect API: Fractal Browser

fractal.parts/browse should GET /fractals and display a (rough) grid of fractals. Clicking a fractal navigates to its designated page. Implement pagination and sorting.

Dynamically Resize the Attractor

Currently the attractor renders with the same dimensions as the base in the original template. The attractor should actually be sized relative to the canvas. Be sure that the attractor isn't stretched.

Use the same (or at least similar) logic to size the base shape in the builder.

Convert Radians to Degrees

Current shapes store rotation in degrees. Use radians instead to remove the need for excessive unit conversion.

Issues in Firefox

Shown in the console:

TypeError: t.t0.response is undefined Create.js:139:16

Shapes Outside Canvas

Currently, users can drag shapes outside the canvas. Objects should either not be allowed outside the canvas or should jump back to the canvas on mouseup.

Builder Validation

On publish, validate that

  • The title has been edited.
  • The title has at least one alphanumeric character.
  • The title doesn't already exist.
  • At least one shape has been added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.