commit 76a52b4dd8458b7244c9a08042da09215118d43a
Author: 刘洪超 <943480861@qq.com>
Date: Tue Aug 15 10:34:08 2023 +0800
海信大屏项目提交
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ebdd23d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..3543521
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..6e8ac24
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,29 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 29
+ buildToolsVersion "29.0.2"
+ defaultConfig {
+ applicationId "com.hisensehitachi.himitboard"
+ minSdkVersion 19
+ targetSdkVersion 29
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'androidx.test:runner:1.3.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..6e7ffa9
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/app/release/output.json b/app/release/output.json
new file mode 100644
index 0000000..9f0c959
--- /dev/null
+++ b/app/release/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c3afd7c
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Fonts/FZLTCXHJW--GB1-0.TTF b/app/src/main/assets/Fonts/FZLTCXHJW--GB1-0.TTF
new file mode 100644
index 0000000..7d09ff7
Binary files /dev/null and b/app/src/main/assets/Fonts/FZLTCXHJW--GB1-0.TTF differ
diff --git a/app/src/main/assets/Fonts/FZLTCXHJW--GB1-1.TTF b/app/src/main/assets/Fonts/FZLTCXHJW--GB1-1.TTF
new file mode 100644
index 0000000..cd19908
Binary files /dev/null and b/app/src/main/assets/Fonts/FZLTCXHJW--GB1-1.TTF differ
diff --git a/app/src/main/assets/img/bk_00.jpg b/app/src/main/assets/img/bk_00.jpg
new file mode 100644
index 0000000..124cb3b
Binary files /dev/null and b/app/src/main/assets/img/bk_00.jpg differ
diff --git a/app/src/main/assets/img/bk_01.jpg b/app/src/main/assets/img/bk_01.jpg
new file mode 100644
index 0000000..93798ce
Binary files /dev/null and b/app/src/main/assets/img/bk_01.jpg differ
diff --git a/app/src/main/assets/img/bk_02.jpg b/app/src/main/assets/img/bk_02.jpg
new file mode 100644
index 0000000..25da6f2
Binary files /dev/null and b/app/src/main/assets/img/bk_02.jpg differ
diff --git a/app/src/main/assets/img/bk_03.jpg b/app/src/main/assets/img/bk_03.jpg
new file mode 100644
index 0000000..decc48a
Binary files /dev/null and b/app/src/main/assets/img/bk_03.jpg differ
diff --git a/app/src/main/assets/img/bk_04.jpg b/app/src/main/assets/img/bk_04.jpg
new file mode 100644
index 0000000..2a133e9
Binary files /dev/null and b/app/src/main/assets/img/bk_04.jpg differ
diff --git a/app/src/main/assets/img/bk_05.jpg b/app/src/main/assets/img/bk_05.jpg
new file mode 100644
index 0000000..8872340
Binary files /dev/null and b/app/src/main/assets/img/bk_05.jpg differ
diff --git a/app/src/main/assets/img/bk_06.jpg b/app/src/main/assets/img/bk_06.jpg
new file mode 100644
index 0000000..f30c87d
Binary files /dev/null and b/app/src/main/assets/img/bk_06.jpg differ
diff --git a/app/src/main/assets/img/bk_07.jpg b/app/src/main/assets/img/bk_07.jpg
new file mode 100644
index 0000000..b886f76
Binary files /dev/null and b/app/src/main/assets/img/bk_07.jpg differ
diff --git a/app/src/main/assets/img/bk_08.jpg b/app/src/main/assets/img/bk_08.jpg
new file mode 100644
index 0000000..b886f76
Binary files /dev/null and b/app/src/main/assets/img/bk_08.jpg differ
diff --git a/app/src/main/assets/img/bk_09.jpg b/app/src/main/assets/img/bk_09.jpg
new file mode 100644
index 0000000..9d94ae5
Binary files /dev/null and b/app/src/main/assets/img/bk_09.jpg differ
diff --git a/app/src/main/assets/img/bk_10.jpg b/app/src/main/assets/img/bk_10.jpg
new file mode 100644
index 0000000..99f7f07
Binary files /dev/null and b/app/src/main/assets/img/bk_10.jpg differ
diff --git a/app/src/main/assets/img/bk_11.jpg b/app/src/main/assets/img/bk_11.jpg
new file mode 100644
index 0000000..ca88e3a
Binary files /dev/null and b/app/src/main/assets/img/bk_11.jpg differ
diff --git a/app/src/main/assets/img/bk_12.jpg b/app/src/main/assets/img/bk_12.jpg
new file mode 100644
index 0000000..7d6ab76
Binary files /dev/null and b/app/src/main/assets/img/bk_12.jpg differ
diff --git a/app/src/main/assets/img/bk_13.jpg b/app/src/main/assets/img/bk_13.jpg
new file mode 100644
index 0000000..6d90e03
Binary files /dev/null and b/app/src/main/assets/img/bk_13.jpg differ
diff --git a/app/src/main/assets/img/bk_14.jpg b/app/src/main/assets/img/bk_14.jpg
new file mode 100644
index 0000000..a9e7927
Binary files /dev/null and b/app/src/main/assets/img/bk_14.jpg differ
diff --git a/app/src/main/assets/img/bk_15.jpg b/app/src/main/assets/img/bk_15.jpg
new file mode 100644
index 0000000..be6d0e2
Binary files /dev/null and b/app/src/main/assets/img/bk_15.jpg differ
diff --git a/app/src/main/assets/img/bk_16.jpg b/app/src/main/assets/img/bk_16.jpg
new file mode 100644
index 0000000..909bc44
Binary files /dev/null and b/app/src/main/assets/img/bk_16.jpg differ
diff --git a/app/src/main/assets/img/bk_17.jpg b/app/src/main/assets/img/bk_17.jpg
new file mode 100644
index 0000000..bd83d1c
Binary files /dev/null and b/app/src/main/assets/img/bk_17.jpg differ
diff --git a/app/src/main/assets/img/bk_18.jpg b/app/src/main/assets/img/bk_18.jpg
new file mode 100644
index 0000000..41cc17b
Binary files /dev/null and b/app/src/main/assets/img/bk_18.jpg differ
diff --git a/app/src/main/assets/img/bk_19.jpg b/app/src/main/assets/img/bk_19.jpg
new file mode 100644
index 0000000..9c451d5
Binary files /dev/null and b/app/src/main/assets/img/bk_19.jpg differ
diff --git a/app/src/main/assets/img/bk_20.jpg b/app/src/main/assets/img/bk_20.jpg
new file mode 100644
index 0000000..90bab6c
Binary files /dev/null and b/app/src/main/assets/img/bk_20.jpg differ
diff --git a/app/src/main/assets/img/bk_21.jpg b/app/src/main/assets/img/bk_21.jpg
new file mode 100644
index 0000000..92cb860
Binary files /dev/null and b/app/src/main/assets/img/bk_21.jpg differ
diff --git a/app/src/main/assets/img/bk_22.jpg b/app/src/main/assets/img/bk_22.jpg
new file mode 100644
index 0000000..52efa7e
Binary files /dev/null and b/app/src/main/assets/img/bk_22.jpg differ
diff --git a/app/src/main/assets/img/bk_23.jpg b/app/src/main/assets/img/bk_23.jpg
new file mode 100644
index 0000000..6c51b01
Binary files /dev/null and b/app/src/main/assets/img/bk_23.jpg differ
diff --git a/app/src/main/assets/img/bk_24.jpg b/app/src/main/assets/img/bk_24.jpg
new file mode 100644
index 0000000..50eacde
Binary files /dev/null and b/app/src/main/assets/img/bk_24.jpg differ
diff --git a/app/src/main/assets/img/bk_25.jpg b/app/src/main/assets/img/bk_25.jpg
new file mode 100644
index 0000000..5e85ddd
Binary files /dev/null and b/app/src/main/assets/img/bk_25.jpg differ
diff --git a/app/src/main/assets/img/bk_26.jpg b/app/src/main/assets/img/bk_26.jpg
new file mode 100644
index 0000000..597ef31
Binary files /dev/null and b/app/src/main/assets/img/bk_26.jpg differ
diff --git a/app/src/main/assets/img/bk_27.jpg b/app/src/main/assets/img/bk_27.jpg
new file mode 100644
index 0000000..a31474a
Binary files /dev/null and b/app/src/main/assets/img/bk_27.jpg differ
diff --git a/app/src/main/assets/img/bk_28.jpg b/app/src/main/assets/img/bk_28.jpg
new file mode 100644
index 0000000..eb952c1
Binary files /dev/null and b/app/src/main/assets/img/bk_28.jpg differ
diff --git a/app/src/main/assets/img/bk_29.jpg b/app/src/main/assets/img/bk_29.jpg
new file mode 100644
index 0000000..c239be4
Binary files /dev/null and b/app/src/main/assets/img/bk_29.jpg differ
diff --git a/app/src/main/assets/img/bk_30.jpg b/app/src/main/assets/img/bk_30.jpg
new file mode 100644
index 0000000..a6a6906
Binary files /dev/null and b/app/src/main/assets/img/bk_30.jpg differ
diff --git a/app/src/main/assets/img/bk_31.jpg b/app/src/main/assets/img/bk_31.jpg
new file mode 100644
index 0000000..dce9587
Binary files /dev/null and b/app/src/main/assets/img/bk_31.jpg differ
diff --git a/app/src/main/assets/img/bk_32.jpg b/app/src/main/assets/img/bk_32.jpg
new file mode 100644
index 0000000..41cc17b
Binary files /dev/null and b/app/src/main/assets/img/bk_32.jpg differ
diff --git a/app/src/main/assets/img/bk_33.jpg b/app/src/main/assets/img/bk_33.jpg
new file mode 100644
index 0000000..7fcb7e0
Binary files /dev/null and b/app/src/main/assets/img/bk_33.jpg differ
diff --git a/app/src/main/assets/img/bk_49.jpg b/app/src/main/assets/img/bk_49.jpg
new file mode 100644
index 0000000..41cc17b
Binary files /dev/null and b/app/src/main/assets/img/bk_49.jpg differ
diff --git a/app/src/main/assets/img/bk_53.jpg b/app/src/main/assets/img/bk_53.jpg
new file mode 100644
index 0000000..fc89adc
Binary files /dev/null and b/app/src/main/assets/img/bk_53.jpg differ
diff --git a/app/src/main/assets/img/bk_54.jpg b/app/src/main/assets/img/bk_54.jpg
new file mode 100644
index 0000000..ce18e21
Binary files /dev/null and b/app/src/main/assets/img/bk_54.jpg differ
diff --git a/app/src/main/assets/img/bk_55.jpg b/app/src/main/assets/img/bk_55.jpg
new file mode 100644
index 0000000..39f6a8b
Binary files /dev/null and b/app/src/main/assets/img/bk_55.jpg differ
diff --git a/app/src/main/assets/img/bk_56.jpg b/app/src/main/assets/img/bk_56.jpg
new file mode 100644
index 0000000..f3a6d28
Binary files /dev/null and b/app/src/main/assets/img/bk_56.jpg differ
diff --git a/app/src/main/assets/img/bk_57.jpg b/app/src/main/assets/img/bk_57.jpg
new file mode 100644
index 0000000..41cc17b
Binary files /dev/null and b/app/src/main/assets/img/bk_57.jpg differ
diff --git a/app/src/main/assets/img/bk_58.jpg b/app/src/main/assets/img/bk_58.jpg
new file mode 100644
index 0000000..41cc17b
Binary files /dev/null and b/app/src/main/assets/img/bk_58.jpg differ
diff --git a/app/src/main/assets/img/bk_99.jpg b/app/src/main/assets/img/bk_99.jpg
new file mode 100644
index 0000000..4eed61e
Binary files /dev/null and b/app/src/main/assets/img/bk_99.jpg differ
diff --git a/app/src/main/assets/img/bottombar.png b/app/src/main/assets/img/bottombar.png
new file mode 100644
index 0000000..acc22ee
Binary files /dev/null and b/app/src/main/assets/img/bottombar.png differ
diff --git a/app/src/main/assets/img/circle/bg-circle.png b/app/src/main/assets/img/circle/bg-circle.png
new file mode 100644
index 0000000..20d166b
Binary files /dev/null and b/app/src/main/assets/img/circle/bg-circle.png differ
diff --git a/app/src/main/assets/img/circle/sm-circle.png b/app/src/main/assets/img/circle/sm-circle.png
new file mode 100644
index 0000000..17ecac8
Binary files /dev/null and b/app/src/main/assets/img/circle/sm-circle.png differ
diff --git a/app/src/main/assets/img/cloud/cloud_one.png b/app/src/main/assets/img/cloud/cloud_one.png
new file mode 100644
index 0000000..57ee20d
Binary files /dev/null and b/app/src/main/assets/img/cloud/cloud_one.png differ
diff --git a/app/src/main/assets/img/cloud/cloud_three.png b/app/src/main/assets/img/cloud/cloud_three.png
new file mode 100644
index 0000000..fedc05d
Binary files /dev/null and b/app/src/main/assets/img/cloud/cloud_three.png differ
diff --git a/app/src/main/assets/img/cloud/cloud_two.png b/app/src/main/assets/img/cloud/cloud_two.png
new file mode 100644
index 0000000..16e18b3
Binary files /dev/null and b/app/src/main/assets/img/cloud/cloud_two.png differ
diff --git a/app/src/main/assets/img/icon/iuOnOff_0.png b/app/src/main/assets/img/icon/iuOnOff_0.png
new file mode 100644
index 0000000..6abcc2e
Binary files /dev/null and b/app/src/main/assets/img/icon/iuOnOff_0.png differ
diff --git a/app/src/main/assets/img/icon/iuOnOff_1.png b/app/src/main/assets/img/icon/iuOnOff_1.png
new file mode 100644
index 0000000..cd83053
Binary files /dev/null and b/app/src/main/assets/img/icon/iuOnOff_1.png differ
diff --git a/app/src/main/assets/img/icon/mode_0.png b/app/src/main/assets/img/icon/mode_0.png
new file mode 100644
index 0000000..1c56102
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_0.png differ
diff --git a/app/src/main/assets/img/icon/mode_1.png b/app/src/main/assets/img/icon/mode_1.png
new file mode 100644
index 0000000..4a009bd
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_1.png differ
diff --git a/app/src/main/assets/img/icon/mode_10.png b/app/src/main/assets/img/icon/mode_10.png
new file mode 100644
index 0000000..99863a4
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_10.png differ
diff --git a/app/src/main/assets/img/icon/mode_2.png b/app/src/main/assets/img/icon/mode_2.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_2.png differ
diff --git a/app/src/main/assets/img/icon/mode_3.png b/app/src/main/assets/img/icon/mode_3.png
new file mode 100644
index 0000000..ec9c4e4
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_3.png differ
diff --git a/app/src/main/assets/img/icon/mode_4.png b/app/src/main/assets/img/icon/mode_4.png
new file mode 100644
index 0000000..99863a4
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_4.png differ
diff --git a/app/src/main/assets/img/icon/mode_5.png b/app/src/main/assets/img/icon/mode_5.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_5.png differ
diff --git a/app/src/main/assets/img/icon/mode_6.png b/app/src/main/assets/img/icon/mode_6.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_6.png differ
diff --git a/app/src/main/assets/img/icon/mode_7.png b/app/src/main/assets/img/icon/mode_7.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_7.png differ
diff --git a/app/src/main/assets/img/icon/mode_8.png b/app/src/main/assets/img/icon/mode_8.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_8.png differ
diff --git a/app/src/main/assets/img/icon/mode_9.png b/app/src/main/assets/img/icon/mode_9.png
new file mode 100644
index 0000000..4af4ff0
Binary files /dev/null and b/app/src/main/assets/img/icon/mode_9.png differ
diff --git a/app/src/main/assets/img/icon/wind_0.png b/app/src/main/assets/img/icon/wind_0.png
new file mode 100644
index 0000000..5f41d0a
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_0.png differ
diff --git a/app/src/main/assets/img/icon/wind_1.png b/app/src/main/assets/img/icon/wind_1.png
new file mode 100644
index 0000000..c521237
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_1.png differ
diff --git a/app/src/main/assets/img/icon/wind_2.png b/app/src/main/assets/img/icon/wind_2.png
new file mode 100644
index 0000000..befbe10
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_2.png differ
diff --git a/app/src/main/assets/img/icon/wind_3.png b/app/src/main/assets/img/icon/wind_3.png
new file mode 100644
index 0000000..4766107
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_3.png differ
diff --git a/app/src/main/assets/img/icon/wind_4.png b/app/src/main/assets/img/icon/wind_4.png
new file mode 100644
index 0000000..c521237
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_4.png differ
diff --git a/app/src/main/assets/img/icon/wind_5.png b/app/src/main/assets/img/icon/wind_5.png
new file mode 100644
index 0000000..de78146
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_5.png differ
diff --git a/app/src/main/assets/img/icon/wind_6.png b/app/src/main/assets/img/icon/wind_6.png
new file mode 100644
index 0000000..4766107
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_6.png differ
diff --git a/app/src/main/assets/img/icon/wind_7.png b/app/src/main/assets/img/icon/wind_7.png
new file mode 100644
index 0000000..4766107
Binary files /dev/null and b/app/src/main/assets/img/icon/wind_7.png differ
diff --git a/app/src/main/assets/img/icon_00.png b/app/src/main/assets/img/icon_00.png
new file mode 100644
index 0000000..880df66
Binary files /dev/null and b/app/src/main/assets/img/icon_00.png differ
diff --git a/app/src/main/assets/img/icon_01.png b/app/src/main/assets/img/icon_01.png
new file mode 100644
index 0000000..df47e50
Binary files /dev/null and b/app/src/main/assets/img/icon_01.png differ
diff --git a/app/src/main/assets/img/icon_02.png b/app/src/main/assets/img/icon_02.png
new file mode 100644
index 0000000..7efe5de
Binary files /dev/null and b/app/src/main/assets/img/icon_02.png differ
diff --git a/app/src/main/assets/img/icon_03.png b/app/src/main/assets/img/icon_03.png
new file mode 100644
index 0000000..6c9636c
Binary files /dev/null and b/app/src/main/assets/img/icon_03.png differ
diff --git a/app/src/main/assets/img/icon_04.png b/app/src/main/assets/img/icon_04.png
new file mode 100644
index 0000000..961d8ab
Binary files /dev/null and b/app/src/main/assets/img/icon_04.png differ
diff --git a/app/src/main/assets/img/icon_05.png b/app/src/main/assets/img/icon_05.png
new file mode 100644
index 0000000..961d8ab
Binary files /dev/null and b/app/src/main/assets/img/icon_05.png differ
diff --git a/app/src/main/assets/img/icon_06.png b/app/src/main/assets/img/icon_06.png
new file mode 100644
index 0000000..7089e0f
Binary files /dev/null and b/app/src/main/assets/img/icon_06.png differ
diff --git a/app/src/main/assets/img/icon_07.png b/app/src/main/assets/img/icon_07.png
new file mode 100644
index 0000000..f0543fe
Binary files /dev/null and b/app/src/main/assets/img/icon_07.png differ
diff --git a/app/src/main/assets/img/icon_08.png b/app/src/main/assets/img/icon_08.png
new file mode 100644
index 0000000..dc347c7
Binary files /dev/null and b/app/src/main/assets/img/icon_08.png differ
diff --git a/app/src/main/assets/img/icon_09.png b/app/src/main/assets/img/icon_09.png
new file mode 100644
index 0000000..b9f008b
Binary files /dev/null and b/app/src/main/assets/img/icon_09.png differ
diff --git a/app/src/main/assets/img/icon_10.png b/app/src/main/assets/img/icon_10.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_10.png differ
diff --git a/app/src/main/assets/img/icon_11.png b/app/src/main/assets/img/icon_11.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_11.png differ
diff --git a/app/src/main/assets/img/icon_12.png b/app/src/main/assets/img/icon_12.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_12.png differ
diff --git a/app/src/main/assets/img/icon_13.png b/app/src/main/assets/img/icon_13.png
new file mode 100644
index 0000000..482cdb8
Binary files /dev/null and b/app/src/main/assets/img/icon_13.png differ
diff --git a/app/src/main/assets/img/icon_14.png b/app/src/main/assets/img/icon_14.png
new file mode 100644
index 0000000..d237f2a
Binary files /dev/null and b/app/src/main/assets/img/icon_14.png differ
diff --git a/app/src/main/assets/img/icon_15.png b/app/src/main/assets/img/icon_15.png
new file mode 100644
index 0000000..482cdb8
Binary files /dev/null and b/app/src/main/assets/img/icon_15.png differ
diff --git a/app/src/main/assets/img/icon_16.png b/app/src/main/assets/img/icon_16.png
new file mode 100644
index 0000000..5eac54d
Binary files /dev/null and b/app/src/main/assets/img/icon_16.png differ
diff --git a/app/src/main/assets/img/icon_17.png b/app/src/main/assets/img/icon_17.png
new file mode 100644
index 0000000..5eac54d
Binary files /dev/null and b/app/src/main/assets/img/icon_17.png differ
diff --git a/app/src/main/assets/img/icon_18.png b/app/src/main/assets/img/icon_18.png
new file mode 100644
index 0000000..8ad6e70
Binary files /dev/null and b/app/src/main/assets/img/icon_18.png differ
diff --git a/app/src/main/assets/img/icon_19.png b/app/src/main/assets/img/icon_19.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_19.png differ
diff --git a/app/src/main/assets/img/icon_20.png b/app/src/main/assets/img/icon_20.png
new file mode 100644
index 0000000..7dbc630
Binary files /dev/null and b/app/src/main/assets/img/icon_20.png differ
diff --git a/app/src/main/assets/img/icon_21.png b/app/src/main/assets/img/icon_21.png
new file mode 100644
index 0000000..6c9636c
Binary files /dev/null and b/app/src/main/assets/img/icon_21.png differ
diff --git a/app/src/main/assets/img/icon_22.png b/app/src/main/assets/img/icon_22.png
new file mode 100644
index 0000000..b9f008b
Binary files /dev/null and b/app/src/main/assets/img/icon_22.png differ
diff --git a/app/src/main/assets/img/icon_23.png b/app/src/main/assets/img/icon_23.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_23.png differ
diff --git a/app/src/main/assets/img/icon_24.png b/app/src/main/assets/img/icon_24.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_24.png differ
diff --git a/app/src/main/assets/img/icon_25.png b/app/src/main/assets/img/icon_25.png
new file mode 100644
index 0000000..6adb292
Binary files /dev/null and b/app/src/main/assets/img/icon_25.png differ
diff --git a/app/src/main/assets/img/icon_26.png b/app/src/main/assets/img/icon_26.png
new file mode 100644
index 0000000..482cdb8
Binary files /dev/null and b/app/src/main/assets/img/icon_26.png differ
diff --git a/app/src/main/assets/img/icon_27.png b/app/src/main/assets/img/icon_27.png
new file mode 100644
index 0000000..5eac54d
Binary files /dev/null and b/app/src/main/assets/img/icon_27.png differ
diff --git a/app/src/main/assets/img/icon_28.png b/app/src/main/assets/img/icon_28.png
new file mode 100644
index 0000000..5eac54d
Binary files /dev/null and b/app/src/main/assets/img/icon_28.png differ
diff --git a/app/src/main/assets/img/icon_29.png b/app/src/main/assets/img/icon_29.png
new file mode 100644
index 0000000..3411fe0
Binary files /dev/null and b/app/src/main/assets/img/icon_29.png differ
diff --git a/app/src/main/assets/img/icon_30.png b/app/src/main/assets/img/icon_30.png
new file mode 100644
index 0000000..0628064
Binary files /dev/null and b/app/src/main/assets/img/icon_30.png differ
diff --git a/app/src/main/assets/img/icon_31.png b/app/src/main/assets/img/icon_31.png
new file mode 100644
index 0000000..4a00cd2
Binary files /dev/null and b/app/src/main/assets/img/icon_31.png differ
diff --git a/app/src/main/assets/img/icon_32.png b/app/src/main/assets/img/icon_32.png
new file mode 100644
index 0000000..8ad6e70
Binary files /dev/null and b/app/src/main/assets/img/icon_32.png differ
diff --git a/app/src/main/assets/img/icon_33.png b/app/src/main/assets/img/icon_33.png
new file mode 100644
index 0000000..482cdb8
Binary files /dev/null and b/app/src/main/assets/img/icon_33.png differ
diff --git a/app/src/main/assets/img/icon_49.png b/app/src/main/assets/img/icon_49.png
new file mode 100644
index 0000000..8ad6e70
Binary files /dev/null and b/app/src/main/assets/img/icon_49.png differ
diff --git a/app/src/main/assets/img/icon_53.png b/app/src/main/assets/img/icon_53.png
new file mode 100644
index 0000000..2e3faa6
Binary files /dev/null and b/app/src/main/assets/img/icon_53.png differ
diff --git a/app/src/main/assets/img/icon_54.png b/app/src/main/assets/img/icon_54.png
new file mode 100644
index 0000000..41f7ccd
Binary files /dev/null and b/app/src/main/assets/img/icon_54.png differ
diff --git a/app/src/main/assets/img/icon_55.png b/app/src/main/assets/img/icon_55.png
new file mode 100644
index 0000000..e03f495
Binary files /dev/null and b/app/src/main/assets/img/icon_55.png differ
diff --git a/app/src/main/assets/img/icon_56.png b/app/src/main/assets/img/icon_56.png
new file mode 100644
index 0000000..75071d5
Binary files /dev/null and b/app/src/main/assets/img/icon_56.png differ
diff --git a/app/src/main/assets/img/icon_57.png b/app/src/main/assets/img/icon_57.png
new file mode 100644
index 0000000..8ad6e70
Binary files /dev/null and b/app/src/main/assets/img/icon_57.png differ
diff --git a/app/src/main/assets/img/icon_58.png b/app/src/main/assets/img/icon_58.png
new file mode 100644
index 0000000..8ad6e70
Binary files /dev/null and b/app/src/main/assets/img/icon_58.png differ
diff --git a/app/src/main/assets/img/icon_99.png b/app/src/main/assets/img/icon_99.png
new file mode 100644
index 0000000..880df66
Binary files /dev/null and b/app/src/main/assets/img/icon_99.png differ
diff --git a/app/src/main/assets/img/layer_00.png b/app/src/main/assets/img/layer_00.png
new file mode 100644
index 0000000..7f2a3ad
Binary files /dev/null and b/app/src/main/assets/img/layer_00.png differ
diff --git a/app/src/main/assets/img/layer_01.png b/app/src/main/assets/img/layer_01.png
new file mode 100644
index 0000000..f7af866
Binary files /dev/null and b/app/src/main/assets/img/layer_01.png differ
diff --git a/app/src/main/assets/img/layer_02.png b/app/src/main/assets/img/layer_02.png
new file mode 100644
index 0000000..f7af866
Binary files /dev/null and b/app/src/main/assets/img/layer_02.png differ
diff --git a/app/src/main/assets/img/layer_03.png b/app/src/main/assets/img/layer_03.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_03.png differ
diff --git a/app/src/main/assets/img/layer_04.png b/app/src/main/assets/img/layer_04.png
new file mode 100644
index 0000000..8d42b94
Binary files /dev/null and b/app/src/main/assets/img/layer_04.png differ
diff --git a/app/src/main/assets/img/layer_05.png b/app/src/main/assets/img/layer_05.png
new file mode 100644
index 0000000..8d42b94
Binary files /dev/null and b/app/src/main/assets/img/layer_05.png differ
diff --git a/app/src/main/assets/img/layer_06.png b/app/src/main/assets/img/layer_06.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_06.png differ
diff --git a/app/src/main/assets/img/layer_07.png b/app/src/main/assets/img/layer_07.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_07.png differ
diff --git a/app/src/main/assets/img/layer_08.png b/app/src/main/assets/img/layer_08.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_08.png differ
diff --git a/app/src/main/assets/img/layer_09.png b/app/src/main/assets/img/layer_09.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_09.png differ
diff --git a/app/src/main/assets/img/layer_10.png b/app/src/main/assets/img/layer_10.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_10.png differ
diff --git a/app/src/main/assets/img/layer_11.png b/app/src/main/assets/img/layer_11.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_11.png differ
diff --git a/app/src/main/assets/img/layer_12.png b/app/src/main/assets/img/layer_12.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_12.png differ
diff --git a/app/src/main/assets/img/layer_13.png b/app/src/main/assets/img/layer_13.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_13.png differ
diff --git a/app/src/main/assets/img/layer_14.png b/app/src/main/assets/img/layer_14.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_14.png differ
diff --git a/app/src/main/assets/img/layer_15.png b/app/src/main/assets/img/layer_15.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_15.png differ
diff --git a/app/src/main/assets/img/layer_16.png b/app/src/main/assets/img/layer_16.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_16.png differ
diff --git a/app/src/main/assets/img/layer_17.png b/app/src/main/assets/img/layer_17.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_17.png differ
diff --git a/app/src/main/assets/img/layer_18.png b/app/src/main/assets/img/layer_18.png
new file mode 100644
index 0000000..ce251cb
Binary files /dev/null and b/app/src/main/assets/img/layer_18.png differ
diff --git a/app/src/main/assets/img/layer_19.png b/app/src/main/assets/img/layer_19.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_19.png differ
diff --git a/app/src/main/assets/img/layer_20.png b/app/src/main/assets/img/layer_20.png
new file mode 100644
index 0000000..5425087
Binary files /dev/null and b/app/src/main/assets/img/layer_20.png differ
diff --git a/app/src/main/assets/img/layer_21.png b/app/src/main/assets/img/layer_21.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_21.png differ
diff --git a/app/src/main/assets/img/layer_22.png b/app/src/main/assets/img/layer_22.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_22.png differ
diff --git a/app/src/main/assets/img/layer_23.png b/app/src/main/assets/img/layer_23.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_23.png differ
diff --git a/app/src/main/assets/img/layer_24.png b/app/src/main/assets/img/layer_24.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_24.png differ
diff --git a/app/src/main/assets/img/layer_25.png b/app/src/main/assets/img/layer_25.png
new file mode 100644
index 0000000..7d9608a
Binary files /dev/null and b/app/src/main/assets/img/layer_25.png differ
diff --git a/app/src/main/assets/img/layer_26.png b/app/src/main/assets/img/layer_26.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_26.png differ
diff --git a/app/src/main/assets/img/layer_27.png b/app/src/main/assets/img/layer_27.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_27.png differ
diff --git a/app/src/main/assets/img/layer_28.png b/app/src/main/assets/img/layer_28.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_28.png differ
diff --git a/app/src/main/assets/img/layer_29.png b/app/src/main/assets/img/layer_29.png
new file mode 100644
index 0000000..5425087
Binary files /dev/null and b/app/src/main/assets/img/layer_29.png differ
diff --git a/app/src/main/assets/img/layer_30.png b/app/src/main/assets/img/layer_30.png
new file mode 100644
index 0000000..5425087
Binary files /dev/null and b/app/src/main/assets/img/layer_30.png differ
diff --git a/app/src/main/assets/img/layer_31.png b/app/src/main/assets/img/layer_31.png
new file mode 100644
index 0000000..8e96782
Binary files /dev/null and b/app/src/main/assets/img/layer_31.png differ
diff --git a/app/src/main/assets/img/layer_32.png b/app/src/main/assets/img/layer_32.png
new file mode 100644
index 0000000..ce251cb
Binary files /dev/null and b/app/src/main/assets/img/layer_32.png differ
diff --git a/app/src/main/assets/img/layer_33.png b/app/src/main/assets/img/layer_33.png
new file mode 100644
index 0000000..e6ed587
Binary files /dev/null and b/app/src/main/assets/img/layer_33.png differ
diff --git a/app/src/main/assets/img/layer_49.png b/app/src/main/assets/img/layer_49.png
new file mode 100644
index 0000000..ce251cb
Binary files /dev/null and b/app/src/main/assets/img/layer_49.png differ
diff --git a/app/src/main/assets/img/layer_53.png b/app/src/main/assets/img/layer_53.png
new file mode 100644
index 0000000..f057480
Binary files /dev/null and b/app/src/main/assets/img/layer_53.png differ
diff --git a/app/src/main/assets/img/layer_54.png b/app/src/main/assets/img/layer_54.png
new file mode 100644
index 0000000..f057480
Binary files /dev/null and b/app/src/main/assets/img/layer_54.png differ
diff --git a/app/src/main/assets/img/layer_55.png b/app/src/main/assets/img/layer_55.png
new file mode 100644
index 0000000..f057480
Binary files /dev/null and b/app/src/main/assets/img/layer_55.png differ
diff --git a/app/src/main/assets/img/layer_56.png b/app/src/main/assets/img/layer_56.png
new file mode 100644
index 0000000..f057480
Binary files /dev/null and b/app/src/main/assets/img/layer_56.png differ
diff --git a/app/src/main/assets/img/layer_57.png b/app/src/main/assets/img/layer_57.png
new file mode 100644
index 0000000..ce251cb
Binary files /dev/null and b/app/src/main/assets/img/layer_57.png differ
diff --git a/app/src/main/assets/img/layer_58.png b/app/src/main/assets/img/layer_58.png
new file mode 100644
index 0000000..ce251cb
Binary files /dev/null and b/app/src/main/assets/img/layer_58.png differ
diff --git a/app/src/main/assets/img/layer_99.png b/app/src/main/assets/img/layer_99.png
new file mode 100644
index 0000000..7f2a3ad
Binary files /dev/null and b/app/src/main/assets/img/layer_99.png differ
diff --git a/app/src/main/assets/img/login/bk.jpg b/app/src/main/assets/img/login/bk.jpg
new file mode 100644
index 0000000..73e0f94
Binary files /dev/null and b/app/src/main/assets/img/login/bk.jpg differ
diff --git a/app/src/main/assets/img/login/button.png b/app/src/main/assets/img/login/button.png
new file mode 100644
index 0000000..4a189f5
Binary files /dev/null and b/app/src/main/assets/img/login/button.png differ
diff --git a/app/src/main/assets/img/login/checkbox-0.png b/app/src/main/assets/img/login/checkbox-0.png
new file mode 100644
index 0000000..e6468ba
Binary files /dev/null and b/app/src/main/assets/img/login/checkbox-0.png differ
diff --git a/app/src/main/assets/img/login/checkbox-1.png b/app/src/main/assets/img/login/checkbox-1.png
new file mode 100644
index 0000000..3e2dca3
Binary files /dev/null and b/app/src/main/assets/img/login/checkbox-1.png differ
diff --git a/app/src/main/assets/img/login/help.png b/app/src/main/assets/img/login/help.png
new file mode 100644
index 0000000..a3ffc94
Binary files /dev/null and b/app/src/main/assets/img/login/help.png differ
diff --git a/app/src/main/assets/img/login/hikari.png b/app/src/main/assets/img/login/hikari.png
new file mode 100644
index 0000000..9b97a8b
Binary files /dev/null and b/app/src/main/assets/img/login/hikari.png differ
diff --git a/app/src/main/assets/img/login/inputbox-bk.png b/app/src/main/assets/img/login/inputbox-bk.png
new file mode 100644
index 0000000..6d18f4c
Binary files /dev/null and b/app/src/main/assets/img/login/inputbox-bk.png differ
diff --git a/app/src/main/assets/img/login/left.png b/app/src/main/assets/img/login/left.png
new file mode 100644
index 0000000..74d5b39
Binary files /dev/null and b/app/src/main/assets/img/login/left.png differ
diff --git a/app/src/main/assets/img/login/login-box.png b/app/src/main/assets/img/login/login-box.png
new file mode 100644
index 0000000..771626f
Binary files /dev/null and b/app/src/main/assets/img/login/login-box.png differ
diff --git a/app/src/main/assets/img/login/logo.png b/app/src/main/assets/img/login/logo.png
new file mode 100644
index 0000000..1f2858b
Binary files /dev/null and b/app/src/main/assets/img/login/logo.png differ
diff --git a/app/src/main/assets/img/login/password-bk.png b/app/src/main/assets/img/login/password-bk.png
new file mode 100644
index 0000000..075b6c6
Binary files /dev/null and b/app/src/main/assets/img/login/password-bk.png differ
diff --git a/app/src/main/assets/img/login/password.png b/app/src/main/assets/img/login/password.png
new file mode 100644
index 0000000..7239282
Binary files /dev/null and b/app/src/main/assets/img/login/password.png differ
diff --git a/app/src/main/assets/img/login/right.png b/app/src/main/assets/img/login/right.png
new file mode 100644
index 0000000..4444d90
Binary files /dev/null and b/app/src/main/assets/img/login/right.png differ
diff --git a/app/src/main/assets/img/login/user-bk.png b/app/src/main/assets/img/login/user-bk.png
new file mode 100644
index 0000000..9ef5c9b
Binary files /dev/null and b/app/src/main/assets/img/login/user-bk.png differ
diff --git a/app/src/main/assets/img/login/user.png b/app/src/main/assets/img/login/user.png
new file mode 100644
index 0000000..bd97a12
Binary files /dev/null and b/app/src/main/assets/img/login/user.png differ
diff --git a/app/src/main/assets/img/mark/aqi_0.png b/app/src/main/assets/img/mark/aqi_0.png
new file mode 100644
index 0000000..dd5bd79
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_0.png differ
diff --git a/app/src/main/assets/img/mark/aqi_1.png b/app/src/main/assets/img/mark/aqi_1.png
new file mode 100644
index 0000000..c325ec9
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_1.png differ
diff --git a/app/src/main/assets/img/mark/aqi_2.png b/app/src/main/assets/img/mark/aqi_2.png
new file mode 100644
index 0000000..b7f8424
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_2.png differ
diff --git a/app/src/main/assets/img/mark/aqi_3.png b/app/src/main/assets/img/mark/aqi_3.png
new file mode 100644
index 0000000..5a0a92a
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_3.png differ
diff --git a/app/src/main/assets/img/mark/aqi_4.png b/app/src/main/assets/img/mark/aqi_4.png
new file mode 100644
index 0000000..ff0342f
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_4.png differ
diff --git a/app/src/main/assets/img/mark/aqi_5.png b/app/src/main/assets/img/mark/aqi_5.png
new file mode 100644
index 0000000..eeebd2e
Binary files /dev/null and b/app/src/main/assets/img/mark/aqi_5.png differ
diff --git a/app/src/main/assets/img/mark/indoor.png b/app/src/main/assets/img/mark/indoor.png
new file mode 100644
index 0000000..24182af
Binary files /dev/null and b/app/src/main/assets/img/mark/indoor.png differ
diff --git a/app/src/main/assets/img/mark/outdoor.png b/app/src/main/assets/img/mark/outdoor.png
new file mode 100644
index 0000000..4249430
Binary files /dev/null and b/app/src/main/assets/img/mark/outdoor.png differ
diff --git a/app/src/main/assets/img/menu/icon.png b/app/src/main/assets/img/menu/icon.png
new file mode 100644
index 0000000..64e41b4
Binary files /dev/null and b/app/src/main/assets/img/menu/icon.png differ
diff --git a/app/src/main/assets/img/menu/line.png b/app/src/main/assets/img/menu/line.png
new file mode 100644
index 0000000..a9d116d
Binary files /dev/null and b/app/src/main/assets/img/menu/line.png differ
diff --git a/app/src/main/assets/img/menu/line_sel.png b/app/src/main/assets/img/menu/line_sel.png
new file mode 100644
index 0000000..9d93c9e
Binary files /dev/null and b/app/src/main/assets/img/menu/line_sel.png differ
diff --git a/app/src/main/assets/img/menu/menu.png b/app/src/main/assets/img/menu/menu.png
new file mode 100644
index 0000000..c3afa83
Binary files /dev/null and b/app/src/main/assets/img/menu/menu.png differ
diff --git a/app/src/main/assets/img/menu/right.png b/app/src/main/assets/img/menu/right.png
new file mode 100644
index 0000000..5663189
Binary files /dev/null and b/app/src/main/assets/img/menu/right.png differ
diff --git a/app/src/main/assets/img/snow/sn.png b/app/src/main/assets/img/snow/sn.png
new file mode 100644
index 0000000..dfd2f69
Binary files /dev/null and b/app/src/main/assets/img/snow/sn.png differ
diff --git a/app/src/main/assets/js/XeZBab.js b/app/src/main/assets/js/XeZBab.js
new file mode 100644
index 0000000..f8e89e4
--- /dev/null
+++ b/app/src/main/assets/js/XeZBab.js
@@ -0,0 +1,1758 @@
+const {
+ E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2,
+ abs, acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, clz32,
+ cosh, exp, expm1, floor, fround, hypot, imul, log, log10, log1p, log2, max,
+ min, pow, /* random, */ round, sign, sinh, sqrt, tan, tanh, trunc
+} = Math;
+
+let _codepenIDRegex = /codepen\.io\/[^/]+\/(?:pen|debug|fullpage|fullembedgrid)\/([^?#]+)/;
+
+// Why not?
+const ZERO = 0.0;
+const ONE = 1.0;
+const TWO = 2.0;
+const THREE = 3.0;
+const FOUR = 4.0;
+const FIVE = 5.0;
+const SIX = 6.0;
+const SEVEN = 7.0;
+const EIGHT = 8.0;
+const NINE = 9.0;
+const TEN = 10.0;
+const ELEVEN = 11.0;
+const TWELVE = 12.0;
+const SIXTEEN = 16.0;
+const THIRTY = 30.0;
+const THIRTY_TWO = 32.0;
+const SIXTY = 60.0;
+const HUNDRED = 100.0;
+const THOUSAND = 1000.0;
+
+const HALF = ONE / TWO;
+const THIRD = ONE / THREE;
+const TWO_THIRDS = THIRD * TWO;
+const QUARTER = ONE / FOUR;
+const THREE_QUARTER = QUARTER * THREE;
+const FIFTH = ONE / FIVE;
+const SIXTH = ONE / SIX;
+const SEVENTH = ONE / SEVEN;
+const EIGHTH = ONE / EIGHT;
+const TWELFTH = ONE / TWELVE;
+const SIXTEENTH = ONE / SIXTEEN;
+const ONE_THIRTIETH = ONE / THIRTY;
+const THIRTY_SECONDTH = ONE / THIRTY_TWO;
+const SIXTIETH = ONE / SIXTY;
+
+const TENTH = 1e-1;
+const HUNDREDTH = 1e-2;
+const THOUSANDTH = 1e-3;
+const TEN_THOUSANDTH = 1e-4;
+const HUNDRED_THOUSANDTH = 1e-5;
+const MILLIONTH = 1e-6;
+const TEN_MILLIONTH = 1e-7;
+const HUNDRED_MILLIONTH = 1e-8;
+const BILLIONTH = 1e-9;
+const TEN_BILLIONTH = 1e-10;
+const HUNDRED_BILLIONTH = 1e-11;
+
+const HALF_PI = PI * HALF;
+const THIRD_PI = PI * THIRD;
+const THREE_QUARTER_PI = PI * THREE_QUARTER;
+const QUARTER_PI = PI * QUARTER;
+const FIFTH_PI = PI * FIFTH;
+const SIXTH_PI = PI * SIXTH;
+const SEVENTH_PI = PI * SEVENTH;
+const EIGHTH_PI = PI * EIGHTH;
+const TWELFTH_PI = PI * TWELFTH;
+const SIXTEENTH_PI = PI * SIXTEENTH;
+const THIRTY_SECONDTH_PI = PI * THIRTY_SECONDTH;
+const TAU = PI * TWO;
+const TWO_TAU = TAU * TWO;
+const HALF_TAU = PI;
+const THIRD_TAU = TAU * THIRD;
+const QUARTER_TAU = HALF_PI;
+const FIFTH_TAU = TAU * FIFTH;
+const SIXTH_TAU = THIRD_PI;
+const EIGHTH_TAU = QUARTER_PI;
+const TWELFTH_TAU = SIXTH_PI;
+const SIXTEENTH_TAU = EIGHTH_PI;
+const THIRTY_SECONDTH_TAU = SIXTEENTH_PI;
+
+const SQRT_3 = sqrt(THREE);
+const SQRT_4 = sqrt(FOUR);
+const SQRT_5 = sqrt(FIVE);
+
+const PHI = (1 + sqrt(5)) * 0.5;
+const GOLDEN_ANGLE = 1 / (PHI * PHI);
+
+const COLOR_BLACK = hsl(0, 0, 0);
+const COLOR_WHITE = hsl(0, 0, 100);
+const COLOR_RED = hsl(0, 100, 50);
+const COLOR_ORANGE = hsl(30, 100, 50);
+const COLOR_YELLOW = hsl(60, 100, 50);
+const COLOR_GREEN = hsl(120, 100, 50);
+const COLOR_CYAN = hsl(180, 100, 50);
+const COLOR_BLUE = hsl(240, 100, 50);
+const COLOR_PURPLE = hsl(280, 100, 50);
+const COLOR_MAGENTA = hsl(300, 100, 50);
+
+const TEXTALIGN_LEFT = 'left';
+const TEXTALIGN_CENTER = 'center';
+const TEXTALIGN_RIGHT = 'right';
+const TEXTBASELINE_TOP = 'top';
+const TEXTBASELINE_MIDDLE = 'middle';
+const TEXTBASELINE_BOTTOM = 'bottom';
+
+let _defaulCanvasOptions = {
+ autoClear: false,
+ autoCompensate: true,
+ autoPushPop: false,
+ canvas: true,
+ centered: false,
+ desynchronized: false,
+ drawAndStop: false,
+ width: null,
+ height: null
+ };
+let _canvasOptions = {};
+let canvas;// = document.getElementById('canvas');
+// if(canvas === null) {
+// canvas = document.createElement('canvas');
+// canvas.id = 'canvas';
+// //document.body.appendChild(canvas);
+// $(".main").prepend(canvas);
+// }
+let ctx ;
+//canvas.getContext('2d', {
+// desynchronized: window.canvasOptions && window.canvasOptions.desynchronized !== undefined ?
+// window.canvasOptions.desynchronized : _defaulCanvasOptions.desynchronized
+// // preserveDrawingBuffer: true // WebGL
+// });
+var _originalCtx = ctx;
+let _anim, _lastCanvasTime, canvasFrameRate, frameCount, width, height, width_half, height_half, width_quarter, height_quarter;
+let _canvasCurrentlyCentered = false;
+let mouseUpdate = -Infinity, mouseIn = false, mouseDown = false, mouseMove = null, mousePos = null, mousePosPrev = null;
+function initsnow(){
+ canvas = document.getElementById('canvas');
+ if(canvas === null) {
+ canvas = document.createElement('canvas');
+ canvas.id = 'canvas';
+ canvas.setAttribute("style", "z-index:-2; width:1920px; height:1080px;");
+ //document.body.appendChild(canvas);
+ var mainDiv = document.getElementById('mainDiv');
+ mainDiv.appendChild(canvas);
+ }
+ ctx = canvas.getContext('2d', {
+ desynchronized: window.canvasOptions && window.canvasOptions.desynchronized !== undefined ?
+ window.canvasOptions.desynchronized : _defaulCanvasOptions.desynchronized
+ // preserveDrawingBuffer: true // WebGL
+ });
+ _originalCtx = ctx;
+
+
+// canvas.addEventListener('mouseenter', e => (updateMouse(e), mouseIn = true));
+// canvas.addEventListener('mouseleave', e => (updateMouse(e), mouseIn = false, mouseDown = false));
+// canvas.addEventListener('mousemove', e => (updateMouse(e), mouseIn = true, mouseMove = e.timeStamp));
+// canvas.addEventListener('mousedown', e => (updateMouse(e), mouseIn = true, mouseDown = true));
+// canvas.addEventListener('mouseup', e => (updateMouse(e), mouseDown = false));
+// canvas.addEventListener('touchstart', e => (updateMouse(e), mouseIn = true));
+// canvas.addEventListener('touchend', e => (updateMouse(e), mouseIn = false, mouseDown = false));
+// canvas.addEventListener('touchcancel', e => (updateMouse(e), mouseIn = false, mouseDown = false));
+// canvas.addEventListener('touchmove', e => (updateMouse(e), mouseIn = true));
+// window.removeEventListener('resize', _resizeCanvas);
+
+// window.addEventListener('resize', _resizeCanvas);
+// window.addEventListener('load', () => {
+// mousePos = createVector();
+// mousePosPrev = createVector();
+// Object.assign(
+// _canvasOptions,
+// _defaulCanvasOptions,
+// 'canvasOptions' in window ? window.canvasOptions : {}
+// );
+// if(_canvasOptions.canvas === false) {
+// document.body.removeChild(canvas);
+// }
+// _resizeCanvas();
+// if('setup' in window) {
+// //window.setup();
+// }
+// frameCount = 0;
+// _anim = requestAnimationFrame(_draw);
+// });
+
+
+ mousePos = createVector();
+ mousePosPrev = createVector();
+ Object.assign(
+ _canvasOptions,
+ _defaulCanvasOptions,
+ 'canvasOptions' in window ? window.canvasOptions : {}
+ );
+ // if(_canvasOptions.canvas === false) {
+ // document.body.removeChild(canvas);
+ // }
+ _resizeCanvas();
+ if('setup' in window) {
+ //window.setup();
+ }
+ frameCount = 0;
+ _anim = requestAnimationFrame(_draw);
+}
+
+function updateMouse(e) { // Modified from p5.js
+ if(e && !e.clientX) {
+ e = e.touches ? e.touches[0] : (e.changedTouches ? e.changedTouches[0] : e);
+ }
+ mouseUpdate = e.timeStamp === undefined ? performance.now() : e.timeStamp;
+ let rect = canvas.getBoundingClientRect();
+ let sx = canvas.scrollWidth / width;
+ let sy = canvas.scrollHeight / height;
+ let x = (e.clientX - rect.left) / sx;
+ let y = (e.clientY - rect.top) / sy;
+ if(x < 0) x = 0;
+ else if(x > width) x = width;
+ if(y < 0) y = 0;
+ else if(y > height) y = height;
+ if(mousePos) {
+ mousePosPrev.set(mousePos);
+ mousePos.set(x, y);
+ }
+ // return { x, y, winX: e.clientX, winY: e.clientY, id: e.identifier };
+}
+
+// let mouseIn = false, mouseDown = false, mouseMove = null, mousePos = { x: 0, y: 0 };
+// function updateMouse(e) {
+// if(e && !e.clientX) {
+// e = e.touches ? e.touches[0] : (e.changedTouches ? e.changedTouches[0] : e);
+// }
+// const { innerWidth: width, innerHeight: height } = window;
+// uniforms.mouse.value.set(e.clientX / width, 1 - e.clientY / height);
+// }
+
+// [
+// [ 'mouseenter', e => mouseIn = true ],
+// [ 'mouseleave', e => (mouseIn = false, mouseDown = false) ],
+// [ 'mousemove', e => (mouseIn = true, mouseMove = e.timeStamp) ],
+// [ 'mousedown', e => (mouseIn = true, mouseDown = true) ],
+// [ 'mouseup', e => mouseDown = false ],
+// [ 'touchstart', e => mouseIn = true ],
+// [ 'touchend', e => (mouseIn = false, mouseDown = false) ],
+// [ 'touchcancel', e => (mouseIn = false, mouseDown = false) ],
+// [ 'touchmove', e => (mouseIn = true, mouseMove = e.timeStamp) ]
+// ].forEach(([ eventName, cb ]) => document.body.addEventListener(eventName, e => {
+// updateMouse(e);
+// cb(e);
+// }));
+
+
+
+function _draw(timestamp) {
+ frameCount++;
+ canvasFrameRate = 1000.0 / (timestamp - _lastCanvasTime);
+ _lastCanvasTime = timestamp;
+ ctx = _originalCtx;
+ _canvasOptions.autoClear && clear(null);
+ if(_canvasOptions.autoPushPop) {
+ push();
+ _canvasOptions.centered && (_canvasCurrentlyCentered = true) && translateCenter();
+ _canvasOptions.autoCompensate && compensateCanvas();
+ }
+ 'draw' in window && window.draw(timestamp);
+ _canvasOptions.autoPushPop && pop();
+ _canvasCurrentlyCentered = false;
+ if(_canvasOptions.drawAndStop) {
+ return;
+ }
+ _anim = requestAnimationFrame(_draw);
+}
+
+function _resizeCanvas(specificCanvas) {
+ width = canvas.width = _canvasOptions.width !== null ? _canvasOptions.width : window.innerWidth;
+ height = canvas.height = _canvasOptions.height !== null ? _canvasOptions.height : window.innerHeight;
+ width_quarter = (width_half = width * HALF) * HALF;
+ height_quarter = (height_half = height * HALF) * HALF;
+ ctx.fillStyle = 'hsl(0, 0%, 100%)';
+ ctx.strokeStyle = 'hsl(0, 0%, 100%)';
+ if('onResize' in window) {
+ window.onResize();
+ }
+}
+
+function clear(x, y, w, h) {
+ if(x !== undefined && typeof x === 'number') {
+ ctx.clearRect(x, y, w, h);
+ }
+ else if(_canvasOptions.centered && _canvasCurrentlyCentered/* && x !== null */) {
+ ctx.clearRect(-width_half, -height_half, width, height);
+ }
+ else {
+ ctx.clearRect(0, 0, width, height);
+ }
+}
+
+function background(a) {
+ push();
+ if(typeof a !== 'number') {
+ fillStyle(a);
+ }
+ if(_canvasOptions.centered && _canvasCurrentlyCentered) {
+ ctx.fillRect(-width_half, -height_half, width, height);
+ }
+ else {
+ ctx.fillRect(0, 0, width, height);
+ }
+ pop();
+}
+
+function globalAlpha(alpha = ctx.globalAlpha) {
+ return ctx.globalAlpha = alpha;
+}
+
+function fillStyle(...args) {
+ if(args.length === 1) {
+ let a = args[0];
+ if(typeof a === 'string' || a instanceof CanvasGradient || a instanceof CanvasPattern) {
+ ctx.fillStyle = args[0];
+ }
+ }
+ return ctx.fillStyle;
+}
+
+function lineWidth(w) {
+ if(typeof w === 'number') {
+ ctx.lineWidth = w;
+ }
+ return ctx.lineWidth;
+}
+
+// "butt" || "round" || "square";
+function lineCap(style = 'butt') {
+ ctx.lineCap = style;
+}
+
+// "bevel" || "round" || "miter"
+function lineJoin(style) {
+ ctx.lineJoin = style;
+}
+
+function miterLimit(value = 10) {
+ ctx.miterLimit = value;
+}
+
+function strokeStyle(...args) {
+ if(args.length === 1) {
+ let a = args[0];
+ if(typeof a === 'string' || a instanceof CanvasGradient) {
+ ctx.strokeStyle = a;
+ }
+ }
+ else if(args.length === 2) {
+ strokeStyle(args[0]);
+ lineWidth(args[1]);
+ }
+ return ctx.strokeStyle;
+}
+
+function lerpRGB(...args) {
+ let r1 = 255;
+ let b1 = 255;
+ let g1 = 255;
+ let a1 = 1;
+ let r2 = 0;
+ let g2 = 0;
+ let b2 = 0;
+ let a2 = 1;
+ let t = 0.5;
+ if(args.length === 3) {
+ if(Array.isArray(args[0]) && Array.isArray(args[1])) {
+ return lerpRGB(...args[0], ...args[1], args[2]);
+ }
+ [
+ { r: r1 = 255, b: b1 = 255, g: g1 = 255, a: a1 = 1 },
+ { r: r2 = 0, b: b2 = 0, g: g2 = 0, a: a2 = 1 },
+ t
+ ] = args;
+ }
+ else if(args.length === 7) {
+ [
+ r1, g1, b1,
+ r2, g2, b2,
+ t
+ ] = args;
+ }
+ else if(args.length === 9) {
+ [
+ r1, g1, b1, a1,
+ r2, g2, b2, a2,
+ t
+ ] = args;
+ }
+ else if(args.length === 2 && Array.isArray(args[0])) {
+ if(args[0].length === 2) {
+ return lerpRGB(...args[0], args[1]);
+ }
+ // TODO: Allow (possibly weighted) lerping between n-count RGBs at specified positions
+ }
+ else {
+ return { r: 127.5, g: 127.5, b: 127.5, a: 1 };
+ }
+ let r = lerp(r1, r2, t);
+ let g = lerp(g1, g2, t);
+ let b = lerp(b1, b2, t);
+ let a = lerp(a1, a2, t);
+ return { r, g, b, a };
+}
+
+function hsl(hue, sat, light, alpha = 1) {
+ if(typeof hue !== 'number') {
+ if(Array.isArray(hue)) {
+ [ hue, sat, light, alpha = alpha ] = hue;
+ }
+ else if('h' in hue) {
+ ({ h: hue, s: sat, l: light, a: alpha = alpha } = hue);
+ }
+ }
+ hue = hue % 360;
+ if(hue < 0) {
+ hue += 360;
+ }
+ return `hsl(${hue} ${sat}% ${light}% / ${alpha})`;
+}
+
+function parseHSL(input) {
+ if(typeof input !== 'string') {
+ return input;
+ }
+ let result = input.match(/hsla?\(([\d.]+)\s*,?\s*([\d.]+)%\s*,?\s*([\d.]+)%\s*[/,]?\s*([\d.]*)?\)/);
+ if(result) {
+ let [ i, h, s, l, a ] = result;
+ return { input, h, s, l, a };
+ }
+ return null;
+}
+
+function setHueHSL(input, val) {
+ if(val === undefined) return input;
+ let p = parseHSL(input);
+ p.h = val;
+ return hsl(p);
+}
+
+function rotateHSL(input, amt = 90) {
+ if(amt === 0) return input;
+ let p = parseHSL(input);
+ p.h += amt;
+ return hsl(p);
+}
+
+function saturateHSL(input, amt = 0.1) {
+ if(amt === 0) return input;
+ let p = parseHSL(input);
+ p.s *= 1 + amt;
+ return hsl(p);
+}
+
+function lightenHSL(input, amt = 0.1) {
+ if(amt === 0) return input;
+ let p = parseHSL(input);
+ p.l *= 1 + amt;
+ return hsl(p);
+}
+
+function rgb(r = 255, g = 255, b = 255, a = 1) {
+ if(typeof r !== 'number' && 'r' in r) {
+ ({ r = 255, g = 255, b = 255, a = 1 } = r);
+ }
+ return `rgba(${r}, ${g}, ${b}, ${a})`;
+}
+
+function fill(...args) {
+ if(args.length) {
+ fillStyle(...args);
+ }
+ ctx.fill();
+}
+
+function stroke(...args) {
+ if(args.length) {
+ strokeStyle(...args);
+ }
+ ctx.stroke();
+}
+
+function clip() {
+ ctx.clip();
+}
+
+function createLinearGradient(x1 = -100, y1 = -100, x2 = 100, y2 = 100) {
+// if(typeof x1 !== 'number') {
+// if('x' in x1) {
+
+// }
+// }
+ return ctx.createLinearGradient(x1, y1, x2, y2);
+}
+
+function createRadialGradient(x1 = 0, y1 = 0, r1 = 0, x2 = 0, y2 = 0, r2 = 200) {
+ return ctx.createRadialGradient(x1, y1, r1, x2, y2, r2);
+}
+
+function drawImage(img, x = 0, y = 0, ...args) {
+ ctx.drawImage(img, x, y, ...args);
+}
+
+function strokeText(str = 'Hello world', x = 0, y = 0) {
+ ctx.strokeText(str, x, y);
+}
+
+function fillText(str = 'Hello world', x = 0, y = 0) {
+ ctx.fillText(str, x, y);
+}
+
+function strokeFillText(str = 'Hello world', x = 0, y = 0) {
+ strokeText(str, x, y);
+ fillText(str, x, y);
+}
+
+function fillStrokeText(str = 'Hello world', x = 0, y = 0) {
+ fillText(str, x, y);
+ strokeText(str, x, y);
+}
+
+function measureText(...args) {
+ return ctx.measureText(...args);
+}
+
+// ctx.textAlign = "left" || "right" || "center" || "start" || "end";
+function textAlign(str = 'left') {
+ ctx.textAlign = str;
+}
+
+// ctx.textBaseline = "top" || "hanging" || "middle" || "alphabetic" || "ideographic" || "bottom";
+function textBaseline(str = 'left') {
+ if(str === 'center') str = 'middle';
+ ctx.textBaseline = str;
+}
+
+function push() {
+ ctx.save();
+}
+
+function pop() {
+ ctx.restore();
+}
+
+function resetTransform() {
+ ctx.resetTransform();
+}
+
+function translate(x = 0, y = 0) {
+ if(typeof x === 'number') {
+ ctx.translate(x, y);
+ }
+ else if('x' in x) {
+ ctx.translate(x.x, x.y);
+ }
+}
+
+function translateCenter(x = 0, y = 0) {
+ ctx.translate(width_half + x, height_half + y);
+}
+
+function rotate(rot, offsetX, offsetY) {
+ rot = rot % TAU;
+ if(offsetX === undefined) {
+ ctx.rotate(rot);
+ }
+ else if(typeof offsetX !== 'number') {
+ if('x' in offsetX) {
+ ctx.translate(offsetX.x, offsetX.y);
+ ctx.rotate(rot);
+ ctx.translate(-offsetX.x, -offsetX.y);
+ }
+ }
+ else {
+ ctx.translate(offsetX, offsetY);
+ ctx.rotate(rot);
+ ctx.translate(-offsetX, -offsetY);
+ }
+}
+
+function scale(x = 1, y = x) {
+ ctx.scale(x, y);
+}
+
+function shearX(rad) {
+ ctx.transform(1, 0, tan(rad), 1, 0, 0);
+}
+
+function shearY(rad) {
+ ctx.transform(1, tan(rad), 0, 1, 0, 0);
+}
+
+function compensateCanvas() {
+ let offX = 0;
+ let offY = 0;
+ if(width % 2) offX += 0.5;
+ if(height % 2) offY += 0.5;
+ if(offX || offY) {
+ translate(offX, offY);
+ }
+}
+
+const compOper = {
+ default: 'source-over', sourceOver: 'source-over', sourceIn: 'source-in',
+ sourceOut: 'source-out', sourceAtop: 'source-atop', destinationOver: 'destination-over',
+ destinationIn: 'destination-in', destinationOut: 'destination-out', destinationAtop: 'destination-atop',
+ lighter: 'lighter', copy: 'copy', xor: 'xor',
+ multiply: 'multiply', screen: 'screen', overlay: 'overlay',
+ darken: 'darken', lighten: 'lighten', colorDodge: 'color-dodge',
+ colorBurn: 'color-burn', hardLight: 'hard-light', softLight: 'soft-light',
+ difference: 'difference', exclusion: 'exclusion', hue: 'hue',
+ saturation: 'saturation', color: 'color', luminosity: 'luminosity',
+ source: {
+ over: 'source-over', in: 'source-in', out: 'source-out',
+ atop: 'source-atop'
+ },
+ destination: {
+ over: 'destination-over', in: 'destination-in', out: 'destination-out',
+ atop: 'destination-atop'
+ },
+ light: {
+ hard: 'hard-light', soft: 'soft-light'
+ }
+ };
+
+
+function compositeOperation(type = compOper.default) { // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
+ ctx.globalCompositeOperation = type;
+}
+
+// const filters = [
+// [ 'url', [ 'url' ] ],
+// [ 'blur', [ 'length' ] ],
+// [ 'brightness', [ 'percentage' ] ],
+// [ 'contrast', [ 'percentage' ] ]
+// ];
+
+function filter(filterFuncs = 'none') {
+ ctx.filter = filterFuncs;
+}
+
+function beginPath() {
+ ctx.beginPath();
+}
+
+function moveTo(x, y) {
+ if(typeof x === 'number') {
+ ctx.moveTo(x, y);
+ }
+ else if('x' in x) {
+ ctx.moveTo(x.x, x.y);
+ }
+}
+
+function lineTo(x, y) {
+ if(typeof x === 'number') {
+ ctx.lineTo(x, y);
+ }
+ else if('x' in x) {
+ ctx.lineTo(x.x, x.y);
+ }
+}
+
+function quadraticCurveTo(cpX, cpY, x, y) {
+ // ctx.quadraticCurveTo(cpX, cpY, x, y);
+ let a = [];
+ let b = [];
+ if(typeof cpX === 'number') {
+ a = [ cpX, cpY ];
+ if(typeof x === 'number') {
+ b = [ x, y ];
+ }
+ else if('x' in x) {
+ b = x.xy;
+ }
+ }
+ else if('x' in cpX) {
+ a = cpX.xy;
+ if(typeof cpY === 'number') {
+ b = [ cpY, x ];
+ }
+ else if('x' in cpY) {
+ b = cpY.xy;
+ }
+ }
+ ctx.quadraticCurveTo(a[0], a[1], b[0], b[1]);
+}
+
+function bezierCurveTo(cp1X, cp1Y, cp2X, cp2Y, x, y) {
+ let a = [];
+ let b = [];
+ let c = [];
+ if(typeof cp1X === 'number') {
+ a = [ cp1X, cp1Y ];
+ if(typeof cp2X === 'number') {
+ b = [ cp2X, cp2Y ];
+ if(typeof x === 'number') {
+ c = [ x, y ];
+ }
+ else if('x' in x) {
+ c = x.xy;
+ }
+ }
+ else if('x' in cp2X) {
+ b = cp2X.xy;
+ if(typeof cp2Y === 'number') {
+ c = [ cp2Y, x ];
+ }
+ else if('x' in cp2Y) {
+ c = cp2Y.xy;
+ }
+ }
+ }
+ else if('x' in cp1X) {
+ a = cp1X.xy;
+ if(typeof cp1Y === 'number') {
+ b = [ cp1Y, cp2X ];
+ if(typeof cp2Y === 'number') {
+ c = [ cp2Y, x ];
+ }
+ else if('x' in cp2Y) {
+ c = cp2Y.xy;
+ }
+ }
+ else if('x' in cp1Y) {
+ b = cp1Y.xy;
+ if(typeof cp2X === 'number') {
+ c = [ cp2X, cp2Y ];
+ }
+ else if('x' in cp2X) {
+ c = cp2X.xy;
+ }
+ }
+ }
+ ctx.bezierCurveTo(a[0], a[1], b[0], b[1], c[0], c[1]);
+}
+
+function closePath() {
+ ctx.closePath();
+}
+
+function point(x = 0, y = 0, r = 0, g = 0, b = 0, a = 255, doPut_ = true) {
+ // let imgData = ctx.createImageData(1, 1);
+ // imgData.data[0] = r;
+ // imgData.data[1] = g;
+ // imgData.data[2] = b;
+ // imgData.data[3] = a;
+ // if(doPut_) {
+ // ctx.putImageData(imgData, x, y);
+ // }
+ // return imgData;
+}
+
+function line(x = 0, y = 0, x_ = 0, y_ = 0) {
+ if(typeof x === 'number') {
+ moveTo(x, y);
+ lineTo(x_, y_);
+ }
+ else if('x' in x) {
+ moveTo(x);
+ lineTo(y, x_);
+ }
+}
+
+function vertices(...verts) {
+ if(verts.length === 0) return;
+ else if(verts.length === 1 && Array.isArray(verts[0])) {
+ verts = verts[0];
+ }
+ for(let i = 0; i < verts.length; i++) {
+ let n = verts[i];
+ let x = 0;
+ let y = 0;
+ if(Array.isArray(n)) {
+ ([ x, y ] = n);
+ }
+ else if(n instanceof Vector || ('x' in n && 'y' in n)) {
+ ({ x, y } = n);
+ }
+ lineTo(x, y);
+ }
+}
+
+function arcTo(x1 = 0, y1 = 0, x2 = 0, y2 = 0, radius = 50) {
+ ctx.arcTo(x1, y1, x2, y2, radius);
+}
+
+function rect(x = 0, y = 0, w = 10, h = w, r = 0) {
+ if(r > 0) {
+ moveTo(x + r, y);
+ arcTo(x + w, y, x + w, y + h, r);
+ arcTo(x + w, y + h, x, y + h, r);
+ arcTo(x, y + h, x, y, r);
+ arcTo(x, y, x + w, y, r);
+ closePath();
+ }
+ else {
+ ctx.rect(x, y, w, h);
+ }
+}
+
+function arc(x = 0, y = 0, radius = 50, startAngle = 0, endAngle = Math.PI * 2, anticlockwise = false) {
+ if(radius < 0) radius = 0;
+ ctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);
+}
+
+function circle(x = 0, y = undefined, rX = 20, rY = undefined) {
+ if(typeof x !== 'number' && 'x' in x) {
+ if(y !== undefined) {
+ rX = y;
+ }
+ y = x.y;
+ x = x.x;
+ }
+ else if(y === undefined) {
+ y = 0;
+ }
+ if(typeof rX !== 'number' && 'x' in rX) {
+ rY = rX.y;
+ rX = rX.x;
+ }
+ ctx.moveTo(x + rX, y);
+ if(rY !== undefined) {
+ ellipse(x, y, rX, rY);
+ }
+ else {
+ if(rX < 0) rX = 0;
+ ctx.arc(x, y, rX, 0, TAU);
+ }
+}
+
+function ellipse(x = 0, y = 0, rX = 50, rY = 50, rot = 0, angStart = 0, angEnd = Math.PI * 2, antiCw = false) {
+ if(rX < 0) rX = 0;
+ if(rY < 0) rY = 0;
+ ctx.ellipse(x, y, rX, rY, rot, angStart, angEnd, antiCw);
+}
+
+function regularPolygon(sides, radius = 50, rotation = 0) {
+ let circumference = TAU * radius;
+ let count = min(sides, circumference);
+ for(let i = 0; i < count; i++) {
+ let t = i / count * TAU + rotation;
+ let x = cos(t) * radius;
+ let y = sin(t) * radius;
+ if(i === 0) {
+ ctx.moveTo(x, y);
+ }
+ else {
+ ctx.lineTo(x, y);
+ }
+ }
+ ctx.closePath();
+}
+
+function genRegularPolygon(sides = 3, radius = 50, rotation = 0) {
+ let iSizes = 1 / sides * TAU;
+ let data = {
+ sides,
+ radius,
+ rotation,
+ points: []
+ };
+ for(let i = 0; i < sides; i++) {
+ let t = i * iSizes + rotation;
+ let x = cos(t) * radius;
+ let y = sin(t) * radius;
+ let point = createVector(x, y);
+ Object.assign(point, { i, t });
+ data.points.push(point);
+ }
+ return data;
+}
+
+function getCodePenID() {
+ if(_codepenIDRegex.test(window.location.href)) {
+ return _codepenIDRegex.exec(window.location.href)[1];
+ }
+ else {
+ let metas = document.getElementsByTagName('link');
+ for(let i = 0; i < metas.length; i++) {
+ let m = metas[i];
+ if(m.getAttribute('rel') == 'canonical') {
+ let id = _codepenIDRegex.exec(m.getAttribute('href'));
+ if(id) {
+ return id[1];
+ }
+ }
+ }
+ }
+}
+
+function isPreviewEmbed() {
+ return location.href.includes('/fullcpgrid/');
+}
+
+function loadImage(url) {
+ return new Promise((resolve, reject) => {
+ let img = new Image();
+ img.crossOrigin = 'Anonymous';
+ img.onload = () => resolve(img);
+ img.src = url;
+ });
+}
+
+loadImage.alca = function(urlPart) {
+ return loadImage('https://alca.tv/static/' + urlPart);
+ };
+
+loadImage.alca.pen = function(urlPart) {
+ return loadImage.alca('codepen/' + urlPart);
+ };
+
+loadImage.alca.pen._ = function(urlPart) {
+ return loadImage.alca.pen(`pens/${getCodePenID()}/${urlPart}`);
+ };
+
+function loadVideo(url) {
+ return new Promise((resolve, reject) => {
+ let vid = document.createElement('video');
+ vid.crossOrigin = 'anonymous';
+ vid.onloadeddata = () => resolve(vid);
+ vid.preload = true;
+ vid.muted = true;
+ vid.src = url;
+ vid.load();
+ });
+}
+
+loadVideo.alca = function(urlPart) {
+ return loadVideo('https://alca.tv/static/' + urlPart);
+ };
+
+loadVideo.alca.pen = function(urlPart) {
+ return loadVideo.alca('codepen/' + urlPart);
+ };
+
+loadVideo.alca.pen._ = function(urlPart) {
+ return loadVideo.alca.pen(`pens/${getCodePenID()}/${urlPart}`);
+ };
+
+function loadData(url) {
+ return fetch(url);
+}
+
+loadData.alca = function(urlPart) {
+ return loadData('https://alca.tv/static/' + urlPart);
+ };
+
+function loadText(url) {
+ return loadData(url)
+ .then(res => res.text());
+}
+
+loadText.alca = function(urlPart) {
+ return loadText('https://alca.tv/static/' + urlPart);
+ };
+
+function loadJSON(url) {
+ return loadData(url)
+ .then(res => res.json());
+}
+
+loadJSON.alca = function(urlPart) {
+ return loadJSON('https://alca.tv/static/' + urlPart);
+ };
+
+function getImageData(img, ...args) {
+ if(img instanceof Image) {
+ let canvas = document.createElement('canvas');
+ let ctx = canvas.getContext('2d');
+ Object.assign(canvas, { width: img.width, height: img.height });
+ ctx.drawImage(img, 0, 0);
+ let data;
+ if(args.length) {
+ data = ctx.getImageData(...args);
+ }
+ else {
+ data = ctx.getImageData(0, 0, img.width, img.height);
+ }
+ return Object.assign(data, { canvas, ctx });
+ }
+ else {
+ return ctx.getImageData(img, ...args);
+ }
+}
+
+function xyToI(x, y, w, h) {
+ if(typeof x !== 'number' && 'x' in x) {
+ h = w;
+ w = y;
+ ({ x, y } = x);
+ }
+ if(w === undefined) w = 1;
+ // if(h === undefined) h = Infinity;
+ return x + w * y;
+}
+
+function iToXY(i, w, h) {
+ return createVector(i % w, floor(i / w));
+}
+
+function random(low = 1, high = null) {
+ if(Array.isArray(low)) {
+ return low[floor(Math.random() * low.length)];
+ }
+ if(high === null) {
+ return Math.random() * low;
+ }
+ return Math.random() * (high - low) + low;
+}
+
+let _randomGaussianPrevious = false;
+let _randomGaussianY2 = 0;
+
+// https://github.com/processing/p5.js/blob/5a46133fdc3e8c42fda1c1888864cf499940d86d/src/math/random.js#L166
+// Offset, deviation
+function randomGaussian(mean = 0, sd = 1) {
+ let y1, x1, x2, w;
+ if(_randomGaussianPrevious) {
+ y1 = _randomGaussianY2;
+ _randomGaussianPrevious = false;
+ }
+ else {
+ do {
+ x1 = random(2) - 1;
+ x2 = random(2) - 1;
+ w = x1 * x1 + x2 * x2;
+ } while (w >= 1);
+ w = sqrt(-2 * log(w) / w);
+ y1 = x1 * w;
+ _randomGaussianY2 = x2 * w;
+ _randomGaussianPrevious = true;
+ }
+ return y1 * (sd || 1) + mean;
+}
+
+function map(n, a, b, c, d) {
+ return (n - a) * (d - c) / (b - a) + c;
+}
+
+function constrain(n, mn, mx) {
+ return max(mn, min(mx, n));
+}
+
+function lerp(start, stop, amt = 0.5) {
+ if(typeof start !== 'number') {
+ return Vector.lerp(start, stop, amt);
+ }
+ return amt * (stop - start) + start;
+}
+
+function _distSq(x1, y1, x2, y2) {
+ let _x = x2 - x1;
+ let _y = y2 - y1;
+ return _x * _x + _y * _y;
+}
+
+function distSq(x1, y1, x2, y2) {
+ if(x1 === undefined || y1 === undefined || x2 === undefined || y2 === undefined) {
+ return 0;
+ }
+ else if(typeof x1 === 'number') {
+ if(x1 === x1) {
+ return _distSq(x1, y1, x2, y2);
+ }
+ return 0;
+ }
+ else if('x' in x1) {
+ return _distSq(x1.x, x1.y, y1.x, y1.y);
+ }
+ return 0;
+}
+
+function dist(x1, y1, x2, y2) {
+ let d = distSq(x1, y1, x2, y2);
+ if(d === 0) {
+ return 0;
+ }
+ return sqrt(d);
+}
+
+function cos(input, mult = null) {
+ let c = Math.cos(input % TAU);
+ if(mult === null) {
+ return c;
+ }
+ return c * mult;
+}
+
+function sin(input, mult = null) {
+ let s = Math.sin(input % TAU);
+ if(mult === null) {
+ return s;
+ }
+ return s * mult;
+}
+
+
+function createVector(x, y, z) {
+ return new Vector(x, y, z);
+}
+
+class Vector {
+ constructor(x = 0, y = 0, z = 0) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+ toString() {
+ let { x, y, z } = this;
+ return `{ x: ${x}, y: ${y}, z: ${z} }`;
+ }
+
+ static center() {
+ return createVector(width_half, height_half);
+ }
+
+ static from(v, ...args) {
+ if(v === undefined) {
+ return createVector();
+ }
+ else if(Array.isArray(v)) {
+ return createVector(...v);
+ }
+ else if(typeof v === 'object') {
+ return createVector(v.x, v.y, v.z);
+ }
+ else if(typeof v === 'number') {
+ return createVector(v, ...args);
+ }
+ }
+
+ static fromAngle(angle, mult = 1) {
+ let v = createVector(cos(angle), sin(angle));
+ if(mult !== 1) v.mult(mult);
+ return v;
+ }
+
+ static random2D(angle = true, mult = 1) {
+ let v;
+ if(angle === true) {
+ v = Vector.fromAngle(random(TAU));
+ }
+ else {
+ v = createVector(random(-1, 1), random(-1, 1));
+ }
+ if(typeof angle === 'number') {
+ v.mult(angle);
+ }
+ else if(mult !== 1) {
+ v.mult(mult);
+ }
+ return v;
+ }
+
+ static lerp(start, stop, amt = 0.5, apply = false) {
+ let x = start.x === stop.x ? start.x : lerp(start.x, stop.x, amt);
+ let y = start.y === stop.y ? start.y : lerp(start.y, stop.y, amt);
+ let z = start.z === undefined ? stop.z === undefined ? 0 : stop.z : start.z === stop.z ? start.z : lerp(start.z, stop.z, amt);
+ if(apply) {
+ return start.set(x, y, z);
+ }
+ return createVector(x, y, z);
+ }
+
+ get xy() { return [ this.x, this.y ]; }
+ get yx() { return [ this.y, this.x ]; }
+ get xz() { return [ this.x, this.z ]; }
+ get zx() { return [ this.z, this.x ]; }
+ get yz() { return [ this.y, this.z ]; }
+ get zy() { return [ this.z, this.y ]; }
+ get xyz() { return [ this.x, this.y, this.z ]; }
+ get xzy() { return [ this.x, this.z, this.y ]; }
+ get yxz() { return [ this.y, this.x, this.z ]; }
+ get yzx() { return [ this.y, this.z, this.x ]; }
+ get zyx() { return [ this.z, this.y, this.x ]; }
+ get zxy() { return [ this.z, this.x, this.y ]; }
+
+ get xyObject() { return { x: this.x, y: this.y }; }
+ get xzObject() { return { x: this.x, z: this.z }; }
+ get yzObject() { return { y: this.y, z: this.z }; }
+ get xyzObject() { return { x: this.x, y: this.y, z: this.z }; }
+
+ copy() {
+ return createVector(this.x, this.y, this.z);
+ }
+
+ get _() {
+ return this.copy();
+ }
+
+ equals(vec) {
+ return this.x === vec.x && this.y === vec.y;
+ }
+
+ equals3D(vec = {}) {
+ return this.x === vec.x && this.y === vec.y && this.z === vec.z;
+ }
+
+ draw() {
+ point(this.x, this.y);
+ }
+
+ set(x = this.x, y = this.y, z = this.z) {
+ if(x instanceof Vector) {
+ this.x = x.x;
+ this.y = x.y;
+ this.z = x.z;
+ return this;
+ }
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ return this;
+ }
+ setX(x = this.x) {
+ if(x instanceof Vector) {
+ this.x = x.x;
+ return this;
+ }
+ this.x = x;
+ return this;
+ }
+ setY(y = this.y) {
+ if(y instanceof Vector) {
+ this.y = y.y;
+ return this;
+ }
+ this.y = y;
+ return this;
+ }
+ setZ(z = this.z) {
+ if(z instanceof Vector) {
+ this.z = z.z;
+ return this;
+ }
+ this.z = z;
+ return this;
+ }
+ setXY(x = this.x, y = this.y) {
+ if(x instanceof Vector) {
+ this.x = x.x;
+ this.y = x.y;
+ return this;
+ }
+ this.x = x;
+ this.y = y;
+ return this;
+ }
+ setYZ(y = this.y, z = this.z) {
+ if(y instanceof Vector) {
+ this.y = y.y;
+ this.z = y.z;
+ return this;
+ }
+ this.y = y;
+ this.z = z;
+ return this;
+ }
+ setXZ(x = this.x, z = this.y) {
+ if(x instanceof Vector) {
+ this.x = x.x;
+ this.z = x.z;
+ return this;
+ }
+ this.x = x;
+ this.z = z;
+ return this;
+ }
+ setZX(...args) {
+ return this.setXZ(...args);
+ }
+
+ add(x = 0, y = undefined, z = undefined) {
+ if(y === undefined) {
+ y = x;
+ z = x;
+ }
+ else if(z === undefined) {
+ z = 0;
+ }
+ if(x instanceof Vector) {
+ this.x += x.x;
+ this.y += x.y;
+ this.z += x.z;
+ return this;
+ }
+ this.x += x;
+ this.y += y;
+ this.z += z;
+ return this;
+ }
+ addX(n = 0) {
+ if(n instanceof Vector) {
+ this.x += n.x;
+ return this;
+ }
+ this.x += n;
+ return this;
+ }
+ addY(n = 0) {
+ if(n instanceof Vector) {
+ this.y += n.y;
+ return this;
+ }
+ this.y += n;
+ return this;
+ }
+ addZ(n = 0) {
+ if(n instanceof Vector) {
+ this.z += n.z;
+ return this;
+ }
+ this.z += n;
+ return this;
+ }
+ sub(x = 0, y = undefined, z = undefined) {
+ if(y === undefined) {
+ y = x;
+ z = x;
+ }
+ else if(z === undefined) {
+ z = 0;
+ }
+ if(x instanceof Vector) {
+ this.x -= x.x;
+ this.y -= x.y;
+ this.z -= x.z;
+ return this;
+ }
+ this.x -= x;
+ this.y -= y;
+ this.z -= z;
+ return this;
+ }
+ subX(n = 0) {
+ if(n instanceof Vector) {
+ this.x -= n.x;
+ return this;
+ }
+ this.x -= n;
+ return this;
+ }
+ subY(n = 0) {
+ if(n instanceof Vector) {
+ this.y -= n.y;
+ return this;
+ }
+ this.y -= n;
+ return this;
+ }
+ subZ(n = 0) {
+ if(n instanceof Vector) {
+ this.z -= n.z;
+ return this;
+ }
+ this.z -= n;
+ return this;
+ }
+ mult(x = 1, y = x, z = x) {
+ if(x instanceof Vector) {
+ this.x *= x.x;
+ this.y *= x.y;
+ this.z *= x.z;
+ return this;
+ }
+ this.x *= x;
+ this.y *= y;
+ this.z *= z;
+ return this;
+ }
+ multX(n = 1) {
+ if(n instanceof Vector) {
+ this.x *= n.x;
+ return this;
+ }
+ this.x *= n;
+ return this;
+ }
+ multY(n = 1) {
+ if(n instanceof Vector) {
+ this.y *= n.y;
+ return this;
+ }
+ this.y *= n;
+ return this;
+ }
+ multZ(n = 1) {
+ if(n instanceof Vector) {
+ this.z *= n.z;
+ return this;
+ }
+ this.z *= n;
+ return this;
+ }
+ div(x = 1, y = x, z = x) {
+ if(x instanceof Vector) {
+ this.x /= x.x;
+ this.y /= x.y;
+ this.z /= x.z;
+ return this;
+ }
+ this.x /= x;
+ this.y /= y;
+ this.z /= z;
+ return this;
+ }
+ divX(n = 1) {
+ if(n instanceof Vector) {
+ this.x /= n.x;
+ return this;
+ }
+ this.x /= n;
+ return this;
+ }
+ divY(n = 1) {
+ if(n instanceof Vector) {
+ this.y /= n.y;
+ return this;
+ }
+ this.y /= n;
+ return this;
+ }
+ divZ(n = 1) {
+ if(n instanceof Vector) {
+ this.z /= n.z;
+ return this;
+ }
+ this.z /= n;
+ return this;
+ }
+
+ mod(x, y, z) {
+ if(x === undefined) return this;
+ else if(x instanceof Vector) {
+ this.x %= x.x;
+ this.y %= x.y;
+ this.z %= x.z;
+ return this;
+ }
+ this.x %= x;
+ this.y %= y === undefined ? x : y;
+ this.z %= z === undefined ? x : y;
+ return this;
+ }
+ // TODO: modX, modY, modZ
+
+ min(mX = this.x, mY = this.y, mZ = this.z) {
+ if(mX instanceof Vector) {
+ this.x = min(this.x, mX.x);
+ this.y = min(this.y, mX.y);
+ this.z = min(this.z, mX.z);
+ return this;
+ }
+ this.x = min(this.x, mX);
+ this.y = min(this.y, mY);
+ this.z = min(this.z, mZ);
+ return this;
+ }
+ max(mX = this.x, mY = this.y, mZ = this.z) {
+ if(mX instanceof Vector) {
+ this.x = max(this.x, mX.x);
+ this.y = max(this.y, mX.y);
+ this.z = max(this.z, mX.z);
+ return this;
+ }
+ this.x = max(this.x, mX);
+ this.y = max(this.y, mY);
+ this.z = max(this.z, mZ);
+ return this;
+ }
+ minX(n) {
+ this.x = min(this.x, n instanceof Vector ? n.x : n);
+ return this;
+ }
+ minY(n) {
+ this.y = min(this.y, n instanceof Vector ? n.y : n);
+ return this;
+ }
+ minZ(n) {
+ this.z = min(this.z, n instanceof Vector ? n.z : n);
+ return this;
+ }
+ maxX(n) {
+ this.x = max(this.x, n instanceof Vector ? n.x : n);
+ return this;
+ }
+ maxY(n) {
+ this.y = max(this.y, n instanceof Vector ? n.y : n);
+ return this;
+ }
+ maxZ(n) {
+ this.z = max(this.z, n instanceof Vector ? n.z : n);
+ return this;
+ }
+
+ heading() {
+ return atan2(this.y, this.x);
+ }
+ rotate(a = 0) {
+ // if(a === 0) {
+ // return this;
+ // }
+ // let newHeading = this.heading() + a;
+ // let mag = this.mag();
+ // return this.set(cos(newHeading), sin(newHeading)).mult(mag);
+ if(!a) {
+ return this;
+ }
+ const c = cos(a);
+ const s = sin(a);
+ const { x, y } = this;
+ this.x = x * c - y * s;
+ this.y = x * s + y * c;
+ return this;
+ }
+ rotateXY(a) {
+ let v = new Vector(this.x, this.y).rotate(a);
+ this.x = v.x;
+ this.y = v.y;
+ return this;
+ }
+ rotateYZ(a) {
+ let v = new Vector(this.y, this.z).rotate(a);
+ this.y = v.x;
+ this.z = v.y;
+ return this;
+ }
+ rotateZX(a) {
+ let v = new Vector(this.z, this.x).rotate(a);
+ this.z = v.x;
+ this.x = v.y;
+ return this;
+ }
+ magSq() {
+ return this.x * this.x + this.y * this.y;
+ }
+ magSq3D() {
+ return this.x * this.x + this.y * this.y + this.z * this.z;
+ }
+ mag() {
+ return Math.sqrt(this.magSq());
+ // return hypot(this.x, this.y);
+ }
+ mag3D() {
+ return Math.sqrt(this.magSq3D());
+ // return hypot(this.x, this.y);
+ }
+ normalize(mag = this.mag()) {
+ return mag === 0 ? this : this.div(mag);
+ }
+ normalize3D(mag = this.mag3D()) {
+ return mag === 0 ? this : this.div(mag);
+ }
+ setMag(mag) {
+ return this.normalize().mult(mag);
+ }
+ setMag3D(mag) {
+ return this.normalize3D().mult(mag);
+ }
+ limit(max) {
+ const magSq = this.magSq();
+ if(magSq > max * max) {
+ this.div(sqrt(magSq));
+ this.mult(max);
+ }
+ return this;
+ }
+ limit3D(max) {
+ const magSq = this.magSq3D();
+ if(magSq > max * max) {
+ this.div(sqrt(magSq));
+ this.mult(max);
+ }
+ return this;
+ }
+ dot(x = 0, y = 0) {
+ if(x instanceof Vector) {
+ return this.dot(x.x, x.y);
+ }
+ return this.x * x + this.y * y;
+ }
+ dot3D(x = 0, y = 0, z = 0) {
+ if(x instanceof Vector) {
+ return this.dot(x.x, x.y, x.z);
+ }
+ return this.x * x + this.y * y + this.z * z;
+ }
+ dist(x, y) {
+ if(x instanceof Vector) {
+ return x.copy().sub(this).mag();
+ }
+ else if(typeof x === 'object' && 'x' in x) {
+ ({ x, y } = x);
+ }
+ return dist(this.x, this.y, x, y);
+ }
+ dist3D(v) {
+ return v.copy().sub(this).mag3D();
+ }
+ lerp(stop, amt) {
+ return Vector.lerp(this, stop, amt, true);
+ }
+ round() {
+ this.x = round(this.x);
+ this.y = round(this.y);
+ this.z = round(this.z);
+ return this;
+ }
+ floor() {
+ this.x = floor(this.x);
+ this.y = floor(this.y);
+ this.z = floor(this.z);
+ return this;
+ }
+ fastFloor() {
+ this.x = ~~this.x;
+ this.y = ~~this.y;
+ this.z = ~~this.z;
+ return this;
+ }
+ ceil() {
+ this.x = ceil(this.x);
+ this.y = ceil(this.y);
+ this.z = ceil(this.z);
+ return this;
+ }
+}
+
+
+// Robert Penner - http://gizma.com/easing/
+// t: Current time
+// b: Start value
+// c: Change in value
+// d: Duration
+
+function linearTween /* simple linear tweening */ (t = 0.5, b = 0, c = 1, d = 1) { return c * t / d + b; }
+function easeInQuad /* quadratic easing in */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return c * t * t + b; }
+function easeOutQuad /* quadratic easing out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return -c * t * (t - 2) + b; }
+function easeInOutQuad /* quadratic easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return c * 0.5 * t * t + b; t--; return -c * 0.5 * (t * (t - 2) - 1) + b; }
+function easeInCubic /* cubic easing in */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return c * t * t * t + b; }
+function easeOutCubic /* cubic easing out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; t--; return c * (t * t * t + 1) + b; }
+function easeInOutCubic /* cubic easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return c * 0.5 * t * t * t + b; t -= 2; return c * 0.5 * (t * t * t + 2) + b; }
+function easeInQuart /* quartic easing in */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return c * t * t * t * t + b; }
+function easeOutQuart /* quartic easing out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; t--; return -c * (t * t * t * t - 1) + b; }
+function easeInOutQuart /* quartic easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return c * 0.5 * t * t * t * t + b; t -= 2; return -c * 0.5 * (t * t * t * t - 2) + b; }
+function easeInQuint /* quintic easing in */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return c * t * t * t * t * t + b; }
+function easeOutQuint /* quintic easing out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; t--; return c * (t * t * t * t * t + 1) + b; }
+function easeInOutQuint /* quintic easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return c * 0.5 * t * t * t * t * t + b; t -= 2; return c * 0.5 * (t * t * t * t * t + 2) + b; }
+function easeInSine /* sinusoidal easing in */ (t = 0.5, b = 0, c = 1, d = 1) { return -c * cos(t / d * HALF_PI) + c + b; }
+function easeOutSine /* sinusoidal easing out */ (t = 0.5, b = 0, c = 1, d = 1) { return c * sin(t / d * HALF_PI) + b; }
+function easeInOutSine /* sinusoidal easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { return -c * 0.5 * (cos(PI * t / d) - 1) + b; }
+function easeInExpo /* exponential easing in */ (t = 0.5, b = 0, c = 1, d = 1) { return c * pow(2, 10 * (t / d - 1)) + b; }
+function easeOutExpo /* exponential easing out */ (t = 0.5, b = 0, c = 1, d = 1) { return c * (-pow(2, -10 * t / d ) + 1) + b; }
+function easeInOutExpo /* exponential easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return c * 0.5 * pow(2, 10 * (t - 1)) + b; t--; return c * 0.5 * (-pow(2, -10 * t) + 2) + b; }
+function easeInCirc /* circular easing in */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; return -c * (sqrt(1 - t * t) - 1) + b; }
+function easeOutCirc /* circular easing out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d; t--; return c * sqrt(1 - t * t) + b; }
+function easeInOutCirc /* circular easing in/out */ (t = 0.5, b = 0, c = 1, d = 1) { t /= d * 0.5; if(t < 1) return -c * 0.5 * (sqrt(1 - t * t) - 1) + b; t -= 2; return c * 0.5 * (sqrt(1 - t * t) + 1) + b; }
+
+const ease = {
+ linearTween,
+ easeInQuad, easeOutQuad, easeInOutQuad,
+ easeInCubic, easeOutCubic, easeInOutCubic,
+ easeInQuart, easeOutQuart, easeInOutQuart,
+ easeInQuint, easeOutQuint, easeInOutQuint,
+ easeInSine, easeOutSine, easeInOutSine,
+ easeInExpo, easeOutExpo, easeInOutExpo,
+ easeInCirc, easeOutCirc, easeInOutCirc,
+ in: { linear: linearTween, quad: easeInQuad, cubic: easeInCubic, quart: easeInQuart, quint: easeInQuint, sine: easeInSine, expo: easeInExpo, circ: easeInCirc },
+ out: { linear: linearTween, quad: easeOutQuad, cubic: easeOutCubic, quart: easeOutQuart, quint: easeOutQuint, sine: easeOutSine, expo: easeOutExpo, circ: easeOutCirc },
+ inOut: { linear: linearTween, quad: easeInOutQuad, cubic: easeInOutCubic, quart: easeInOutQuart, quint: easeInOutQuint, sine: easeInOutSine, expo: easeInOutExpo, circ: easeInOutCirc },
+ linear: Object.assign(linearTween,
+ { in: linearTween, out: linearTween, inOut: linearTween }),
+ quad: { in: easeInQuad, out: easeOutQuad, inOut: easeInOutQuad },
+ cubic: { in: easeInCubic, out: easeOutCubic, inOut: easeInOutCubic },
+ quart: { in: easeInQuart, out: easeOutQuart, inOut: easeInOutQuart },
+ quint: { in: easeInQuint, out: easeOutQuint, inOut: easeInOutQuint },
+ sine: { in: easeInSine, out: easeOutSine, inOut: easeInOutSine },
+ expo: { in: easeInExpo, out: easeOutExpo, inOut: easeInOutExpo },
+ circ: { in: easeInCirc, out: easeOutCirc, inOut: easeInOutCirc }
+ };
+
+function getTimeArray(timestamp = null) {
+ if(timestamp === null) {
+ timestamp = new Date();
+ }
+ else if(typeof timestamp === 'string' || typeof timestamp === 'number') {
+ let parsedTimestamp = Date.parse(timestamp);
+ if(!isNaN(parsedTimestamp)) {
+ timestamp = new Date(parsedTimestamp);
+ }
+ else {
+ throw new RangeError('Invalid Date');
+ }
+ }
+ else if(!(timestamp instanceof Date)) {
+ throw new TypeError('Unsupported timestamp');
+ }
+ let arr = [
+ timestamp.getHours(),
+ timestamp.getMinutes(),
+ timestamp.getSeconds(),
+ timestamp.getMilliseconds()
+ ];
+ return arr;
+}
+
+function getTimeArrayPadded(...opts) {
+ return getTimeArray(...opts).map(n => `0${n}`.slice(-2));
+}
+
+function getTimeArraySmooth(...opts) {
+ let arr = getTimeArray(...opts);
+ let milliseconds = arr[3] / 1000;
+ let seconds = (arr[2] + milliseconds) / 60;
+ let minutes = (arr[1] + seconds) / 60;
+ let hours = ((arr[0] % 12 || 12) + minutes) / 12;
+ return [ hours, minutes, seconds, milliseconds ];
+}
+
+function loadWebFont(fontName) {
+ if('WebFont' in window === false) {
+ return Promise.reject('WebFont not available. Load using this script: https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js');
+ }
+ if(fontName === '') {
+ return Promise.resolve();
+ }
+ return new Promise((resolve, reject) => {
+ let options = { fontactive: resolve };
+ let providers = {};
+ if(typeof fontName === 'string') {
+ providers = { google: { families: [ fontName ] } };
+ }
+ else if(Array.isArray(fontName)) {
+ providers = { google: { families: fontName } };
+ }
+ else {
+ providers = fontName;
+ }
+ Object.assign(options, providers);
+ WebFont.load(options);
+ });
+}
+
+function isFontDefault() {
+ return ctx.font === '10px sans-serif';
+}
+
+function font(fontStr, fallbackIfDefault) {
+ if(fontStr !== undefined) {
+ ctx.font = fontStr;
+ if(fallbackIfDefault !== undefined && isFontDefault()) {
+ ctx.font = fallbackIfDefault;
+ }
+ }
+ return ctx.font;
+}
\ No newline at end of file
diff --git a/app/src/main/assets/js/circle-progress.js b/app/src/main/assets/js/circle-progress.js
new file mode 100644
index 0000000..ab8ac24
--- /dev/null
+++ b/app/src/main/assets/js/circle-progress.js
@@ -0,0 +1,412 @@
+/*
+jquery-circle-progress - jQuery Plugin to draw animated circular progress bars
+
+URL: http://kottenator.github.io/jquery-circle-progress/
+Author: Rostyslav Bryzgunov
+Version: 1.1.2
+License: MIT
+*/
+export const circle_progress = (function($) {
+ function CircleProgress(config) {
+ this.init(config);
+ }
+
+ CircleProgress.prototype = {
+ //----------------------------------------------- public options -----------------------------------------------
+ /**
+ * This is the only required option. It should be from 0.0 to 1.0
+ * @type {number}
+ */
+ value: 0.0,
+
+ /**
+ * Size of the circle / canvas in pixels
+ * @type {number}
+ */
+ size: 100.0,
+
+ /**
+ * Initial angle for 0.0 value in radians
+ * @type {number}
+ */
+ startAngle: -Math.PI,
+
+ /**
+ * Width of the arc. By default it's auto-calculated as 1/14 of size, but you may set it explicitly in pixels
+ * @type {number|string}
+ */
+ thickness: 'auto',
+
+ /**
+ * Fill of the arc. You may set it to:
+ * - solid color:
+ * - { color: '#3aeabb' }
+ * - { color: 'rgba(255, 255, 255, .3)' }
+ * - linear gradient (left to right):
+ * - { gradient: ['#3aeabb', '#fdd250'], gradientAngle: Math.PI / 4 }
+ * - { gradient: ['red', 'green', 'blue'], gradientDirection: [x0, y0, x1, y1] }
+ * - image:
+ * - { image: 'http://i.imgur.com/pT0i89v.png' }
+ * - { image: imageObject }
+ * - { color: 'lime', image: 'http://i.imgur.com/pT0i89v.png' } - color displayed until the image is loaded
+ */
+ fill: {
+ gradient: ['#3aeabb', '#fdd250']
+ },
+
+ /**
+ * Color of the "empty" arc. Only a color fill supported by now
+ * @type {string}
+ */
+ emptyFill: 'rgba(0, 0, 0, .1)',
+
+ /**
+ * Animation config (see jQuery animations: http://api.jquery.com/animate/)
+ */
+ animation: {
+ duration: 1200,
+ easing: 'circleProgressEasing'
+ },
+
+ /**
+ * Default animation starts at 0.0 and ends at specified `value`. Let's call this direct animation.
+ * If you want to make reversed animation then you should set `animationStartValue` to 1.0.
+ * Also you may specify any other value from 0.0 to 1.0
+ * @type {number}
+ */
+ animationStartValue: 0.0,
+
+ /**
+ * Reverse animation and arc draw
+ * @type {boolean}
+ */
+ reverse: false,
+
+ /**
+ * Arc line cap ('butt' (default), 'round' and 'square')
+ * Read more: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineCap
+ * @type {string}
+ */
+ lineCap: 'butt',
+
+ //-------------------------------------- protected properties and methods --------------------------------------
+ /**
+ * @protected
+ */
+ constructor: CircleProgress,
+
+ /**
+ * Container element. Should be passed into constructor config
+ * @protected
+ * @type {jQuery}
+ */
+ el: null,
+
+ /**
+ * Canvas element. Automatically generated and prepended to the {@link CircleProgress.el container}
+ * @protected
+ * @type {HTMLCanvasElement}
+ */
+ canvas: null,
+
+ /**
+ * 2D-context of the {@link CircleProgress.canvas canvas}
+ * @protected
+ * @type {CanvasRenderingContext2D}
+ */
+ ctx: null,
+
+ /**
+ * Radius of the outer circle. Automatically calculated as {@link CircleProgress.size} / 2
+ * @protected
+ * @type {number}
+ */
+ radius: 0.0,
+
+ /**
+ * Fill of the main arc. Automatically calculated, depending on {@link CircleProgress.fill} option
+ * @protected
+ * @type {string|CanvasGradient|CanvasPattern}
+ */
+ arcFill: null,
+
+ /**
+ * Last rendered frame value
+ * @protected
+ * @type {number}
+ */
+ lastFrameValue: 0.0,
+
+ /**
+ * Init/re-init the widget
+ * @param {object} config Config
+ */
+ init: function(config) {
+ $.extend(this, config);
+ this.radius = this.size / 2;
+ this.initWidget();
+ this.initFill();
+ this.draw();
+ },
+
+ /**
+ * @protected
+ */
+ initWidget: function() {
+ var canvas = this.canvas = this.canvas || $('