Esempio n. 1
0
 public void GenerateAnimation()
 {
     if (points != null && points.Count > 0)
     {
         beginPostion  = model.position;
         beginRotation = model.rotation;
         currentFrame  = 0;
         ModelData modelData = AnimationData.CreateModelData(model, points, rotationPoints, detailLoaPoints, mutatorStrength);
         modelData.numberOfFrames = framesOfAnimation;
         swellanimations.Animation animation = BackendAdapter.GenerateFromBackend(modelData);
         frames = animation.frames.ToArray();
         serializedAnimation = BackendAdapter.serializeNodeArray(frames);
         //Debug.Log("Just serialized: " + serializedAnimation);
         ClearMaps();
         FillModelMap(model);
     }
 }
Esempio n. 2
0
 public void GenerateAnimation()
 {
     if (points != null && points.Count > 0)
     {
         currentFrame = 0;
         List <Vector3> line = points;
         if (smoothCurve && points.Count >= 4)
         {
             line = GetCatmullRomCurve(line);
         }
         ModelData modelData = AnimationData.CreateModelData(model, line, rotationPoints,
                                                             detailLoaPoints, framesOfAnimation, mutatorStrength);
         swellanimations.Animation animation = BackendAdapter.GenerateFromBackend(modelData);
         frames = animation.frames.ToArray();
         serializedAnimation = BackendAdapter.serializeNodeArray(frames);
         //Debug.Log("Animation generated");
         ClearMaps();
         FillModelMap(model);
     }
 }