Example #1
0
        public void Initialize(
            IMessageSender sender,
            IMessageReceiver receiver,
            VRMPreviewCanvas previewCanvas,
            IKTargetTransforms ikTargets,
            ErrorIndicateSender errorSender,
            ErrorInfoFactory errorInfoFactory
            )
        {
            _sender        = sender;
            _previewCanvas = previewCanvas;
            _ikTargets     = ikTargets;

            _errorSender      = errorSender;
            _errorInfoFactory = errorInfoFactory;

            receiver.AssignCommandHandler(
                VmmCommands.OpenVrmPreview,
                message => LoadModelForPreview(message.Content)
                );
            receiver.AssignCommandHandler(
                VmmCommands.OpenVrm,
                message =>
            {
                previewCanvas.Hide();
                LoadModel(message.Content);
            });
            receiver.AssignCommandHandler(
                VmmCommands.CancelLoadVrm,
                _ => previewCanvas.Hide()
                );
        }
Example #2
0
 public void Initialize(
     IMessageReceiver receiver,
     VRMPreviewCanvas previewCanvas,
     IKTargetTransforms ikTargets
     )
 {
     _previewCanvas = previewCanvas;
     _ikTargets     = ikTargets;
     receiver.AssignCommandHandler(
         VmmCommands.OpenVrmPreview,
         message => LoadModelForPreview(message.Content)
         );
     receiver.AssignCommandHandler(
         VmmCommands.OpenVrm,
         message =>
     {
         previewCanvas.Hide();
         LoadModel(message.Content);
     });
     receiver.AssignCommandHandler(
         VmmCommands.CancelLoadVrm,
         _ => previewCanvas.Hide()
         );
 }