当前位置:编程学习 > C#/ASP.NET >>

用ASP.NET可以实现3D旋转效果么?

    我是新人,刚上班,出现了一个难题,老总让我做一个3D旋转的效果。我是学ASP.NET得,要怎么用ASP.NET实现3D选装效果呢?同时,希望大家给出实现3D旋转效果得方案,不用ASP.NET也可以! --------------------编程问答-------------------- 用silverlight来做,也是有点复杂,不过好像有相关源代码,你可以找找。

--------------------编程问答--------------------
引用 1 楼 woodyy 的回复:
用silverlight来做,也是有点复杂,不过好像有相关源代码,你可以找找。



ps:
你这个老板不是人!!! --------------------编程问答-------------------- WPF,Direct 3D,silverlight,http://download.csdn.net/source/1119272 --------------------编程问答-------------------- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="testimage.aspx.cs" Inherits="testimage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>JavaScript实现图片旋转构成3D圆环代码</title>
<script language="javascript">   
window.onload=function(){   
var rt=new imgRound("photo",120,90,260,20,250,0.01);//参数分别表示控件id,单个图片的长和高,空间旋转的原点坐标,旋转半径,旋转速度
setInterval(function(){rt.roundMove()},20);
}
function imgRound(id,w,h,x,y,r,dv,rh,ah){
if (ah==undefined) ah=1;
if (rh==undefined) rh=10;
var dv=dv*ah; //旋转速度
var pi=3.1415926575;
var d=pi/2;
var pd=Math.asin(w/2/r);
var smove=true;
var imgArr=new Array();
var objectId=id;
var o=document.getElementById(objectId);
o.style.position="relative";
var arrimg=o.getElementsByTagName("img");
var pn=arrimg.length; //图片数量
var ed=pi*2/pn;
for (n=0;n<arrimg.length;n++){
var lk=arrimg[n].getAttribute("link");
if (lk!=null) arrimg[n].setAttribute("title",lk)
arrimg[n].onclick=function(){
if (this.getAttribute("link")!=null){
if (this.getAttribute("target")!="_blank") window.location=(this.getAttribute("link"))
else window.open(this.getAttribute("link"))
}
}
arrimg[n].onmouseout=function()
{
smove=true;
}
arrimg[n].onmouseover=function()

smove=false;
}
arrimg[n].style.position="absolute";
imgArr.push(arrimg[n]);
}
this.roundMove=function(){
for (n=0;n<=pn-1;n++){
var o=imgArr[n];
var ta=Math.sin(d+ed*n),strFilter;
if (ta<0) o.style.left=Math.cos(d+ed*n-pd)*r+x+"px";
else o.style.left=Math.cos(d+ed*n+pd)*r+x+"px";
o.style.top=ta*rh+rh+y+"px";
var zoom=Math.abs(Math.sin((d+ed*n)/2+pi/4))*0.5+0.5;
o.style.width=Math.abs(Math.cos(d+ed*n+pd)-Math.cos(d+ed*n-pd))*zoom*r+"px";
o.style.height=zoom*h+"px";
if (ta<0) {ta=(ta+1)*80+20;o.style.zIndex=0;}
else {ta=100;o.style.zIndex=1}
if (o.style.zIndex<=0) strFilter="FlipH(enabled:true)"
else strFilter="FlipH(enabled:false)";
strFilter=strFilter+" alpha(opacity="+ta+")";
o.style.opacity=ta/100;
o.style.filter=strFilter;
}
if (smove){ 
d=d+dv;
}
}
}
</script>
</head>
<body>
<div id="photo" style="width:540px;height:150px;border:1px solid red; background-color:White">
<img src="image/bt_close.gif" onclick="location="http://www.baidu.com"" onmousedown="location='http://www.baidu.com'" style=" border:0" >
 <img src="image/bt_close.gif" onclick="location="http://www.baidu.com"" onmousedown="location='http://www.baidu.com'" style=" border:0">
  <img src="image/bt_close.gif" onclick="location="http://www.baidu.com"" onmousedown="location='http://www.baidu.com'" style=" border:0"> 
