Skip to content

Commit f4976b1

Browse files
committed
version 0.0.2
1 parent 7dfa2eb commit f4976b1

File tree

3 files changed

+85
-22
lines changed

3 files changed

+85
-22
lines changed

App.js

+8-16
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88

99
import React, {Component} from 'react';
1010
import {
11-
ART,
12-
Platform,
1311
StyleSheet,
14-
Text,
15-
View,
16-
Dimensions
12+
View
1713
} from 'react-native';
1814

1915
import { HcdWaveView } from './src/components/HcdWaveView'
@@ -22,6 +18,12 @@ export default class App extends Component {
2218
render() {
2319
return (
2420
<View style={styles.container}>
21+
<HcdWaveView
22+
surfaceWidth = {230}
23+
surfaceHeigth ={230}
24+
powerPercent = {76}
25+
type="dc"
26+
style = {{backgroundColor:'#FF7800'}}></HcdWaveView>
2527
<HcdWaveView
2628
surfaceWidth = {230}
2729
surfaceHeigth ={230}
@@ -39,15 +41,5 @@ const styles = StyleSheet.create({
3941
justifyContent: 'center',
4042
alignItems: 'center',
4143
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+
}
5345
});

README.md

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
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.
33

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
514

615
``` bash
716
yarn
@@ -10,3 +19,55 @@ yarn run-ios # 运行iPhone X模拟器
1019
yarn run-android # 运行Android客户端
1120
```
1221

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+

package.json

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
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+
],
515
"scripts": {
616
"start": "node node_modules/react-native/local-cli/cli.js start",
717
"run-ios": "react-native run-ios --simulator 'iPhone X'",

0 commit comments

Comments
 (0)