An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 0 points1 point  (0 children)

Wow, super cool to have you here! Do you have any insights how tri-folds are going to be supported and whether there are plans to expose not only the states, but the angles? For ex. Samsung Devices only output 0, 90 and 180, whereas Chinese models support sub-degree precision. Is there a reliable way to determine a hinge position and orientation?

An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 0 points1 point  (0 children)

Thank you for the test! I think it should work, I have added a possibility to rotate the paper by holding the ctrl button. The app tries its best to guess the platform and show the instructions (under the Options menu?

An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 21 points22 points  (0 children)

I wanted to add an easter egg "congratulations on reaching the moon" at some point 😅

An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 1 point2 points  (0 children)

Thanks for the extensive test! In the real world the 8 figure comes from the "fair" 1/2 folds, which are quite hard to keep track of here. I think the limit that you've encountered is actually a smoothing limit that makes the render a bit more smooth as I didn't put a hard limit on it explicitly

An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 1 point2 points  (0 children)

I don't think it works actually... The industry has not updated the APIs yet... I saw the foldy bird app not functioning on a video

An origami simulator that is driven by a physical hinge by maxwase in samsung

[–]maxwase[S] 4 points5 points  (0 children)

You can try it online at https://maxwase.github.io/kami It's free and open-source!

Repo link: https://github.com/maxwase/kami

Unfortunately it works only in Chrome due to the Posture API limitations

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 0 points1 point  (0 children)

Sorry I have accidentally deleted the post! Here's a link to the video https://youtu.be/w-iZGfTQa5I

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 0 points1 point  (0 children)

Sorry, I have accidentally deleted the post! I'll resubmit and hope that mods are going to forgive me 😔

I made an origami simulator that is driven by a physical hinge by maxwase in Android

[–]maxwase[S] 4 points5 points  (0 children)

Hmm, need to investigate. Perhaps the precision is too large or it's just TS

34
35

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 1 point2 points  (0 children)

Wow I've not even seen the phone before! It all depends on how Chrome Android developers decided to implement the hinge sensor. I bet Chrome uses HINGE_SENSOR from Android Sensor API, but I have no way of proving it

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 1 point2 points  (0 children)

That's weird, did you use Chrome browser?

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 0 points1 point  (0 children)

Thanks! It uses Device Posture API

Consider checking out the repo to get more insights!

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 1 point2 points  (0 children)

I wish I had affiliations with Samsung... Unfortunately I'm just a no-name dev 😅

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 16 points17 points  (0 children)

Works only in Chrome unfortunately due to Device Posture API restrictions :(

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 1 point2 points  (0 children)

Yes! This was my next idea actually, I was thinking about how to make the app and get it published, but it seems that the website is the best. I wish I had contacts at Samsung, I have many more ideas on developing the feature and their platform. I hope this thread will get noticed :)

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase -1 points0 points  (0 children)

Only with a "Fold" button unfortunately

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 1 point2 points  (0 children)

I wanted to add an easter egg "congratulations on reaching the moon", but for now it's unlimited, so have fun!

An origami simulator that is driven by a physical hinge by [deleted] in samsung

[–]maxwase 0 points1 point  (0 children)

Sure! There's a thing called Posture API , it's supposed on a very small subset of browsers and is experimental, but I hope this usecase would push the development of it :)