<img src="image/bt_close.gif" onclick="location="http://www.baidu.com"" onmousedown="location='http://www.baidu.com'" style=" border:0"> 
 <img src="image/bt_close.gif" onclick="location="http://www.baidu.com"" onmousedown="location='http://www.baidu.com'" style=" border:0">  
</div>
</body>
</html>
--------------------编程问答-------------------- <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用Javascript使网页图片产生旋转效果</title>

</head> 
<body onLoad="Carousel()">
<style type="text/css"> 
body{background:black} 
.point{position:absolute;height:75px;border:1px silver solid} 
#round{position:absolute;background:red;width:200px;height:200px;} 
</style> 
<script> 
    var r=200,dv=0.01,w=100,x=400;y=100,pn=8 
    var pi=3.1415926575,d=pi/2; 
    var pd=Math.asin(w/2/r);ed=pi*2/pn;smove=true 
    function window.onload(){ 
        var o=document.getElementById("imground"); 
        var arrimg=o.getElementsByTagName("img"); 
        for (n=0;n<arrimg.length;n++){ 
            arrimg[n].onmouseout=function(){smove=true;} 
            arrimg[n].onmouseover=function(){smove=false;} 
            arrimg[n].onmousedown=function(){dv=dv*2} 
        } 
        setInterval(roundMove,20); 
    } 
    function roundMove(){ 
        for (n=1;n<=8;n++){ 
            var o=document.getElementById("p"+n) 
            var ta=Math.sin(d+ed*n); 
            var strFilter; 
            if (ta<0)    o.style.left=Math.cos(d+ed*n-pd)*r+x; 
            else o.style.left=Math.cos(d+ed*n+pd)*r+x; 
            o.style.top=ta*10+10+y; 
            o.style.width=Math.abs(Math.cos(d+ed*n+pd)-Math.cos(d+ed*n-pd))*r; 
            o.style.zIndex=ta*10; 
            if (o.style.zIndex<0) strFilter="FlipH(enabled:true)" 
            else strFilter="FlipH(enabled:false)"; 
            if (ta<0) ta=(ta+1)*80+20; else ta=100; 
            strFilter=strFilter+" alpha(opacity="+ta+")"; 
            o.style.opacity=ta/100; 
            o.style.filter=strFilter; 
        } 
        if (smove) d=d+dv; 
    } 
</script> 
<div id="imground"> 
<img class="point" id="p1" src="arrimg/arrimg00.jpg"/> 
<img class="point" id="p2" src="arrimg/arrimg11.jpg"/> 
<img class="point" id="p3" src="arrimg/arrimg12.jpg"/> 
<img class="point" id="p4" src="arrimg/arrimg13.jpg"/> 
<img class="point" id="p5" src="arrimg/arrimg14.jpg"/> 
<img class="point" id="p6" src="arrimg/arrimg15.jpg"/> 
<img src="arrimg/arrimg00.jpg" class="point" id="p7"/> 
<img src="http://img.ieche.com/Member/2009-04/2009042510430711382.jpg" width="99" height="72" class="point" id="p8"/></div>
</body>
</html> 
<!--
参数说明: initRound(id,w,h,x,y,r,dv,rh,ah);
id: 容器ID
w: 图片宽度
h: 图片高度
x: 圆心水平位置
y: 圆心垂直位置
r: 圆圈半径
dv: 旋转速度
rh: 垂直距离 (可选,默认为10)
ah: 旋转方向 (可选,1:顺时针,2:逆时针,默认为1)--> --------------------编程问答-------------------- 图表控件zedgraph,owc,ms chart,Chartlet
图表Direct3D 
WPF 3D  
silverlight --------------------编程问答-------------------- js也可以,你找一找 --------------------编程问答-------------------- silverlight  
 应该还简单点。
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,