@hxa-rn/react-native-gcanvas 6.0.25 → 6.0.26

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 (86) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +203 -21
  3. package/README.md +5 -5
  4. package/harmony/gcanvas/LICENSE +203 -21
  5. package/harmony/gcanvas/NOTICE +32 -32
  6. package/harmony/gcanvas/OAT.xml +37 -37
  7. package/harmony/gcanvas/build-profile.json5 +16 -16
  8. package/harmony/gcanvas/hvigorfile.ts +1 -1
  9. package/harmony/gcanvas/index.ets +1 -1
  10. package/harmony/gcanvas/oh-package.json5 +14 -14
  11. package/harmony/gcanvas/src/main/cpp/CMakeLists.txt +126 -126
  12. package/harmony/gcanvas/src/main/cpp/GCanvasNapi.cpp +485 -485
  13. package/harmony/gcanvas/src/main/cpp/GCanvasXComponent.cpp +106 -106
  14. package/harmony/gcanvas/src/main/cpp/GcanvasPackage.h +24 -24
  15. package/harmony/gcanvas/src/main/ets/GCanvasModuleTurboModule.ts +448 -448
  16. package/harmony/gcanvas/src/main/ets/GCanvasNativeEngine.ts +206 -206
  17. package/harmony/gcanvas/src/main/ets/components/GCanvasView.ets +64 -64
  18. package/harmony/gcanvas/src/main/module.json5 +21 -21
  19. package/harmony/gcanvas/src/main/resources/base/element/string.json +12 -12
  20. package/harmony/gcanvas/src/main/resources/en_US/element/string.json +8 -8
  21. package/harmony/gcanvas/src/main/resources/zh_CN/element/string.json +12 -12
  22. package/harmony/gcanvas.har +0 -0
  23. package/package.json +4 -4
  24. package/packages/gcanvas/.babelrc +4 -4
  25. package/packages/gcanvas/.eslintrc.js +133 -133
  26. package/packages/gcanvas/package.json +19 -19
  27. package/packages/gcanvas/rollup.config.js +13 -13
  28. package/packages/gcanvas/src/bridge/react-native.js +286 -286
  29. package/packages/gcanvas/src/bridge/weex.js +210 -210
  30. package/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +16 -16
  31. package/packages/gcanvas/src/context/2d/FillStylePattern.js +7 -7
  32. package/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +16 -16
  33. package/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +48 -48
  34. package/packages/gcanvas/src/context/2d/RenderingContext.js +787 -787
  35. package/packages/gcanvas/src/context/webgl/ActiveInfo.js +10 -10
  36. package/packages/gcanvas/src/context/webgl/Buffer.js +20 -20
  37. package/packages/gcanvas/src/context/webgl/Framebuffer.js +20 -20
  38. package/packages/gcanvas/src/context/webgl/GLenum.js +300 -300
  39. package/packages/gcanvas/src/context/webgl/GLmethod.js +141 -141
  40. package/packages/gcanvas/src/context/webgl/GLtype.js +22 -22
  41. package/packages/gcanvas/src/context/webgl/Program.js +20 -20
  42. package/packages/gcanvas/src/context/webgl/Renderbuffer.js +20 -20
  43. package/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -1479
  44. package/packages/gcanvas/src/context/webgl/Shader.js +21 -21
  45. package/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +10 -10
  46. package/packages/gcanvas/src/context/webgl/Texture.js +21 -21
  47. package/packages/gcanvas/src/context/webgl/UniformLocation.js +21 -21
  48. package/packages/gcanvas/src/context/webgl/classUtils.js +2 -2
  49. package/packages/gcanvas/src/env/canvas.js +210 -210
  50. package/packages/gcanvas/src/env/image.js +76 -76
  51. package/packages/gcanvas/src/env/off-screen-canvas.js +74 -74
  52. package/packages/gcanvas/src/index.js +56 -56
  53. package/src/components/CanvasView.js +20 -20
  54. package/src/components/GCanvasComponent.js +408 -408
  55. package/src/index.js +69 -69
  56. package/src/packages/gcanvas/.babelrc +4 -4
  57. package/src/packages/gcanvas/.eslintrc.js +133 -133
  58. package/src/packages/gcanvas/package.json +19 -19
  59. package/src/packages/gcanvas/rollup.config.js +13 -13
  60. package/src/packages/gcanvas/src/bridge/react-native.js +288 -288
  61. package/src/packages/gcanvas/src/bridge/weex.js +210 -210
  62. package/src/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +16 -16
  63. package/src/packages/gcanvas/src/context/2d/FillStylePattern.js +7 -7
  64. package/src/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +16 -16
  65. package/src/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +48 -48
  66. package/src/packages/gcanvas/src/context/2d/RenderingContext.js +801 -801
  67. package/src/packages/gcanvas/src/context/webgl/ActiveInfo.js +10 -10
  68. package/src/packages/gcanvas/src/context/webgl/Buffer.js +20 -20
  69. package/src/packages/gcanvas/src/context/webgl/Framebuffer.js +20 -20
  70. package/src/packages/gcanvas/src/context/webgl/GLenum.js +300 -300
  71. package/src/packages/gcanvas/src/context/webgl/GLmethod.js +141 -141
  72. package/src/packages/gcanvas/src/context/webgl/GLtype.js +22 -22
  73. package/src/packages/gcanvas/src/context/webgl/Program.js +20 -20
  74. package/src/packages/gcanvas/src/context/webgl/Renderbuffer.js +20 -20
  75. package/src/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -1479
  76. package/src/packages/gcanvas/src/context/webgl/Shader.js +21 -21
  77. package/src/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +10 -10
  78. package/src/packages/gcanvas/src/context/webgl/Texture.js +21 -21
  79. package/src/packages/gcanvas/src/context/webgl/UniformLocation.js +21 -21
  80. package/src/packages/gcanvas/src/context/webgl/classUtils.js +2 -2
  81. package/src/packages/gcanvas/src/env/canvas.js +210 -210
  82. package/src/packages/gcanvas/src/env/image.js +76 -76
  83. package/src/packages/gcanvas/src/env/off-screen-canvas.js +74 -74
  84. package/src/packages/gcanvas/src/index.js +56 -56
  85. package/src/specs/v1/GCanvasViewNativeComponent.ts +42 -42
  86. package/src/specs/v1/NativeGCanvasModule.ts +140 -140
