allow adding AnimationComponent/morph target animations to arbitrary entities

This commit is contained in:
Nick Fisher
2024-04-26 10:52:34 +08:00
parent f2efb0d7d1
commit 4b348f62eb

View File

@@ -105,16 +105,14 @@ extern "C"
const char *const entityName, const char *const entityName,
float *const weights, float *const weights,
int count); int count);
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights( FLUTTER_PLUGIN_EXPORT bool set_morph_target_weights(
void *sceneManager, void *sceneManager,
EntityId asset, EntityId asset,
const char *const entityName,
const float *const morphData, const float *const morphData,
int numWeights); int numWeights);
FLUTTER_PLUGIN_EXPORT bool set_morph_animation( FLUTTER_PLUGIN_EXPORT bool set_morph_animation(
void *sceneManager, void *sceneManager,
EntityId asset, EntityId asset,
const char *const entityName,
const float *const morphData, const float *const morphData,
const int *const morphIndices, const int *const morphIndices,
int numMorphTargets, int numMorphTargets,
@@ -196,7 +194,7 @@ extern "C"
FLUTTER_PLUGIN_EXPORT void flutter_filament_free(void *ptr); FLUTTER_PLUGIN_EXPORT void flutter_filament_free(void *ptr);
FLUTTER_PLUGIN_EXPORT void add_collision_component(void *const sceneManager, EntityId entityId, void (*callback)(const EntityId entityId1, const EntityId entityId2), bool affectsCollidingTransform); FLUTTER_PLUGIN_EXPORT void add_collision_component(void *const sceneManager, EntityId entityId, void (*callback)(const EntityId entityId1, const EntityId entityId2), bool affectsCollidingTransform);
FLUTTER_PLUGIN_EXPORT void remove_collision_component(void *const sceneManager, EntityId entityId); FLUTTER_PLUGIN_EXPORT void remove_collision_component(void *const sceneManager, EntityId entityId);
FLUTTER_PLUGIN_EXPORT void add_animation_component(void *const sceneManager, EntityId entityId); FLUTTER_PLUGIN_EXPORT bool add_animation_component(void *const sceneManager, EntityId entityId);
FLUTTER_PLUGIN_EXPORT EntityId create_geometry(void *const viewer, float *vertices, int numVertices, uint16_t *indices, int numIndices, int primitiveType, const char *materialPath); FLUTTER_PLUGIN_EXPORT EntityId create_geometry(void *const viewer, float *vertices, int numVertices, uint16_t *indices, int numIndices, int primitiveType, const char *materialPath);
FLUTTER_PLUGIN_EXPORT void set_parent(void *const sceneManager, EntityId child, EntityId parent); FLUTTER_PLUGIN_EXPORT void set_parent(void *const sceneManager, EntityId child, EntityId parent);