网页播放Catia的代码(此文备份使用)

本文介绍了一个基于网页的3D模型与动画编辑工具的实现方法。通过使用ActiveX控件,该工具能够实现在不同浏览器环境(如IE和Chrome)下加载并展示3D模型文件(例如.3dxml)。此外,还提供了创建Gludio和Catia实例的具体代码示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

   var tempChrome = '<div id="1145_" style="width: 400px;height: 400px; position: absolute; top: 25px; left: 21px; padding: 10px; border: 1px solid;"><object width="100%" height="100%" id="viewer_ia_1145_" clsid="{5ABD296B-F8A0-436C-B2F7-B19170C43D28}" type="application/x-itst-activex">'
            + '<param name="DocumentFile" value="http://localhost:8081/images/Img/Sample.3dxml">'
            + '</object></div>';

  var tempIE = '<div id="1145_" style="width: 400px;height: 400px; position: absolute; top: 25px; left: 21px; padding: 10px; border: 1px solid;"><object width="100%" height="100%" id="viewer_ia_1145_" classid="clsid:5ABD296B-F8A0-436C-B2F7-B19170C43D28" type="application/x-itst-activex">'
            + '<param name="DocumentFile" value="http://localhost:8081/images/Img/Sample.3dxml">'
            + '</object></div>';



动画编辑页面:

<!DOCTYPE html>
<html>
<head>
    <title>动画编辑页面EZ602230847CN</title>
    <script src="AnimationResource/jsmin/jquery-2.0.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function createGludio() {
            var tempIE = '<object width="100%" height="100%" id="Object1" classid="clsid:2BD70499-E075-4059-8384-B7AB7E8AAB1F"'
                + 'codebase="http://localhost:8081/lcms/HTMLTemplate/Animation/AnimationResource/GlStudio/GLSPlayer.ocx#version=4,0,5,0"'
                + 'viewtext="">'
                + '<param name="_Version" value="262148">'
                + '<param name="_ExtentX" value="10583">'
                + '<param name="_ExtentY" value="8414">'
                + '<param name="_StockProps" value="0">'
                + '<param name="scaleX" value="1">'
                + '<param name="scaleY" value="1">'
                + '<param name="offsetX" value="0">'
                + '<param name="offsetY" value="0">'
                + '<param name="offsetZ" value="0">'
                + '<param name="maintainAspect" value="1">'
                + '<param name="perspective" value="0">'
                + '<param name="FieldOfView" value="0">'
                + '<param name="depthFactor" value="4">'
                + '<param name="UseExtents" value="1">'
                + '<param name="AbsolutePlacement" value="0">'
                + '<param name="TargetFrameRate" value="30">'
                + '<param name="EyePoint" value="">'
                + '<param name="UseContainerBackground" value="1">'
                + '<param name="DrawBackground" value="1">'
                + '<param name="BackgroundColor" value="0">'
                + '<param name="ComponentFileName" value="http://localhost:8081/lcms/images/ResourceImg/Img/MFD.cab">'
                + '<param name="ClassName" value="">'
                + '<param name="InitialAttribs" value="">'
                + '<span class="errstyle">Failed to load GLS Player! </span>'
                + '<param name="Enabled" value="1">'
                + '<param name="wmode" value="transparent">'
                + '<param name="ComponentFileName" value="http://localhost:8081/lcms/images/ResourceImg/Img/MFD.cab">'
                + '</object>';

            var tempChrome = '<object id="undefined" codebase="http://localhost:8081/lcms/HTMLTemplate/Animation/AnimationResource/GlStudio/GLSPlayer.ocx#version=4,0,5,0" width="100%" height="100%" viewtext="" clsid="{2BD70499-E075-4059-8384-B7AB7E8AAB1F}" type="application/x-itst-activex">'
            + '<span class="errstyle">Failed to load GLS Player! </span>'
            + '<param name="Enabled" value="1">'
            + '<param name="wmode" value="transparent">'
            + '<param name="ComponentFileName" value="http://localhost:8081/lcms/images/ResourceImg/Img/MFD.cab">'
            + '</object>'

            document.getElementById("test").innerHTML = tempChrome;
        }

        function createCatia() {


            var temp1 = '<div id="1145_" style="width: 400px;'
                        + 'height: 400px; position: absolute; top: 25px; left: 21px; padding: 10px; border: 1px solid;">'
                        + '<object width="100%" height="100%" id="viewer_ia_1145_" classid="{5ABD296B-F8A0-436C-B2F7-B19170C43D28}">'
                        + '<param name="DocumentFile" value="http://localhost:8081/lcms/images/ResourceImg/Img/Sample.3dxml">'
                        + '</object>'
                        + '</div>';

            var tempChrome = '<object width="100%" height="100%" id="viewer_ia_1145_" clsid="{5ABD296B-F8A0-436C-B2F7-B19170C43D28}" type="application/x-itst-activex">'
            + '<param name="DocumentFile" value="http://localhost:8888/lcms/images/ResourceImg/Img/Sample.3dxml">'
            + '</object>';

            var tempIE = '<div id="1145_" style="width: 400px;height: 400px; position: absolute; top: 25px; left: 21px; padding: 10px; border: 1px solid;"><object width="100%" height="100%" id="viewer_ia_1145_" classid="clsid:5ABD296B-F8A0-436C-B2F7-B19170C43D28" type="application/x-itst-activex">'
            + '<param name="DocumentFile" value="http://localhost:8888/lcms/images/ResourceImg/Img/Sample.3dxml">'
            + '</object></div>';

            document.getElementById("1147_").innerHTML = tempChrome;

        }
    </script>
</head>
<body>
    <input type="button" name="name" value="createGlstudio" onclick='createGludio();' />
    <input type="button" name="name" value="createCatia" onclick='createCatia();' />
    <div id="test">
    </div>
    <!-- <object width="100px" height="100px" id="viewer_ele23" classid="clsid:5ABD296B-F8A0-436C-B2F7-B19170C43D28">
        <param name="DocumentFile" value="http://localhost:8888/lcms/images/ResourceImg/Img/Sample.3dxml">
    </object>
    <object width="100px" height="100px" id="Object1" classid="clsid:5ABD296B-F8A0-436C-B2F7-B19170C43D28">
        <param name="DocumentFile" value="http://localhost:8888/lcms/images/ResourceImg/Img/Sample.3dxml">
    </object>-->
    <script type="text/javascript">
        $("body").append('<object width="100px" height="100px" id="Object4" classid="clsid:5ABD296B-F8A0-436C-B2F7-B19170C43D28"><param name="DocumentFile" value="http://localhost:8888/lcms/images/ResourceImg/Img/Sample.3dxml"></object>');
    </script>
</body>
</html>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值