supereggbert / jiglibjs Goto Github PK
View Code? Open in Web Editor NEWJigLib port for javascript
JigLib port for javascript
prerelease - coming soon This release is mainly due to the great foundation the JigLibFlash guys have put in place, big thanks you from me and I'm sure everyone else. http://www.jiglibflash.com/blog/
Is there a way to prevent a body from rotating? This is mostly useful for solid player objects (think zelda in Ocarina of Time).
Hey,
I'm pretty new at WebGL and so I started learning by reading example code of three.js. Finally I didn't only want to watch my created cube rotate, but to behave like a fully realistic cube and that's how I got to use JigLibJS so far.
But I'm experiencing problems by integrating JigbLib into my three.js code.
I gathered information and snippets from some examples but still the cube I created just don't want to fall down to the ground I created.
Maybe I'm messing something up with the updateMatrixWorld-Method?
The code can be found here: http://pastebin.com/9tDrz7dd
Hi,
I've noticed that the Matrix3D class (jiglib/maths/matrix3d.js) possibly has a bug in the appendRotation() and angleAxis() functions. The conversion from degrees to angles is done with angle=angle/(pi_2), whereas it should be angle=angle_pi/180 (or angle_2_pi/360). I am also wondering why in the appendRotation() function you negate the axis of rotation (Vector3DUtil.negate(axis)).
If, for example, I set the rotation angles [10, 20, 30] of an object and I apply inverse transformations to the orientation matrix I get the rotation angles [350, 340, 330](with degrees/radians conversion fixed). If I comment the axis negation part I get the right values ([10, 20, 30]).
Regards,
Gabriel
Hi, I am creating a bunch of JBoxes and then setting them high above a JPlane. When they fall, they collide with each other and the plane, but they do not rotate. I don't understand why there is no rotation on impact?
I have pasted my code here: http://pastebin.com/gFabjbU6
Hi,
I've made a little scenario consisting of a sphere and a plane (with normal (0, 1, 0) and distance 0, so the xOz plane). The system has a gravity of [0, -9, 0]. The ball is positioned slightly above (in the positive Y direction) the plane with an initial velocity on the X-axis. There is a friction coefficient set for both the ball and the plane. I would expect the ball to 'fall' onto the plane and continue its movement in parallel with the X-axis, but slowly decreasing its velocity because of the friction.
I am unable to obtain this behavior using the friction parameter. No matter what I set for the friction parameters, the system behaves as if there were no friction at all.
I am curious why this happens.
I've pasted the code here: http://pastebin.com/x8sTYRaD
Regards,
Gabriel
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.