hotstu/WaveDrawable


extremely real & natural wave-like loading drawable/打造真实自然的水波loading动画

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.hotstu:wavedrawable:1.0.0'
	}
	dependencies {
		implementation("com.github.hotstu:wavedrawable:1.0.0")
	}
	<dependency>
	    <groupId>com.github.hotstu</groupId>
	    <artifactId>wavedrawable</artifactId>
	    <version>1.0.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.hotstu" % "wavedrawable" % "1.0.0"
        
        

                            
    :dependencies [[com.github.hotstu/wavedrawable "1.0.0"]]
        
        

Readme


WaveDrawable

extremely real & natural wave-like loading drawable

打造最接近真实自然的水波loading动画

preview/效果

9.PNG 7.gif 8.gif 9.gif

how to use/使用

  1. Add the JitPack repository to your build file
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add the dependency
	dependencies {
	        implementation 'com.github.hotstu:WaveDrawable:1.0.0'
	}

properties/设置

below is the properties can be configed/支持以下属性

  • direction

    the directon the wave expanding, can be one of TOP LEFT RIGHT BOTTOM

    方向,可以是TOP LEFT RIGHT BOTTOM

  • progress

    the expanding progress, in [0, 1]

    进度 [0, 1]

  • waveHeight

    the height of the wave slop, default is height * .05f

    设置波峰高度,px,默认为height * .05f

  • waveStrength

    the strength of the wave, the larger the more slop in area, default is 0.01f

    设置波浪强度 数值越大单位区域内峰谷越多,默认0.01f

  • waveSpeed

    the speed of the wave, the larger the wave change faster, default is 0.05f

    设置波浪速度 数值越大波浪变化越快,默认0.05f