Commit Graph

71 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 6bdd48da31 add allowSleep api to rigidbody (#4934) 2019-07-22 11:52:49 +08:00
jiaxin.lai 194125b70f wakeup body if change state of the body (#4902) 2019-07-18 09:27:50 +08:00
jiaxin.lai 765ac770f0 add physiscs system interface (#4866) 2019-07-12 10:03:47 +08:00
jiaxin.lai 01272e2d10 update api for applyForce/Impulse (#4865) 2019-07-12 10:01:37 +08:00
jiaxin.lai 57d06f678c Fix bug of set isTrigger (#4858) 2019-07-11 11:24:18 +08:00
pandamicro ec9e639293 Refactor valuetypes (#4798)
* Some value-types change

* value-type change

* Refactor valuetypes
2019-07-03 09:31:43 +08:00
jiaxin.lai 3d2c385b7a adjust physics system interface (#4759) 2019-07-01 09:34:31 +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 29b61b6b0a update physics api doc (#4735) 2019-06-27 17:55:47 +08:00
jiaxin.lai 7c7a0536a6 fix bug of collider set size & radius when using builtin (#4726) 2019-06-27 11:31:21 +08:00
jiaxin.lai 25c13d4d96 update display order of rigid body component (#4723) 2019-06-27 09:54:39 +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
JoneLau a18decfa83 fix circle (#4599) 2019-06-12 16:55:58 +08:00
jiaxin.lai 3359c9a30f Add physics interface api document (#4593) 2019-06-12 11:11: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 a1883b6cc6 Fix bug of Cannon physics (#4557) 2019-06-06 18:57:31 +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 4cbd3e63f2 split box\sphere collider component from base collider component (#4541) 2019-06-03 19:26:43 +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
Leslie Leigh 4756973818 do not auto calculate bounds (#4342)
* do not auto calculate bounds

* fix ccclass error
2019-04-30 10:53:37 +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 081867183a fix bug: "BoxCollider 优先级必须高于 RigidBody" (#4270) 2019-04-23 13:06:25 +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
jiaxin.lai 6b37a78897 rigidbody depends on colider, so rigidbody should be executed later than colider (#4186) 2019-04-10 15:45:31 +08:00
jiaxin.lai abc2d65da1 fixes UseGravity property in rigidbody component (#4165) 2019-04-08 18:14:45 +08:00
jiaxin.lai 3bb398a31f Fix a problem where the physical system collision event does not trigger because of automatic sleep, adding a trigger property to the collider component (#4158) 2019-04-08 14:35:23 +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 e5c94a04a8 fix bug (#4055) 2019-03-18 16:20:33 +08:00
Leslie Leigh a2416ba312 normalize the RaycastResult; allow rigidbody to sleep to prevent shake (#4028) 2019-03-13 18:21:15 +08:00
Leslie Leigh dcfb485d69 fix ammo-impl bugs (#3997) 2019-03-11 17:32:16 +08:00