void DisplayPixelsText::UpdateAnimation() { /* Serial.print("UpdateAnimation Called "); Serial.print(textStartX); Serial.println(_text); */ //Serial.println("about to create red pixel"); //RgbColor red(128, 0, 0); // strip->SetPixelColor(mosaic.Map(0, 0), red); // strip->Show(); // delay(1000); // Serial.println("after red pixel"); drawString(textStartX, 0, _text, textColor); int now = millis(); if (now - setupStartMillis > 100000 / 1000 ) { setupStartMillis = now; textStartX--; int end = _text.length() * fontWidth * -1; if (textStartX < end) { textStartX = 8; NewAnimation(); } } }
// // CONVERTNODE // look for all the segments on this node and convert them // recurse on children // // bool plAnimAvatarComponent::ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg) { plNotetrackAnim noteAnim(node, pErrMsg); // does this node have any segments specified? if (noteAnim.HasNotetracks()) { // for each segment we found: plString animName; while (!(animName = noteAnim.GetNextAnimName()).IsNull()) { plAnimInfo info = noteAnim.GetAnimInfo(animName); plATCAnim *anim = NewAnimation(info.GetAnimName(), info.GetAnimStart(), info.GetAnimEnd()); plString loopName = info.GetNextLoopName(); if (!loopName.IsNull()) { anim->SetLoop(true); float loopStart = info.GetLoopStart(loopName); float loopEnd = info.GetLoopEnd(loopName); anim->SetLoopStart(loopStart == -1 ? anim->GetStart() : loopStart); anim->SetLoopEnd(loopEnd == -1 ? anim->GetEnd() : loopEnd); } plString marker; while (!(marker = info.GetNextMarkerName()).IsNull()) anim->AddMarker(marker, info.GetMarkerTime(marker)); ConvertNodeSegmentBranch(node, anim, pErrMsg); MakePersistent(node, anim, info.GetAnimName(), pErrMsg); } } // let's see if the children have any segments specified... int childCount = node->NumberOfChildren(); for (int i = 0; i < childCount; i++) ConvertNode((plMaxNode *)(node->GetChildNode(i)), pErrMsg); return true; }