Commit Graph

39 Commits

Author SHA1 Message Date
ChiaNing 4bc2739786 Vmath (#4987)
* Vmath (#4895)

* vmath refactor

* value-type API change

* vmath change update

* conflict fix

* value types change

* translate modify (#4917)

* value types bug fixed (#4940)

* playground update (#4946)

* bug fixed

* bug fixed

* bug fixed

* bug fix

* util modify

* create remove & ccenum rename

* export by cc.math

* Rename value-types to math

* util funtion deprecated warn

* value-types change

* color test fix

* color API change
2019-07-29 11:50:51 +08:00
pandamicro 1380e46c34 Unittest (#4973)
* unit test for ts

* Fix ts-jest warnings

* Remove puppeteer for now

* fix physics define and jest config for windows

* Replace Node ref with INode ref

* Fix ci issue

* Fix

* tweak

* tweak

* Fix vscode launcher

* now physics framework export all physics component (#28)

* tweaks
2019-07-25 17:15:20 +08:00
jiaxin.lai 765ac770f0 add physiscs system interface (#4866) 2019-07-12 10:03:47 +08:00
ChiaNing 9b3858a3e7 API-Doc format modify (#4761) 2019-07-01 09:33:24 +08:00
jiaxin.lai 2aa125974d Fix collider sync bug, add shape to body before enable body (#4753)
* add shape to body before enable body, when enable body will sync the body

* sync node after add shape to body
2019-06-29 12:16:48 +08:00
jiaxin.lai e3bd03f037 api module declare for physics (#4687)
* api module declare for physics

* modify physics api

* update physics profile
2019-06-26 10:42:55 +08:00
jiaxin.lai cb2786a789 Physics enegine event refactor (#4675)
* update cannon.js & cannon.js declaration

* plugin cannon.js collsion event & provide contacts(testing for now)

* wrap cannon body impl

* add linear\angular factor to rigidbody component

* add awake sleepy sleeping state query get property

* add apply local force/impulse function to rigidbody component

* add builtin macro protection

* add linear/angular veloctiy function to rigidbody component

* delete some unneed code, enable allowSleep by default

* event refactor, trigger emit by shape, collision emit by rigidBody

* Builtin system also need 'beforeStep'
2019-06-24 18:32:00 +08:00
jiaxin.lai b81f4471f3 Fix cannon add&remove mask method (#4652)
* Fix cannon add&remove mask method

* remove extra condition

* group and mask use bit operation only
2019-06-20 11:39:41 +08:00
jiaxin.lai 280e620f64 before destroy make sure the body is deactive (#4656) 2019-06-20 09:35:15 +08:00
jiaxin.lai 28b18223da Adjust group & mask documents, add get/set-CollisionFilter-group/mask interface (#4602) 2019-06-14 10:20:02 +08:00
ChiaNing f49bd31a22 Format adjustment for api doc (#4618) 2019-06-14 09:22:43 +08:00
jiaxin.lai 8a86e39151 Add some documents for gemo-util (#4614)
* Add some documents for gemo-util

* Add docments for distance
2019-06-13 17:33:31 +08:00
jiaxin.lai b8888a4317 Add Physics group and mask docments (#4597) 2019-06-12 17:04:46 +08:00
jiaxin.lai 38c2478b19 Add method to collider (#4561)
* Fix bug of Cannon physics

* Add on、off、once to collider-component

* Modify collision event emit param

* Rename ColliderComponentBase to ColliderComponent and export ColliderComponent;

* Add export-api file for export some physics api to user

* on、off、once Change to private

* Collider manage collision event
2019-06-11 17:32:33 +08:00
jiaxin.lai 34c8e6650d Physics builtin (#4547)
* Rename built-in-*** to builtin-***

* Rename r to radius and c to center;

* Add method : transkateAndRotate & setScale to obb & sphere;
Delete unneed class box in box.ts file

* Fix builtin physics Bug of #751 & Modify the physics relative component

* Add macro condition, some method is not declare in builtin

* Rename CC_PHYISCS_*** to CC_PHYSICS_***;

* rename BuiltIn*** to Builtin***

* Typing intersect
2019-06-05 10:27:09 +08:00
jiaxin.lai 0d0838770b Fix physic component (#4490)
* Fix physic component

* rename ' _triggered ' to ' _isTrigger ' in rigid-body-component

* Code stylized
2019-05-24 16:57:04 +08:00
jiaxin.lai c98f25d53e remove the collider body from world When the collider has shape only (#4470)
* remove the collider body from world When collider has shape only;
set body group default value to 1;

* Add declare for phyiscs macro
2019-05-22 14:07:57 +08:00
jiaxin.lai eaa5edb199 Adjusting mask of body,add note for interface (#4402) 2019-05-11 22:53:13 +08:00
jiaxin.lai 45c1c12ab5 Add group&mask to rigidbody (#4399) 2019-05-10 08:44:46 +08:00
jiaxin.lai 693b994857 Collision events are subdivided into ' Enter ', ' Stay ', ' Exit ' three states (#4391) 2019-05-09 17:12:05 +08:00
jiaxin.lai a2743c427f Fix bug of "Overwriting 'destroy' function in 'cc.ColliderComponentBase' class without calling super is not allowed. Call the super function in 'destroy' please" (#4367) 2019-05-05 14:22:52 +08:00
jiaxin.lai 96995cca91 Fix physics component destory bug (#4334) 2019-04-28 19:40:15 +08:00
jiaxin.lai c92eaf9807 Scaling of sync physical shape and node (#4318) 2019-04-26 18:35:56 +08:00
jiaxin.lai 7e71494806 Fix collider & rigid body component enabled property (#4249) 2019-04-19 15:25:38 +08:00
jiaxin.lai 1982751da3 Adjustment modules to avoid circular reference , split 'enum' type from 'instance.ts' , add to 'physics-enum.ts' (#4235) 2019-04-17 19:27:59 +08:00
jiaxin.lai 0609c58a9d Fix problems where physics and scene synchronization are different (#4224) 2019-04-15 20:25:26 +08:00
jiaxin.lai 5a0b49ac25 fixes applyForce and applyImpulse function call error, modify shape and body construct order (#4195) 2019-04-12 09:49:44 +08:00
jiaxin.lai 449e7640dc Construct a rigid body should be before the user script can access the rigid body (#4189) 2019-04-11 14:54:51 +08:00
Leslie Leigh 682c9d19dc Leslie (#4103)
* physics system use fixed frame-rate

* wakeup bodies before apply force and impulse
2019-03-26 00:12:28 +08:00
Leslie Leigh dcfb485d69 fix ammo-impl bugs (#3997) 2019-03-11 17:32:16 +08:00
Leslie Leigh b7869b595d restructure physics (#3985) 2019-03-08 11:30:14 +08:00
Leslie Leigh 1c967ed52f modify CCNodePool, change rigidbodycomponent implement (#3979) 2019-03-07 15:19:57 +08:00
Leslie Leigh 2b3a26ec7d modify default friction to 0; add api applyImpulse (#3972) 2019-03-06 15:55:04 +08:00
Leslie Leigh 19c390b8d9 modify default physics material (#3970) 2019-03-06 09:15:48 +08:00
Leslie Leigh dee10308a4 fix when use uint32arrat as index buffer (#3961)
* fix when use uint32arrat as index buffer

* add collide event
2019-03-05 10:27:15 +08:00
Leslie Leigh 8f9e5534d1 fix phys comp removal error (#3943)
* collider removal

* bug fix

* fix name
2019-03-01 18:25:07 +08:00
Leslie a83b1a7bdf remove PhyscisBody, PhysicsShape concepts, directly use RigidBodyComponent, CollidersComopnent; add Constraints. 2019-02-22 14:41:22 +08:00
Yun Hsiao Wu 06eb5d8060 fix tsc errors 2019-01-08 16:38:26 +08:00
Leslie Leigh 3ed9edfbc6 phy framework (#3644)
* phy framework

* phy mat

* framework/index.ts

* a node can have more than one collider

* rename physical to physics

* fix

* fix

* support mix ts js

* fix

* fix problems in issue

* fix

* remove RigidBodyType, add DataFlow

* useGravity, freezeRotation, isKinematic

* raycasts

* fit buildin-world raycast options

* add contact material

* lint

* add rigid-body-component.ts

* some improvements

* improvements

* fix bug
2018-12-27 12:03:10 +08:00