Skip to content

Instantly share code, notes, and snippets.

@daeken
Last active January 10, 2022 07:14
Show Gist options
  • Save daeken/3266f1463447881346f9e58a5e9f7b88 to your computer and use it in GitHub Desktop.
Save daeken/3266f1463447881346f9e58a5e9f7b88 to your computer and use it in GitHub Desktop.
---
- interface:
name: hypercosm.object.v1.0.0
methods:
- listInterfaces:
- array[string]
- release
- interface:
name: hypercosm.root.v0.1.0
methods:
- listExtensions:
- array[string]
- ping
- getObject:
- object
- uuid: id
- getObject:
- object
- string: name
- extension:
- name: hypercosm.assetdelivery.v0.1.0
- interface: # Implicit name; matches extension and visible from root object
events: # Events can come after methods in the YAML but always first for command numbering
- loadAssets:
- void
- array[asset]: asset
- unloadAssets:
- void
- array[uuid]: ids
methods:
- fetchAsset:
- asset
- uuid: id
- fetchAsset:
- asset
- string: name
- fetchAssets:
- array[asset]
- array[uuid]: ids
- fetchAssets:
- array[asset]
- array[string]: names
- getId:
- uuid
- string: name
- struct:
- name: asset # First element of a struct is always the name
- uuid: id
- string: name
- array[u8]: data
- extension:
- name: hypercosm.world.v0.1.0
- interface:
events:
- addEntities:
- void
- array[entityInfo]: entities
- updateEntities:
- void
- array[entityInfo]: entities
- removeEntities:
- void
- array[entity]: entities
- struct:
- name: entityInfo
- uuid: assetId # glTF
- matrix4x4: transformation
- entityFlags: flags
- interface:
name: entity
methods:
- interact
- flags:
- name: entityFlags
- type: vu128
- None: 0
- Interactable
- Collidable
- enum: # Alternate form
- name: entityFlags
- type: vu128
- None: 0
- Interactable: 1
- Collidable: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment