@csi-foxbyte/cityjson-to-3d-tiles
Version:
A Node.js library that converts CityJSON files into Cesium 3D Tiles—complete with automatic texture atlas packing, Basis compression, three LOD levels, and customizable threading.
2 lines • 1.38 kB
JavaScript
import {ExtensionProperty,PropertyType,RefSet}from'@gltf-transform/core';const t="EXT_mesh_features";class l extends ExtensionProperty{init(){this.extensionName=t,this.propertyType="InstanceFeatures",this.parentTypes=[PropertyType.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{featureIds:new RefSet})}listFeatureIds(){return this.listRefs("featureIds")}addFeatureId(e){return this.addRef("featureIds",e)}removeFeatureId(e){return this.removeRef("featureIds",e)}}l.EXTENSION_NAME=t;class I extends ExtensionProperty{init(){this.extensionName=t,this.propertyType="FeatureId",this.parentTypes=["InstanceFeatures"];}getDefaults(){return Object.assign(super.getDefaults(),{nullFeatureId:null,label:null,attribute:null,propertyTable:null})}getFeatureCount(){return this.get("featureCount")}setFeatureCount(e){return this.set("featureCount",e)}getNullFeatureId(){return this.get("nullFeatureId")}setNullFeatureId(e){return this.set("nullFeatureId",e)}getLabel(){return this.get("label")}setLabel(e){return this.set("label",e)}getAttribute(){return this.get("attribute")}setAttribute(e){return this.set("attribute",e)}getPropertyTable(){return this.getRef("propertyTable")}setPropertyTable(e){return this.setRef("propertyTable",e)}}export{I as FeatureId,l as InstanceFeatures};//# sourceMappingURL=InstanceFeatures.js.map
//# sourceMappingURL=InstanceFeatures.js.map