TweenMax+MorphSVGPlugin+svg实现弓箭瞄准射击靶子小游戏代码
代码语言:html
所属分类:游戏
代码描述:TweenMax+MorphSVGPlugin+svg实现弓箭瞄准射击靶子小游戏代码,用鼠标往后面拉弓瞄准释放鼠标射击
代码标签: TweenMax MorphSVGPlugin svg 弓箭 瞄准 射击 靶子 游戏
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body{
margin:0;
background:#222;
margin:20px;
}
svg{
width:100%;
height:100%;
position:fixed;
top:0;
left:0;
}
span{
color:white;
font-family:sans-serif;
opacity:.3;
}
</style>
</head>
<body >
<svg id="game" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 400" overflow="visible">
<linearGradient id="ArcGradient" >
<stop offset="0" stop-color="#fff" stop-opacity=".2"/>
<stop offset="50%" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<path id="arc" fill="none" stroke="url(#ArcGradient)" stroke-width="4" d="M100,250c250-400,550-400,800,0" pointer-events="none"/>
<defs>
<g id="arrow">
<line x2="60" fill="none" stroke="#888" stroke-width="2" />
<polygon fill=".........完整代码请登录后点击上方下载按钮下载查看
















网友评论0