Commit Graph

26 Commits

Author SHA1 Message Date
James Chen f4ccf3a8bb [v3.8.5] Support inline enum and mangle private variables to reduce engine size. (#17703) 2024-10-15 10:17:16 +08:00
James Chen 08d95c5ea4 Add a tween unit test that parallel with two call tweens (#17357) 2024-07-12 08:29:05 +08:00
James Chen b029f9a99a fixed #17207: Add Tween.updateUntil low-level tween API (#17254) 2024-07-02 10:23:47 +08:00
James Chen d9bd3c3dc0 [tween] Add bezier / catmullrom support (#17216) 2024-06-25 15:41:15 +08:00
James Chen 61837784c1 Some type renaming in Tween module: TTweenCustomProperty to ITweenCustomProperty since it's an interface, remove T prefix. (#17198) 2024-06-24 11:18:58 +08:00
James Chen d21946f763 [tween] on/off node events in action-manager.ts only when target node is valid. (#17190) 2024-06-20 10:30:30 +08:00
James Chen e9d3e8dd08 Add tween.running getter and use it in the new added unit tests for tween.stopAll (#17193)
* Add tween.running getter and use it in the new added unit tests for tween.stopAll

* Add comment for running getter

* Add Tween.getRunningCount static method
2024-06-20 09:55:03 +08:00
James Chen 0115af0866 fixed #17186: [bug] Tween property type was changed to plain object (#17188) 2024-06-19 17:50:05 +08:00
James Chen 58ceb5ffe0 fixed #17110: [tween] Support to tween string and customize 'progress' for object. (#17154) 2024-06-17 11:34:42 +08:00
James Chen 35877f4765 [tween] Add missing types for custom progress or easing in props. (#17140) 2024-06-14 14:55:56 +08:00
James Chen e2a6d51fd3 [tween] fixed #3d-tasks/issues/9430: Automatic pause and resume Node tweens when Node active changes (#17141)
* fixed #3d-tasks/issues/9430: Automatic pause and resume Node tweens when Node active changes

* Fix Tween.clone()

* More unittest for tween.

* Fix comment in action-manager.ts

* Remove unused ActionManager.purgeSharedManager.

* Add more unit test for tween.

* Fix error TS2322: Type 'Tween<T | NonNullable<U>>' is not assignable to type 'Tween<T | U>'. Types of property 'to' are incompatible.

* Add Tween.getTarget()
2024-06-14 13:44:33 +08:00
James Chen 8e7aa0fdb1 [v3.8.5] Fix timeScale could not work for repeatForever. (#17118)
* Don't step if speed is 0.

* Fix timeScale could not work for repeatForever.

* RepeatForever's duration is Infinity.

* Add unit test.

* Add timeScale(0) test
2024-06-07 17:47:31 +08:00
James Chen fd47685c86 Merge Tween.startAt(time) and Tween.start() to Tween.start(time) , and don't export the internal option ITweenOption.relative. (#17115) 2024-06-07 10:31:00 +08:00
James Chen 06a6ae65b7 Add Tween.startAt(time) API and add more unit test. (#17105) 2024-06-05 14:25:28 +08:00
James Chen 99183fd2e4 Add Tween.update API. (#17099)
* And make ActionInterval.reverse  abstract.
2024-06-04 16:07:12 +08:00
James Chen d0fc74f113 [feature] Add Tween.pause/resume/pauseAllByTarget/resumeAllByTarget method. (#17094)
* Make Action.step/update abstract.

* Add Tween.pause/resume method.

* Add more unit tests for pause/resume/pauseAllByTarget/resumeAllByTarget.

* Add API comments for Tween.pause/resume/pauseAllByTarget/resumeAllByTarget.

* More unit tests for tween.pause/resume.
2024-06-04 14:23:31 +08:00
James Chen 1114b1bd77 Add Tween.timeScale(scale) method and Tween.duration getter (#17088)
* And Fix a repeatForever issue and add more unit test for repeatForever.
2024-06-03 21:14:46 +08:00
James Chen 5a08884c5b Add Tween.reverse and some features for Tween (#17071)
* Add action.setId/getId, Sequence.findAction, Spawn.findAction.

* tween clone needs to consider id

* Add Tween.id() method

* Tween.union  supports to union from a specific action id.

* Add Tween.reverse

* Tween.clone() doesn't have to pass in a target parameter, make it optional.

* Add more unit test
2024-06-03 13:49:49 +08:00
minggo bc6c2d4d6a Color val delete (#17021)
* remove Color._val, use r, g, b, a instead
2024-05-24 10:18:11 +08:00
James Chen bfeedd3a0d The public method Tween.union() should not update workerTarget. (#17020)
* The public method `Tween.union()` should not update workerTarget.
Add more unit test for tween.

* Revert
2024-05-23 14:29:01 +08:00
James Chen 0a7b11708c [v3.8.5] Support difference targets in sequence and parallel chain (#16979) 2024-05-21 13:54:42 +08:00
qiuguohua 043c4dcc3c Fix tween.sequence not supporting single parameter (#16443)
* fix tween.sequence

* add sequence unit test

* Fix tween.sequence not supporting single parameter

* semicolon added

---------

Co-authored-by: zxx43 <zxx43@hotmail.com>
Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2023-11-01 11:03:18 +08:00
zhakesi 6e052808e0 add unit test for tween destroySelf (#14391) 2023-02-28 10:08:06 +08:00
minggo 95a76235b6 Adjust some files (#12910)
`cocos/core` should not depend other modules, so move some files out of `cocos/core`:
- move some files from `cocos/core` to `cocos/game`
  - director.ts
  - splash-screen.ts
  - game.ts
 - move `cocos/core/root.ts` to `cocos/root.ts` as there is not better module to contain `root.ts`.
 - move `cocos/core/platform/view.ts` to `cocos/ui/view.ts` as screen related logic is moved to `cocos/core/platform/screen.ts`
2022-09-28 09:34:35 +08:00
minggo 0d7c5c8f56 move cocos/core/scene-graph to cocos/scene-graph (#12868)
* move `cocos/core/scene-graph` to `cocos/scene-graph`
* move some files in `cocos/core/components` to `cocos/scene-graph`:
  - component.ts
  - component-event-handler.ts
  - component-event-handler-schema.ts
* move some files in `cocos/core/components` to `cocos/misc`: 
  - missing-script.ts
  - model-renderer.ts
  - renderer.ts
  - camera-component.ts
* move  `cocos/core/components/system.ts` to ``cocos/core/system.ts``
2022-09-26 11:02:22 +08:00
Greg1129 6f3b1fae0c fix bug: remove all actions by tag (#9876)
* fix bug: remove all actions by tag

* add tween unit test

* add @internal comment

* fix using backward delete

* add commnets by eslint
2021-12-30 17:55:11 +08:00