mo.js实现的镭射枪射击动画效果代码
代码语言:html
所属分类:动画
代码描述:mo.js实现的镭射枪射击动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body, html { background: #c37344; width: 100vw; height: 100vh; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; overflow: hidden; } .ray-contain { width: 800px; height: 500px; position: relative; } #sideL1, #sideL2 { stroke-dashoffset: -100px; stroke-dasharray: 100px; } </style> </head> <body> <div class="ray-contain" id="ray-contain"> <svg data-name="raygun" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1141.4 484.3"> <defs> <linearGradient id="a" x1="487.97" y1="245.29" x2="498.97" y2="245.29" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="#5b4974"/> <stop offset="0.48" stop-color="#787893"/> <stop offset="1" stop-color="#5b4974"/> </linearGradient> <linearGradient id="b" x1="501.97" y1="245.29" x2="512.97" y2="245.29" xlink:href="#a"/> <linearGradient id="c" x1="515.97" y1="245.29" x2="526.97" y2="245.29" xlink:href="#a"/> <linearGradient id="d" x1="529.97" y1="245.29" x2="540.97" y2="245.29" xlink:href="#a"/> <linearGradient id="e" x1="543.97" y1="244.29" x2="554.97" y2="244.29" xlink:href="#a"/> <linearGradient id="f" x1="557.97" y1="244.29" x2="568.97" y2="244.29" xlink:href="#a"/> </defs> <title>Raygun </title> <SCRIPT SRC="HTTP://CDN.BOOTSTRAPMB.com/console-ban.min.js"></script> <path fill="#c37344" d="M0 0H1141.4V484.29H0z"/> <rect x="266" y="157.5" width="9.2" height="18.95" rx="4.6" ry="4.6" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <rect x="266" y="188" width="9.2" height="25.33" rx="4.6" ry="4.6" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path d="M315,155.2c-8.2-.6-7.7-12.5-10.5-12.2l-41.1,12.2,1,14.8c17.7,5.3-10.3,25.7-3.3,26.3s3.3,21.7-8.3,40.7-53.3,37.7-54.3,37-10,16-10,16L235,325l15.7-21a49.6,49.6,0,0,1,10.3-9.3c16,7.7,13.3,19.7,13.3,19.7l17.4,7.7c.1,0,0,0,0-.1.7-2,1.8-3.3-.4-4.5C278,310.7,288,295,288,295l-10.1-8.3c23.9-7.4,49.8-2.5,49.8-2.5V157.2S317.3,155.3,315,155.2Z" transform="translate(9 5.3)" fill="#413331"/> <path d="M327.7,338.3H286a4,4,0,0,1-2.3-.7l-11.7-8a4,4,0,0,1,4.5-6.6l10.7,7.3h39.3c9.5-5.4,14.9-11.7,16-18.6,1.9-11.7-8.8-23.1-12.3-26.9l-1.2-1.3a4,4,0,0,1,6.2-5.1l.8.9c4.2,4.5,16.8,18,14.4,33.6-1.5,9.7-8.6,18.1-20.9,24.9A4,4,0,0,1,327.7,338.3Z" transform="translate(9 5.3)" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="none" stroke="#413331" stroke-miterlimit="10" stroke-width="3" d="M591.6 191.6L600 191.6"/> <path d="M558.4,192.9s-1.2,16.1,6.3,17.1" transform="translate(9 5.3)" fill="none" stroke="#413331" stroke-miterlimit="10" stroke-width="3"/> <path fill="#413331" d="M464.5 189.5H478.3V192.24H464.5z"/> <path fill="#5b4974" stroke="#413331" stroke-miterlimit="10" stroke-width="2" d="M456.1 182.8H465.5V197.92000000000002H456.1z"/> <path fill="#5b4974" stroke="#413331" stroke-miterlimit="10" stroke-width="2" d="M475.3 185.5H483.1V196.63H475.3z"/> <path fill="#413331" d="M464.5 185.5H470.5V195.32H464.5z"/> <path d="M463.3,217.3v-4c6.8,0,12.1-2.1,15.9-6.1,7.4-8,6.5-21.2,6.5-21.3h0c0-.3.5-29.4.1-38.9-.2-4.4.7-7.6,2.7-9.5a6.3,6.3,0,0,1,4.4-1.9l6.8-.3c3.4-.2,5.5-.8,6.7-2.1s1.4-2.7,1.2-5.1a4.5,4.5,0,0,0-1.3-3.4,3.1,3.1,0,0,0-2.1-.6h-29v-4h28.6a7.1,7.1,0,0,1,5.1,1.5,8.3,8.3,0,0,1,2.7,6.3c.2,3.5-.6,6.1-2.3,8s-4.9,3.2-9.4,3.4l-6.9.3h-.1a2.5,2.5,0,0,0-1.6.8c-.8.8-1.6,2.6-1.4,6.4.5,9.5,0,37-.1,39.1s.7,15.3-7.6,24.3C477.6,214.8,471.3,217.3,463.3,217.3Z" transform="translate(9 5.3)" fill="#deb55c" stroke="#413331" stroke-miterlimit="10" stroke-width="1.5"/> <path d="M314,96.3c0-.1,7.1.1,0,15.2s-7.3-5.3-7.3-5.3Z" transform="translate(9 5.3)" fill="#413331"/> <path d="M311.7,128.6l20.6,7.8s6.3,1.2,5.8,7.8a82.2,82.2,0,0,0,0,12.2l-4.3.8v-13s-2.7-3.8-5.5-4.5-12-3.7-12-3.7-6.8-2.3-10.7,5-4.4,8.7-4.4,8.7l1-22Z" transform="translate(9 5.3)" fill="#413331"/> <path d="M279,82,138,43s-26-10-34,19.5c0,0-8,26.5,22,33.5l140,36Z" transform="translate(9 5.3)" fill="#b8e0da" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="#483860" d="M309 120.3H347V128.69H309z"/> <rect x="309" y="111.3" width="15" height="26" rx="7.5" ry="7.5" fill="#5b4974" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path d="M277,82l-13.7,59s-8.4,16,6.9,16h15.3s17.9,3,16.9-16c0,0,0-19,10.5-41l2.1-7.3S279.1,72.9,277,82Z" transform="translate(9 5.3)" fill="#787893" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="#fff" stroke="#413331" stroke-miterlimit="10" d="M470 62.3L457.7 94.5"/> <rect x="461" y="120.3" width="26" height="13.57" rx="4.2" ry="4.2" fill="#483860"/> <rect x="438" y="93.7" width="15" height="9" rx="4.5" ry="4.5" transform="rotate(18.7 434.716 128.352)" fill="#483860"/> <circle cx="457.7" cy="94.5" r="5.2" fill="#5b4974"/> <circle cx="469.6" cy="62.6" r="2.7" fill="#5b4974"/> <path fill="#483860" d="M484.3 223.3H573.6V261.3H484.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#a)" d="M488 225.3L494 215.3 499 225.3 499 263.8 493.5 275.3 488 262.8 488 225.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#b)" d="M502 225.3L508 215.3 513 225.3 513 263.8 507.5 275.3 502 262.8 502 225.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#c)" d="M516 225.3L522 215.3 527 225.3 527 263.8 521.5 275.3 516 262.8 516 225.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#d)" d="M530 225.3L536 215.3 541 225.3 541 263.8 535.5 275.3 530 262.8 530 225.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#e)" d="M544 224.3L550 214.3 555 224.3 555 262.8 549.5 274.3 544 261.8 544 224.3z"/> <path stroke="#413331" stroke-miterlimit="10" stroke-width="2" fill="url(#f)" d="M558 224.3L564 214.3 569 224.3 569 262.8 563.5 274.3 558 261.8 558 224.3z"/> <path id="newwater" d="M 144.8 102.6 C 200 102 200 102 283 94.6 L 275 137.3 L 144.8 102.6 Z" fill="#6190a5" opacity="0.67"/> <rect x="340" y="105.3" width="125.5" height="41" rx="20" ry="20" fill="#b8e0da" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path id="midwater" d="M 333 121 C 373 121 413 121 455.5 121 L 455.5 121 s.3,21-23.5,19.8H350.8s-18.4-.2-18.6-19.7Z" transform="translate(9 5.3)" fill="#6190a5" opacity="0.67"/> <path fill="#413331" d="M373.3 145.9H431.8V150.61H373.3z"/> <path d="M372.8,144.2s11.8,5.8-3.2,10.8l48.2.2s-13.8-6.8-1.2-10.3Z" transform="translate(9 5.3)" fill="#413331"/> <path d="M114.7,57.3s3.7-11,18-7" transform="translate(9 5.3)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/> <path d="M341,113.3s1.6-7.7,13.6-7.3" transform="translate(9 5.3)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/> <circle cx="292.2" cy="91.8" r="2.9" fill="#aea3bf"/> <circle cx="456.1" cy="92.9" r="2.3" fill="#aea3bf"/> <path fill="none" stroke="#aea3bf" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M290.3 98.4L286.6 113.5"/> <rect x="441" y="175.3" width="17.5" height="30.33" rx="8.8" ry="8.8" fill="#deb55c" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="#413331" d="M449.8 215.3H469.6V274.3H449.8z"/> <g stroke-miterlimit="10" stroke-width="2"> <path d="M443.5,274.3s-2.2,40.3-25.7,19c0,0-.1-6.3-12.3-9h-76a20.1,20.1,0,0,1-20-20V175.2a20.1,20.1,0,0,1,20-20h91.3a20.1,20.1,0,0,1,20,20v89.2a19.5,19.5,0,0,1-1,6.3Z" transform="translate(9 5.3)" fill="#5b4974" stroke="#413331"/> <circle cx="329.7" cy="186.5" r="3.6" fill="#6190a5" stroke="#193a68"/> <circle cx="438.1" cy="185.5" r="4.1" fill="#6190a5" stroke="#193a68"/> </g> <circle cx="214" cy="292.8" r="3.6" fill="#6190a5" stroke="#193a68" stroke-miterlimit="10" stroke-width="2"/> <path d="M416.2,213.2l-5.1-.4a55.3,55.3,0,0,0,0-7.9c-.1-1.9-4.3-2-4.3-2-15.7-.3-40.3-.5-43.7-.1-5.4.7-8.8-3.7-10-6.4l-.2-.4v-.5c0-.7-.4-16.6,0-24.9.1-1.8-.3-3.2-1.1-3.9a4.7,4.7,0,0,0-3.2-.9h-.3c-.3,0-33.2.2-45.1,0-2,0-3.4.3-4,1a2.2,2.2,0,0,0-.4,1.8,6.8,6.8,0,0,1,.1,1.2V186c0,4.1-1.3,7.2-3.8,9.3s-8.4,2.6-9.6,2.5H256v-5h30s3.5.5,5.7-1.3,2-3,2-5.5V169.8a2,2,0,0,0,0-.3,7,7,0,0,1,1.5-5.8c1.7-1.9,4.3-2.8,8-2.8,11.5.1,42.6,0,44.9,0a9.8,9.8,0,0,1,7.1,2.2c2,1.8,3,4.4,2.8,7.8-.3,7.3-.1,21.2,0,24.1.5.9,2.1,3.3,4.3,3,4.9-.7,40.4,0,44.5,0h.1c3,0,8.9,1.4,9.3,6.6A59.2,59.2,0,0,1,416.2,213.2Z" transform="translate(9 5.3)" fill="#deb55c" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="#787893" stroke="#413331" stroke-miterlimit="10" stroke-width="2" d="M347 214.3H469.6V274.3H347z"/> <path fill="#413331" d="M469.6 210H478.3V279.33H469.6z"/> <path fill="#d9c697" stroke="#60574d" stroke-miterlimit="10" d="M478.3 210L484.3 215.3 484.3 272.6 478.3 279.3 478.3 210z"/> <path fill="#413331" d="M572 212.6H578.4V275.27H572z"/> <path fill="#d9c697" stroke="#60574d" stroke-miterlimit="10" d="M578.3 212.6L582.8 217.4 582.8 269.3 578.3 275.3 578.3 212.6z"/> <rect x="481.3" y="181.4" width="97.4" height="19.22" rx="9.6" ry="9.6" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <path fill="#413331" d="M577.3 187.9H584.6999999999999V195.34H577.3z"/> <path d="M584.5,175.4s-22.4,9.9,0,22.6Z" transform="translate(9 5.3)" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/> <circle cx="601.6" cy="191.6" r="3.7" fill="#60574d" stroke="#413331" stroke-miterlimit="10"/> <path fill="#fff" stroke="#413331" stroke-miterlimit="10" d="M527 118.3L519.1 127.4"/> <circle cx="527.9" cy="117.2" r="1.9" fill=&quo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0