merge in changes from web/js branch by hand (bone animation updates)

This commit is contained in:
Nick Fisher
2024-02-02 17:16:25 +08:00
parent d2fc342bea
commit 17e4014b3e
9 changed files with 500 additions and 150 deletions

View File

@@ -83,7 +83,9 @@ namespace polyvox
const char *const boneName,
const char **const meshName,
int numMeshTargets,
float frameLengthInMs);
float frameLengthInMs,
bool isModelSpace);
void resetBones(EntityId entityId);
void playAnimation(EntityId e, int index, bool loop, bool reverse, bool replaceActive, float crossfade = 0.3f);
void stopAnimation(EntityId e, int index);
void setMorphTargetWeights(const char *const entityName, float *weights, int count);
@@ -95,6 +97,8 @@ namespace polyvox
utils::Entity findChildEntityByName(
EntityId entityId,
const char *entityName);
int getEntityCount(EntityId entity, bool renderableOnly);
const char* getEntityNameAt(EntityId entity, int index, bool renderableOnly);
private:
AssetLoader *_assetLoader = nullptr;
@@ -117,11 +121,5 @@ namespace polyvox
inline void updateTransform(SceneAsset &asset);
void updateBoneTransformFromAnimationBuffer(
const BoneAnimation& animation,
int frameNumber,
FilamentAsset *asset
);
};
}