I am creating a website that requires a physics engine. Working with a number of SPA applications, I feel pretty confident.
Unfortunately, I had problems with collision detection and walls for modeling the physics that the famous created.
Here you can see an editable example.
https://staging.famous.org/examples/index.html?block=gravity3d&detail=false&header=false
What I would like to know is it possible to add collisions to particles? I tried this, but it seems that the collisions are not configured correctly. I was hoping someone could do it successfully.
Thanks!
var FamousEngine = famous.core.FamousEngine; var Camera = famous.components.Camera; var DOMElement = famous.domRenderables.DOMElement; var Gravity3D = famous.physics.Gravity3D; var Gravity1D = famous.physics.Gravity1D; var MountPoint = famous.components.MountPoint; var PhysicsEngine = famous.physics.PhysicsEngine; var Physics = famous.physics; var Wall = famous.physics.Wall; var Position = famous.components.Position; var Size = famous.components.Size; var Sphere = famous.physics.Sphere; var Vec3 = famous.math.Vec3; var Collision = famous.physics.Collision; function Demo() { this.scene = FamousEngine.createScene('#socialInteractive'); this.camera = new Camera(this.scene); this.camera.setDepth(1000); this.simulation = new PhysicsEngine(); this.items = []; this.collision = new Collision(); var Wall = famous.physics.Wall; var rightWall = new Wall({ direction: Wall.LEFT });
Michaelbell
source share