Commit f4976b1 1 parent 7dfa2eb commit f4976b1 Copy full SHA for f4976b1
File tree 3 files changed +85
-22
lines changed
3 files changed +85
-22
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import React , { Component } from 'react' ;
10
10
import {
11
- ART ,
12
- Platform ,
13
11
StyleSheet ,
14
- Text ,
15
- View ,
16
- Dimensions
12
+ View
17
13
} from 'react-native' ;
18
14
19
15
import { HcdWaveView } from './src/components/HcdWaveView'
@@ -22,6 +18,12 @@ export default class App extends Component {
22
18
render ( ) {
23
19
return (
24
20
< View style = { styles . container } >
21
+ < HcdWaveView
22
+ surfaceWidth = { 230 }
23
+ surfaceHeigth = { 230 }
24
+ powerPercent = { 76 }
25
+ type = "dc"
26
+ style = { { backgroundColor :'#FF7800' } } > </ HcdWaveView >
25
27
< HcdWaveView
26
28
surfaceWidth = { 230 }
27
29
surfaceHeigth = { 230 }
@@ -39,15 +41,5 @@ const styles = StyleSheet.create({
39
41
justifyContent : 'center' ,
40
42
alignItems : 'center' ,
41
43
backgroundColor : '#18A4FD' ,
42
- } ,
43
- welcome : {
44
- fontSize : 20 ,
45
- textAlign : 'center' ,
46
- margin : 10 ,
47
- } ,
48
- instructions : {
49
- textAlign : 'center' ,
50
- color : '#333333' ,
51
- marginBottom : 5
52
- } ,
44
+ }
53
45
} ) ;
Original file line number Diff line number Diff line change 1
- # react-native-art-wave
2
- An animate wave view writed by React Native Art.
1
+ # react-native-art-hcdwave
2
+ A concise water wave animation process view writed by React Native Art.
3
3
4
- ## Run
4
+ ![ Example 1] ( https://github.com/Jvaeyhcd/react-native-art-wave/blob/master/gif/ac.gif?raw=true )
5
+
6
+ ![ Example 2] ( https://github.com/Jvaeyhcd/react-native-art-wave/blob/master/gif/dc.gif?raw=true )
7
+
8
+ ## Install
9
+ ``` bash
10
+ npm i react-native-art-hcdwave
11
+ ```
12
+
13
+ ## Run Example
5
14
6
15
``` bash
7
16
yarn
@@ -10,3 +19,55 @@ yarn run-ios # 运行iPhone X模拟器
10
19
yarn run-android # 运行Android客户端
11
20
```
12
21
22
+ ## Dependency
23
+
24
+ ### Android
25
+
26
+ Don't need any dependency. Android incloud the ART library.
27
+
28
+ ### iOS
29
+
30
+ 1 . Right click on the project -> Add Files to ` Your Project Name ` -> Select ` Project path ` /node_modules/react-native/Libraries/ART/ART.xcodeproj.
31
+ 2 . Add ` libART.a ` to 'Link Binary With Libraries'.
32
+
33
+ ## Example
34
+ ``` javascript
35
+ import React , {Component } from ' react' ;
36
+ import {
37
+ StyleSheet ,
38
+ View
39
+ } from ' react-native' ;
40
+
41
+ import { HcdWaveView } from ' ./src/components/HcdWaveView'
42
+
43
+ export default class App extends Component {
44
+ render () {
45
+ return (
46
+ < View style= {styles .container }>
47
+ < HcdWaveView
48
+ surfaceWidth = {230 }
49
+ surfaceHeigth = {230 }
50
+ powerPercent = {76 }
51
+ type= " dc"
52
+ style = {{backgroundColor: ' #FF7800' }}>< / HcdWaveView>
53
+ < HcdWaveView
54
+ surfaceWidth = {230 }
55
+ surfaceHeigth = {230 }
56
+ powerPercent = {76 }
57
+ type= " ac"
58
+ style = {{backgroundColor: ' #FF7800' }}>< / HcdWaveView>
59
+ < / View>
60
+ )
61
+ }
62
+ }
63
+
64
+ const styles = StyleSheet .create ({
65
+ container: {
66
+ flex: 1 ,
67
+ justifyContent: ' center' ,
68
+ alignItems: ' center' ,
69
+ backgroundColor: ' #18A4FD' ,
70
+ }
71
+ });
72
+ ```
73
+
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " reactnativewave" ,
3
- "version" : " 0.0.1" ,
4
- "private" : true ,
2
+ "name" : " react-native-art-hcdwave" ,
3
+ "version" : " 0.0.2" ,
4
+ "description" : " A concise water wave animation process view writed by React Native Art." ,
5
+ "main" : " src/components/HcdWaveView.js" ,
6
+ "author" : " Jvaeyhcd" ,
7
+ "license" : " ISC" ,
8
+ "keywords" : [
9
+ " react-native" ,
10
+ " react-native-art-wave" ,
11
+ " react-native-art-hcdwave" ,
12
+ " art" ,
13
+ " wave"
14
+ ],
5
15
"scripts" : {
6
16
"start" : " node node_modules/react-native/local-cli/cli.js start" ,
7
17
"run-ios" : " react-native run-ios --simulator 'iPhone X'" ,
You can’t perform that action at this time.
0 commit comments