久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='STEBq'><tr id='STEBq'><dt id='STEBq'><q id='STEBq'><span id='STEBq'><b id='STEBq'><form id='STEBq'><ins id='STEBq'></ins><ul id='STEBq'></ul><sub id='STEBq'></sub></form><legend id='STEBq'></legend><bdo id='STEBq'><pre id='STEBq'><center id='STEBq'></center></pre></bdo></b><th id='STEBq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='STEBq'><tfoot id='STEBq'></tfoot><dl id='STEBq'><fieldset id='STEBq'></fieldset></dl></div>

      <bdo id='STEBq'></bdo><ul id='STEBq'></ul>

    <small id='STEBq'></small><noframes id='STEBq'>

  • <legend id='STEBq'><style id='STEBq'><dir id='STEBq'><q id='STEBq'></q></dir></style></legend>

    <tfoot id='STEBq'></tfoot>

        三個 JS 從 matrixWorld 獲取(世界)旋轉

        THREE JS get (world) rotation from matrixWorld(三個 JS 從 matrixWorld 獲取(世界)旋轉)

      1. <i id='jNgq2'><tr id='jNgq2'><dt id='jNgq2'><q id='jNgq2'><span id='jNgq2'><b id='jNgq2'><form id='jNgq2'><ins id='jNgq2'></ins><ul id='jNgq2'></ul><sub id='jNgq2'></sub></form><legend id='jNgq2'></legend><bdo id='jNgq2'><pre id='jNgq2'><center id='jNgq2'></center></pre></bdo></b><th id='jNgq2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jNgq2'><tfoot id='jNgq2'></tfoot><dl id='jNgq2'><fieldset id='jNgq2'></fieldset></dl></div>

            <small id='jNgq2'></small><noframes id='jNgq2'>

                <tbody id='jNgq2'></tbody>
            1. <tfoot id='jNgq2'></tfoot>
            2. <legend id='jNgq2'><style id='jNgq2'><dir id='jNgq2'><q id='jNgq2'></q></dir></style></legend>
              • <bdo id='jNgq2'></bdo><ul id='jNgq2'></ul>
                  本文介紹了三個 JS 從 matrixWorld 獲取(世界)旋轉的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何在 three.js 中獲得 Object3D 的世界旋轉?我知道如何從 object.matrixWorld 獲取 Object3D 的世界位置,但是如何獲取對象的世界旋轉?

                  How do I get the world rotation of an Object3D in three.js? I know how to get the world position of an Object3D from object.matrixWorld, but how do I get the world rotation of an object?

                  我需要這個來解決以下問題:我有一個像這樣的分層對象結構:

                  I need this for the following problem: I have a hierarchical Object structure like this:

                  var obj1 = new THREE.Object3D();
                  obj1.x = 200;
                  obj1.rotation.x = 0.1;
                  scene.add(obj1);
                  
                  var obj2 = new THREE.Object3D();
                  obj2.y = -400;
                  obj2.rotation.y = 0.21;
                  obj1.add(obj2);
                  
                  var obj3 = new THREE.Object3D();
                  obj3.z = -200;
                  obj3.rotation.x = 0.1;
                  obj3.rotation.y = -0.1;
                  obj2.add(obj3);
                  

                  現(xiàn)在我想讓我的相機在一定距離內正交地看 obj3.當我的對象不旋轉時,它的工作原理如下:

                  Now I want to make my camera look at obj3 orthogonally in a certain distance. When My Objects are not rotated, this works like this:

                  var relativeCameraOffset = new THREE.Vector3(0, 0, 500); // 500 is z-distance from my object
                  var cameraOffset = relativeCameraOffset.applyMatrix4(obj3.matrixWorld);
                  camera.position = cameraOffset;
                  

                  當只有我的最后一個孩子被旋轉時,當我添加這一行時,我得到了我想要的

                  When only my last child is rotated I get what I want when I add this line

                  camera.rotation = obj3.rotation;
                  

                  但是當所有父元素都旋轉時,這不起作用.所以我正在尋找一種方法來獲得我的 3D 對象的世界方向".謝謝.

                  But when all parent Elements are rotated this is not working. So I'm looking for a way to get the world "orientation" of my 3D object. Thanks.

                  推薦答案

                  獲取世界"旋轉的一種方法如下:

                  One way to get the "world" rotation is as follows:

                  var position = new THREE.Vector3();
                  var quaternion = new THREE.Quaternion();
                  var scale = new THREE.Vector3();
                  
                  mesh.matrixWorld.decompose( position, quaternion, scale );
                  

                  然后您可以像這樣設置相機方向:

                  You can then set your camera orientation like so:

                  camera.quaternion.copy( quaternion );
                  

                  重要提示:如果您要直接訪問 matrixWorld,您必須確保它已更新.渲染器通常在渲染循環(huán)中為您執(zhí)行此操作.但是,如果您在渲染調用之間,并且需要強制更新矩陣,則可以使用

                  Important: if you are going to access matrixWorld directly, you have to make sure it is updated. The renderer typically does this for you in the render loop. If, however, you are between render calls, and need to force an update of the matrix, you can do so with

                  mesh.updateMatrixWorld( true );
                  

                  現(xiàn)在有一種新方法可用.檢查源代碼,看看它在做什么.

                  There is a new method that is now available. Check the source code so you see what it is doing.

                  Object3D.getWorldQuaternion( optionalTarget );
                  

                  three.js r.69

                  three.js r.69

                  這篇關于三個 JS 從 matrixWorld 獲取(世界)旋轉的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發(fā)技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                    <tfoot id='3usTc'></tfoot>

                        <legend id='3usTc'><style id='3usTc'><dir id='3usTc'><q id='3usTc'></q></dir></style></legend>

                        • <bdo id='3usTc'></bdo><ul id='3usTc'></ul>

                        • <small id='3usTc'></small><noframes id='3usTc'>

                              <tbody id='3usTc'></tbody>
                            <i id='3usTc'><tr id='3usTc'><dt id='3usTc'><q id='3usTc'><span id='3usTc'><b id='3usTc'><form id='3usTc'><ins id='3usTc'></ins><ul id='3usTc'></ul><sub id='3usTc'></sub></form><legend id='3usTc'></legend><bdo id='3usTc'><pre id='3usTc'><center id='3usTc'></center></pre></bdo></b><th id='3usTc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3usTc'><tfoot id='3usTc'></tfoot><dl id='3usTc'><fieldset id='3usTc'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 国产成人精品一区二 | 日韩精品视频在线观看一区二区三区 | 日韩欧美三级 | 成人精品影院 | 91九色在线观看 | 欧美视频精品 | 91福利在线观看视频 | 欧美一卡二卡在线观看 | 超碰最新在线 | 日韩免费高清视频 | 久久久久国产精品 | 精品国产乱码久久久久久影片 | 91.com在线观看 | 欧美白人做受xxxx视频 | 在线一区二区三区 | 日韩av在线不卡 | 日韩精品久久 | 91久久久久久久久久久 | 国产精品日日夜夜 | 在线观看国产wwwa级羞羞视频 | 看片国产 | 国产黄色大片网站 | 亚洲国产精品suv | 99在线精品视频 | 久久亚洲一区 | 综合色站导航 | www精品美女久久久tv | 欧美精品一区二区三区在线 | 福利视频一区二区 | 91精品国产综合久久精品 | 久久精品久久精品久久精品 | 国产毛片久久久久久久久春天 | 女朋友的闺蜜3韩国三级 | 久久av在线播放 | 最新日韩av | 中文字幕视频在线 | 黄在线免费观看 | 久久久网| 国产精品成人一区二区 | 九色国产 | 欧美日韩国产不卡 |