elben / planjure Goto Github PK
View Code? Open in Web Editor NEW:checkered_flag:Path-planning algorithms (Dijkstra, A*, etc); a study in ClojureScript, Om and core.async.
Home Page: http://elbenshira.com/p/planjure
:checkered_flag:Path-planning algorithms (Dijkstra, A*, etc); a study in ClojureScript, Om and core.async.
Home Page: http://elbenshira.com/p/planjure
D*lite, etc.
Bug: tile size not updated.
Should create islands. Perhaps create the brush first, then the random world generator can just be random brushes.
If A* is selected and re-plan is on, and then I switch to Dijkstra, the plan isn't re-planned. Make it so.
Likewise, if I enable re-plan, it should re-plan right away.
planjure.plan
should be independent of demo.
planjure.plan
to both target platforms.The slow part about re-drawing the world (mostly noticeable on large world) is the tight loop through each element in world
. What we need to do is only draw the difference.
So we can have a difference hash that only contains the updated rows/cols:
{row-idx-0 {col-idx-0 3
col-idx-1 5 ...}
row-idx-1 { ... }
...}
Left-click on canvas should spray tiles.
Event-listening using Google Closure:
Raw event listening:
Break out planjure.plan to its own library. Perhaps use that project that compiles to cljs and clj, then include the cljs version into the demo.
Write tests targeting JVM since it seems easier?
Path vectors should look continuous, with knowledge to render proper direction and (on corner changes) curves.
Looking good is important. I want to give it an old-world-ish seafaring theme. Like you're going on an explorative mission for the Queen somewhere.
Loading image: http://www.html5canvastutorials.com/tutorials/html5-canvas-images/
Right now, brushing across large world is very slow. Probably due to update-world
and update-row
making new vecs instead of using assoc
on the old ones.
app-state
update-world
versus inside of the re-draw function for canvas.Perhaps update path every N updates to :world, or every S seconds.
In our components, we often pass in the whole appstate. This means IRender is called every time the app state changes. This is often unnecessary and can cause slowdown.
Refactor components to only accept the cursor(s) necessary to render that component.
Should be able to select brush size. Drawing brush should make a spray, where center has highest cost, spreading outward like a gaussian kernel.
Allow user to select small, medium, large world sizes.
Because we don't set :world
through update-world-state!
. We need to move this (and plan-chan
) to its own module, perhaps appstate
.
https://coderwall.com/p/-sawaa
To add tests to a React/Om app: https://github.com/sgrove/omchaya/blob/master/project.clj
When I modify the world via brush, I would like to be able to undo.
https://github.com/jackschaedler/goya/blob/master/src/cljs/goya/timemachine.cljs
Text boxes that specify start/finish row/cols.
A* doesn't show off very well when going straight diagonal due to geometry.
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.