bcgis-type
Version:
The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.
130 lines (129 loc) • 3.03 kB
TypeScript
import Overlay from "../Overlay";
import { T_Position } from "../../common/type";
import Position from "../../position/Position";
import { ModelSection } from "../../analysis/ModelSection";
/**
* tiles模型
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let tileset = new BC.Tileset('tileset.json')
* tileset.setPosition(position)
* ```
*/
declare class Tileset extends Overlay {
private _tileVisibleCallback;
private _properties;
private _fragmentShader;
private _replaceFS;
modelSection: ModelSection;
/**
*
* @param url 地址
* @param options 参数
*/
constructor(url: string, options?: {});
get type(): any;
get readyPromise(): any;
/**
*
* @private
*/
_bindVisibleEvent(): void;
/**
* Updates tile
* @param tile
* @private
*/
_updateTile(tile: any): void;
/**
* Sets position
* @param position
*/
setPosition(position: T_Position): this;
addClippingPlane(position: Position): void;
/**
*
* @param heading
* @param pitch
* @param roll
*/
setHeadingPitchRoll(heading: number, pitch: number, roll: number): this;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* Clamps To Ground
*/
clampToGround(): this;
/**
* Sets height
* @param height
* @param isAbsolute
*/
setHeight(height: number, isAbsolute?: boolean): this;
/**
* Sets scale
* @param scale
*/
setScale(scale: number): this;
/**
* Sets feature property
* @param properties
*/
setProperties(properties: any): this;
/**
* Sets feature FS
* @param fragmentShader
*/
setCustomShader(fragmentShader: any): this;
/**
*
* @param fragmentShader
* @return {Tileset}
*/
replaceFS(fragmentShader: any): this;
/**
*
* @param fragmentShader
*/
appendFS(fragmentShader: any): this;
/**
*
* @param splitDirection
*/
setSplitDirection(splitDirection: any): this;
/**
* 设置风格
* @param style
* @example
* ```js
* let style = new BC.TilesetStyle({
* color: {
* conditions: [
* ['${Height} >= 100', 'color("purple", 0.5)'], //Height 为模型设置的属性
* ['${Height} >= 50', 'color("red")'],
* ['true', 'color("blue")'],
* ],
* },
* show: '${Height} > 0',
* })
* ```
*/
setStyle(style: any): this;
/**
* 压平面集合
*/
get flattenPolygons(): any;
setFlatten(flattens: any): void;
/**
* 压平是否挖坑
* @param discard 是否挖坑
*/
setFlattenDiscard(discard: boolean): void;
}
export default Tileset;