@x1a0ma17x/zeppos-fx 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/CHANGELOG.md +33 -0
  3. package/README.md +68 -136
  4. package/README_zh-CN.md +65 -142
  5. package/example/app.js +9 -9
  6. package/example/app.json +4 -10
  7. package/example/global.d.ts +1 -1
  8. package/example/jsconfig.json +9 -9
  9. package/example/package.json +17 -14
  10. package/example/page/i18n/en-US.po +1 -1
  11. package/example/page/index.js +45 -19
  12. package/example/page/index.r.layout.js +6 -6
  13. package/example/pnpm-lock.yaml +31 -0
  14. package/fx.js +6 -6
  15. package/package.json +1 -1
  16. package/example/app-side/i18n/en-US.po +0 -2
  17. package/example/app-side/index.js +0 -13
  18. package/example/page/i18n/fr-FR.po +0 -4
  19. package/example/page/i18n/ru-RU.po +0 -4
  20. package/example/page/i18n/zh-CN.po +0 -2
  21. package/example/page/i18n/zh-TW.po +0 -4
  22. package/example/page/index.anim.js +0 -37
  23. package/example/page/index.style.js +0 -13
  24. package/example/setting/i18n/en-US.po +0 -2
  25. package/example/setting/index.js +0 -7
  26. package/src/example/app.js +0 -10
  27. package/src/example/app.json +0 -46
  28. package/src/example/assets/default.b/icon.png +0 -0
  29. package/src/example/assets/default.r/icon.png +0 -0
  30. package/src/example/assets/default.s/icon.png +0 -0
  31. package/src/example/global.d.ts +0 -1
  32. package/src/example/jsconfig.json +0 -9
  33. package/src/example/libs/fx.js +0 -325
  34. package/src/example/package.json +0 -14
  35. package/src/example/page/anim.js +0 -60
  36. package/src/example/page/i18n/en-US.po +0 -2
  37. package/src/example/page/index.js +0 -13
  38. package/src/example/page/index.r.layout.js +0 -6
@@ -1,14 +0,0 @@
1
- {
2
- "name": "empty",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "app.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "author": "",
10
- "license": "ISC",
11
- "devDependencies": {
12
- "@zeppos/device-types": "^3.0.0"
13
- }
14
- }
@@ -1,60 +0,0 @@
1
- import { Fx } from "../libs/fx";
2
- import * as hmUI from "@zos/ui";
3
-
4
- export const ANIM_PROFILE = {
5
- metadata: {
6
- version: 1,
7
- author: "XiaomaiTX",
8
- default_config: {
9
- track: {
10
- startTime: 0,
11
- },
12
- frame: {
13
- fps: 60,
14
- time: 1,
15
- style: Fx.Styles.EASE_IN_OUT_QUAD,
16
- },
17
- },
18
- },
19
- tracks: [
20
- {
21
- config: {
22
- startTime: 0,
23
- },
24
- frames: [
25
- {
26
- delay: 0,
27
- fps: 60,
28
- time: 1,
29
- style: Fx.Styles.EASE_IN_OUT_QUAD,
30
- init_func: () => {
31
- console.log("init");
32
- const text = hmUI.createWidget(hmUI.widget.TEXT, {
33
- x: 0,
34
- y: 0,
35
- w: 100,
36
- h: 100,
37
- text: "Hello World",
38
- color: 0xff3232,
39
- });
40
- return text;
41
- },
42
- runtime_func: (wgtObj, progress) => {
43
- let begin = 0;
44
- let end = 100;
45
- console.log(begin + (end - begin) * progress);
46
- wgtObj.setProperty(
47
- hmUI.prop.X,
48
- begin + (end - begin) * progress
49
- );
50
- return wgtObj;
51
- },
52
-
53
- callback_func: (wgtObj) => {
54
- console.log("callback");
55
- },
56
- },
57
- ],
58
- },
59
- ],
60
- };
@@ -1,2 +0,0 @@
1
- msgid "example"
2
- msgstr "This is an example in device"
@@ -1,13 +0,0 @@
1
- import { getText } from '@zos/i18n'
2
- import * as Styles from 'zosLoader:./index.[pf].layout.js'
3
- import { Fx } from '../libs/fx';
4
- import { ANIM_PROFILE } from './anim';
5
-
6
- Page({
7
- build() {
8
- const anim = new Fx(ANIM_PROFILE);
9
-
10
- anim.start();
11
- console.log(anim.getStatus());
12
- }
13
- })
@@ -1,6 +0,0 @@
1
- import { px } from "@zos/utils";
2
-
3
- export const TEXT_STYLE = {
4
- x: px(0),
5
- y: px(0),
6
- }