|
|
|
|
|
by dustingetz
3474 days ago
|
|
Yeah, I played with react-aframe and a couple other webvr experiments over the summer. A huge benefit of virtual dom in web dev is immutability and programming with immutable state. But all these experimental libraries are backed by THREE.js which means your state is done with traditional imperative math primitives. Just composing a scene in React is not very interesting because the real fun is in interacting with the state of all the objects, for example coding physics. So in the end it does not feel like React. Though Arcadia (experimental Unity engine adapter for Clojure, a functional programming language) is onto a way to bridge these imperative and functional worlds, the fundamental abstraction of Arcadia is to dehydrate a fat object instance into immutable data, then you can program with immutable data, and then hydrate the data back into the fat object instance (which is optimized for use with Unity and the underlying imperative hardware). E.g. https://github.com/arcadia-unity/Arcadia/blob/6105770a780194... Here are some related notes i dumped on reddit in April 2016 maybe helpful, about doing VR from Clojure: https://www.reddit.com/r/Clojure/comments/4sgjhz/new_clojuri... |
|