| 999 | } |
| 1000 | |
| 1001 | void NetworkedAnimator::setupNetStates() { |
| 1002 | clearNetElements(); |
| 1003 | |
| 1004 | addNetElement(&m_processingDirectives); |
| 1005 | addNetElement(&m_zoom); |
| 1006 | addNetElement(&m_flipped); |
| 1007 | addNetElement(&m_flippedRelativeCenterLine); |
| 1008 | |
| 1009 | addNetElement(&m_animationRate); |
| 1010 | m_animationRate.setInterpolator(lerp<float, float>); |
| 1011 | |
| 1012 | addNetElement(&m_globalTags); |
| 1013 | |
| 1014 | for (auto const& part : sorted(m_animatedParts.partNames())) |
| 1015 | addNetElement(&m_partTags[part]); |
| 1016 | |
| 1017 | for (auto& pair : m_stateInfo) { |
| 1018 | addNetElement(&pair.second.stateIndex); |
| 1019 | addNetElement(&pair.second.startedEvent); |
| 1020 | } |
| 1021 | |
| 1022 | for (auto& pair : m_transformationGroups) { |
| 1023 | addNetElement(&pair.second.xTranslation); |
| 1024 | addNetElement(&pair.second.yTranslation); |
| 1025 | addNetElement(&pair.second.xScale); |
| 1026 | addNetElement(&pair.second.yScale); |
| 1027 | addNetElement(&pair.second.xShear); |
| 1028 | addNetElement(&pair.second.yShear); |
| 1029 | |
| 1030 | if (pair.second.interpolated) { |
| 1031 | pair.second.xTranslation.setInterpolator(lerp<float, float>); |
| 1032 | pair.second.yTranslation.setInterpolator(lerp<float, float>); |
| 1033 | pair.second.xScale.setInterpolator(lerp<float, float>); |
| 1034 | pair.second.yScale.setInterpolator(lerp<float, float>); |
| 1035 | pair.second.xShear.setInterpolator(angleLerp<float, float>); |
| 1036 | pair.second.yShear.setInterpolator(angleLerp<float, float>); |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | for (auto& pair : m_rotationGroups) { |
| 1041 | addNetElement(&pair.second.targetAngle); |
| 1042 | addNetElement(&pair.second.netImmediateEvent); |
| 1043 | } |
| 1044 | |
| 1045 | for (auto& pair : m_particleEmitters) { |
| 1046 | addNetElement(&pair.second.emissionRate); |
| 1047 | addNetElement(&pair.second.burstCount); |
| 1048 | addNetElement(&pair.second.randomSelectCount); |
| 1049 | addNetElement(&pair.second.offsetRegion); |
| 1050 | addNetElement(&pair.second.active); |
| 1051 | addNetElement(&pair.second.burstEvent); |
| 1052 | |
| 1053 | pair.second.burstEvent.setIgnoreOccurrencesOnNetLoad(true); |
| 1054 | } |
| 1055 | |
| 1056 | for (auto& pair : m_lights) { |
| 1057 | addNetElement(&pair.second.active); |
| 1058 | addNetElement(&pair.second.xPosition); |
nothing calls this directly
no test coverage detected