Giter Club home page Giter Club logo

ant-motion's Introduction

Ant Motion

Animation specification and components of Ant Design.

Dependencies DevDependencies

What is Ant Motion?

Ant Motion is a motion design specification from Ant Design, and also provide a complete solution with lots of out-of-box animations for your React applications.

What can Ant Motion do?

  • Create neat animations by using React components with a simple configuration.
  • Create beautiful landing page with motions by a few steps.

Demos

Specification

Ant Motion is an abstraction interface mainly intended to enhance the comfortness in the UX, increase the UI vitality, and also describe the level of relationship among touch feedback, user intentions and other functional effects. View details

Animation Components

  • rc-tween-one

    This is a React wrapper to animate your components. You can perform all of the style animations, including transform3d, fuzzy and other effects, you can also complete the Bezier curve animation. For the specific parameters see the API

  • rc-animate

    On a single element according to the status of animation display hidden, need to combine css or other third-party animation class used together; for the specific parameters see API

  • rc-queue-anim

    Add a serial rendering approach to a group of elements. Refer to the API for the specific parameters.

  • rc-scroll-anim

    Through a simple configuration, you can add animations which follow the scollbar on the elements of the page. Refer to the API for the specific parameters.

  • rc-banner-anim

    With a simple configuration, you can set up a modern and professional banner slider. Refer to the API for the specific parameters.

Landing page solution

Landing Formally launched, more. 🎉🎉🎉

This is based on the Ant Motion React components to follow with the design specifications of Ant Design to complete the demo page, you can quickly and flexibly configure the page template you want.

It provides a single-element example and a full-page example after configuration.

ant-motion-dva-cli-example

umi-example

More details

Develop

npm install
npm start

Go to http://localhost:8111

ant-motion's People

Contributors

afc163 avatar cncolder avatar dependabot-preview[bot] avatar dqaria avatar fancymo avatar hi-caicai avatar im6 avatar ioslh avatar jkomyno avatar jljsj33 avatar maiff avatar majorcool avatar renovate-bot avatar timelessover avatar yangzhedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-motion's Issues

1.5.0

  • 网站响应式

  • 模板响应式

  • 编辑时的样式使用css,手机端需要可编辑 css 文件,

  • 隐藏区块,web 与 phone 呈现的内容,需要隐藏的收藏容器。

很好奇的说

在git上查看react 动画解决方案的时候.无意中看到你们的rc-tween-one库.你们是自己写着玩的?还是公司的项目??

1.3.0

  • 首页调整。
  • 内页结构样式
  • README 重写

模版代码下载下来导入到dva搭建的项目里面,启动时报错(npm start)

你好,我下载的Home项目引入到项目工程里面,为了方便,我全部放到了components下面,引入和基本流程没有问题。在家里的win10上面启动没有报错,在win7上面启动就报错了,错误原因:
in ./src/components/Index/less/antMotion_style.less
Module build failed: ModuleBuildError: Module build failed: JavaScript evaluation error: 'ReferenceError: colorPalette is not defined'
@ F:\Web\mabyloveProjects\mabylove\weblove\node_modules.2.6.0@antd\lib\button\style\index.less (line 11, column 2)
near lines:
.btn;
.btn-default;

at DependenciesBlock.onModuleBuildFailed (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.0.6.9@webpack-core\lib\NormalModuleMixin.js:315:19)
at nextLoader (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.0.6.9@webpack-core\lib\NormalModuleMixin.js:270:31)
at F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.0.6.9@webpack-core\lib\NormalModuleMixin.js:292:15
at context.callback (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.0.6.9@webpack-core\lib\NormalModuleMixin.js:148:14)
at F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.2.3@less-loader\index.js:68:16
at F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.6.1@less\lib\less\render.js:33:38
at F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.6.1@less\lib\less\parse.js:63:17
at Object.finish [as _finish] (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.6.1@less\lib\less\parser\parser.js:183:28)
at Object.ImportVisitor._onSequencerEmpty (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.6.1@less\lib\less\visitors\import-visitor.js:35:14)
at ImportSequencer.tryRun (F:\Web\mabyloveProjects\mabylove\weblove\node_modules\.2.6.1@less\lib\less\visitors\import-sequencer.js:50:14)

@ ./src/components/Index/index.jsx 57:0-38

便于清晰的认识到:我特意截了图:
构建组件的时候,在index.jsx中出现错误:(其实就是antMotion_style.less样式报错)

接着就是错误的位置啦

接上一个的错误的具体位置

希望给一个解决方法。谢谢

TweenOne中使用scale出现模糊

在TweenOne中使用发现,scale值如从0到1显示,动画过程中会出现非常模糊的现象,测试中发现缩放值在0.5以下就会出现模糊,而同样从0到1的缩放效果在QueueAnim中则显示正常。
望排查,谢谢。

Animate组件对于Table的增删的离场动效

如果只对一两行操作很完美。
gif2

