Module world_v2

Module world_v2 

Source

Structs§

AudioClipInfo
Struct for providing information about an audio clip.
GltfFlags
MaterialDesc
MeshGltf
MeshGltfNamed
MeshGltfResource
MeshProperties
Mesh properties
MeshRawDeprecated
MeshRawBits
bytemuck-generated type for internal purposes only.
MeshRawWithMaterialDeprecated
MeshRawWithMaterialAndName
MeshRawWithMaterialAndNameBits
bytemuck-generated type for internal purposes only.
MeshRawWithMaterialBits
bytemuck-generated type for internal purposes only.
MeshRawWithName
MeshRawWithNameBits
bytemuck-generated type for internal purposes only.
MeshSimplified
MeshSimplifiedFlags
MeshStreamLayout
MeshStreamLayoutBits
bytemuck-generated type for internal purposes only.
MeshStyleFlags
MeshVisibilityFlags
Message
MessageRangeAndReceiver
PlayerIdSet
PlayerIdSetFlags
RawAudioModuleData
RawRenderModuleData
Ray
Ray, a line through space with a starting point and a direction.
SdfSkinInfo
Value

Enums§

ComponentType
CreateDataType
Type used to describe a data object created using either world__create_data or by the host.
EntityTemplate
MeshComponentFormat
Mesh component format for a stream
MeshPrimitiveTopology
Mesh primitive topology
MeshStreamSemantic
Mesh semantic to describe what a stream contains
RetrieveDataType
Type describing what data to retrieve with world__retrieve_data
WorldDataType

Constants§

INVALID_RESOURCE_HANDLE

Statics§

API
FFI API

Functions§

add_component
Add a component and reset it to default values if it already exists.
clone_entities
Clones ‘entity_src’ from memory location to ‘entity_dst’, ‘entity_src’ and ‘entity_dst’ length should match unless ‘entity_src’ length is a divisor of ‘entity_dst’ length where the src entities are duplicated entity_dst_len / entity_src_len times.
copy_component
create_data
Create a data blob from this input data.
create_entity
create_mesh_from_streamsDeprecated
create_named_mesh_from_streamsDeprecated
destroy_data
Releases the ref count of a data object and destroys it if ref count reaches 0.
destroy_entity
destroy_meshDeprecated
get_components
Returns the component types associated with a specific entity.
get_entity_value_checked
get_mesh_material_count
get_mesh_material_desc
get_mesh_material_name
TODO: Replace in future version that returns String parameter directly
get_mesh_morph_target_count
get_mesh_morph_target_name
Get the name of a morph target. The name parameter should have a size of at least get_mesh_morph_target_name_len(handle, idx) TODO: Replace in future version that returns String parameter directly
get_mesh_morph_target_name_len
TODO: Replace in future version that returns String parameter directly
get_mesh_properties
get_message_counts
message_struct_size is the size of the module struct to sanity check size and have a fallback for older modules if possible. entities is a list of entities for which to count messages. out_counts should be the same size as entities and will after this call contain the amount of messages in the outbox of each entity. out_total will contain the sum of all out_counts which is the number of messages you need to allocate space for if calling retrieve_messages with the same list of entities.
has_component
has_messageDeprecated
Returns > 0 if there’s a message to be read
is_valid_data
Asks the host if the data referenced by data is valid.
is_valid_entity
is_valid_mesh
pop_messageDeprecated
push_messageDeprecated
ray_cast
remove_component
retain_data
Increases the ref count of a data object.
retrieve_data
A max_len of 0 should still give you out_len in that argument so that you can use this to allocate data and call it again with the right amount.
retrieve_messages
message_struct_size is the size of the module struct to sanity check size and have entities is a list of entities for which to retrieve messages. out_msgs will contain the messages of the outbox of each entity in entities after a call to this function. Use get_message_counts to retrieve the total number of msgs to allocate the right amount of space.
send_messages
message_struct_size is the size of the module struct to sanity check size and have a fallback for older modules if possible. range_and_receiever contains a destination entity and a range of messages to be grabbed from messagesand put into the inbox of the destination entity. messages is a slice of messages range_and_receiver points into.
set_entity_value_checked
set_mesh_offset
world__add_component
Add a component and reset it to default values if it already exists.
world__clone_entities
Clones ‘entity_src’ from memory location to ‘entity_dst’, ‘entity_src’ and ‘entity_dst’ length should match unless ‘entity_src’ length is a divisor of ‘entity_dst’ length where the src entities are duplicated entity_dst_len / entity_src_len times.
world__copy_component
world__create_data
Create a data blob from this input data.
world__create_entity
world__create_mesh_from_streamsDeprecated
world__create_named_mesh_from_streamsDeprecated
world__destroy_data
Releases the ref count of a data object and destroys it if ref count reaches 0.
world__destroy_entity
world__destroy_meshDeprecated
world__get_components
Returns the component types associated with a specific entity.
world__get_entity_value_checked
world__get_mesh_material_count
world__get_mesh_material_desc
world__get_mesh_material_name
TODO: Replace in future version that returns String parameter directly
world__get_mesh_morph_target_count
world__get_mesh_morph_target_name
Get the name of a morph target. The name parameter should have a size of at least get_mesh_morph_target_name_len(handle, idx) TODO: Replace in future version that returns String parameter directly
world__get_mesh_morph_target_name_len
TODO: Replace in future version that returns String parameter directly
world__get_mesh_properties
world__get_message_counts
message_struct_size is the size of the module struct to sanity check size and have a fallback for older modules if possible. entities is a list of entities for which to count messages. out_counts should be the same size as entities and will after this call contain the amount of messages in the outbox of each entity. out_total will contain the sum of all out_counts which is the number of messages you need to allocate space for if calling retrieve_messages with the same list of entities.
world__has_component
world__has_messageDeprecated
Returns > 0 if there’s a message to be read
world__is_valid_data
Asks the host if the data referenced by data is valid.
world__is_valid_entity
world__is_valid_mesh
world__pop_messageDeprecated
world__push_messageDeprecated
world__ray_cast
world__remove_component
world__retain_data
Increases the ref count of a data object.
world__retrieve_data
A max_len of 0 should still give you out_len in that argument so that you can use this to allocate data and call it again with the right amount.
world__retrieve_messages
message_struct_size is the size of the module struct to sanity check size and have entities is a list of entities for which to retrieve messages. out_msgs will contain the messages of the outbox of each entity in entities after a call to this function. Use get_message_counts to retrieve the total number of msgs to allocate the right amount of space.
world__send_messages
message_struct_size is the size of the module struct to sanity check size and have a fallback for older modules if possible. range_and_receiever contains a destination entity and a range of messages to be grabbed from messagesand put into the inbox of the destination entity. messages is a slice of messages range_and_receiver points into.
world__set_entity_value_checked
world__set_mesh_offset

Type Aliases§

DataHandle
EntityHandle
MeshHandle
ResourceHandleRepr
A raw handle to a unique resource