shader-gradient-vue
shader-gradient-vue
Vue 3 wrapper for ShaderGradient.
Tested with
@shadergradient/react@2.4.20
Install
npm i shader-gradient-vue
Usage
<script setup>
import { ShaderGradient } from 'shader-gradient-vue'
</script>
<template>
<ShaderGradient
animate="on"
color1="#ff5005"
color2="#dbba95"
color3="#d0bce1"
type="plane"
:uSpeed="0.4"
:uStrength="4"
grain="on"
/>
</template>
Props
All props from @shadergradient/react are supported.
| Prop | Type | Description |
|---|---|---|
type |
'plane' | 'sphere' | 'waterPlane' |
Shape |
animate |
'on' | 'off' |
Animation |
color1, color2, color3 |
string |
Colors |
uSpeed, uStrength, uDensity, uFrequency |
number |
Shader params |
grain |
'on' | 'off' |
Grain effect |
lightType |
'3d' | 'env' |
Lighting |
envPreset |
'city' | 'dawn' | 'lobby' |
Environment |
Bundle size
~250kb gzip (three.js + react + veaury). Consider this for performance-critical apps.
License
MIT — see LICENSE
Related Packages
@wave3d/element
Drop-in animated 3D gradient wave for Vue, Svelte, or plain HTML: the custom ele...
2,488
2
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.0 | ^3.3.0 | MIT |