当进行切换页的时候,上一页的元素dom元素还在,会撑开整个table,很难看
gif1

如果设置transitionLeave=false,就没有离场动效了

so,怎么样才能更优雅

首页拼接功能使用反馈

  1. 选择完成以后,不能返回重新选择(浏览器返回可以,但是无记录)有点麻烦,因为之前选的时候不能预览,只有点了完成才能预览;
  2. 我主要用的是生成代码这个功能,代码下下来以后发现配置的地方有两个了(不知是不是必须)感觉最好把每个的配置代码放在各自的组件内部就很好(nav、content、footer等);
  3. nav1,footer1,content3,名字好奇怪呀,还需要自己改名字;
  4. 其它还好,有些样式是全局样式,建议在最外层套一层;

Ant Motion Users

做下调研,

  1. 如果你使用了我们 ant motion 的组件。
  2. 如果你使用了 landing page 模板的。
  3. 对 ant motion 有任何建议。

如果您和您的公司或组织使用了 Ant Motion ,非常感谢您的支持,欢迎留下公司或产品名,您的回复将成为维护者、社区用户和观望者的信心来源。

在不泄露信息的前提下,建议把截图晒一晒~
无关回复将会定期删除

推荐回复格式:

- 产品:
- 公司或组织:(如果可以)
- 链接:(如果可以)
- 截图:(如果可以)

一点小疑问

Tween的单元素动画是不是不能对组件施加?我对Tween的子组件加了旋转的效果,结果不是绕着自身中心而是屏幕中心旋转

English version of docs

Can i look for it somewhere? If it doesnt exists please create it. Your solution is awesome. World waits ;)

rc-queue-anim 报错: Uncaught Invariant Violation

使用例子中的代码:

import React from 'react';
import ReactDOM from 'react-dom';

import QueueAnim from 'rc-queue-anim';
ReactDOM.render(<QueueAnim>
  <div key="demo1">依次进场</div>
  <div key="demo2">依次进场</div>
  <div key="demo3">依次进场</div>
  <div key="demo4">依次进场</div>
</QueueAnim>, document.getElementById('root'));

控制台报错:

invariant.js:39 :

Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

环境
···
"antd": "^1.1.0",
"atool-build": "0.6.x",
"babel-plugin-antd": "0.3.x",
"chart.js": "^1.1.1",
"es3ify-loader": "^0.1.0",
"history": "^2.1.1",
"lodash": "^4.13.1",
"rc-queue-anim": "^0.11.9",
"react": "0.14.x",
"react-chartjs": "^0.7.3",
"react-dom": "0.14.x",
"react-redux": "^4.4.5",
"react-router": "^2.4.0",
"react-router-redux": "^4.0.4",
"redux": "^3.5.2",
"redux-thunk": "^2.0.1",
"superagent": "^1.8.3"
···

safari 里面,使用 rc-tween-one 设置 translate 的位置,从一个地方移动到另一个地方时,初始位置出现错误

this.moveAnimation = [
      // 透明度变化
      { opacity: 1, duration: 300 },
      // 移动
      {
        translateX: `${end.left}px`,
        translateY: `${end.top + end.height}px`,
        duration: 600,
        delay: 300
      },
      // 消失
      { opacity: 0, duration: 600, delay: 150 },
    ];

svg 里面 的 g 标签设置的动画。

动画的步骤是上面那样

问题是,在 safari 里面,元素的初始位置跑到了浏览器的左上角。

chrome 一切正常。

version history

Hi, I am big fan of your product.
Do you have version history or changelog stuff?
I think version number is quite necessary.

Thanks.

scrollScreen会连续滚动多页

在使用scrollScreen进行滚动翻页时,由于鼠标或触控板的滚动时间长于scrollInterval的设定时间时,会发生连续滚动多页的情况,即使在默认值1000时依然会有这种现象发生,而实际1000已经是很长的一段时间了,能不能锁定一次只能滚动一页,不管一次滚动持续了多久?望告知,谢谢。

编辑器BUG

  • 修改页面元素高度后,,edit-state高度未刷新。

  • content10 滚动时初始高度错误 。。。banner-anim 里高度计算错误。

  • 切到手机窗口,底下多一个空 div

  • content4 数据不正确

在<QueueAnim/>内部的控件无法在componentDidMount()内获取到

class userCenterPage extends React.Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
        this.elem = ReactDOM.findDOMNode(this.refs.headerBackground);
        this.elem2 = document.getElementById('headerBackground');
    }

    render() {
        return (
            <QueueAnim delay={0} type="bottom">
                <div key="a">
                    <div className="headerBackground" ref="headerBackground"></div>
                </div>
            </QueueAnim>
        )
    }
}

这样出来的this.elem和this.elem2都是null的
有什么方法可以解决吗

overPack

overPack设置了在屏幕下方 50% 时开始播放动画,希望可以有屏幕上半部分的‘overPack’。

请教下演示的制作方法