@@ -1,12 +1,12 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from npm package"
6
- },
7
- {
8
- "name": "reason_internet",
9
- "value": "用于下载远程图片以绑定 Canvas 纹理"
10
- }
11
- ]
12
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from npm package"
6
+ },
7
+ {
8
+ "name": "reason_internet",
9
+ "value": "用于下载远程图片以绑定 Canvas 纹理"
10
+ }
11
+ ]
12
+ }
Binary file
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@hxa-rn/react-native-gcanvas",
3
3
  "displayName": "@hxa-rn/react-native-gcanvas",
4
- "version": "6.0.25",
4
+ "version": "6.0.26",
5
5
  "description": "A C++ native canvas 2D/WebGL component based on gpu opengl glsl shader GCanvas",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
8
8
  "react-native": "./src/index.js",
9
- "license": "MIT",
9
+ "license": "Apache-2.0",
10
10
  "private": false,
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/flyskywhy/react-native-gcanvas.git"
13
+ "url": "https://gitcode.com/hxa-rn/react-native-gcanvas.git"
14
14
  },
15
15
  "keywords": [
16
16
  "react-native",
17
17
  "harmony",
18
18
  "harmonyos"
19
19
  ],
20
- "homepage": "https://github.com/flyskywhy/react-native-gcanvas#readme",
20
+ "homepage": "https://gitcode.com/hxa-rn/react-native-gcanvas",
21
21
  "publishConfig": {
22
22
  "registry": "https://registry.npmjs.org/"
23
23
  },
