国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

three.js中幾何對(duì)象

sshe / 3190人閱讀

摘要:和幾何對(duì)象是用必要的數(shù)據(jù)點(diǎn)頂點(diǎn)面等來描述三維模型。在擠壓樣條的深度上細(xì)分區(qū)段的點(diǎn)數(shù)個(gè)數(shù)。一個(gè)三維的樣條路徑,在這個(gè)過程中,形狀應(yīng)該被擠壓出來如果沒有定義幀,就會(huì)創(chuàng)建幀。提供發(fā)生器功能的對(duì)象這個(gè)物體將二維形狀擠壓到三維幾何圖形中。

CircleGeometry 、 CubeGeometry、CylinderGeometry 和 ExtrudeGeometry

幾何對(duì)象是用必要的數(shù)據(jù)(點(diǎn)、頂點(diǎn)、面等)來描述三維模型。我們將創(chuàng)建平面的圓、立方體和圓柱體。Extrude Geometry是用來制作從路徑凸出的形狀。我們要做個(gè)凸出的三角形:

cube.castShadow = cube.receiveShadow = true;
this.scene.add(cube);

// 添加不規(guī)則的物體
var extrudeSettings = {
    amount: 10,
    steps: 10,
    bevelSegments: 10,
    bevelSize: 10,
    bevelThickness: 10
};
var triangleShape = new THREE.Shape();
triangleShape.moveTo(  0, -50 );
triangleShape.lineTo(  -50, 50 );
triangleShape.lineTo( 50, 50 );
triangleShape.lineTo(  0, -50 );

var extrude = new THREE.Mesh(new THREE.ExtrudeGeometry(triangleShape, extrudeSettings), new THREE.MeshLambertMaterial({ color: this.getRandColor() }));
extrude.rotation.y = Math.PI / 2;
extrude.position.x = -300;
extrude.position.y = 150;
extrude.position.z = 300;
extrude.castShadow = extrude.receiveShadow = true;
this.scene.add(extrude);

ExtrudeBufferGeometry

Constructor

ExtrudeBufferGeometry(shapes, options)

shapes — Shape or an array of shapes.
options — Object that can contain the following parameters.可以包含以下參數(shù)的對(duì)象。

curveSegments — int. Number of points on the curves. Default is 12.曲線上的點(diǎn)數(shù)。默認(rèn)是12。

steps — int. Number of points used for subdividing segments along the depth of the extruded spline. Default is 1.在擠壓樣條的深度上細(xì)分區(qū)段的點(diǎn)數(shù)個(gè)數(shù)。默認(rèn)值為1。

amount — int. Depth to extrude the shape. Default is 100.深度擠壓成形。默認(rèn)是100。

bevelEnabled — bool. Apply beveling to the shape. Default is true.將斜面涂在形狀上。默認(rèn)是正確的。

bevelThickness — float. How deep into the original shape the bevel goes. Default is 6.斜角的形狀有多深。默認(rèn)是6。

bevelSize — float. Distance from the shape outline that the bevel extends. Default is bevelThickness - 2.斜面延伸的形狀輪廓的距離。默認(rèn)是斜面- 2。

bevelSegments — int. Number of bevel layers. Default is 3.斜層。默認(rèn)是3。

extrudePath — THREE.CurvePath. A 3D spline path along which the shape should be extruded (creates Frames if frames aren"t defined).一個(gè)三維的樣條路徑,在這個(gè)過程中,形狀應(yīng)該被擠壓出來(如果沒有定義幀,就會(huì)創(chuàng)建幀)。

frames — An object containing arrays of tangents, normals, binormals for each step along the extrudePath.一種包含有切線、法線、雙氣門的對(duì)象,用于每一步的擠壓。

UVGenerator — Object. object that provides UV generator functions提供UV發(fā)生器功能的對(duì)象

This object extrudes a 2D shape to a 3D geometry.這個(gè)物體將二維形狀擠壓到三維幾何圖形中。
When creating a Mesh with this geometry, if you"d like to have a separate material used for its face and its extruded sides, you can use an array of materials. The first material will be applied to the face; the second material will be applied to the sides.如果你想要一個(gè)多帶帶的材料用于它的面和它的擠壓面,你可以使用一系列材料。第一種材料將應(yīng)用于面部;第二種材料將被應(yīng)用到兩邊。

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://m.specialneedsforspecialkids.com/yun/90610.html

相關(guān)文章

  • WebGL three.js學(xué)習(xí)筆記 自定義頂點(diǎn)建立幾何

    摘要:自定義頂點(diǎn)建立幾何體與克隆本身已經(jīng)有很多的網(wǎng)格模型,基本已經(jīng)夠我們的使用,但是如果我們還是想自己根據(jù)頂點(diǎn)坐標(biāo)來建立幾何模型的話,也是可以的。并且不僅要更新頂點(diǎn),還要更新線條的連接方式,否則是沒有效果的。 自定義頂點(diǎn)建立幾何體與克隆 Three.js本身已經(jīng)有很多的網(wǎng)格模型,基本已經(jīng)夠我們的使用,但是如果我們還是想自己根據(jù)頂點(diǎn)坐標(biāo)來建立幾何模型的話,Three.js也是可以的。 基本效果...

    joyvw 評(píng)論0 收藏0
  • three.js 實(shí)現(xiàn)立體幾何的文本標(biāo)簽

    摘要:最近在做一個(gè)基于實(shí)現(xiàn)立體幾何的項(xiàng)目,碰到一個(gè)問題,如何給球體加上文字標(biāo)簽,探索了幾種實(shí)現(xiàn)方法。 最近在做一個(gè)基于three.js實(shí)現(xiàn)立體幾何的項(xiàng)目,碰到一個(gè)問題,如何給球體加上文字標(biāo)簽,探索了幾種實(shí)現(xiàn)方法。 二維文字標(biāo)簽 1.通過CSS2DObject創(chuàng)建二維對(duì)象 var earthDiv = document.createElement( div ); earthDiv.class...

    Hancock_Xu 評(píng)論0 收藏0
  • 看完這篇,你也可以實(shí)現(xiàn)一個(gè)360度全景插件

    摘要:兩種相機(jī)的區(qū)別目前提供了幾種不同的相機(jī),最常用的,也是下面插件中使用的兩種相機(jī)是透視相機(jī)正交投影相機(jī)。上面的圖很清楚的解釋了兩種相機(jī)的區(qū)別右側(cè)是正交投影相機(jī)他不具有透視效果,即物體的大小不受遠(yuǎn)近距離的影響,對(duì)應(yīng)的是投影中的正交投影。導(dǎo)讀 本文從繪圖基礎(chǔ)開始講起,詳細(xì)介紹了如何使用Three.js開發(fā)一個(gè)功能齊全的全景插件。 我們先來看一下插件的效果: showImg(https://user...

    Michael_Lin 評(píng)論0 收藏0
  • 看完這篇,你也可以實(shí)現(xiàn)一個(gè)360度全景插件

    摘要:導(dǎo)讀本文從繪圖基礎(chǔ)開始講起,詳細(xì)介紹了如何使用開發(fā)一個(gè)功能齊全的全景插件。兩種相機(jī)的區(qū)別目前提供了幾種不同的相機(jī),最常用的,也是下面插件中使用的兩種相機(jī)是透視相機(jī)正交投影相機(jī)。 導(dǎo)讀 本文從繪圖基礎(chǔ)開始講起,詳細(xì)介紹了如何使用Three.js開發(fā)一個(gè)功能齊全的全景插件。 我們先來看一下插件的效果: showImg(https://segmentfault.com/img/remote/...

    XiNGRZ 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<