com.mikepenz.hypnoticcanvas:hypnoticcanvas-shaders-iosx64

HypnoticCanvas


Keywords
android, animation, background, compose, glsl, kotlin, mesh-gradient, mesh-gradients, multiplatform, shader, shaders, sksl
License
CC-BY-NC-SA-3.0

Documentation

Maven Central

HypnoticCanvas

Note

This README is under construction.

HypnoticCanvas is a library providing a convenient Modifier offering mesmerising shaders as background in your Compose based UI.

preview_small.mp4

Setup

Core-module

implementation "com.mikepenz.hypnoticcanvas:hypnoticcanvas:${version}"

Note

All shaders provided in the core module are licensed either under MIT or Apache 2.0 license.

Shader-module

implementation "com.mikepenz.hypnoticcanvas:hypnoticcanvas-shaders:${version}"

Important

Shaders in this module have non permissive licenses. Ensure to read the LICENSE section of the README.

Usage

Box(
    modifier = Modifier
        .fillMaxSize()
        .shaderBackground(BlackCherryCosmos)
)

Compatiblity

HypnoticCanvas is built with Compose Multiplatform, meaning that it supports different platforms:

Platform Supported Link
Android
Desktop (JVM)
iOS
Wasm Sample

Build & Run Sample App

Run Desktop App

./gradlew sample:run

Run Web App

./gradlew sample:wasmJsRun

Update aboutLibraries.json

 ./gradlew sample:exportLibraryDefinitions -PaboutLibraries.exportPath=src/commonMain/composeResources/files/

Credit

The base project setup is strongly based on the haze project by Chris Banes, Licensed under Apache License 2.0

The individual shaders are based on the respective shaders licenses. More details below.

Shaders core-module

Name Author License Note
GlossyGradients Giorgi Azmaipharashvili MIT License Rights bought for this shader on Fiverr, included in this project under MIT.

Shaders shaders-module

Name Author License Note
BlackCherryCosmos2 via via axiomcrux CC BY-NC-SA 3.0 DEED Shader does not specifically include license, however found the shader it appears to be based on.
GoldenMagma TAKUSAKU CC BY-NC-SA 3.0 DEED
IceReflection TAKUSAKU CC BY-NC-SA 3.0 DEED
InkFlow TAKUSAKU CC BY-NC-SA 3.0 DEED
OilFlow TAKUSAKU CC BY-NC-SA 3.0 DEED
PurpleLiquid fouad CC BY-NC-SA 3.0 DEED
RainbowWater flylo CC BY-NC-SA 3.0 DEED
Stage TAKUSAKU CC BY-NC-SA 3.0 DEED

License

The core project code in this repository is licensed as under Apache 2.0. SPDX-License-Identifier: Apache-2.0.

All Shaders are provided under their respective Authors license.

Shaders in the hypnoticcanvas module are licensed either as MIT, or Apache 2.0. Shaders in the hypnoticcanvas-shaders module are licensed as SPDX-License-Identifier: CC-BY-NC-SA-3.0.

Core module License

The source code for the core module is licensed under Apache 2.0, with the shaders provided in the core module as MIT License.

Copyright 2024 Mike Penz
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Shaders module License

Shaders in this module are most from ShaderToy.com and are licensed Attribution-NonCommercial-ShareAlike 3.0 Unported. Which is the default license as outlined by ShaderToy.com