ashleymarkfletcher / spark-ar-physics Goto Github PK
View Code? Open in Web Editor NEWA helper module for connecting Spark AR with physics libraries
A helper module for connecting Spark AR with physics libraries
Hi!
I see that in the example the scale of the cubes are .1, while in cannon they are all set to 5.. What would be the scale ratio between both engines ?
EDIT: Apparently, the imported models from SparkAR Library are in the wrong dimensions with Spark's own scale units ?
TriMesh uses Float32Array for the vertices, but SparkAR doesn't seem to support TypedArrays out of the box. (strange...dunno why). Of course, there may be polyfills available though that the user may download on his own in the unlikely case they use trimesh. The "official" package published on Spark AR Library appears ot have this issue if you use something like:
CANNON.Trimesh.createTorus(4, 3.5, 16, 16);
. But from the typehintings, Trimesh seems to be unavailable and not found in intellisense though..even though you can still call it remotely.
Hello there!
First off, thanks for the tutorial and the starter. I'm trying to tackle a project and hoping you can help. Essentially I want to have three objects float and collide with each other, bouncing off of the device's frame. I'm wondering if this is achievable through Cannon? Inverting the gravity like so: world.gravity.set(0, 9.82, 0);
doesn't need to invert the gravity, and even then, I'd have to have a 'roof' of sorts to have the objects bounce off the top and sides. Can you think of a way to achieve this?
Thanks in advance!
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.