Giter Site home page Giter Site logo

betteroneday / vue-fabric-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nihaojob/vue-fabric-editor

0.0 0.0 0.0 133.93 MB

基于fabric.js和Vue的图片编辑器,可自定义字体、素材、设计模板。fabric.js and Vue based image editor, can customize fonts, materials, design templates.

Home Page: https://nihaojob.github.io/vue-fabric-editor/

License: MIT License

Shell 0.07% JavaScript 21.51% TypeScript 5.58% CSS 0.07% HTML 0.46% Vue 70.41% Less 1.90%

vue-fabric-editor's Introduction

English | 中文

vue-fabric-editor

Demo 基于 fabric.js 和 Vue 的图片编辑器,可自定义字体、素材、设计模板。

image

已有功能

  • 导入 JSON 文件
  • 保存为 PNG、SVG、JSON 文件
  • 插入 SVG、图片文件
  • 多元素水平、垂直对齐方式
  • 字体模板
  • 组合/拆分组合
  • 图层及顺序调整
  • 撤销/重做
  • 背景属性设置
  • 外观属性/字体属性/描边/阴影
  • 自定义字体
  • 自定义模板素材
  • 快捷键
  • 右键菜单
  • 辅助线
  • 标尺
  • 国际化

使用

启动项目

yarn install
yarn serve

自定义素材

可自定义字体、设计模板、标题模板等,所有自定义素材在https://github.com/nihaojob/vue-fabric-editor-static 项目中保存。

贡献指南

项目目标是构建一个可便捷扩展、定制的设计编辑器。基于目标的拆解大致可以分为 3 个方面:

  1. 功能完善:具备设计编辑器的主要能力,如图形、元素模板、保存、修改、快捷键等。
  2. 架构简洁:在 fabric.js 的基础能力之上,封装出与工程、UI 组件无关的 Core 中间层。
  3. UI 精致:基于 Core 中间层的能力,结合 UI 组件,让 UI 尽可能的精致好用。

项目初期更多的工作还是对基础功能积累和架构的建设,只有保证每个功能模块封闭独立、Core 中间层轻量简洁,才能达成可便捷扩展与定制的需求。

项目目前处于初期阶段,还在积累功能、架构演进中,如果恰好你有类似的需求或者对这件事情很感兴趣,欢迎你参与进来,可能比观望更有趣,你可能会获得包括但不限于以下列表的收获:

  1. 基于 fabric.js 与 Vue 的编辑器架构。
  2. fabric.js 库的中高阶用法。
  3. 开源项目的维护经验。

注:如果遇到技术问题,期望使用 issue 讨论,它更加开放与透明,足够多的信息会让解决问题变得更高效,参考提问的智慧

这是我发表在掘金社区的一篇技术笔记,会有更多的细节,使用 fabric.js 快速开发一个图片编辑器,在讨论区里有更多的编辑器选型、入门内容、常见问题、微信群内的有效讨论记录等内容。

目前有很多需要做的工作,比如英文文档的搭建、渐变的配置功能等,欢迎与我联系,我愿意与你进行任何问题的交流,微信:13146890191。期待你的 issue 和 PR 。

规划

可能新增功能

第一阶段

  • 缩放
  • 三角形、箭头、线条
  • 复制 粘贴 快捷键
  • 拖动模式,放大缩小
  • 画布大小保存
  • 绘制线条
  • svgIcon 汇总
  • 标题样式列表模板
  • 预览

第二阶段

  • 替换图片、加载 url 图片
  • 渐变配置
  • 平铺背景、等比例背景
  • 图片裁剪
  • 滤镜
  • 描边 strokeDashArray

致谢

License

Licensed under the MIT License.

vue-fabric-editor's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.