{"id":2543,"date":"2016-12-20T23:01:54","date_gmt":"2016-12-20T14:01:54","guid":{"rendered":"http:\/\/fdada.info\/?page_id=2543"},"modified":"2017-01-19T10:49:45","modified_gmt":"2017-01-19T01:49:45","slug":"radiation_3d","status":"publish","type":"page","link":"https:\/\/fdada.info\/fdada\/home\/vis_3d\/radiation_3d\/","title":{"rendered":"<!--05-04-->\u653e\u5c04\u7dda\u91cf\u306e\u5206\u5e03"},"content":{"rendered":"<link href=\"\/igniteui\/css\/themes\/metro\/infragistics.theme.css\" rel=\"stylesheet\" \/><link href=\"\/igniteui\/css\/structure\/infragistics.css\" rel=\"stylesheet\" \/><link href=\"\/igniteui\/css\/structure\/modules\/infragistics.ui.chart.css\" rel=\"stylesheet\" \/>\r\n<style type=\"text\/css\">\r\n.site-content ul > li.ui-igtree-node{\r\n        background: none;\r\n        margin: 3px 0px 0px 0px;\r\n        padding: 6px 0px 0px 15px;\r\n        line-height: 1.0em;\r\n        clear: left; \r\n}\r\n.site-content ul > li{\r\n        background: none;\r\n        margin: 0px;\r\n        padding: 0px;\r\n        float: left;\r\n}\r\n<\/style>\r\n\r\n<h1>\u653e\u5c04\u7dda\u91cf\u306e\u5206\u5e03<\/h1>\r\n<script src=\"\/3d\/threejs\/three.js\"><\/script>\r\n<script src=\"\/3d\/threejs\/controls\/OrbitControls.js\"><\/script>\r\n<script src=\"\/3d\/threejs\/math\/Lut.js\"><\/script>\r\n<script src=\"https:\/\/code.jquery.com\/jquery-1.9.1.min.js\"><\/script>\r\n<script src=\"https:\/\/code.jquery.com\/ui\/1.10.3\/jquery-ui.min.js\"><\/script>\r\n<script src=\"https:\/\/ajax.aspnetcdn.com\/ajax\/modernizr\/modernizr-2.8.3.js\"><\/script>\r\n\r\n<link href=\"\/igniteui\/css\/structure\/infragistics.css\" rel=\"stylesheet\" \/>\r\n\r\n<!-- Ignite UI Required Combined JavaScript Files -->\r\n<script src=\"\/igniteui\/js\/infragistics.core.js\"><\/script>\r\n<script src=\"\/igniteui\/js\/infragistics.lob.js\"><\/script>\r\n\r\n\r\n<table border=\"0\">\r\n        <tr>\r\n            <td>\r\n                <div id=\"canvas-frame\"><\/div>\r\n            <\/td>\r\n            <td valign=\"top\">\r\n                <div id=\"tree2\">\r\n                <ul id=\"tree\"><\/ul>\r\n                <\/div>\r\n            <\/td>\r\n        <\/tr>\r\n        <tr>\r\n            <td valign=\"top\">\r\n                 <div id=\"table1\">\r\n                     <table border=\"1\">\r\n                        <tbody>\r\n                           <tr>\r\n                              <td>\u653e\u5c04\u7dda\u91cf<\/td>\r\n                              <td><div id=\"radi\"><\/div><\/td>\r\n                           <\/tr>\r\n                        <\/tbody>\r\n                      <\/table>\r\n            <\/td>\r\n            <td>\r\n                <div id=\"container2\"><\/div>\r\n            <\/td>\r\n       <\/tr>\r\n<\/table>\r\n\r\n\r\n<script>\r\n   threeStart();         \r\n  \/*----------------webGL\u51e6\u7406\u2460--------------*\/ \r\n  var width, height;\r\n  var renderer,renderer2;\r\n  var canvasFrame,canvasFrame2;\r\n  function initThree() {\r\n    canvasFrame = document.getElementById('canvas-frame');\r\n    width = 700 ; \r\n    height =  550 ;\r\n    renderer = new THREE.WebGLRenderer({antialias: true}); \r\n    renderer.setSize(width, height);\r\n    document.getElementById('canvas-frame').appendChild(renderer.domElement);\r\n    renderer.shadowMapEnabled = true;\r\n  }\r\n\/*----------------webGL\u51e6\u7406\u2460--END---------*\/\r\n\r\n\r\n\/*----------------Camera SET\u2461----------------*\/\r\n  var camera,camera2;\r\n  var controls,controls2;\r\n  function initCamera() {\r\n    camera = new THREE.PerspectiveCamera( 45 , width \/ height , 1 , 10000 );\r\n    camera.up.x = 0; camera.up.y = 0; camera.up.z = 1;\r\n    camera.position.set(4.5, 4.5, 6);\r\n    controls = new THREE.OrbitControls(camera,renderer.domElement);\r\n    controls.target.set(0,0,1); \r\n  }\r\n   \/*------------Camera SET---END------*\/ \r\n  \r\n \/*----------------scene SET----------------*\/\r\n  var scene,scene2;\r\n  function initScene() {\r\n    scene = new THREE.Scene();\r\n  }\r\n \/*----------scene SET---END----------*\/\r\n  \r\n \/*----------------Light SET---------------*\/\r\n  var light, light2, light3,light4,light5;\r\n  function initLight() {\r\n    light = new THREE.DirectionalLight(0xcccccc,1.6);\r\n    light.position = new THREE.Vector3(2.5, 2.5, 4.5);\r\n    light.castShadow = true;\r\n    scene.add(light);\r\n    \r\n    light3 = new THREE.DirectionalLight(0xffffff,2.0);\r\n    light3.position.x=-1;\r\n    light3.position.y=-1;\r\n    light3.position.z=1;\r\n    light3.castShadow = true;\r\n    scene.add(light3);\r\n     \r\n    light2 = new THREE.AmbientLight(0x333333);\r\n    scene.add(light2);\r\n  }\r\n \/*----------------Light SET---END--------*\/ \r\n \r\n  \/*---------------------Object   SET------*\/ \r\n\r\n  var plane,plane2,plane3,plane4,plane5,axis,len,plane11;\r\n  var sp = [];\r\n  var planes = [6];\r\n  var planes2 = [6];\r\n  var x1=[];\r\n  var y1=[];\r\n  var z1=[];\r\n  var rad1=[];\r\n  var rgb_r='Global Scope';\r\n  var rgb_g='Global Scope';\r\n  var rgb_b='Global Scope';\r\n  var rad_cri='Global Scope';\r\n  var geox1=[];\r\n  var geoy1=[];\r\n  var cenx1=[];\r\n  var ceny1=[];\r\n  var cenz1=[];\r\n  var geox2=[];\r\n  var geoy2=[];\r\n  var cenx2=[];\r\n  var ceny2=[];\r\n  var cenz2=[];\r\n  var geox3=[];\r\n  var geoy3=[];\r\n  var cenx3=[];\r\n  var ceny3=[];\r\n  var cenz3=[];\r\n\r\n  var colorMap;\r\n  var numberOfColors;\r\n  var legendLayout;\r\n  var lut,labels;\r\n  colorMap = 'rainbow';\r\n  numberOfColors = 512;\r\n  legendLayout = 'vertical';\r\n  \r\n  var rad=0.05;\r\n  function initObject(){\r\n      $.getJSON(\"\/data\/3d.models\/geo_u1.json\" , function(data) {\r\n          len = data.length;\r\n          for(var i=0;i<len;i++){\r\n              geox1[i]=data[i].geox;\r\n              geoy1[i]=data[i].geoy;\r\n              cenx1[i]=data[i].cenx;\r\n              ceny1[i]=data[i].ceny;\r\n              cenz1[i]=data[i].cenz;             \r\n          }\r\n     });\r\n      $.getJSON(\"\/data\/3d.models\/geo_u2.json\" , function(data) {\r\n          len = data.length;\r\n          for(var i=0;i<len;i++){\r\n              geox2[i]=data[i].geox;\r\n              geoy2[i]=data[i].geoy;\r\n              cenx2[i]=data[i].cenx;\r\n              ceny2[i]=data[i].ceny;\r\n              cenz2[i]=data[i].cenz;             \r\n          }\r\n     });\r\n      $.getJSON(\"\/data\/3d.models\/geo_u3.json\" , function(data) {\r\n          len = data.length;\r\n          for(var i=0;i<len;i++){\r\n              geox3[i]=data[i].geox;\r\n              geoy3[i]=data[i].geoy;\r\n              cenx3[i]=data[i].cenx;\r\n              ceny3[i]=data[i].ceny;\r\n              cenz3[i]=data[i].cenz;             \r\n          }\r\n     });\r\n\r\n     \/\/xyz\u8ef8Set\r\n     axis = new THREE.AxisHelper(1000);\r\n     scene.add(axis); \r\n     axis.position.set(0,0,0);\r\n     \r\n     \/\/\u65b9\u89d2\u30e9\u30d9\u30eb\r\n     var map = THREE.ImageUtils.loadTexture(\"\/data\/3d.models\/East.png\");\r\n     var material = new THREE.SpriteMaterial({map: map, useScreenCoordinates:false});\r\n\t\r\n     var sprite = new THREE.Sprite(material);\r\n     scene.add(sprite);\r\n     sprite.position.set(3,0,0);\r\n     sprite.scale.set(0.5,0.5,1);\r\n\r\n\t\r\n     var map2 = THREE.ImageUtils.loadTexture(\"\/data\/3d.models\/North.png\");\r\n     var material2 = new THREE.SpriteMaterial({map: map2, useScreenCoordinates:false});\r\n\t\r\n     var sprite2 = new THREE.Sprite(material2);\r\n     scene.add(sprite2);\r\n     sprite2.position.set(0,3,0);\r\n     sprite2.scale.set(0.5,0.5,1);\r\n\r\n     \r\n  }\r\n  \r\n   \/*-------Object SET-----END-------*\/ \r\n   \r\n   \r\n   \/*---------------Loop------------*\/ \r\n    function loop(){  \r\n        renderer.clear();   \r\n        renderer.render(scene, camera);\r\n        renderer2.render(scene2, camera2);\r\n        controls.update();   \r\n        window.requestAnimationFrame(loop);\r\n    }\r\n   \/*------------Loop-----END-------*\/   \r\n    \r\n\/*--------Function READ----------------*\/ \r\n  function threeStart() {\r\n    initThree();\r\n    initEvent();\r\n    initCamera();\r\n    initScene();    \r\n    initLight();\r\n    init2();\r\n    initObject();\r\n    \r\n    loop();     \r\n  }\r\n  \r\n\/*------Function READ----END---------*\/ \r\n\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\t\/\/Event Function SET\r\n\t\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\tfunction initEvent() {\r\n\t    \/\/Mouse Down Event\r\n\t    canvasFrame.addEventListener( 'mousedown', onDocumentMouseDown, false );\r\n\t    function onDocumentMouseDown( event ) {\r\n\r\n                var element = document.getElementById(\"canvas-frame\");\r\n                var rect = element.getBoundingClientRect();\r\n            \r\n                var positionX = rect.left ;\t\/\/ \u8981\u7d20\u306eX\u5ea7\u6a19\r\n                var positionY = rect.top  ;\t\/\/ \u8981\u7d20\u306eY\u5ea7\u6a19\r\n            \r\n                \/\/ \u8981\u7d20\u306e\u5de6\u4e0a\u304b\u3089\u306e\u8ddd\u96e2\u3092\u8a08\u7b97\r\n\t        var offsetX = event.clientX - positionX ;\r\n\t        var offsetY = event.clientY - positionY ;\r\n\t        \r\n\t        var vector = new THREE.Vector3(( offsetX \/ width ) * 2 - 1, -( offsetY \/ height ) * 2 + 1, 0.5);\r\n         \r\n                vector = vector.unproject(camera);\r\n                var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize());\r\n                for(var i=0;i<len;i++){\r\n                    var intersects = raycaster.intersectObjects([sp[i]]);\r\n                    if (intersects.length > 0) {\r\n                        console.log(\"\u5ea7\u6a19:(\"+x1[i]+\",\"+y1[i]+\",\"+z1[i]+\")\");\r\n                        console.log(\"\u653e\u5c04\u7dda\u91cf:\"+rad1[i]+\" [mSv\/h]\");\r\n                    \r\n                        \/\/var xElement = document.getElementById('pos');\r\n\t                var yElement = document.getElementById('radi');\r\n                    \r\n                        \/\/xElement.innerHTML = \"(\"+x1[i]+\",\"+y1[i]+\",\"+z1[i]+\")\" ;\r\n\t                yElement.innerHTML = rad1[i]+\" [mSv\/h]\" ;\t                \r\n                    }\r\n                }\r\n\t    }\r\n\t}\r\n\r\n\/\/Tree\u306e\u4f5c\u6210\r\n    $(function () {\r\n\r\n            $.getJSON(\"\/data\/3d\/radiation.json\" , function(data) {\r\n                $(\"#tree\").igTree({\r\n                    dataSource: data, \/\/JSON Array defined above\r\n                    bindings: {\r\n                       textKey: \"ReactorName\",\r\n                       valueKey: \"ID\",\r\n                       childDataProperty: \"Times\",\r\n                       bindings: {\r\n                           textKey: \"filename\",\r\n                           valueKey: \"ID\"\r\n                       }\r\n                   }\r\n                });              \r\n            });\r\n\r\n            \/\/\u30af\u30ea\u30c3\u30af\u52d5\u4f5c\u306e\u8a2d\u5b9a\r\n            $(\"#tree\").on(\"igtreenodeclick\", function (evt, ui) {\r\n                if ( ui.node.data.filename ) {\r\n                    id       = ui.node.data.ID;\r\n                    reactornum = ui.node.data.ReactorNumber;\r\n                    dataname = ui.node.data.filename;\r\n                    date = ui.node.data.Date;\r\n\r\n                    console.log(\"igtreenodeclick: [\"+ dataname +  \"\u30d5\u30a1\u30a4\u30eb\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u307e\u3057\u305f: ]\");\r\n                    for(var i=0;i<=3;i++){\r\n                         scene.remove(planes[i]);\r\n                         scene.remove(planes2[i]);\r\n                    }\r\n                    draw(id,date,reactornum);\r\n                }\r\n                else {\r\n                    id       = null;\r\n                    reactornum = null;\r\n                    dataname = null;\r\n                    date= null;\r\n                    var node = $(\"#tree\").igTree(\"nodeByPath\", ui.node.path);\r\n                    var isExpanded = $(\"#tree\").igTree(\"isExpanded\", node);\r\n                    if ( isExpanded ) {\r\n                        $(\"#tree\").igTree(\"collapse\", node);\r\n                    }\r\n                    else {\r\n                        $(\"#tree\").igTree(\"expand\", node);\r\n                    }\r\n                }\r\n            });\r\n    });\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\u63cf\u753b\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\r\n    function draw(id,date,reactornum){\r\n        \/\/\u524d\u63cf\u753b\u306e\u6d88\u53bb\r\n        for(var i=0;i<len;i++){\r\n           scene.remove(sp[i]);\r\n        }\r\n        for(var i=0;i<=3;i++){\r\n           scene.remove(planes[i]);\r\n           scene.remove(planes2[i]);\r\n        }\r\n        scene.remove(plane);\r\n        scene.remove(plane11);\r\n        scene.remove(plane2);\r\n        scene.remove(plane3);\r\n        scene.remove(plane4);\r\n        scene.remove(plane5);\r\n        cleanScene();\r\n        \r\n         lut = new THREE.Lut( colorMap, numberOfColors );        \r\n        \/\/JSON\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\r\n        $.getJSON(\"\/data\/3d\/radiation_u\" + reactornum + \".\" +date + \".json\" , function(data) {\r\n            var rad2=[];\r\n            var radmax;\r\n            radmax=0;\r\n            len = data.length;\r\n            var lutColors = [];\r\n            for(var i=0;i<len;i++){\r\n                rad1[i]=data[i].rad; \r\n                if(radmax<rad1[i]){\r\n                    radmax=rad1[i];\r\n                }\r\n            }\r\n            lut.setMin( 0 );\r\n            lut.setMax( radmax );\r\n            for(var i=0;i<len;i++){\r\n                x1[i]=data[i].x;\r\n                y1[i]=data[i].y;\r\n                z1[i]=data[i].z;\r\n\r\n                color = lut.getColor( rad1[i] );\r\n                 \r\n                \/\/sphere\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\r\n                sp[i] = new THREE.Mesh(\r\n                    new THREE.SphereGeometry(rad),\r\n                    new THREE.MeshPhongMaterial({\r\n                         color : lut.getColor( rad1[i] )\r\n                    })\r\n                );\r\n                sp[i].castShadow = true;\r\n                sp[i].receiveShadow = true;\r\n                scene.add(sp[i]);\r\n                sp[i].position.set(x1[i],y1[i],z1[i]);\r\n                             \r\n           }\r\n\r\n           \/\/\u30ab\u30e9\u30fc\u30b9\u30b1\u30fc\u30eb\u30d0\u30fc\u306e\u4f5c\u6210\r\n           if ( legendLayout ) {\r\n           if ( legendLayout == 'horizontal' ) {\r\n\t\tlegend = lut.setLegendOn( { 'layout':'horizontal', 'position': { 'x': 21, 'y': 6, 'z': 5 } } );\r\n\t   }\r\n\t   else {\r\n\t\t\/\/legend = lut.setLegendOn({ 'layout':'vertical', 'position': { 'x': 0, 'y': 0, 'z': 0 }} \r\n                legend = lut.setLegendOn({ 'layout':'horizontal', 'position': { 'x': 20.5, 'y': 6, 'z': 3 } }\r\n                       );\r\n\t\t}\r\n           }\r\n           scene2.add ( legend );\r\n\r\n           \/\/\u30e9\u30d9\u30eb\u306e\u4f5c\u6210\r\n           labels = lut.setLegendLabels( { 'title': '\u653e\u5c04\u7dda\u91cf', 'um': 'mSv\/h', 'ticks': 5 } );\r\n           scene2.remove(labels);\r\n           scene2.remove ( labels['title'] );\r\n           scene2.add ( labels['title'] );\r\n\r\n           for ( var i = 0; i < Object.keys( labels[ 'ticks' ] ).length; i++ ) {\r\n               scene2.remove ( labels[ 'ticks' ][ i ] );\r\n               scene2.remove ( labels[ 'lines' ][ i ] );\r\n\t       scene2.add ( labels[ 'ticks' ][ i ] );\r\n\t       scene2.add ( labels[ 'lines' ][ i ] );\r\n           }\r\n       });\r\n\r\n       \/\/\u30d7\u30ec\u30fc\u30c8\u306e\u4f5c\u6210\r\n       var materials = [5];\r\n       var textures = [5];\r\n       var materials2 = [5];\r\n       var textures2 = [5];\r\n       \/\/1\u53f7\u6a5f\r\n         if(reactornum==1){\r\n\r\n            \/\/plane\u4f5c\u6210\r\n            \/\/1F\r\n            for(var i=1;i<=4;i++){\r\n                \/\/texture SET\r\n                var textureLoader = new THREE.TextureLoader();\r\n                textures[i] = textureLoader.load('\/data\/3d.models\/u1_1f_' +i+ '.png');\r\n                textures[i].anisotropy = renderer.getMaxAnisotropy();\r\n\r\n                \/\/Material Object SET\r\n                if(i==2||i==4){\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 0.5})\r\n                }else{\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 1})\r\n                }\r\n                materials[i].side = THREE.DoubleSide;\r\n      \r\n                \/\/plane SET\r\n                planes[i-1] =  new THREE.Mesh(\r\n                             new THREE.PlaneGeometry(geox1[i-1], geoy1[i-1]),materials[i]);\r\n                planes[i-1].receiveShadow = true;    \r\n                planes[i-1].position.set(cenx1[i-1],ceny1[i-1],cenz1[i-1]); \r\n                scene.add(planes[i-1]);\r\n            }\r\n            \/\/2F\r\n            \/\/plane\u4f5c\u6210\r\n            for(var i=1;i<=4;i++){\r\n                \/\/texture SET\r\n                var textureLoader = new THREE.TextureLoader();\r\n                textures2[i] = textureLoader.load('\/data\/3d.models\/u1_2f_' +i+ '.png');\r\n                textures2[i].anisotropy = renderer.getMaxAnisotropy();\r\n\r\n                \/\/Material Object SET\r\n                if(i==2||i==4){\r\n                    materials2[i] = new THREE.MeshBasicMaterial({ map:textures2[i],transparent: true,\r\n                          opacity : 0.5})\r\n                }else{\r\n                    materials2[i] = new THREE.MeshBasicMaterial({ map:textures2[i],transparent: true,\r\n                          opacity : 1})\r\n                }\r\n                materials2[i].side = THREE.DoubleSide;\r\n      \r\n                \/\/plane SET\r\n                planes2[i-1] =  new THREE.Mesh(\r\n                             new THREE.PlaneGeometry(geox1[i+3], geoy1[i+3]),materials2[i]);\r\n                planes2[i-1].receiveShadow = true;    \r\n                planes2[i-1].position.set(cenx1[i+3],ceny1[i+3],cenz1[i+3]); \r\n                scene.add(planes2[i-1]);\r\n            }\r\n      \r\n             \/\/3F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u1_3f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane3 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox1[8], geoy1[8]),material);\r\n\r\n             plane3.receiveShadow = true;    \r\n             plane3.position.set(cenx1[8],ceny1[8],cenz1[8]); \r\n             scene.add(plane3);\r\n\r\n             \/\/4F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u1_4f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane4 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox1[9], geoy1[9]),material);\r\n\r\n             plane4.receiveShadow = true;    \r\n             plane4.position.set(cenx1[9],ceny1[9],cenz1[9]); \r\n             scene.add(plane4);\r\n             \/\/5F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u1_5f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane5 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox1[10], geoy1[10]),material);\r\n\r\n             plane5.receiveShadow = true;    \r\n             plane5.position.set(cenx1[10],ceny1[10],cenz1[10]); \r\n             scene.add(plane5);\r\n\r\n        }\r\n\r\n        \/\/2\u53f7\u6a5f\r\n         if(reactornum==2){\r\n\r\n             \/\/\u5730\u4e0b1F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             texture= textureLoader.load('\/data\/3d.models\/u2_-1f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane11=  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox2[0], geoy2[0]),material);\r\n\r\n             plane11.receiveShadow = true;    \r\n             plane11.position.set(cenx2[0],ceny2[0],cenz2[0]); \r\n             scene.add(plane11);\u3000\r\n\r\n\r\n             \/\/1F\r\n            for(var i=1;i<=4;i++){\r\n                \/\/texture SET\r\n                var textureLoader = new THREE.TextureLoader();\r\n                textures[i] = textureLoader.load('\/data\/3d.models\/u2_1f_' +i+ '.png');\r\n                textures[i].anisotropy = renderer.getMaxAnisotropy();\r\n\r\n                \/\/Material Object SET\r\n                if(i==2||i==4){\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 0.5})\r\n                }else{\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 1})\r\n                }\r\n                materials[i].side = THREE.DoubleSide;\r\n      \r\n                \/\/plane SET\r\n                planes[i-1] =  new THREE.Mesh(\r\n                             new THREE.PlaneGeometry(geox2[i], geoy2[i]),materials[i]);\r\n                planes[i-1].receiveShadow = true;    \r\n                planes[i-1].position.set(cenx2[i],ceny2[i],cenz2[i]); \r\n                scene.add(planes[i-1]);\r\n            }\r\n            \/\/2F\r\n            \/\/plane\u4f5c\u6210\r\n            for(var i=1;i<=4;i++){\r\n                \/\/texture SET\r\n                var textureLoader = new THREE.TextureLoader();\r\n                textures2[i] = textureLoader.load('\/data\/3d.models\/u2_2f_' +i+ '.png');\r\n                textures2[i].anisotropy = renderer.getMaxAnisotropy();\r\n\r\n                \/\/Material Object SET\r\n                if(i==2||i==4){\r\n                    materials2[i] = new THREE.MeshBasicMaterial({ map:textures2[i],transparent: true,\r\n                          opacity : 0.5})\r\n                }else{\r\n                    materials2[i] = new THREE.MeshBasicMaterial({ map:textures2[i],transparent: true,\r\n                          opacity : 1})\r\n                }\r\n                materials2[i].side = THREE.DoubleSide;\r\n      \r\n                \/\/plane SET\r\n                planes2[i-1] =  new THREE.Mesh(\r\n                             new THREE.PlaneGeometry(geox2[i+4], geoy2[i+4]),materials2[i]);\r\n                planes2[i-1].receiveShadow = true;    \r\n                planes2[i-1].position.set(cenx2[i+4],ceny2[i+4],cenz2[i+4]); \r\n                scene.add(planes2[i-1]);\r\n            }\r\n      \r\n             \/\/3F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u2_3f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane3 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox2[9], geoy2[9]),material);\r\n\r\n             plane3.receiveShadow = true;    \r\n             plane3.position.set(cenx2[9],ceny2[9],cenz2[9]); \r\n             scene.add(plane3);\r\n             \/\/4F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u2_4f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane4 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox2[10], geoy2[10]),material);\r\n\r\n             plane4.receiveShadow = true;    \r\n             plane4.position.set(cenx2[10],ceny2[10],cenz2[10]); \r\n             scene.add(plane4);\r\n             \/\/5F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u2_5f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane5 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox2[11], geoy2[11]),material);\r\n\r\n             plane5.receiveShadow = true;    \r\n             plane5.position.set(cenx2[11],ceny2[11],cenz2[11]); \r\n             scene.add(plane5);\r\n        } \r\n  \r\n        \/\/3\u53f7\u6a5f\r\n        if(reactornum==3){\r\n\r\n             \/\/\u5730\u4e0b1F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             texture= textureLoader.load('\/data\/3d.models\/u3_-1f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane11=  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox3[0], geoy3[0]),material);\r\n\r\n             plane11.receiveShadow = true;    \r\n             plane11.position.set(cenx3[0],ceny3[0],cenz3[0]); \r\n             scene.add(plane11);\r\n\r\n\r\n             \/\/1F\r\n            for(var i=1;i<=4;i++){\r\n                \/\/texture SET\r\n                var textureLoader = new THREE.TextureLoader();\r\n                textures[i] = textureLoader.load('\/data\/3d.models\/u3_1f_' +i+ '.png');\r\n                textures[i].anisotropy = renderer.getMaxAnisotropy();\r\n\r\n                \/\/Material Object SET\r\n                if(i==2||i==4){\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 0.5})\r\n                }else{\r\n                    materials[i] = new THREE.MeshBasicMaterial({ map:textures[i],transparent: true,\r\n                          opacity : 1})\r\n                }\r\n                materials[i].side = THREE.DoubleSide;\r\n      \r\n                \/\/plane SET\r\n                planes[i-1] =  new THREE.Mesh(\r\n                             new THREE.PlaneGeometry(geox3[i], geoy3[i]),materials[i]);\r\n                planes[i-1].receiveShadow = true;    \r\n                planes[i-1].position.set(cenx3[i],ceny3[i],cenz3[i]); \r\n                scene.add(planes[i-1]);\r\n            }\r\n            \/\/2F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u3_2f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane2 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox3[5], geoy3[5]),material);\r\n\r\n             plane2.receiveShadow = true;    \r\n             plane2.position.set(cenx3[5],ceny3[5],cenz3[5]); \r\n             scene.add(plane2);\r\n      \r\n             \/\/3F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u3_3f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane3 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox3[6], geoy3[6]),material);\r\n\r\n             plane3.receiveShadow = true;    \r\n             plane3.position.set(cenx3[6],ceny3[6],cenz3[6]); \r\n             scene.add(plane3);\r\n             \/\/4F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u3_4f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane4 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox3[7], geoy3[7]),material);\r\n\r\n             plane4.receiveShadow = true;    \r\n             plane4.position.set(cenx3[7],ceny3[7],cenz3[7]); \r\n             scene.add(plane4);\r\n             \/\/5F\r\n             \/\/texture SET\r\n             var textureLoader = new THREE.TextureLoader();\r\n             var texture = textureLoader.load( '\/data\/3d.models\/u2_5f.png');\r\n             texture.anisotropy = renderer.getMaxAnisotropy();\r\n             \/\/Material Object SET\r\n             var material = new THREE.MeshBasicMaterial({ \r\n                    map:texture,\r\n                    transparent: true,\r\n                    opacity : 1})\r\n             material.side = THREE.DoubleSide;\r\n      \r\n             \/\/plane SET\r\n             plane5 =  new THREE.Mesh(\r\n                       new THREE.PlaneGeometry(geox3[8], geoy3[8]),material);\r\n\r\n             plane5.receiveShadow = true;    \r\n             plane5.position.set(cenx3[8],ceny3[8],cenz3[8]); \r\n             scene.add(plane5);\r\n        }     \r\n\r\n      \r\n    }\r\n\r\n\/\/\u30ab\u30e9\u30fc\u30b9\u30b1\u30fc\u30eb\u30d0\u30fc\u7528\u306escene2\u4f5c\u6210\r\nfunction init2() {\r\n\r\n\tcontainer2 = document.getElementById( 'container2' );\r\n\r\n\t\/\/ SCENE\r\n\tscene2 = new THREE.Scene();\r\n\r\n        \/\/ CAMERA\r\n\tcamera2 = new THREE.PerspectiveCamera( 20, 300 \/ 200, 1, 10000 );\r\n\tcamera2.name = 'camera2';\r\n\tscene2.add( camera2 );\r\n\r\n\t\/\/ LIGHT\r\n\tvar ambientLight2 = new THREE.AmbientLight( 0x444444 );\r\n\tambientLight2.name = 'ambientLight2';\r\n\tscene2.add( ambientLight2 );\r\n\r\n\tcolorMap2 = 'rainbow';\r\n\tnumberOfColors2 = 512;\r\n\r\n\tlegendLayout2 = 'horizontal';\r\n\r\n\t\/\/loadModel2( colorMap2, numberOfColors2, legendLayout2 );\r\n\r\n\tcamera2.position.x = 17 + 4;\r\n\tcamera2.position.y = 9 - 4;\r\n\tcamera2.position.z = 32 - 20;\r\n\r\n\tvar directionalLight2 = new THREE.DirectionalLight( 0xffffff, 0.7 );\r\n\tdirectionalLight2.position.x = 17;\r\n\tdirectionalLight2.position.y = 9;\r\n\tdirectionalLight2.position.z = 30;\r\n\tdirectionalLight2.name = 'directionalLight2';\r\n\tscene2.add( directionalLight2 );\r\n\r\n\trenderer2 = new THREE.WebGLRenderer( { antialias: true } );\r\n\trenderer2.setClearColor( 0xffffff );\r\n\trenderer2.setPixelRatio( window.devicePixelRatio );\r\n\trenderer2.setSize(  300,  200 );\r\n\tcontainer2.appendChild( renderer2.domElement );\r\n}\r\n\/\/\u30af\u30ea\u30c3\u30af\u6642\u306b\u524d\u56de\u8868\u793a\u3057\u305f\u8981\u7d20\u306e\u6d88\u53bb\r\nfunction cleanScene () {\r\n\tvar elementsInTheScene = scene2.children.length;\r\n\tfor ( var i = elementsInTheScene-1; i > 0; i-- ) {\r\n\t\tif ( scene2.children [ i ].name != 'camera2' &&\r\n\t\t\tscene2.children [ i ].name != 'ambientLight' &&\r\n\t\t\tscene2.children [ i ].name != 'directionalLight') {\r\n\t\t\tscene2.remove ( scene2.children [ i ] );\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\/\/--------------------------------------------------------------------------\t\r\n\r\n    \r\n<\/script>\r\n","protected":false},"excerpt":{"rendered":"\u653e\u5c04\u7dda\u91cf\u306e\u5206\u5e03 \u653e\u5c04\u7dda\u91cf","protected":false},"author":1,"featured_media":0,"parent":2535,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-2543","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/pages\/2543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/comments?post=2543"}],"version-history":[{"count":5,"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/pages\/2543\/revisions"}],"predecessor-version":[{"id":2551,"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/pages\/2543\/revisions\/2551"}],"up":[{"embeddable":true,"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/pages\/2535"}],"wp:attachment":[{"href":"https:\/\/fdada.info\/fdada\/wp-json\/wp\/v2\/media?parent=2543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}