@@ -1,5 +1,5 @@
1
- {
2
- "plugins": [
3
- "@babel/plugin-proposal-class-properties"
4
- ]
1
+ {
2
+ "plugins": [
3
+ "@babel/plugin-proposal-class-properties"
4
+ ]
5
5
  }
@@ -1,133 +1,133 @@
1
- module.exports = {
2
- 'root': true,
3
- 'parser': 'babel-eslint',
4
- 'env': {
5
- 'browser': true,
6
- 'node': true,
7
- 'es6': true,
8
- 'jest': true,
9
- 'commonjs': true
10
- },
11
- 'parserOptions': {
12
- 'sourceType': 'module',
13
- 'ecmaVersion': 6,
14
- 'ecmaFeatures': {
15
- 'generators': true,
16
- 'experimentalObjectRestSpread': true
17
- }
18
- },
19
- 'globals': {
20
- '__weex_data__': true,
21
- '__weex_options__': true,
22
- '__weex_downgrade__': true,
23
- '__weex_define__': true,
24
- '__weex_require__': true,
25
- 'WXEnvironment': true,
26
- 'weex': true,
27
- 'callGCanvasLinkNative': true
28
- },
29
- 'rules': {
30
- 'max-len': 'off',
31
- // ES6
32
- 'prefer-const': 'off',
33
- 'no-const-assign': 'error',
34
- 'no-class-assign': 'error',
35
- 'no-dupe-class-members': 'error',
36
- 'rest-spread-spacing': 'error',
37
- 'no-duplicate-imports': 'error',
38
- 'no-useless-rename': 'error',
39
- 'arrow-spacing': 'error',
40
- 'no-useless-computed-key': 'error',
41
- 'template-curly-spacing': 'error',
42
- 'generator-star-spacing': ['error', {'before': false, 'after': true}],
43
- 'yield-star-spacing': ['error', {'before': false, 'after': true}],
44
- 'strict': ['off', 'global'],
45
- 'global-strict': ['off', 'always'],
46
- 'no-extra-strict': 'off',
47
- 'no-shadow': 'off',
48
- 'no-unused-vars': ['off', {
49
- 'vars': 'local',
50
- 'args': 'after-used',
51
- 'varsIgnorePattern': 'createElement'
52
- }],
53
- 'no-undef': 'error',
54
- 'no-unused-expressions': 'off',
55
- 'no-use-before-define': 'off',
56
- 'yoda': 'off',
57
- 'eqeqeq': 'off',
58
- 'no-new': 'off',
59
- 'consistent-return': 'off',
60
- 'dot-notation': ['error', {
61
- 'allowKeywords': true
62
- }],
63
- 'no-extend-native': 'error',
64
- 'no-native-reassign': 'error',
65
- 'no-return-assign': 'off',
66
- 'no-constant-condition': ['error', {
67
- 'checkLoops': false
68
- }],
69
- 'no-caller': 'error',
70
- 'no-loop-func': 'off',
71
-
72
- // Node.js
73
- 'no-console': 'off',
74
- 'no-catch-shadow': 'error',
75
- 'no-new-require': 'off',
76
- 'no-mixed-requires': ['off', false],
77
- 'no-path-concat': 'off',
78
- 'handle-callback-err': 'off',
79
-
80
- 'no-empty': 'off',
81
- 'indent': ['error', 2, {
82
- 'SwitchCase': 1,
83
- 'MemberExpression': 'off'
84
- }],
85
- 'camelcase': ['off', {
86
- 'properties': 'always'
87
- }],
88
- 'quotes': ['error', 'single', 'avoid-escape'],
89
- 'brace-style': ['error', '1tbs', {
90
- 'allowSingleLine': false
91
- }],
92
- 'comma-spacing': ['error', {
93
- 'before': false,
94
- 'after': true
95
- }],
96
- 'comma-style': ['error', 'last'],
97
- 'eol-last': 'off',
98
- 'func-names': 'off',
99
- 'new-cap': ['error', {
100
- 'capIsNewExceptions': ['App', 'Page', 'Component']
101
- }],
102
- 'key-spacing': ['error', {
103
- 'beforeColon': false,
104
- 'afterColon': true
105
- }],
106
- 'no-mixed-spaces-and-tabs': 'error',
107
- 'no-multi-spaces': 'error',
108
- 'no-multiple-empty-lines': 'error',
109
- 'no-new-object': 'error',
110
- 'no-spaced-func': 'error',
111
- 'no-tabs': 'error',
112
- 'no-trailing-spaces': 'error',
113
- 'no-extra-parens': ['error', 'all', { ignoreJSX: 'all' }],
114
- 'padded-blocks': ['error', 'never'],
115
- 'semi': 'error',
116
- 'semi-spacing': 'error',
117
- 'keyword-spacing': 'error',
118
- 'space-before-blocks': 'error',
119
- 'space-before-function-paren': ['error', 'never'],
120
- 'space-infix-ops': 'error',
121
- 'spaced-comment': ['error', 'always', {
122
- 'line': {
123
- 'markers': ['/'],
124
- 'exceptions': ['-', '+']
125
- },
126
- 'block': {
127
- 'markers': ['!'],
128
- 'exceptions': ['*'],
129
- 'balanced': true
130
- }
131
- }]
132
- }
133
- };
1
+ module.exports = {
2
+ 'root': true,
3
+ 'parser': 'babel-eslint',
4
+ 'env': {
5
+ 'browser': true,
6
+ 'node': true,
7
+ 'es6': true,
8
+ 'jest': true,
9
+ 'commonjs': true
10
+ },
11
+ 'parserOptions': {
12
+ 'sourceType': 'module',
13
+ 'ecmaVersion': 6,
14
+ 'ecmaFeatures': {
15
+ 'generators': true,
16
+ 'experimentalObjectRestSpread': true
17
+ }
18
+ },
19
+ 'globals': {
20
+ '__weex_data__': true,
21
+ '__weex_options__': true,
22
+ '__weex_downgrade__': true,
23
+ '__weex_define__': true,
24
+ '__weex_require__': true,
25
+ 'WXEnvironment': true,
26
+ 'weex': true,
27
+ 'callGCanvasLinkNative': true
28
+ },
29
+ 'rules': {
30
+ 'max-len': 'off',
31
+ // ES6
32
+ 'prefer-const': 'off',
33
+ 'no-const-assign': 'error',
34
+ 'no-class-assign': 'error',
35
+ 'no-dupe-class-members': 'error',
36
+ 'rest-spread-spacing': 'error',
37
+ 'no-duplicate-imports': 'error',
38
+ 'no-useless-rename': 'error',
39
+ 'arrow-spacing': 'error',
40
+ 'no-useless-computed-key': 'error',
41
+ 'template-curly-spacing': 'error',
42
+ 'generator-star-spacing': ['error', {'before': false, 'after': true}],
43
+ 'yield-star-spacing': ['error', {'before': false, 'after': true}],
44
+ 'strict': ['off', 'global'],
45
+ 'global-strict': ['off', 'always'],
46
+ 'no-extra-strict': 'off',
47
+ 'no-shadow': 'off',
48
+ 'no-unused-vars': ['off', {
49
+ 'vars': 'local',
50
+ 'args': 'after-used',
51
+ 'varsIgnorePattern': 'createElement'
52
+ }],
53
+ 'no-undef': 'error',
54
+ 'no-unused-expressions': 'off',
55
+ 'no-use-before-define': 'off',
56
+ 'yoda': 'off',
57
+ 'eqeqeq': 'off',
58
+ 'no-new': 'off',
59
+ 'consistent-return': 'off',
60
+ 'dot-notation': ['error', {
61
+ 'allowKeywords': true
62
+ }],
63
+ 'no-extend-native': 'error',
64
+ 'no-native-reassign': 'error',
65
+ 'no-return-assign': 'off',
66
+ 'no-constant-condition': ['error', {
67
+ 'checkLoops': false
68
+ }],
69
+ 'no-caller': 'error',
70
+ 'no-loop-func': 'off',
71
+
72
+ // Node.js
73
+ 'no-console': 'off',
74
+ 'no-catch-shadow': 'error',
75
+ 'no-new-require': 'off',
76
+ 'no-mixed-requires': ['off', false],
77
+ 'no-path-concat': 'off',
78
+ 'handle-callback-err': 'off',
79
+
80
+ 'no-empty': 'off',
81
+ 'indent': ['error', 2, {
82
+ 'SwitchCase': 1,
83
+ 'MemberExpression': 'off'
84
+ }],
85
+ 'camelcase': ['off', {
86
+ 'properties': 'always'
87
+ }],
88
+ 'quotes': ['error', 'single', 'avoid-escape'],
89
+ 'brace-style': ['error', '1tbs', {
90
+ 'allowSingleLine': false
91
+ }],
92
+ 'comma-spacing': ['error', {
93
+ 'before': false,
94
+ 'after': true
95
+ }],
96
+ 'comma-style': ['error', 'last'],
97
+ 'eol-last': 'off',
98
+ 'func-names': 'off',
99
+ 'new-cap': ['error', {
100
+ 'capIsNewExceptions': ['App', 'Page', 'Component']
101
+ }],
102
+ 'key-spacing': ['error', {
103
+ 'beforeColon': false,
104
+ 'afterColon': true
105
+ }],
106
+ 'no-mixed-spaces-and-tabs': 'error',
107
+ 'no-multi-spaces': 'error',
108
+ 'no-multiple-empty-lines': 'error',
109
+ 'no-new-object': 'error',
110
+ 'no-spaced-func': 'error',
111
+ 'no-tabs': 'error',
112
+ 'no-trailing-spaces': 'error',
113
+ 'no-extra-parens': ['error', 'all', { ignoreJSX: 'all' }],
114
+ 'padded-blocks': ['error', 'never'],
115
+ 'semi': 'error',
116
+ 'semi-spacing': 'error',
117
+ 'keyword-spacing': 'error',
118
+ 'space-before-blocks': 'error',
119
+ 'space-before-function-paren': ['error', 'never'],
120
+ 'space-infix-ops': 'error',
121
+ 'spaced-comment': ['error', 'always', {
122
+ 'line': {
123
+ 'markers': ['/'],
124
+ 'exceptions': ['-', '+']
125
+ },
126
+ 'block': {
127
+ 'markers': ['!'],
128
+ 'exceptions': ['*'],
129
+ 'balanced': true
130
+ }
131
+ }]
132
+ }
133
+ };
@@ -1,19 +1,19 @@
1
- {
2
- "name": "@gcanvas/core",
3
- "version": "1.0.0",
4
- "description": "Javascript Bridge for GCanvas",
5
- "main": "src/index.js",
6
- "scripts": {
7
- "build": "rollup --config",
8
- "lint": "npm run lint:nofix -- --fix",
9
- "lint:nofix": "eslint --ext .js --ext .jsx ./"
10
- },
11
- "devDependencies": {
12
- "@babel/core": "^7.7.2",
13
- "@babel/plugin-proposal-class-properties": "^7.7.0",
14
- "babel-eslint": "^10.0.3",
15
- "eslint": "^6.6.0",
16
- "rollup": "^1.27.0",
17
- "rollup-plugin-babel": "^4.3.3"
18
- }
19
- }
1
+ {
2
+ "name": "@gcanvas/core",
3
+ "version": "1.0.0",
4
+ "description": "Javascript Bridge for GCanvas",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "build": "rollup --config",
8
+ "lint": "npm run lint:nofix -- --fix",
9
+ "lint:nofix": "eslint --ext .js --ext .jsx ./"
10
+ },
11
+ "devDependencies": {
12
+ "@babel/core": "^7.7.2",
13
+ "@babel/plugin-proposal-class-properties": "^7.7.0",
14
+ "babel-eslint": "^10.0.3",
15
+ "eslint": "^6.6.0",
16
+ "rollup": "^1.27.0",
17
+ "rollup-plugin-babel": "^4.3.3"
18
+ }
19
+ }
@@ -1,14 +1,14 @@
1
- import babel from 'rollup-plugin-babel';
2
-
3
- module.exports = {
4
- input: 'src/index.js',
5
- output: {
6
- file: 'dist/gcanvas.js',
7
- format: 'cjs'
8
- },
9
- plugins: [
10
- babel({
11
- exclude: 'node_modules/**'
12
- })
13
- ]
1
+ import babel from 'rollup-plugin-babel';
2
+
3
+ module.exports = {
4
+ input: 'src/index.js',
5
+ output: {
6
+ file: 'dist/gcanvas.js',
7
+ format: 'cjs'
8
+ },
9
+ plugins: [
10
+ babel({
11
+ exclude: 'node_modules/**'
12
+ })
13
+ ]
14
14
  };