Basic HIDL

trunk
Alona EM 2022-01-15 22:50:02 +00:00
parent 5a5199f91f
commit 6fcfea664f
1 changed files with 80 additions and 0 deletions

80
hidl/hypercosm.hidl Normal file
View File

@ -0,0 +1,80 @@
namespace hypercosm
interface Object {
version 0 0 0
methods {
list_interfaces() -> []string
release()
}
}
interface Root {
version 0 0 0
methods {
list_extenstions() -> []string
ping()
get_object_by_id(id: uuid) -> object
get_object_by_name(name: string) -> object
}
}
extension asset_delivery {
version 0 0 0
interface {
events {
load_assets(assets: []Asset)
unload_assets(assets: []uuid)
}
methods {
fetchById(id: uuid) -> Asset
fetchByName(name: string) -> Asset
fetchByIds(ids: []uuid) -> []Asset
fetchByNames(names: []string) -> []Asset
getId(name: string) -> uuid
}
}
types {
struct Asset {
id: uuid
name: string
data: []u8
}
}
}
extension world {
version 0 0 0
interface {
events {
add_entitys(entities: []EntityInfo)
update_entitys(entities: []EntityInfo)
remove_entitys(entities: []uuid)
}
}
interface Entity {
methods {
interact()
}
}
types {
struct EntityInfo {
assetId: uuid
entity: Entity
transformation: matrix4x4
flags: EntityFlags
}
enum EntityFlags(vu128) {
None = 0
Interactable = 1
Collidable = 2
}
}
}