three.js 源碼注釋(二十四)Core/Face4.js

來源:互聯網
上載者:User

three.js 源碼注釋(二十四)Core/Face4.js

 

轉載請保留此句:商域無疆 - 本部落格專註於 敏捷開發及移動和物聯裝置研究:資料視覺效果、GOLANG、Html5、WEBGL、THREE.JS,否則,出自本部落格的文章拒絕轉載或再轉載,謝謝合作。


俺也是剛開始學,好多地兒肯定不對還請見諒.

以下代碼是THREE.JS 源碼檔案中Core/Face4.js檔案的注釋.

更多更新在 : https://github.com/omni360/three.js.sourcecode


/** * @author mrdoob / http://mrdoob.com/ *//*///Face3對象的建構函式.用來在四維空間內通過參數a,b,c,d, normal, color, materialIndex建立一個四角面對象.Face4對象的功能函數採用///定義構造的函數原型對象來實現.////// NOTE:Face4方法已經刪除,使用Face3替代,這裡保留為了向下相容.//////用法: var a=0,b=1,c=2,d=3;var normal = new THREE.Vector3( 0, 1, 0 ); var color = new THREE.Color( 0xffaa00 ); var face = new THREE.Face3( a, b, c,d, normal, color, 0 );///建立一個a,b,c,d四點組成的顏色0xffaa00,法線指向normal,材質索引為0的四角面對象.//////用法: var a=0,b=1,c=2,d=3;  var normal1 = new THREE.Vector3( 0, 1, 0 ), normal2 = new THREE.Vector3( 0, 1, 0 ), normal3 = new THREE.Vector3( 0, 1, 0 );  normal = new Array(normal1,normal2,normal3);  var color1 = new THREE.Color( 0xffaa00 ), color2 = new THREE.Color( 0x00aaff ), color3 = new THREE.Color( 0x00ffaa );  var color = new Array(color1,color2,color3);  var face = new THREE.Face3( a, b, c, d, normal, color, 0 );///建立一個顏色為0xffaa00,0x00aaff,0x00ffaa的a,b,c四點組成的,法線指向normal,材質索引為0的四角面對象.*////Face4///四角面角點a的索引///四角面角點b的索引///四角面角點c的索引///四角面角點d的索引///四角面法線向量,或頂點法線向量數組///四角面顏色值,或頂點顏色值數組///材質索引THREE.Face4 = function ( a, b, c, d, normal, color, materialIndex ) {//提示使用者,Face4方法已經刪除,使用Face3替代,這裡保留為了向下相容console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' )return new THREE.Face3( a, b, c, normal, color, materialIndex );//調用Face3方法,忽略點d,返回建立的三角面.};


商域無疆 (http://blog.csdn.net/omni360/)

本文遵循“署名-非商業用途-保持一致”創作公用協議

轉載請保留此句:商域無疆 - 本部落格專註於 敏捷開發及移動和物聯裝置研究:資料視覺效果、GOLANG、Html5、WEBGL、THREE.JS,否則,出自本部落格的文章拒絕轉載或再轉載,謝謝合作。


以下代碼是THREE.JS 源碼檔案中Core/Face4.js檔案的注釋.

更多更新在 : https://github.com/omni360/three.js.sourcecode

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.