projects/angular-cesium/src/lib/angular-cesium/models/ac-entity.ts
Angular Cesium parent entity, all entities should inherit from it.
* entity= new AcEntity({
* id: 0,
* name: 'click me',
* position: Cesium.Cartesian3.fromRadians(0.5, 0.5),
* });
*
Methods |
|
constructor(json?: any)
|
||||||||
Creates entity from a json
Parameters :
|
Static create | ||||||||
create(json?: any)
|
||||||||
Creates entity from a json
Parameters :
Returns :
any
entity as AcEntity |
export class AcEntity {
/**
* Creates entity from a json
* @param json entity object
* @returns entity as AcEntity
*/
static create(json?: any) {
if (json) {
return Object.assign(new AcEntity(), json);
}
return new AcEntity();
}
/**
* Creates entity from a json
* @param json (Optional) entity object
*/
constructor(json?: any) {
Object.assign(this, json);
}
}