以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  用鼠标控制VML矢量3D图形的立体翻转  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=28082)


--  作者:gengwei80
--  发布时间:3/3/2006 2:50:00 PM

--  用鼠标控制VML矢量3D图形的立体翻转
<HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<HEAD>
<META http-equiv="Content-Type" content="text/html;Charset=gb2312">
<META name="GENERATOR content="网络程序员伴侣(Lshdic)2005">
<title>VML矢量3D控制展示</title>
<STYLE>
v\:*{behavior:url(#default#VML);}o\:*{behavior:url(#default#VML);}
</STYLE>
</HEAD>
<body onselectstart='return false' oncontextmenu='return false'>
<v:oval style="Z-INDEX:1;LEFT:350;WIDTH:147;POSITION:absolute;TOP:170;HEIGHT:163" filled="t" fillcolor="#f9ec18" strokecolor="#2174ff" strokeweight=".75pt" id="s">
<v:path textpathok="t"/>
<v:textpath style="FONT-FAMILY:Webdings" on="t" fitpath="t" string="&ucirc;"/>
<v:extrusion on="t" foredepth="0" backdepth="15pt" color="#e9fd92" diffusity="1.1"/>
<v:fill type='gradient' color="blue" color2="green"/>
</v:oval>

<script>
//作者:FYW(风云舞)
//2005-5-23 14:31:30
var xx=0,yy=0
var litioldx=0,litioldy=0,moveobj=null
function document.onmousedown(){
xx=event.x;yy=event.y;
var ebj=event.srcElement
if(ebj.id=="s"){
if(ebj.extrusion.rotationangle=="")ebj.extrusion.rotationangle="0,0"
str1=ebj.extrusion.rotationangle;str1=new String(str1).split(",")
litioldy=parseInt(str1[0]);litioldx=parseInt(str1[1])
moveobj=ebj
}}
function document.onmousemove(){
tempx=event.x;tempy=event.y;
if(moveobj!=null)moveobj.extrusion.rotationangle=(litioldy+(tempy-yy))+","+(litioldx+(tempx-xx))
}
function document.onmouseup(){
moveobj=null //立体角度调整结束
}
</script>
</body>
</html>


--  作者:卷积内核
--  发布时间:3/6/2006 10:46:00 AM

--  
好东西
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms