Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
body { background-color: #80f9af; margin: 0; overflow: hidden; } .zdog-canvas { background-color: transparent; cursor: move; }
JavaScript
/* * ZDOG - COOL TYPO * Made with Zdog - Enjoy! * https://zzz.dog/ * * Drag the graphic to rotate it manually. * Inspired by the late summer. * * #013 - #100DaysOfCode * By ilithya | 2019 */ const illoElem = document.querySelector('canvas'); const TAU = Zdog.TAU; const c_01 = 'hsl(336, 100%, 70%)'; // Pink const c_02 = 'hsl(59, 100%, 70%)'; // Yellow const c_03 = 'hsl(233, 100%, 57%)'; // Blue const c_04 = 'hsl(60, 100%, 97%)'; // Whitish const letterSize = 90; // Resize graphic here const letterHalf = letterSize / 2; const letterStroke = letterSize / 2.5; illoElem.setAttribute('width', window.innerWidth); illoElem.setAttribute('height', window.innerHeight); const illo = new Zdog.Illustration({ element: illoElem, dragRotate: true }); // Word const letters = new Zdog.Group({ addTo: illo }); const c = new Zdog.Ellipse({ addTo: letters, width: letterSize, height: letterSize, quarters: 2, stroke: letterStroke, color: c_01, rotate: { z: TAU / 2 }, // Let's mirror the half circle translate: { x: letterSize * -1.85 } }); const o = new Zdog.Ellipse({ addTo: letters, width: letterSize, height: letterSize, stroke: letterStroke, color: c_01, translate: { x: letterSize * -0.85 } }); o.copy({ translate: { x: letterSize * 0.7 } }); const l = new Zdog.Shape({ addTo: letters, path: [ { x: letterHalf, y: letterHalf * -1 }, { x: letterHalf, y: letterHalf }, { x: letterSize * 1.1, y: letterHalf }], closed: false, stroke: letterStroke, color: c_01, translate: { x: letterSize * 1.25 } }); // First Rectangle new Zdog.Rect({ addTo: illo, width: letterSize * 5.1, height: letterSize * 1.2, stroke: letterStroke, color: c_02, fill: true, translate: { z: letterSize * -1, y: letterSize * -0.8 } }); // Wave const wavePath = letterStroke; new Zdog.Shape({ addTo: illo, path: [ { x: 0, y: 0 }, { arc: [ { x: wavePath, y: wavePath * -2 }, { x: wavePath * 2, y: 0 }] }, { arc: [ { x: wavePath * 3, y: wavePath * 2 }, { x: wavePath * 4, y: 0 }] }, { arc: [ { x: wavePath * 5, y: wavePath * -2 }, { x: wavePath * 6, y: 0 }] }, { arc: [ { x: wavePath * 7, y: wavePath * 2 }, { x: wavePath * 8, y: 0 }] }], closed: false, stroke: letterStroke, color: c_04, translate: { z: letterSize * -1.6, x: letterSize * -0.9, y: letterSize * 1.35 } }); // Second Rectangle const squareSize = letterSize * 2.8; new Zdog.Rect({ addTo: illo, width: squareSize, height: squareSize * 1.4, stroke: letterStroke, color: c_03, fill: true, translate: { z: letterSize * -3.2, x: letterSize / 4 } }); // Animate and render 3D graphic function animate() { illo.rotate.y += 0.02; illo.updateRenderGraph(); requestAnimationFrame(animate); } illo.updateRenderGraph(); animate();
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Zdog 3D JS引擎-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号