25th week - BabylonJS

This week is all about BabylonJS. I was trying to refactor Summer Festival using react-babylonjs and @preact/signals-react.

Game developing is little different with UI developing. Since the canvas repaints in every frame. I don’t need to care too much about the reactive system. In every frame, there is a pre-render function to pull state from the store.

Unity can be used to export BabylonJS App. Using Scene exporter, it is a paid tool, can find a free alpha version on github. After using it, I found it can export gltf file, the code part is not helpful. Same situation in needle engine. (BTW, needle engine only works on node v16)

cannon is deprecated now, it’s been rewritten to cannon.es. I strongly suggest to read these [code](https://github.com/brianzinn/react-babylonjs/blob/master/packages/static/content/examples/physics/BouncySphere.tsx http://grideasy.github.io/tutorials/Using_The_Physics_Engine ) to use a physical engine in react-babylonjs.

Custom Resolution on Mac

betterdisplay is a paid extension to make dummy screens on Mac OS with a 7 days free trail.

WebXR

There are some CSS specs like transform-style: detached; is used in MR environment. DOM-overlays, I am not sure if it can show DOM in dual screen. If it can’t, maybe using html2canvas can help? Then canvas UI framework like Flutter can have better performance, I guess.

In react-babylonjs, attach an HTML element to a mesh is simple, just use Html tag.

Faas

I was thinking about run serverless functions on a local machine. I found knative and openfaas. I didn’t dig further.

FydeOS

This Friday, I tried FydeOS on my Cube tablet. rotation not working, camera was off. The camera can not work on Ubuntu either. It’s an Intel AV Camera 2500, I found a surface repository trying to crack it. I think I will try Ubuntu on my machines this weekend, running Windows is too hot in this summer.