package name change

This commit is contained in:
Nick Fisher
2021-11-06 12:38:56 +08:00
parent 4a87ccd143
commit 51ba4b2377
29 changed files with 252 additions and 57 deletions

View File

@@ -1,9 +1,9 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint mimetic_filament.podspec` to validate before publishing.
# Run `pod lib lint holovox_filament.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'mimetic_filament'
s.name = 'holovox_filament'
s.version = '0.0.1'
s.summary = 'A new flutter plugin project.'
s.description = <<-DESC
@@ -23,7 +23,7 @@ A new flutter plugin project.
s.user_target_xcconfig = {
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/src", "${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/morph"',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/src", "${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/morph"',
'OTHER_CXXFLAGS' => '--std=c++17 -fmodules -fcxx-modules',
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
#"CLANG_CXX_LIBRARY" => "libc++"
@@ -33,7 +33,7 @@ A new flutter plugin project.
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
'OTHER_CXXFLAGS' => '--std=c++17 -fmodules -fcxx-modules',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/src", "${PODS_ROOT}/../.symlinks/plugins/mimetic_filament/ios/morph"',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/src", "${PODS_ROOT}/../.symlinks/plugins/holovox_filament/ios/morph"',
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
}
s.swift_version = '5.0'

View File

@@ -362,7 +362,7 @@ void FilamentViewer::render() {
_renderer->render(_view);
_renderer->endFrame();
} else {
std::cout << "Skipping frame" << std::endl;
// std::cout << "Skipping frame" << std::endl;
}
}
@@ -396,14 +396,13 @@ void FilamentViewer::updateMorphAnimation() {
if(morphAnimationBuffer->frameIndex == -1) {
morphAnimationBuffer->frameIndex++;
morphAnimationBuffer->lastTime = std::chrono::high_resolution_clock::now();
morphAnimationBuffer->startTime = std::chrono::high_resolution_clock::now();
applyWeights(morphAnimationBuffer->frameData, morphAnimationBuffer->numWeights);
} else {
duration dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->lastTime;
float microsElapsed = dur.count();
if(microsElapsed > (morphAnimationBuffer->frameLength * 1000000)) {
morphAnimationBuffer->frameIndex++;
morphAnimationBuffer->lastTime = std::chrono::high_resolution_clock::now();
std::chrono::duration<double, std::milli> dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->startTime;
int frameIndex = dur.count() / morphAnimationBuffer->frameLength;
if(frameIndex != morphAnimationBuffer->frameIndex) {
morphAnimationBuffer->frameIndex = frameIndex;
applyWeights(morphAnimationBuffer->frameData + (morphAnimationBuffer->frameIndex * morphAnimationBuffer->numWeights), morphAnimationBuffer->numWeights);
}
}

View File

@@ -74,7 +74,7 @@ namespace mimetic {
int frameIndex = -1;
int numFrames;
float frameLength;
time_point_t lastTime;
time_point_t startTime;
float* frameData;
int numWeights;