sonwh98 / infamous

ClojureScript DSL for famous.js
MIT License
7 stars 2 forks source link

how to use with Reagent #1

Closed stukennedy closed 8 years ago

stukennedy commented 8 years ago

I would like to use infamous as a component in my reagent application, I don't want to write the entire web-app in famous. I've tried unsuccessfully to integrate infamous as a component, by taking the carousel demo and trying to render it to a [:div#carousel] using the reagent component-did-mount lifecycle method. I can't get it working properly. (it briefly flashes an image up, but then disappears and does odd things)

Would you be able to explain the best pattern for doing this, that works with both the reagent and infamous paradigms?

I'm mainly wanting to use infamous as a wrapper around my pages's main content, so that I can apply nice transitions to page changes, rather than have to run the entire application as a famous app.

sonwh98 commented 8 years ago

famous.js has been discontinued so I stopped developing this library. I then looked into using three.js and created https://github.com/sonwh98/four. Here's an example of the famous periodical table implement with clojurescript using three.js http://shiva.kaicode.com/elements.html. src https://github.com/sonwh98/four/blob/master/src/four/client/elements.cljs

However, three.js does not play well with reagent. I am working on two independent clojure/clojurescript libraries to allow me do what famous.js and three.js allows me to do.

  1. https://github.com/sonwh98/morpheus matrix manipulation
  2. https://github.com/sonwh98/tweenie tweening animation

I will put up an example project in the next couple of weeks

stukennedy commented 8 years ago

Wow wasn't aware that Famous had been discontinued! Thought they just moved everything to Famous Engine.

Your elements demo is amazing ... Can't wait to see where you get with this. Thanks for all the info, will take a proper look tomorrow.

sonwh98 commented 8 years ago

Here is sample project https://github.com/sonwh98/food-truck Look at layout.cljs for on-screen and off-screen functions to see how to tween animation

stukennedy commented 8 years ago

it won't boot for me

java.io.FileNotFoundException: resources/schema.edn (No such file or directory)
sonwh98 commented 8 years ago

sorry forgot to commit the files. try it now. I've only implemented 2d transitions. it wouldnt look as snazzy as the periodical table with three.js but I'm working on it