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.
❄️ build and view fractals
Home Page: https://fractal.parts
License: MIT License
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.
The domain name, mapping, and record set should be listed in services/template.yaml.
At the very least the view page should let one go to the browse page.
Be sure to sketch the design first.
Replace the builder title with RIEK. See https://github.com/kaivi/riek.
Other improvements:
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.
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.
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.
Create fractals using the builder UI then save the database rows to disk. See https://knexjs.org/#Seeds-CLI.
Useful resources for fractal IFS:
Potential libraries
The encompasses drag and drop.
Specifics TBD. This should be some sort of guide that leads users through creating a fractal.
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.
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.
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.
TBD
Shapes should show the move
cursor. Handles should show the appropriate resize cursor.
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 causes a shape to be unclickable. Reproduce by dragging a handle beyond the opposite handle.
This should exist at a draggable element near the shape.
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.
This should just be for a single shape.
All previous operations should work with these new shapes.
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.
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.
Consider the chain of responsibility design pattern.
Reference the structure seen in your "squares.js" prototype.
Use ajv.
Current shapes store rotation in degrees. Use radians instead to remove the need for excessive unit conversion.
Clicking Publish in the builder should POST the template to /fractals. The user should be redirected to fractal.parts/.
Shown in the console:
TypeError: t.t0.response is undefined Create.js:139:16
Options include:
Consider a drawer: https://ant.design/components/drawer/. The drawer could be triggered on a gear button:
<Button size="large" icon="setting" />
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
.
On publish, validate that
Add draggable elements at the corners and sides of rectangles.
Add a new shape object to the canvas stack. This needs to hook up to the "New" button in the builder UI.
GET /fractals
should pull all fractals from the database. Users should be able to sort on creation date or views.
This should live in the browse and view pages. Show either a spinner or gray content (e.g. https://ant.design/components/skeleton/)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.