动画做的很好,很喜欢,想请教一下演示例子的一些技巧
这个页面 http://motion.ant.design/language/transition
我看到你用了个.mp4,来做演示,请教下这个mp4是咋弄的,
我猜想:
1 里面的内容效果是先写个网站【感觉这样太费时间了】,然后用视频录制?
2 是不是有咋工具可以方便操作这样的演示的?

方便指导一下吗?

npm start失败

既然无法删除Issues,就留下我的解决办法,方便以后的人😃
如果npm start失败:

  1. 先确认是否执行npm install安装依赖的模块。
  2. install慢或者失败,参考npm国内镜像设置方法

首页与架构改版

  • 首页改版
  • 网站架构调整
    • 信息结构
    • 页面逻辑
    • 功能区块重新整理
  • 模板这块提供下载
  • 添加页面加载动画
  • 404页面设计
  • scollAnim 内容更新
  • load 在 windows 下变量错误 ,不能用t
  • 动效demo 6个。

后期再整:

  • 小动画编辑器

  • 可视化编辑忧化。
    左侧导航。

    • 可添加删除模块。
    • 对背景处理。
    • 调整页面布局和添加区块
    • 其它功能编辑

    双击开启编辑后:

    • 拖动可编辑位置,百分比变成绝对值。
    • 双击后编辑区块内容
    • 调整样式

动效模板更换背景图片无法生效

动效模板更换背景图片无法生效
视频教程中有保存按钮,但是网页上没有,其他的参数设置后,效果生效,但是背景图片更改后,不起作用。
经过测试需要修改为:url(图片地址)才可以

遮盖问题

image

下边的div会遮盖住Menu的二级菜单,如:
image

正常的情况应该是:
image

响应式布局,请教如何把 ant-design 的栅格系统集成到 ant-motion 的 template 里?

先赞一下 ant-motion 的模版,十分好用,目前希望支持响应式布局。

按照 ant-design 栅格的使用方式,可以用下面的方式来做响应式适配:

import { Row, Col } from 'antd';

ReactDOM.render(
  <Row>
    <Col xs={2} sm={4} md={6} lg={8}>Col</Col>
    <Col xs={20} sm={16} md={12} lg={8}>Col</Col>
    <Col xs={2} sm={4} md={6} lg={8}>Col</Col>
  </Row>
, mountNode);

而比如在模版的 Content2Content5 中,不太清楚应该如何来做?

Content2: 多个文字段落
Content5: 多个文字段落+图片

是否可以给个简单的参考样例?

新模块

新模块大概什么时候能开放呢?

TweenOne demo效果与动画效果不一致

export default class Logo extends React.Component {
  constructor(props) {
    super(props);
    this.path = `M3.5,175V19c0,0,1-8.75,8.25-11.5S26.5,8,26.5,8l54,53.25
      c0,0,7,8.25,14.5,0.75s51.5-52.25,51.5-52.25s9.75-7,18-2s7.75,11.5,7.75,11.5
      v104c0,0-0.5,15.75-15.25,15.75s-15.75-15-15.75-15V68.5c0,0-0.125-9.125-6-3.25
      s-36.25,36-36.25,36s-11.625,11.875-24-0.5S40.25,65.5,40.25,65.5
      s-5.75-5.25-5.75,2s0,107.25,0,107.25s-0.75,13.5-14.5,13.5S3.5,175,3.5,175z`;
    this.animation = {
      path: this.path,
      repeat: -1,
      duration: 5000,
      ease: 'linear'
    };
  }
  render() {
    return (
      <div style={{  height: 200, width: 200, margin: 'auto' ,background: "white"}}>
        <TweenOne
          animation={this.animation}
          style={{  width: 20, height: 20, transform: 'translate(-10px, -10px)', background:"blue" }}
          className="code-box-shape"
          paused={this.props.paused}
        />
        <svg width="200" height="200">
          <path d={this.path} fill="red" stroke="rgba(1, 155, 240, 0.2)"/>
        </svg>
      </div>
    )
  }
}

代码如上 但是小方块的运行轨迹跟svg的path轨迹不一样,而且小方块的运行会受到this.animation.duration的影响

lib 里的 util.js 有bug

对比数组是否相等的方法有bug

if (Array.isArray(obj1) && Array.isArray(obj2)) {
    for (var i = 0; i < obj1.length; i++) {
      var currentObj = obj1[i] ;
      var nextObj = obj2[i] ;
      for (var p in currentObj) {
        if (currentObj[p] !== nextObj[p]) {
                ...
        }
      }
    }
  }

若两个数组的长度不一样 就会报错。

我改成如下 就好了 请问会不会有影响

if (Array.isArray(obj1) && Array.isArray(obj2)) {
    for (var i = 0; i < obj1.length; i++) {
      var currentObj = obj1[i] || [];
      var nextObj = obj2[i] || [];
      for (var p in currentObj) {
        if (currentObj[p] !== nextObj[p]) {
          ...
        }
      }
    }
  }

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.