12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277 |
- <!DOCTYPE html>
- <html lang="fr">
- <head>
- <meta charset="utf-8" />
- <title>四维时代</title>
- <meta http-equiv="content-type" content="text/html; charset=UTF8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
- <link rel="stylesheet" href="css/wanaplan.min.css" />
- <style>
- .notFound {
- text-align:center;
- font-size:18px;
- width:100%;
- margin-top:100px;
- margin-left: 50px;
- }
- div.planItem {
- cursor : pointer;
- background:#fafafa;
- margin:10px;
- border:1px solid #CCC;
- position: relative;
- }
- div.planItem img {
- width:288px
- }
- div.planItem p {
- border-top:1px solid #CCC;
- padding: 5px;
- margin: 0px;
- color: #333;
- background: #FFF;
- }
- div.planItem div.toolbarPlan {
- display: none;
- background: #CCC;
- position: absolute;
- right: 0px;
- top: 0px;
- color: #222;
- opacity: 0.9;
- z-index: 9999;
- }
- div.planItem div.toolbarPlan .fa {
- padding: 5px;
- }
- div.planItem div.toolbarPlan .fa-times {
- padding-left: 15px;
- }
- div.planItem:hover div.toolbarPlan {
- display: block;
- }
- div.planItem div.overall{
- background: #222;
- opacity: 0.8;
- width:100%;
- height:100%;
- color:#FFF;
- top: 0px;
- position:absolute;
- text-align:center;
- vertical-align:middle;
- }
- div.planItem div.editForm{
- width:100%;
- height:100%;
- color:#FFF;
- top: 60px;
- position:absolute;
- text-align:center;
- vertical-align:middle;
- }
- div.planItem .editPlanInput{
- height:30px;
- width:90%;
- font-size: 15px;
- border: 1px solid #999;
- }
- div.planItem div.overall span{
- font-size:16px;
- }
- div.planItem .overall-cercle{
- opacity: 1;
- padding-left: 0;
- padding-right: 0;
- margin-left: auto;
- margin-right: auto;
- bottom: 25px;
- width:100%;
- position:absolute;
- }
- div.planItem div.editForm .window-action-bar{
- margin-top:10px;
- text-align: right;
- }
- </style>
- </head>
- <body>
- <img src='images/pattern.png' style='display:none' id='imgWall' />
- <img src='images/pattern_tmp.png' style='display:none' id='imgTempWall' />
- <img src='images/grid2.jpg' style='display:none' id='img' />
- <div id="subMenuContainer">
- <div id="subMenu">
- <ul id="subMenuList">
- <li class="menu-item hidden" id="lock-icon"><span class="menu-icon"><i class="fa fa-unlock"></i></span><span class="menu-title">锁/解锁</span></li>
- <!--
- <li class="menu-item" id="item25"><span class="menu-icon"><i class="fa fa-reply"></i></span><span class="menu-title">Undo</span></li>
- <li class="menu-item" id="item26"><span class="menu-icon"><i class="fa fa-share"></i></span><span class="menu-title">Redo</span></li>
- -->
- <li class="menu-item hidden" id="transparencyButton"><span class="menu-icon"><img src="images/icon-transparency.png" /></span><span class="menu-title">墙体透明</span></li>
- <li class="menu-item" id="toolbarScreenshot"><span class="menu-icon"><i class="fa fa-camera"></i></span><span class="menu-title">拍照</span></li>
- <li class="menu-item" id="fullscreen-btn"><span class="menu-icon"><i class="fa fa-arrows-alt"></i></span><span class="menu-title">全屏</span></li>
- </ul>
- </div>
- </div>
- <section id="main-ui" class="show">
- <div id="toolbar">
- <div id="toolbar-bar">
- <ul id="toolbarMenu">
- <li class="menu-item" id="toolbarNew"><span class="menu-icon"><i class="fa fa-file"></i></span><span class="menu-title">新建</span></li>
- <li class="menu-item" id="toolbarSave"><span class="menu-icon"><img src="images/save_icon.png" /></span><span class="menu-title">保存</span></li>
- <li class="menu-item menu-subitem" id="toolbarOption"><span class="menu-icon"><i class="fa fa-cog"></i></span><span class="menu-title">配置</span>
- <ul class="undefined">
- <li class="menu-item" id="item27"><span class="menu-title">Increase performances</span></li>
- <li class="menu-item" id="2D-options"><span class="menu-title">2D options</span></li>
- <li class="menu-item" id="toolbarChangeLanguage"><span class="menu-title">Change language</span></li>
- <li class="menu-item" id="item19"><span class="menu-title">
- <hr /></span></li>
- <li class="menu-item" id="toolbarAbout"><span class="menu-title">About Wanaplan</span></li>
- </ul></li>
- <li class="menu-item menu-subitem" id="userOption"><span class="menu-icon"><i class="fa fa-user"></i></span><span class="menu-title">用户</span>
- <ul class="undefined">
- <li class="menu-item" id="user"><span class="menu-title">login</span></li>
- </ul></li>
- </ul>
- </div>
- </div>
- <section id="mainMenu">
- <div id="mainMenuTabsContainer">
- <ul id="mainMenuTabs">
- <li class="menu-item label-2D selected" id="draw2D"><span class="menu-icon"><img src="images/dessiner.png" /></span><span class="menu-title">设计</span></li>
- <li class="menu-item label-3D" id="furnishing3D"><span class="menu-icon"><img src="images/meubler.png" /></span><span class="menu-title">家具</span></li>
- <li class="menu-item label-3D" id="decorate3D"><span class="menu-icon"><img src="images/decorer.png" /></span><span class="menu-title">装修</span></li>
- </ul>
- </div>
- <h3 id="mainMenuTitle">绘图</h3>
- <div id="mainMenuContent">
- <ul id="mainMenuContentList" class="mainList layout-list">
-
- </ul>
- </div>
- </section>
- </section>
- <!-- Splashscreen -->
- <div style="display: none;" id="splashscreen">
- <div id="custom-splash" style="display:none" class="splash-text">
- <img src="images/3D.png" style="width:50px;vertical-align:-20px;" /> Kazaplan
- <div class="splash-bar">
- <div style="animation-duration: 1s;" class="splash-bar-inner"></div>
- </div>
- <a style="color:black;display:block;text-decoration:none;margin:20px 0 0 0;text-align:right;font-size:14px" href="http://www.wanadev.com"> by <span style="color:#07656D">Wana</span><span style="color:black">dev</span> </a>
- </div>
- <div id="stock-splash" style="display: block;" class="splash-text">
- <img src="images/wanaplan-logo.png" style="width:50px;vertical-align:-15px;" /> Wanaplan
- <div class="splash-bar">
- <div style="animation-duration: 1s;" class="splash-bar-inner"></div>
- </div>
- </div>
- </div>
- <!-- Screenshot Flash -->
- <div style="display: none;" id="screenshot-flash"></div>
- <!-- Help Bubble -->
- <div id="helpbubble" class="">
- <div id="helpbubble-close" class="close"></div>
- <div class="wrapper">
- <div class="image">
- <img src="" alt="" id="helpbubble-image" />
- </div>
- <div id="helpbubble-content" class="content"></div>
- </div>
- </div>
- <!-- Debug view -->
- <div id="debugArea"></div>
- <!-- Plan2D Area -->
- <div style="display:block" class="drawableSurface with-menu" id="container2d">
- <canvas height="413" width="1180" id="backgroundcanvas2d" style="position: absolute; z-index: 0"></canvas>
- <canvas height="413" width="1180" id="selectcanvas2d" style="position: absolute; z-index: 2"></canvas>
- <canvas height="413" width="1180" id="dynamiccanvas2d" style="position: absolute; z-index: 1 ; opacity: 1;"></canvas>
- </div>
- <!-- Plan3D Area -->
- <div style="display:none" class="drawableSurface with-menu" id="container3d">
- <canvas height="413" width="1180" id="canvas3d"></canvas>
- </div>
- <div id="waiter" class="hidden">
- Computing, please wait...
- </div>
- <section id="modalWidgets">
- <div class="window window-with-button" id="aboutWindow" style="display: none; position: absolute; top: 96.5px; left: 476.5px;">
- <header class="window-title">
- <span class="window-close">
- </span>
- <h1>关于四维时代</h1>
- </header>
- <div class="window-content">
- <div class="tabbed horizontal">
- <ul class="tabbed-tabs">
- <li rel="tab-0" class="active">
- <span class="tab-text">关于</span>
- </li>
- <li rel="tab-1" class="">
- <span class="tab-text">Credits</span>
- </li>
- </ul>
- <div class="tabbed-tabcontent">
- <section class="tab-content-0 active">
- <div style="width: 432px; text-align: center;">
- <img src="./images/wanaplan-logo.png" alt="Wanaplan">
- </div>
- <div style="text-align: center; font-size: 16pt; font-weight: bold; margin-top: 15px; color: #333;">四维时代家具展示</div>
- <div style="text-align: center; margin-top: 30px; color: #555;">版权归四维时代所有
- </div>
- <div style="text-align: center; margin-top: 10px;">
- <a href="http://www.4dage.com/" target="_blank">www.4dage.com</a>
- </div>
- </section>
- <section class="tab-content-1">
- <div class="scrollable-content" style="width: 410px; max-height: 300px; min-height: 100px; font-size: 9pt;">
- <ul>
- <li>
- <strong>"seamless" textures:</strong>
- <dl>
- <dt>Author:</dt>
- <dd>~hhh316 Giles</dd>
- <dt>License:</dt>
- <dd>cc-by 3.0</dd>
- <dt>Downloaded from:</dt>
- <dd><a href="http://seamless-pixels.blogspot.fr/"> http://seamless-pixels.blogspot.fr/</a></dd>
- </dl>
- </li>
- <li>
- <strong>Babylonjs engine:</strong>
- <dl>
- <dt>Authors:</dt>
- <dd>David Catuhe & David Rousset</dd>
- <dt>Licence:</dt>
- <dd>Apache License 2.0</dd>
- <dt>Homepage:</dt>
- <dd><a href="http://www.babylonjs.com">http://www.babylonjs.com</a></dd>
- </dl>
- </li>
- </ul>
- </div>
- </section>
- </div>
- </div>
- </div>
- <div class="window-action-bar">
- <button rel="">关闭</button>
- </div>
- </div>
- <div style="position: absolute; top: 50px; left: 10px; height: 300px; width: 50px;">
- <div style="width: 50px; height: 210px; position: relative; background-image: url("images/remote-controller/bg.png");" id="remoteController">
- <div style="width:20px;height:150px;position:absolute;top:57px;left:15px;">
- <div style="width: 20px; height: 7px; background: none repeat scroll 0% 0% rgb(138, 184, 8); border-radius: 2px; cursor: pointer; border: 1px solid rgb(110, 145, 15); margin-top: 85px;" id="mark"></div>
- </div>
- <div style="width: 18px; height: 18px; position: absolute; background-size: cover; top: 16px; left: 16px; border-radius: 7px; display: none; background-image: url("images/remote-controller/green_man.png");" id="camera-swap-btn"></div>
- <div style="width:50px;height:50px;cursor:pointer;position:absolute;"></div>
- </div>
- </div>
- <div class="window" id="productList" style="width: 1062px; height: 652.666666666667px; display: none; position: absolute; top: 1.16666666666669px; left: 265.5px;">
- <header class="window-title">
- <span class="window-close" id="closeproduct">
- </span>
- <h1>
- <img class="window-title-icon" src="images/productIconTitle.png">
- <span class="window-title-text">产品列表 > 卧室</span>
- </h1>
- </header>
- <div class="window-content">
- <div class="tabbed vertical">
- <ul class="tabbed-tabs">
- <li rel="tab-0">
- <span class="tab-text"></span>
- </li>
- <li rel="tab-1" class="active">
- <span class="tab-text">所有</span>
- </li>
- </ul>
- <div class="tabbed-tabcontent">
- <section class="tab-content-1 active">
- <div id="productItems">
-
- </div>
- </section>
- </div>
- </div>
- </div>
- <div class="window-action-bar">
- </div>
- </div>
- <div class="window window-with-button horizontal" id="configuratorWindow" style="width: 420px; height: 425px; display: none; top: 70px; left: 1346px;">
- <header class="window-title" id="editproducttitle"><span class="window-close"></span><h1>产品编辑界面</h1>
- </header>
- <div class="window-content">
- <div class="tabbed horizontal">
- <ul class="tabbed-tabs">
- <li rel="tab-0" class="active" id="editsize"><span class="tab-text">大小设置</span></li>
- <li rel="tab-1" class="" id="editptrot"><span class="tab-text">位置和角度</span></li>
- </ul>
- <div class="tabbed-tabcontent">
- <section class="tab-content-0 active" id="tabSize">
- <ul>
- <li class="separator" id="item-0"><label>桌子</label><span class="field"><hr></span></li>
- <li class="param-item" id="params-width"><label>宽度</label><span class="field"><input type="number" step="1" value="" event-params="{"eventName":"wnp.contextMenu.propertyChanged","property":"params.mattress.width"}" rel="wnp.contextMenu.propertyChanged"><span class="unit">cm</span></span></li>
- <li class="param-item" id="params-length"><label>长度</label><span class="field"><input type="number" step="1" value="" event-params="{"eventName":"wnp.contextMenu.propertyChanged","property":"params.mattress.length"}" rel="wnp.contextMenu.propertyChanged"><span class="unit">cm</span></span></li>
- <li class="param-item" id="params-height"><label>高度</label><span class="field"><input type="number" step="1" value="" event-params="{"eventName":"wnp.contextMenu.propertyChanged","property":"params.mattress.thickness"}" rel="wnp.contextMenu.propertyChanged"><span class="unit">cm</span></span></li>
- </ul>
- </section>
- <section class="tab-content-1" id="tabPtRot">
- <ul>
- <li class="separator" id="item-1"><label>角度</label><span class="field"><hr></span></li>
- <li class="param-item" id="rotation-y"><label>绕Y轴</label><span class="field"><input id="rangeAngle" type="range" min="0" max="360" step="1" value="" class=" input-range unit"><input id="angleValue" type="number" class="unit" min="0" max="360" value="" step="1" readonly><span class="unit">°</span></span></li>
- <li class="separator" id="item-2"><label>位置</label><span class="field"><hr></span></li>
- <li class="param-item" id="position-x"><label>X:(左/右)</label><span class="field"><input type="number" min="-10000" max="10000" step="10" value="" event-params="{"eventName":"wnp.contextMenu.transformChanged","property":"position.x"}" rel="wnp.contextMenu.transformChanged" class=" unit"></span></li>
- <li class="param-item" id="position-y"><label>Y:(上/下)</label><span class="field"><input type="number" min="-10000" max="10000" step="10" value="" event-params="{"eventName":"wnp.contextMenu.transformChanged","property":"position.y"}" rel="wnp.contextMenu.transformChanged" class=" unit"></span></li>
- <li class="param-item" id="position-z"><label>Z:(前/后)</label><span class="field"><input type="number" min="-10000" max="10000" step="10" value="" event-params="{"eventName":"wnp.contextMenu.transformChanged","property":"position.z"}" rel="wnp.contextMenu.transformChanged" class=" unit"></span></li>
- </ul>
- </section>
- </div>
- </div>
- </div>
- <div class="window-action-bar">
- <button id="removeMesh" class="remove">移除</button>
- <button id="editMesh">提交</button>
- </div>
- </div>
- </section>
- <!-- Scripts -->
- <section id="scripts">
- <script>"use strict"</script>
- </section>
- <div style="width: 80px; opacity: 0.9; cursor: pointer; position: absolute; bottom: 28px; left: 0px; z-index: 99999; display: none;" id="stats">
- <div style="padding: 0px 0px 3px 3px; text-align: left; background-color: rgb(0, 0, 34);" id="fps">
- <div style="color: rgb(0, 255, 255); font-family: Helvetica,Arial,sans-serif; font-size: 9px; font-weight: bold; line-height: 15px;" id="fpsText">
- FPS
- </div>
- <div style="position: relative; width: 74px; height: 30px; background-color: rgb(0, 255, 255);" id="fpsGraph">
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 17, 51);"></span>
- </div>
- </div>
- <div style="padding: 0px 0px 3px 3px; text-align: left; background-color: rgb(0, 34, 0); display: none;" id="ms">
- <div style="color: rgb(0, 255, 0); font-family: Helvetica,Arial,sans-serif; font-size: 9px; font-weight: bold; line-height: 15px;" id="msText">
- MS
- </div>
- <div style="position: relative; width: 74px; height: 30px; background-color: rgb(0, 255, 0);" id="msGraph">
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- <span style="width: 1px; height: 30px; float: left; background-color: rgb(17, 51, 17);"></span>
- </div>
- </div>
- </div>
- <div style="right: 260px; top: 48px;" id="subsubMenuContainer">
- 79.73 m2
- </div>
- <div id="widget-2a02e7a5-c96f-40c1-ad45-b14f5db768c2" style="left: 72px; top: 20.65px; display: none; z-index: 2001;" class="photonui-widget photonui-basewindow photonui-window photonui-active window photonui-window-have-button">
- <div class="photonui-window-title">
- <button style="display: block;" title="Close" class="photonui-window-title-close-button"></button>
- <span class="photonui-window-title-text">Surfaces</span>
- </div>
- <div style="width: 1152px; height: 330.4px; padding: 0px; min-width: 0px; min-height: 0px;" class="photonui-container photonui-window-content photonui-container-expand-child">
- <div id="widget-43a4e730-6d4c-446d-99e8-6ff2cc4aa2d6" style="padding: 5px; overflow: auto;" class="photonui-widget photonui-viewport photonui-container"></div>
- </div>
- </div>
-
- <div id="loaddiv" style="display:none;opacity: 0.6; z-index: 10000; position: absolute; background-color: rgb(255, 255, 255);">
- <img src="images/load.png" style="position: absolute; z-index: 10000;" id="loadimg">
- </div>
-
- <!--<script src="js/wanaplan.min.js"></script>-->
- <script src = "libs/CanvasSketch.js"></script>
- <script type = "text/javascript">
-
- var TESTREFRESH=0;
-
- //var circleStyle = {fillColor:"blue", fill:true, stroke:true, fillOpacity:1, strokeOpacity:1};
- var div = document.getElementById("container2d");
- var width=window.outerWidth-260;
- var height=window.outerHeight;
- var stepx=50;
- var stepy=50;
- var backgroundSize=50;
- var startx=-stepx*backgroundSize;
- //var starty=-parseInt(stepy*backgroundSize*height/width);
- var starty=-stepx*backgroundSize;
- var MixZoom=20;
-
- var MixMark=-1;
- var MaxMark=139;
- var startMarkX=-width/2+150;
- var startMarkY=-height/2+150;
-
-
- var wallleftX=-500;
- var wallleftY=400;
- var wallrightX=500;
- var wallrightY=-400;
-
- var wallThickness=30;
- var partitionThickness=15;
- var door=80;
- var window=50;
-
- var meter=width/20;
- var meterpositionX=100;
-
- var redrawCount=0;
- var backgroundcanvasMax=5000;
- var Sector_r=70;
- var slid_r=10;
- var point_r=5;
- var sysmbolCircleR=10;
- var symbolMinLen=10;
- var show3D=false;
- var three3D;
- var center;
- var my3DEngine=null;
-
- var wallId=null;
- var Overlay;
- var vectors=[];
- var layer;
-
- var initMesh=0;
- var one2d=false;
- var one3d=false;
-
- function init() {
- layer=new Layer(width,height);
- layer.renderer.drawBackGround();
- addWall();
- //layer.addSymbol2D.wallIds.push(wallId);
- if(!one2d)
- {
- //initRoom();
- one2d=true;
- }
-
- initLoad();
- }
- init();
-
- //var parameter=new Parameter();
- layer.menu.addWallMenuItem();
- layer.menu.addDoorsMenuItem();
- layer.menu.addWindowMenuItem();
-
- layer.menu.addBedroomMenuItem();
-
- layer.menu.addOutsideMenuItem();
- layer.menu.addFloorMenuItem();
- layer.menu.addWallpaperMenuItem();
- layer.menu.addsoftDecorationMenuItem();
- //layer.menu.addMenuItemEvents();
- layer.menu.addMenuTabsEvent();
-
- layer.menu.editProduct();
-
- window.requestAnimationFrame || (window.requestAnimationFrame = function() {
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) {
- window.setTimeout(a, 1e3 / 60);
- };
- }());
- window.cancelRequestAnimationFrame || (window.cancelRequestAnimationFrame = function() {
- return window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout
- }());
-
- /*
- document.getElementById("toolbarMenu").addEventListener("click",function(e){
- if(e.target.parentElement.parentElement.id=="toolbarNew")
- {
- if(confirm("您确定要重新打开网页?"))
- {
- //如果是true ,那么就把页面刷新
- //location.reload();
- for(var vectorId in layer.vectors)
- {
- layer.deleteVector(vectorId);
- layer.data2d.wallIds=[];
- }
- addWall();
- initRoom();
-
- }
- }
- else if(e.target.parentElement.parentElement.id=="toolbarSave")
- {
- alert("save");
- }
- else if(e.target.parentElement.parentElement.id=="toolbarOption")
- {
- var aw=document.getElementById("aboutWindow");
- aw.style.display="block";
- //alert("option");
- }
- else if(e.target.parentElement.parentElement.id=="userOption")
- {
- alert("user");
- }
- });
- */
-
- document.getElementById("closeproduct").addEventListener("click",layer.menu.closeProduct);
- window.onresize = function () {
- width=window.outerWidth-260;
- height=window.outerHeight;
- startMarkX=-width/2+50;
- startMarkY=-height/2+50;
-
- layer.size = new CanvasSketch.Size(parseInt(width), parseInt(height));
- //layer.renderer.setSize(layer.size);
- layer.maxBounds = new CanvasSketch.Bounds(-layer.size.w / 2, -layer.size.h / 2, layer.size.w / 2, layer.size.h / 2);
- layer.bounds = new CanvasSketch.Bounds(-layer.size.w / 2, -layer.size.h / 2, layer.size.w / 2, layer.size.h / 2);
- //layer.renderer.redraw(0);
- //layer.renderer.drawBackGround();
- layer.control.refreshCanvas=true;
- layer.control.refreshBackgroundCanvas=true;
- layer.control.refreshSelectCanvas=true;
- layer.renderer.autoRedraw();
- };
- document.getElementById("aboutWindow").addEventListener("click",function(e){
- //console.log("aboutWindow");
- if(document.getElementById("aboutWindow").style.display=="block")
- {
- if(e.target.className=="window-close"||e.target.innerText=="关闭")
- {
- document.getElementById("aboutWindow").style.display="none";
- }
- }
- });
-
-
-
- document.getElementById("subMenuContainer").addEventListener("click",function(e){
- if(e.target.parentElement.parentElement.id=="toolbarScreenshot")
- {
- var saveAsLocalImage=function(canvasid,type) {
- var canvas = document.getElementById(canvasid);
- // 图片导出为 png 格式
- var type = 'png';
- var imgData = canvas.toDataURL(type);
- // 加工image data,替换mime type
- imgData = imgData.replace(_fixType(type),'image/octet-stream');
- // 下载后的图片名
- var filename = '4dage_' + (new Date()).getTime() + '.' + type;
- // download
- saveFile(imgData,filename);
- };
- /**
- * 获取mimeType
- * @param {String} type the old mime-type
- * @return the new mime-type
- */
- var _fixType=function(type) {
- type = type.toLowerCase().replace(/jpg/i, 'jpeg');
- var r = type.match(/png|jpeg|bmp|gif/)[0];
- return 'image/' + r;
- };
- /**
- * 在本地进行文件保存
- * @param {String} data 要保存到本地的图片数据
- * @param {String} filename 文件名
- */
- var saveFile=function(data, filename){
- var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
- save_link.href = data;
- save_link.download = filename;
-
- var event = document.createEvent('MouseEvents');
- event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- save_link.dispatchEvent(event);
- };
- if(show3D)
- {
- BABYLON.Tools.CreateScreenshot(my3DEngine.scene3D.engine, my3DEngine.scene3D.camera, {width: my3DEngine.scene3D.canvas.width,height: my3DEngine.scene3D.canvas.height});
- }
- else
- {
- saveAsLocalImage("dynamiccanvas2d","png");
- }
- }
- else if(e.target.parentElement.parentElement.id=="fullscreen-btn")
- {
- var element = document.documentElement;
- var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
- if (requestMethod)
- {
- requestMethod.call(element);
- }
- else if (typeof window.ActiveXObject !== "undefined") {
- var wscript = new ActiveXObject("WScript.Shell");
- if (wscript !== null) {
- wscript.SendKeys("{F11}");
- }
- }
- }
- else if(e.target.parentElement.parentElement.id=="transparencyButton")
- {
- //alert("透明");
- if(e.target.src.indexOf("icon-transparency.png")>-1)
- {
- for(var i=0;i<my3DEngine.roomWallMeshes.length;++i)
- {
- my3DEngine.roomWallMeshes[i].visibility=0.08;
- }
- e.target.src=e.target.src.replace("icon-transparency.png","icon-opacity.png");
- }
- else if(e.target.src.indexOf("icon-opacity.png")>-1)
- {
- for(var i=0;i<my3DEngine.roomWallMeshes.length;++i)
- {
- my3DEngine.roomWallMeshes[i].visibility=1;
- }
- e.target.src=e.target.src.replace("icon-opacity.png","icon-transparency.png");
- }
-
- }
- else if(e.target.parentElement.parentElement.id=="lock-icon")
- {
- //alert("锁");
- if(e.target.className=="fa fa-unlock")
- {
- my3DEngine.lock=true;
- e.target.className="fa fa-lock";
- }
- else if(e.target.className=="fa fa-lock")
- {
- my3DEngine.lock=false;
- e.target.className="fa fa-unlock";
- }
- }
- });
- // Grid..........................................................
- function initLoad()
- {
- var div=document.getElementById("loaddiv");
- var img=document.getElementById("loadimg");
-
- var width=window.innerWidth;
- var height=window.innerHeight;
-
- var imgwidth=img.width;
- var imgheight=img.height;
-
- var ptwidth =(width -imgwidth ) / 2 + "px";
- var ptheight=(height-imgheight) / 2 + "px";
-
- div.style.width=width+"px";
- div.style.height=height+"px";
- div.width=width;
- div.height=height;
-
- img.style.marginLeft= ptwidth;
- img.style.marginTop = ptheight;
- }
- /*
- function showAdd(e)
- {
- var div=document.getElementById(this.id);
- if(div!=null)
- {
- div.children[0].className="selected show";
- }
- }
- */
- function showPicture()
- {
- if(my3DEngine==null)
- {
- my3DEngine=layer.layer3D;
- my3DEngine.initialize();
- }
- var src=this.id.replace("product","")+".babylon";
- layer.menu.closeProduct();
- my3DEngine.showPicture(src);
- }
-
- function showPhoFrame()
- {
- if(my3DEngine==null)
- {
- my3DEngine=layer.layer3D;
- my3DEngine.initialize();
- }
- var src=this.id.replace("product","")+".obj";
- layer.menu.closeProduct();
- my3DEngine.showPhoFrame(src);
- }
-
- function showProduct3D()
- {
- if(my3DEngine==null)
- {
- my3DEngine=new Symbol3D();
- my3DEngine.initialize();
- }
- var src;
- var src=this.id.replace("product","")+".babylon";
- layer.menu.closeProduct();
- my3DEngine.showProduct(src);
- }
- function drawGrid( stepx, stepy) {
- layer.renderer.addGrid();
- }
- /*
- function addText(name)
- {
- //var vectors = [];
- var points = [];
-
- var point = new Point(startMarkX+15,startMarkY-20);
- points.push(point);
-
- var text = new Vector(new Text(points,name),textStyle);
- vectors.push(text);
- //layer.addVectors(vectors);
- //subVector.push(vectors);
- }
- */
-
-
- function addMeter()
- {
- /*
- var points = [];
- var point1 = new Point(startMarkX,startMarkY);
- points.push(point1);
- var point2 = new Point(startMarkX,startMarkY-5);
- points.push(point2);
- var point3 = new Point(startMarkX+meter,startMarkY-5);
- points.push(point3);
- var point4 = new Point(startMarkX+meter,startMarkY);
- points.push(point4);
- var onemeter = new Vector(new Meter(points),meterStyle);
- vectors.push(onemeter);
- */
- layer.renderer.addMeter();
- }
-
- function initRoom()
- {
- var vectors = [];
-
- var points1=[];
- var point1=new Point(-100,400);
- var point2=new Point(-100,-400);
- points1.push(point1);
- points1.push(point2);
- layer.build.firstLines=layer.build.getEndLines(0,1,wallId);
- layer.build.endLines=layer.build.getEndLines(2,3,wallId);
- var vector1id=layer.build.addOpenWall(points1,"imgWall");
- layer.build.adjustEndPoint(vector1id);
- var vector1=layer.vectors[vector1id];
- vectors.push(vector1);
- layer.data2d.wallIds.push(vector1.id);
-
- var points2=[];
- var point21=new Point(500,0);
- var point22=new Point(100,0);
- var point23=new Point(100,-400);
- points2.push(point21);
- points2.push(point22);
- points2.push(point23);
- layer.build.firstLines=layer.build.getEndLines(1,2,wallId);
- layer.build.endLines=layer.build.getEndLines(2,3,wallId);
- var vector2id=layer.build.addOpenWall(points2,"imgWall");
- layer.build.adjustEndPoint(vector2id);
- var vector2=layer.vectors[vector2id];
- vectors.push(vector2);
- layer.data2d.wallIds.push(vector2.id);
- var doorpoint31=new Point(-100,40);
- var doorpoint32=new Point(-100,120);
- var door3=new Vector(new OpenDoor(),openStyle);
- door3.geometry.point1=doorpoint31;
- door3.geometry.point2=doorpoint32;
- door3.geometry.contextIndex=0;
- door3.update(layer,vector1.id,0,1,null);
-
- var doorpoint41=new Point(-100,-100);
- var doorpoint42=new Point(-100,-20);
- var door4=new Vector(new OpenDoor(),openStyle);
- door4.geometry.point1=doorpoint41;
- door4.geometry.point2=doorpoint42;
- door4.geometry.contextIndex=0;
- door4.update(layer,vector1.id,0,1,null);
- vector1.symbol2dsCount=2;
- vector1.symbol2Ds[door3.id]=door3;
- vector1.symbol2Ds[door4.id]=door4;
-
- var doorpoint51=new Point(100,-300);
- var doorpoint52=new Point(100,-220);
- var door5=new Vector(new OpenDoor(),openStyle);
- door5.geometry.point1=doorpoint51;
- door5.geometry.point2=doorpoint52;
- door5.geometry.contextIndex=0;
- door5.update(layer,vector2.id,1,2,null);
- vector2.symbol2dsCount=1;
- vector2.symbol2Ds[door5.id]=door5;
-
-
- var windowpoint1=new Point(-200,400);
- var windowpoint2=new Point(-260,400);
- var window1=new Vector(new SingleCasement(),singleStyle);
- window1.geometry.point1=windowpoint1;
- window1.geometry.point2=windowpoint2;
- window1.geometry.contextIndex=0;
- window1.update(layer,wallId,0,1,null);
-
- var windowpoint21=new Point(-500,-200);
- var windowpoint22=new Point(-500,-300);
- var window2=new Vector(new SlidingWindow(),slidingStyle);
- window2.geometry.point1=windowpoint21;
- window2.geometry.point2=windowpoint22;
- window2.geometry.contextIndex=0;
- window2.update(layer,wallId,0,3,null);
- layer.vectors[wallId].symbol2dsCount=2;
- layer.vectors[wallId].symbol2Ds[window1.id]=window1;
- layer.vectors[wallId].symbol2Ds[window2.id]=window2;
-
- layer.control.refreshCanvas=true;
- }
-
- function addWall()
- {
- var vectors = [];
- var points = [];
- var point1=new Point(wallleftX,wallleftY);
- points.push(point1);
-
- var point2=new Point(wallrightX,wallleftY);
- points.push(point2);
-
- var point3=new Point(wallrightX,wallrightY);
- points.push(point3);
-
- var point4=new Point(wallleftX,wallrightY);
- points.push(point4);
-
- var wall = new Wall(points, document.getElementById("imgWall"));
- var vector=new Vector(wall,wallStyle);
- wallId=vector.id;
- vectors.push(vector);
- layer.addVectors(vectors);
-
- layer.data2d.wallIds.push(wallId);
- }
- function Show3DBase()
- {
- if(!show3D)
- {
- if(my3DEngine==null)
- {
- my3DEngine=layer.layer3D;
- my3DEngine.initialize();
- }
-
- //my3DEngine.clearSymbol();
- GetWallPoints(layer);
- if(!one3d)
- {
- //initRoom3D();
- one3d=true;
- }
-
- my3DEngine.scene3D.render();
- }
- show3D=true;
- }
-
- function GetWallPoints(layer)
- {
- var wallIds=layer.data2d.wallIds;
- var calculateLine=layer.calculateLine;
- for(var i=0;i<wallIds.length;++i)
- {
- var id=wallIds[i];
- var points=layer.vectors[id].geometry.points;
-
- var syms=[];
-
-
- for(var key in layer.vectors[id].symbol2Ds)
- {
- var symbol2d=layer.vectors[id].symbol2Ds[key];
- var line=calculateLine.createLine(symbol2d.geometry.point1,symbol2d.geometry.point2);
- var sym={};
-
- if(line.a!=0)
- {
- sym.angle=Math.atan(line.a);
- }
- else if(line.hasOwnProperty('x'))
- {
- sym.angle=Math.PI/2;
- }
- else if(line.hasOwnProperty('y'))
- {
- sym.angle=0;
- }
- sym.point={x:(symbol2d.geometry.point1.x+symbol2d.geometry.point2.x)/2,y:(symbol2d.geometry.point1.y+symbol2d.geometry.point2.y)/2};
- //sym.type=symbol2d.geoType;
- sym.type=symbol2d.geometry.geoType;
- sym.len=BABYLON.Vector2.Distance(symbol2d.geometry.point1,symbol2d.geometry.point2);
- syms.push(sym);
- }
-
- if(i==0)
- {
- var inout=calculateLine.divisionBuildUseWall(layer.vectors[id].geometry.border1,layer.vectors[id].geometry.border2);
-
- var inline=inout.use;
- var outline=inout.build;
- my3DEngine.decorate3D.drawFloor(layer.vectors[id].geometry.points,id);
- my3DEngine.decorate3D.drawCloseWallSymbols(outline,inline,syms,layer.vectors[id].geometry.wallType,id);
- }
- else
- {
- if(layer.vectors[id].geometry.state==0)
- {
- var inout=calculateLine.divisionBuildUseWall(layer.vectors[id].geometry.border1,layer.vectors[id].geometry.border2);
-
- var inline=inout.use;
- var outline=inout.build;
- my3DEngine.decorate3D.drawFloor(layer.vectors[id].geometry.points,id);
-
- if(calculateLine.isClockWise(outline)>0)
- {
- outline.reverse();
- inline.reverse();
- }
- my3DEngine.decorate3D.drawCloseWallSymbols(outline,inline,syms,layer.vectors[id].geometry.wallType,id);
- }
- else
- {
- var clockpoints=[];
-
- var floorpoints=calculateLine.outinwallside(points,layer.vectors[id].geometry.wallType);
-
- if(floorpoints.side1.length==2)
- {
- var temp1=[];
- var temp2=[];
-
- temp1[0]=floorpoints.side1[0];
- temp1[1]=floorpoints.side2[0];
-
- temp2[0]=floorpoints.side1[1];
- temp2[1]=floorpoints.side2[1];
-
- floorpoints.side1=temp1;
- floorpoints.side2=temp2;
-
- clockpoints.push(temp1[0]);
- clockpoints.push(temp1[1]);
- clockpoints.push(temp2[1]);
- clockpoints.push(temp2[0]);
- }
- else
- {
- var line1= calculateLine.createLine(floorpoints.side1[0], floorpoints.side1[1]);
- var line2= calculateLine.createLine(floorpoints.side1[floorpoints.side1.length-2], floorpoints.side1[floorpoints.side1.length-1]);
- for(var n=0;n<floorpoints.side1.length;++n)
- {
- clockpoints.push(floorpoints.side1[n]);
- }
- for(var n=floorpoints.side2.length-1;n>-1;--n)
- {
- clockpoints.push(floorpoints.side2[n]);
- }
- }
-
- if(calculateLine.isClockWise(clockpoints)>0)
- {
- floorpoints.side1.reverse();
- floorpoints.side2.reverse();
- }
- my3DEngine.decorate3D.drawOpenWallSymbols(floorpoints,syms,layer.vectors[id].geometry.wallType,id);
-
- }
-
- }
- }
- }
-
- function animate()
- {
- requestAnimationFrame( animate );
- render();
- update();
- }
- function update()
- {
- three3D.controls.update();
- three3D.stats.update();
- //controls.update();
- //stats.update();
- }
- function render()
- {
- three3D.renderer.render( three3D.scene, three3D.camera );
- //renderer.render( scene, camera );
- }
-
- function initRoom3D()
- {
-
- if(my3DEngine==null)
- {
- my3DEngine=layer.layer3D;
- my3DEngine.initialize();
- }
- my3DEngine.scene3D.engine.displayLoadingUI();
- var rotation=new BABYLON.Vector3(0,0,0);
-
- var p1=new BABYLON.Vector3(-300,0,-320);
- var table1=my3DEngine.model.showProductfirst("gui.babylon",p1,rotation);
- table1.name="cabinet";
-
- var p2 =new BABYLON.Vector3(-300,0,-120);
- var table2=my3DEngine.model.showProductfirst("gui.babylon",p2,rotation);
- table2.name="cabinet";
-
- var p3=new BABYLON.Vector3(-300,0,80);
- var table3=my3DEngine.model.showProductfirst("gui.babylon",p3,rotation);
- table3.name="cabinet";
- var p4=new BABYLON.Vector3(-300,0,280);
- var table4=my3DEngine.model.showProductfirst("gui.babylon",p4,rotation);
- table4.name="cabinet";
-
- var p5=new BABYLON.Vector3(300,0,200);
- var table5=my3DEngine.model.showProductfirst("gui.babylon",p5,rotation);
- table5.name="cabinet";
-
- var p6=new BABYLON.Vector3(300,0,100);
- var table6=my3DEngine.model.showProductfirst("gui.babylon",p6,rotation);
- table6.name="cabinet";
-
- var p7=new BABYLON.Vector3(300,0,300);
- var table7=my3DEngine.model.showProductfirst("gui.babylon",p7,rotation);
- table7.name="cabinet";
-
- var p8=new BABYLON.Vector3(80,0,100);
- var table8=my3DEngine.model.showProductfirst("gui.babylon",p8,rotation);
- table8.name="cabinet";
- var p9=new BABYLON.Vector3(80,0,260);
- var table9=my3DEngine.model.showProductfirst("gui.babylon",p9,rotation);
- table9.name="cabinet";
-
- var p10=new BABYLON.Vector3(300,0,-130);
- var table10=my3DEngine.model.showProductfirst("gui.babylon",p10,rotation);
- table10.name="cabinet";
-
- var p11=new BABYLON.Vector3(300,0,-270);
- var table11=my3DEngine.model.showProductfirst("gui.babylon",p11,rotation);
- table11.name="cabinet";
-
- var mp1=new BABYLON.Vector3(-300,103,-320);
- var model1=my3DEngine.model.showProductfirst("11.babylon",mp1,rotation);
-
- var mp2 =new BABYLON.Vector3(-300,103,-120);
- var model2=my3DEngine.model.showProductfirst("12.babylon",mp2,rotation);
-
- var mp3=new BABYLON.Vector3(-300,103,80);
- var model3=my3DEngine.model.showProductfirst("65.babylon",mp3,rotation);
- var mp4=new BABYLON.Vector3(-300,103,280);
- var model4=my3DEngine.model.showProductfirst("15.babylon",mp4,rotation);
-
- var mp5=new BABYLON.Vector3(300,103,200);
- var model5=my3DEngine.model.showProductfirst("17.babylon",mp5,rotation);
-
- var mp6=new BABYLON.Vector3(300,103,100);
- var model6=my3DEngine.model.showProductfirst("64.babylon",mp6,rotation);
-
- var mp7=new BABYLON.Vector3(300,103,300);
- var model7=my3DEngine.model.showProductfirst("37.babylon",mp7,rotation);
-
- var mp8=new BABYLON.Vector3(80,103,100);
- var model8=my3DEngine.model.showProductfirst("44.babylon",mp8,rotation);
- var mp9=new BABYLON.Vector3(80,103,260);
- var model9=my3DEngine.model.showProductfirst("45.babylon",mp9,rotation);
-
- var mp10=new BABYLON.Vector3(300,103,-130);
- var model10=my3DEngine.model.showProductfirst("52.babylon",mp10,rotation);
-
- var mp11=new BABYLON.Vector3(300,103,-270);
- var model11=my3DEngine.model.showProductfirst("54.babylon",mp11,rotation);
- }
-
- //16509
-
-
- </script>
- </body>
- </html>
|