Ejemplo n.º 1
0
 public CgeActivityEditorCombiner(AnimationClip leftAnim, AnimationClip rightAnim, Action onClipRenderedFn, CgeEditorEffector editorEffector, EeRenderingCommands previewController)
 {
     _leftPreview       = new EeRenderingSample(leftAnim, CgeMemoryQuery.NewPreviewTexture2D(CombinerPreviewWidth, CombinerPreviewHeight), OnClipRendered);
     _rightPreview      = new EeRenderingSample(rightAnim, CgeMemoryQuery.NewPreviewTexture2D(CombinerPreviewWidth, CombinerPreviewHeight), OnClipRendered);
     _combinedPreview   = new EeRenderingSample(new AnimationClip(), CgeMemoryQuery.NewPreviewTexture2D(CombinerPreviewCenterWidth, CombinerPreviewCenterHeight), OnClipRendered);
     _onClipRenderedFn  = onClipRenderedFn;
     _editorEffector    = editorEffector;
     _previewController = previewController;
 }
Ejemplo n.º 2
0
        public CgeActivityEditorLipsync(ComboGestureLimitedLipsync limitedLipsync, Action onClipRenderedFn, CgeEditorEffector editorEffector, EeRenderingCommands renderingCommands)
        {
            _limitedLipsync    = limitedLipsync;
            _onClipRenderedFn  = onClipRenderedFn;
            _editorEffector    = editorEffector;
            _renderingCommands = renderingCommands;

            _visemePreviews = Enumerable.Range(0, 15)
                              .Select(i => new EeRenderingSample(
                                          new AnimationClip(),
                                          CgeMemoryQuery.NewPreviewTexture2D(LipsyncPreviewWidth, LipsyncPreviewHeight),
                                          OnClipRendered)
                                      )
                              .ToList();
        }
Ejemplo n.º 3
0
        private Dictionary <AnimationClip, Texture2D> GatherAnimations(ProcessMode processMode)
        {
            var enumerable = _editorArbitraryAnimations
                             .Union(_editorEffector.AllDistinctAnimations())
                             .Union(_blendTreeEffector.AllAnimationsOfSelected())
                             .Distinct()
                             .Where(clip => clip != null);

            if (processMode == ProcessMode.CalculateMissing)
            {
                enumerable = enumerable.Where(clip => !_memoization.Has(clip));
            }

            return(new HashSet <AnimationClip>(enumerable.ToList())
                   .ToDictionary(clip => clip, clip => CgeMemoryQuery.NewPreviewTexture2D(_pictureWidth, _pictureHeight)));
        }