Appearance
@bendyline/molen-entities
Molen entity library: ids and helpers for the molen.entities content pack (trees, rocks, aircraft, vehicles).
ts
import { /* … */ } from '@bendyline/molen-entities';Type Aliases
MolenAircraftEntityId
ts
type MolenAircraftEntityId = typeof MOLEN_AIRCRAFT_ENTITY_IDS[number];MolenEntityId
ts
type MolenEntityId = typeof MOLEN_ENTITY_IDS[number];MolenTransitEntityId
ts
type MolenTransitEntityId = typeof MOLEN_TRANSIT_ENTITY_IDS[number];MolenVehicleEntityId
ts
type MolenVehicleEntityId = typeof MOLEN_VEHICLE_ENTITY_IDS[number];Variables
MOLEN_AIRCRAFT_ENTITY_IDS
ts
const MOLEN_AIRCRAFT_ENTITY_IDS: readonly ["molen.entities.aircraft.p51d", "molen.entities.aircraft.oh6"];MOLEN_AMBIENT_AIRCRAFT_ENTITY_IDS
ts
const MOLEN_AMBIENT_AIRCRAFT_ENTITY_IDS: readonly ["molen.entities.aircraft.airliner"];Ambient-traffic aircraft: seen from the ground, not flyable (no aircraft component).
MOLEN_ENTITY_IDS
ts
const MOLEN_ENTITY_IDS: readonly ["molen.entities.tree.conifer.pine", "molen.entities.tree.conifer.fir", "molen.entities.tree.deciduous.oak", "molen.entities.tree.deciduous.birch", "molen.entities.vegetation.shrub", "molen.entities.nature.boulder", "molen.entities.aircraft.p51d", "molen.entities.aircraft.oh6", "molen.entities.aircraft.airliner", "molen.entities.vehicle.compact", "molen.entities.vehicle.sedan", "molen.entities.vehicle.suv", "molen.entities.vehicle.pickup", "molen.entities.vehicle.van", "molen.entities.transit.bus", "molen.entities.transit.lightrail"];Stable asset/type ids of the molen.entities content pack.
MOLEN_TRANSIT_ENTITY_IDS
ts
const MOLEN_TRANSIT_ENTITY_IDS: readonly ["molen.entities.transit.bus", "molen.entities.transit.lightrail"];Buses and rail cars for ambient traffic (ambientRole, no vehicle component).
MOLEN_VEHICLE_ENTITY_IDS
ts
const MOLEN_VEHICLE_ENTITY_IDS: readonly ["molen.entities.vehicle.compact", "molen.entities.vehicle.sedan", "molen.entities.vehicle.suv", "molen.entities.vehicle.pickup", "molen.entities.vehicle.van"];Functions
createMolenEntitiesAssetIndex()
ts
function createMolenEntitiesAssetIndex(baseUrl): Record<MolenEntityId, string>;Build the molen client assets.index mapping for this library from a directory holding the molen.entities content pack's files (molen pack extract), served as static files. This package ships no models; with the pack itself, use its asset provider instead.
Parameters
baseUrl
string | URL
Returns
Record<MolenEntityId, string>
molenAircraft()
ts
function molenAircraft(types, id): AircraftData;Resolved aircraft data for one of the pack's aircraft, from a type library holding it.
Parameters
types
TypeLibrary
id
"molen.entities.aircraft.p51d" | "molen.entities.aircraft.oh6"
Returns
AircraftData
molenVehicle()
ts
function molenVehicle(types, id): VehicleData;Resolved vehicle data for one of the pack's vehicles, from a type library holding it.
Parameters
types
TypeLibrary
id
| "molen.entities.vehicle.compact" | "molen.entities.vehicle.sedan" | "molen.entities.vehicle.suv" | "molen.entities.vehicle.pickup" | "molen.entities.vehicle.van"
Returns
VehicleData