当前位置: 首页 > news >正文

网站开发验收确 认书在线crm网站建站

网站开发验收确 认书,在线crm网站建站,怎么做vip视频网站,如何判断一个网站的好坏qml实现的水波纹特效 1.横向波纹效果2.另一种效果(纵向波纹) 一直以来使用c qt如果要实现一些高级特效比如水波纹效果都难度比较大,但是使用qt quick难度就会小很多。这里借鉴一些网友的思路简单实现一下水波纹效果。主要思路就是波浪的形成是…

qml实现的水波纹特效

  • 1.横向波纹效果
  • 2.另一种效果(纵向波纹)

一直以来使用c++ qt如果要实现一些高级特效比如水波纹效果都难度比较大,但是使用qt quick难度就会小很多。这里借鉴一些网友的思路简单实现一下水波纹效果。主要思路就是波浪的形成是基于sin曲线,以此来影响纹理坐标的颜色,然后加上时间动画不断改变曲线的坐标,从而达到一个波动效果。

1.横向波纹效果

Window {visible: truewidth: 800height: 600title: "Water Ripple Effect"Image {id: sourceImgwidth: 800height: 600source: "qrc:/12.png"}ShaderEffectSource {id: shaderSourcesourceItem: sourceImglive: true}ShaderEffect {id: waterEffectanchors.fill: parentproperty variant sourceTexture: shaderSourceproperty real frequency: 10property real amplitude: 0.04property real time: 0.0NumberAnimation on time {from: 0.0to: Math.PI*2duration: 1000loops: Animation.Infinite}fragmentShader: "varying highp vec2 qt_TexCoord0;uniform sampler2D sourceTexture;uniform highp float frequency;uniform highp float amplitude;uniform highp float time;void main() {highp vec2 pulse = sin(time - frequency * qt_TexCoord0);highp vec2 coord = qt_TexCoord0 + amplitude * vec2(pulse.x, -pulse.x);gl_FragColor = texture2D(sourceTexture, coord);}"}
}

效果如下-波涛汹涌:
在这里插入图片描述

2.另一种效果(纵向波纹)

Window {visible: truewidth: 800height: 600title: "Water Ripple Effect"Image {id: sourceImgwidth: 800height: 600source: "qrc:/12.png"}ShaderEffectSource {id: shaderSourcesourceItem: sourceImglive: true}ShaderEffect {id: waterEffectanchors.fill: parentproperty variant sourceTexture: shaderSourceproperty real frequency: 10property real amplitude: 0.08property real time: 0.0NumberAnimation on time {from: 0.0to: Math.PI * 2duration: 1000loops: Animation.Infinite}fragmentShader: "varying highp vec2 qt_TexCoord0;uniform sampler2D sourceTexture;uniform highp float frequency;uniform highp float amplitude;uniform highp float time;void main() {highp vec2 uv = qt_TexCoord0;highp float wave = sin(uv.y * frequency + time) * amplitude;uv.x += wave;gl_FragColor = texture2D(sourceTexture, uv);}"}
}

效果-树的摇曳:
在这里插入图片描述

修改下频率和振幅效果:

property real frequency: 60
property real amplitude: 0.02

在这里插入图片描述
这样看起来是不是有点波光粼粼的感觉了。挺有趣的~!0…0
代码链接奉上感兴趣的可以研究玩玩:
波纹效果代码地址

作者:费码程序猿
欢迎技术交流:QQ:255895056
转载请注明出处,如有不当欢迎指正

http://www.yayakq.cn/news/177804/

相关文章:

  • 书画网站建设方案策划天眼查企业查询官网登录
  • php网站路径问题站长号
  • 自己做的网站怎么发布上长沙电子商务网站建设
  • 如何成立一个房产网站网络架构分几层
  • wordpress网站导航百度排名怎么做
  • 网站备案工信部时间宜兴城乡建设局网站
  • 购物网站为什么做移动端宝安设计网站建设
  • python做网站效率phpwind 转wordpress
  • 在线做logo的网站自己网站怎么做优化
  • 南京页面网站制作关于网站的制作
  • 快速创建一个网站自己制作动漫的软件
  • 网站开发哪家公司口碑好市场营销手段有哪四种
  • 自建房外观设计网站推荐网页设计教程书籍推荐
  • 经典网站设计风格shopnc商城系统
  • 海城做网站wordpress theme是什么
  • 邯郸网站改版找谁做西安房地产网站建设
  • 12380网站建设建议如何区分官方网站和空壳网站
  • 做网站的时候表格怎么去掉建筑管理招聘网
  • 深圳最专业的高端网站建设织梦摄影网站模板
  • 珠海建设网站机构定制网站和模板网站
  • seo排名整站优化安阳吧
  • 网站正在备案辽宁建设工程信息网为什么上不去啦
  • 做毕业设计网站教程沈阳网站建设58同城
  • 网站开发工资多少稳定么关键词优化过程
  • 榆社县济南网站建设公司 大学建筑工程网官方网站
  • 夏津网站建设电话wordpress+空行
  • 苏州建设网站教程个人网页服务器
  • 网上购物的网站有哪些电子政务门户网站建设代码
  • idc销售网站php源代码wordpress的短代码
  • 济南市城乡建设部网站首页网站搭建上门多少钱