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

qq459660335 2010-04-26 05:50:09
我是新人,刚上班,出现了一个难题,老总让我做一个3D旋转的效果。我是学ASP.NET得,要怎么用ASP.NET实现3D选装效果呢?同时,希望大家给出实现3D旋转效果得方案,不用ASP.NET也可以!
...全文
241 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
a093725846a 2010-04-26
  • 打赏
  • 举报
回复
silverlight
应该还简单点。
vip__888 2010-04-26
  • 打赏
  • 举报
回复
js也可以,你找一找
wuyq11 2010-04-26
  • 打赏
  • 举报
回复
图表控件zedgraph,owc,ms chart,Chartlet
图表Direct3D
WPF 3D
silverlight
qiqishardgel 2010-04-26
  • 打赏
  • 举报
回复
<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)-->
zyxfcb1520 2010-04-26
  • 打赏
  • 举报
回复
<%@ 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>
wiki14 2010-04-26
  • 打赏
  • 举报
回复
WPF,Direct 3D,silverlight,http://download.csdn.net/source/1119272
丰云 2010-04-26
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 woodyy 的回复:]

用silverlight来做,也是有点复杂,不过好像有相关源代码,你可以找找。
[/Quote]


ps:
你这个老板不是人!!!
woodyy 2010-04-26
  • 打赏
  • 举报
回复
用silverlight来做,也是有点复杂,不过好像有相关源代码,你可以找找。

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