久久久久久一区_中文字幕在线不卡_精品不卡_久久久网_精品亚洲一区二区三区在线观看_欧美精品一区二区三区在线四季

PerInstanceColorAppearance

帶有顏色屬性的GeometryInstance實例的外觀。這允許使用下面第二個示例中所示的相同Primitive繪制多個不同顏色的幾何體實例。
new PerInstanceColorAppearance(options)
Parameters:
options (Object)
Name Description
options.flat
Boolean
default false
當(dāng)true時,片段著色中使用平面著色,這意味著不考慮照明。
options.faceForward
Boolean
default !options.closed
當(dāng)true時,片段明暗器會根據(jù)需要翻轉(zhuǎn)曲面法線,以確保法線面向查看器以避免出現(xiàn)黑點。當(dāng)幾何圖形的兩邊都應(yīng)該像WallGeometry那樣加陰影時,這很有用。
options.translucent
Boolean
default true
當(dāng)true時,幾何體將顯示為半透明,因此PerInstanceColorAppearance#renderState啟用了alpha混合。
options.closed
Boolean
default false
當(dāng)true時,幾何圖形將關(guān)閉,因此PerInstanceColorAppearance#renderState啟用背面剔除。
options.vertexShaderSource
String
可選的glsl頂點明暗器源覆蓋默認(rèn)的頂點明暗器。
options.fragmentShaderSource
String
可選的glsl fragment shader source覆蓋默認(rèn)的fragment shader。
options.renderState
RenderState
可選的渲染狀態(tài)以覆蓋默認(rèn)的渲染狀態(tài)。
Example
// A solid white line segment
var primitive = new bmgl.Primitive({
  geometryInstances : new bmgl.GeometryInstance({
    geometry : new bmgl.SimplePolylineGeometry({
      positions : bmgl.Cartesian3.fromDegreesArray([
        0.0, 0.0,
        5.0, 0.0
      ])
    }),
    attributes : {
      color : bmgl.ColorGeometryInstanceAttribute.fromColor(new bmgl.Color(1.0, 1.0, 1.0, 1.0))
    }
  }),
  appearance : new bmgl.PerInstanceColorAppearance({
    flat : true,
    translucent : false
  })
});

// Two rectangles in a primitive, each with a different color
var instance = new bmgl.GeometryInstance({
  geometry : new bmgl.RectangleGeometry({
    rectangle : bmgl.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0)
  }),
  attributes : {
    color : new bmgl.ColorGeometryInstanceAttribute(1.0, 0.0, 0.0, 0.5)
  }
});

var anotherInstance = new bmgl.GeometryInstance({
  geometry : new bmgl.RectangleGeometry({
    rectangle : bmgl.Rectangle.fromDegrees(0.0, 40.0, 10.0, 50.0)
  }),
  attributes : {
    color : new bmgl.ColorGeometryInstanceAttribute(0.0, 0.0, 1.0, 0.5)
  }
});

var rectanglePrimitive = new bmgl.Primitive({
  geometryInstances : [instance, anotherInstance],
  appearance : new bmgl.PerInstanceColorAppearance()
});

Members

(static, constant) FLAT_VERTEX_FORMAT : VertexFormat

當(dāng)PerInstanceColorAppearance#flattrue時,所有PerInstanceColorAppearance實例都兼容的VertexFormat。這只需要一個position屬性。

(static, constant) VERTEX_FORMAT : VertexFormat

所有PerInstanceColorAppearance實例都兼容的VertexFormat。這只需要positionnormal屬性。

(readonly) closed : Boolean

當(dāng)true時,幾何圖形將關(guān)閉,因此PerInstanceColorAppearance#renderState啟用背面剔除。如果查看器進(jìn)入幾何圖形,它將不可見。
Default Value: false

(readonly) faceForward : Boolean

當(dāng)true時,片段明暗器會根據(jù)需要翻轉(zhuǎn)曲面法線,以確保法線面向查看器以避免出現(xiàn)黑點。當(dāng)幾何圖形的兩邊都應(yīng)該像WallGeometry那樣加陰影時,這很有用。
Default Value: true

(readonly) flat : Boolean

當(dāng)true時,片段著色中使用平面著色,這意味著不考慮照明。
Default Value: false

(readonly) fragmentShaderSource : String

片段明暗器的glsl源代碼。

material : Material

此屬性是Appearance接口的一部分,但PerInstanceColorAppearance不使用,因為使用了完全自定義的片段明暗器。
Default Value: undefined

(readonly) renderState : Object

呈現(xiàn)幾何圖形時要使用的WebGL固定函數(shù)狀態(tài)。

在構(gòu)造PerInstanceColorAppearance實例時,可以顯式定義呈現(xiàn)狀態(tài),也可以通過PerInstanceColorAppearance#translucentPerInstanceColorAppearance#closed隱式設(shè)置呈現(xiàn)狀態(tài)。

translucent : Boolean

當(dāng)true時,幾何體將顯示為半透明,因此PerInstanceColorAppearance#renderState啟用了alpha混合。
Default Value: true

(readonly) vertexFormat : VertexFormat

此外觀實例與之兼容的VertexFormat。幾何體可以有更多的頂點屬性,并且仍然是兼容的(以潛在的性能代價),但是它不能有更少的頂點屬性。

(readonly) vertexShaderSource : String

頂點明暗器的glsl源代碼。

Methods

getFragmentShaderSource() → {String}
程序創(chuàng)建完整的glsl片段明暗器源。對于PerInstanceColorAppearance,這是從PerInstanceColorAppearance#fragmentShaderSourcePerInstanceColorAppearance#flatPerInstanceColorAppearance#faceForward導(dǎo)出的。
getRenderState() → {Object}
創(chuàng)建渲染狀態(tài)。這不是最終的渲染狀態(tài)實例;相反,它可以包含與上下文中創(chuàng)建的渲染狀態(tài)相同的渲染狀態(tài)屬性的子集。
isTranslucent() → {Boolean}
確定幾何圖形是否基于PerInstanceColorAppearance#translucent半透明。
主站蜘蛛池模板: 青娱乐青青草 | 日韩中文字幕视频 | 国产精品久久久久久久久久久不卡 | 五月天婷婷激情视频 | 日韩城人免费 | 青草成人免费视频 | 国产精品一区二区在线观看免费 | 午夜精品福利一区二区三区蜜桃 | 一级视频在线免费观看 | 日韩一区二区三区视频 | 91精品国产91久久综合桃花 | 福利二区视频 | 按摩高潮japanesevideo | 91在线中文字幕 | 免费福利小视频 | 久热av中文字幕 | va在线观看 | 久久久久久亚洲 | 欧美精品导航 | 国产成人精品亚洲7777 | 少妇被粗大的猛烈进大胸视频 | 国产精品婷婷久久久久 | 欧美黑人巨大久久久精品一区 | 国产亚洲精品美女久久久久久久久久 | 免费看a | 中文二区 | 男女视频一区二区 | 亚洲国产成人在线 | 国产 日韩 欧美 在线 | 国产成人精品在线 | 91精品麻豆日日躁夜夜躁 | 亚洲高清视频在线观看 | 亚洲第一av | 老黄网站在线观看 | 国产精品视频二区不卡 | 欧美精品一区二区三区四区 | 99热在线免费观看 | 国色天香成人网 | 播放一级毛片 | 免费观看一级特黄欧美大片 | 国产91成人在在线播放 |