高清在线一区二区_激情网在线观看_激情一区二区三区_精品中文一区_亚洲中字幕_亚洲天堂一区

PerInstanceColorAppearance

帶有顏色屬性的GeometryInstance實(shí)例的外觀。這允許使用下面第二個(gè)示例中所示的相同Primitive繪制多個(gè)不同顏色的幾何體實(shí)例。
new PerInstanceColorAppearance(options)
Parameters:
options (Object)
Name Description
options.flat
Boolean
default false
當(dāng)true時(shí),片段著色中使用平面著色,這意味著不考慮照明。
options.faceForward
Boolean
default !options.closed
當(dāng)true時(shí),片段明暗器會(huì)根據(jù)需要翻轉(zhuǎn)曲面法線,以確保法線面向查看器以避免出現(xiàn)黑點(diǎn)。當(dāng)幾何圖形的兩邊都應(yīng)該像WallGeometry那樣加陰影時(shí),這很有用。
options.translucent
Boolean
default true
當(dāng)true時(shí),幾何體將顯示為半透明,因此PerInstanceColorAppearance#renderState啟用了alpha混合。
options.closed
Boolean
default false
當(dāng)true時(shí),幾何圖形將關(guān)閉,因此PerInstanceColorAppearance#renderState啟用背面剔除。
options.vertexShaderSource
String
可選的glsl頂點(diǎn)明暗器源覆蓋默認(rèn)的頂點(diǎ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時(shí),所有PerInstanceColorAppearance實(shí)例都兼容的VertexFormat。這只需要一個(gè)position屬性。

(static, constant) VERTEX_FORMAT : VertexFormat

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

(readonly) closed : Boolean

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

(readonly) faceForward : Boolean

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

(readonly) flat : Boolean

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

(readonly) fragmentShaderSource : String

片段明暗器的glsl源代碼。

material : Material

此屬性是Appearance接口的一部分,但PerInstanceColorAppearance不使用,因?yàn)槭褂昧送耆远x的片段明暗器。
Default Value: undefined

(readonly) renderState : Object

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

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

translucent : Boolean

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

(readonly) vertexFormat : VertexFormat

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

(readonly) vertexShaderSource : String

頂點(diǎn)明暗器的glsl源代碼。

Methods

getFragmentShaderSource() → {String}
程序創(chuàng)建完整的glsl片段明暗器源。對(duì)于PerInstanceColorAppearance,這是從PerInstanceColorAppearance#fragmentShaderSourcePerInstanceColorAppearance#flatPerInstanceColorAppearance#faceForward導(dǎo)出的。
getRenderState() → {Object}
創(chuàng)建渲染狀態(tài)。這不是最終的渲染狀態(tài)實(shí)例;相反,它可以包含與上下文中創(chuàng)建的渲染狀態(tài)相同的渲染狀態(tài)屬性的子集。
isTranslucent() → {Boolean}
確定幾何圖形是否基于PerInstanceColorAppearance#translucent半透明。
主站蜘蛛池模板: 午夜视频在线看 | 久操中文| 香蕉成人在线视频 | 国产亚洲欧美日韩在线观看不卡 | 精品中文视频 | 免费国产自久久久久三四区久久 | 日韩视频在线观看免费视频 | 澳门一级淫片免费视频 | 久久精品日韩 | 激情小说色 | 欧美日韩亚洲国产 | 免费淫视频| 99精品视频免费 | av在线1 | 黄视频在线网站 | 国产精品刺激对白麻豆99 | 久久露脸国语精品国产91 | 99综合视频 | 久久综合精品视频 | 一区二区三区四区五区中文字幕 | 国产精品久久久久久久久久久久午夜 | 成人综合一区二区 | 成人免费淫片 | 粉嫩av一区二区三区四区在线观看 | 小视频在线看 | 青草久久久久 | 欧美一级毛片特黄黄 | 亚洲字幕av| 欧美日本一| 日本羞羞影院 | 国产精品久久久久久久久粉嫩 | 国产91九色在线播放 | 精品久久久久久综合日本 | 久久99精品久久久久久秒播放器 | 欧美日韩免费一区 | 免费国产精品视频 | 欧美一级黄色免费看 | 日韩精品中文字幕一区 | 亚洲性综合网 | 激情在线视频 | 美国黄色小视频 |