PerInstanceColorAppearance

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

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

                (static, constant) VERTEX_FORMAT : VertexFormat

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

                (readonly) closed : Boolean

                true時,幾何圖形將關閉,因此PerInstanceColorAppearance#renderState啟用背面剔除。如果查看器進入幾何圖形,它將不可見。
                Default Value: false

                (readonly) faceForward : Boolean

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

                (readonly) flat : Boolean

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

                (readonly) fragmentShaderSource : String

                片段明暗器的glsl源代碼。

                material : Material

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

                (readonly) renderState : Object

                呈現幾何圖形時要使用的WebGL固定函數狀態。

                在構造PerInstanceColorAppearance實例時,可以顯式定義呈現狀態,也可以通過PerInstanceColorAppearance#translucentPerInstanceColorAppearance#closed隱式設置呈現狀態。

                translucent : Boolean

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

                (readonly) vertexFormat : VertexFormat

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

                (readonly) vertexShaderSource : String

                頂點明暗器的glsl源代碼。

                Methods

                getFragmentShaderSource() → {String}
                getRenderState() → {Object}
                創建渲染狀態。這不是最終的渲染狀態實例;相反,它可以包含與上下文中創建的渲染狀態相同的渲染狀態屬性的子集。
                isTranslucent() → {Boolean}
                確定幾何圖形是否基于PerInstanceColorAppearance#translucent半透明。
                主站蜘蛛池模板: 日韩欧群交p片内射中文| 自拍偷自拍亚洲精品偷一| 少妇愉情理伦片高潮日本| 亚洲国产成人va在线观看网址| 视频二区中文字幕| 国产黄三级高清在线观看播放| 丰满熟女高潮毛茸茸欧洲| 欧美性色欧美A在线图片| 又黄又爽的视频在线观看| 日本三级香港三级人妇99视 | 欧美真实破苞流血在线播放| 国产东北老头老太露脸| 16女下面流水不遮视频| 成人亚洲网站www在线观看| 亚洲av无码不卡久久| 激情黄+色+成+人| 日本成aⅴ人片日本伦| 国产xxxxx在线观看| 2019天堂精品视频在线观看| 性做久久久久久久久| 久热中文字幕在线精品免费 | 老师好紧开裆蕾丝内裤h男男| 国产精品18久久久久久麻辣| www..99557c..com| 日本免费人成在线网站| 亚洲国产电影在线观看| 秋霞电影网一区二区三区| 国产亚洲精品自在久久| 一区二区三区影院| 日韩内射美女片在线观看网站| 亚洲精品乱码久久久久久自慰| 美女巨胸喷奶水视频www免费| 国产成人亚洲欧美激情| 8050午夜二级毛片全黄app| 嫩草伊人久久精品少妇av| 久久久一本精品99久久精品66| 欧洲美女与动性zozozo| 亚洲熟妇无码爱v在线观看| 精品久久8X国产免费观看| 国产亚洲日韩AV在线播放不卡| 亚洲人xxx日本人18|