mo.js实现的镭射枪射击动画效果代码

代码语言:html

所属分类:动画

代码描述:mo.js实现的镭射枪射击动画效果代码

代码标签: 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.........完整代码请登录后点击上方下载按钮下载查看

网友评论0