
<p align="middle"><img src="https://daybrush.com/scenejs/images/clapperboard.png" width="250"/></p>
<h2 align="middle">Scene.js</h2>
<p align="middle"><a href="https://badge.fury.io/js/scenejs" target="_blank"><img src="https://badge.fury.io/js/scenejs.svg" alt="npm version" height="18"/></a> <a href="https://travis-ci.org/daybrush/scenejs"><img src="https://travis-ci.org/daybrush/scenejs.svg?branch=master"/></a> <a href="https://coveralls.io/github/daybrush/scenejs?branch=master"><img src="https://coveralls.io/repos/github/daybrush/scenejs/badge.svg?branch=master"/></a> <img src="https://img.shields.io/badge/语言-typescript-blue.svg"/> <a href="https://github.com/daybrush/scenejs/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/badge/执照-MIT-brightgreen.svg"/></a></p>


<p align="middle">🎬 Scene.js是 JavaScript 和 CSS 的基于时间轴的动画库。</p>

<p align="middle"><a href="https://daybrush.com/scenejs"><strong>官方广场</strong></a> &nbsp;/&nbsp; <a href="https://daybrush.com/scenejs/release/latest/doc"><strong>API</strong></a> &nbsp;/&nbsp; <a href="https://daybrush.com/scenejs/features.html"><strong>特性</strong></a> &nbsp;/&nbsp; <a href="https://codepen.io/collection/DLWxrd/"><strong>例子</strong></a></p>
<p align="middle"><strong>翻译</strong>: <a href="https://github.com/daybrush/scenejs/blob/master/README_CN.md">🇨🇳</a> <a href="https://github.com/daybrush/scenejs/blob/master/README.md">🇺🇸</a></p>
<br/>

<p align="middle" style="max-width: 1000px; margin: 0px auto;" >
  <a href="https://codepen.io/daybrush/pen/arQpYb" target="_blank"><img src="https://daybrush.com/scenejs/images/daybrush.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/EQPPBg" target="_blank"><img src="https://daybrush.com/scenejs/images/tree.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/QYRyMd" target="_blank"><img src="https://daybrush.com/scenejs/images/card.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/zWMeJW" target="_blank"><img src="https://daybrush.com/scenejs/images/circleburst.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/aYPjjM" target="_blank"><img src="https://daybrush.com/scenejs/example/scenejs.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/ydMJKR" target="_blank"><img src="https://daybrush.com/scenejs/images/panda.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/vRrbXG" target="_blank"><img src="https://daybrush.com/scenejs/example/raindrop.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/RMBXBm" target="_blank"><img src="https://daybrush.com/scenejs/example/search.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
  <a href="https://codepen.io/daybrush/pen/pLxQGY" target="_blank"><img src="https://daybrush.com/scenejs/example/motion.gif" width="280" style="min-width:200px;max-width:320px;width: 32%;"/></a>&nbsp;
</p>


## 🚀 例子
* [纸板动画](https://codepen.io/daybrush/pen/VRomqr)
* [熊猫吃竹子动画](https://codepen.io/daybrush/pen/ydMJKR)
* [圈状爆炸动画](https://codepen.io/daybrush/pen/zWMeJW)
* [运动效应动画](https://codepen.io/daybrush/pen/pLxQGY)
* [树动画](https://codepen.io/daybrush/pen/EQPPBg)
* [冰雪动画](https://codepen.io/daybrush/pen/eoYGrx)
* [卡片旋转动画](https://codepen.io/daybrush/pen/QYRyMd)
* [雨滴效应动画](https://codepen.io/daybrush/pen/vRrbXG)
* [魔方动画](https://codepen.io/daybrush/pen/ybxwpV)
* [形状动画](https://codepen.io/daybrush/pen/VXVgpE) 
* [计时器动画](https://codepen.io/daybrush/pen/OdMMXd)

[**更多的例子**](https://codepen.io/collection/DLWxrd/)



## ⚙️ 安装
```bash
$ npm install scenejs
```
```html
<script src="//daybrush.com/scenejs/release/latest/dist/scene.min.js"></script>
```

## 📄 文件
* [API文档](https://daybrush.com/scenejs/release/latest/doc/)
* [特性文档](https://daybrush.com/scenejs/features.html)

## 📦 包
|包名|版本|简介|
|---|---|---|
|[**react-scenejs**](https://github.com/daybrush/scenejs/tree/master/packages/react-scenejs)|[![](https://img.shields.io/npm/v/react-scenejs.svg)](https://npmjs.com/package/react-scenejs)|通过 Sence.js 用JavaScript和CSS创建基于时间轴动画的 React 组件。|
|[**ngx-scenejs**](https://github.com/daybrush/scenejs/tree/master/packages/ngx-scenejs)|[![](https://img.shields.io/npm/v/ngx-scenejs.svg)](https://npmjs.com/package/ngx-scenejs)|通过 Sence.js 用JavaScript和CSS创建基于时间轴动画的 Angular 组件。|
|[**vue-scenejs**](https://github.com/daybrush/scenejs/tree/master/packages/vue-scenejs)|[![](https://img.shields.io/npm/v/vue-scenejs.svg)](https://npmjs.com/package/vue-scenejs)|通过 Sence.js 用JavaScript和CSS创建基于时间轴动画的 Vue 组件。|
|[**preact-scenejs**](https://github.com/daybrush/scenejs/tree/master/packages/preact-scenejs)|[![](https://img.shields.io/npm/v/preact-scenejs.svg)](https://npmjs.com/package/preact-scenejs)|通过 Sence.js 用JavaScript和CSS创建基于时间轴动画的 Preact 组件。|
|[**@scenejs/effects**](https://github.com/daybrush/scenejs-effects)|[![](https://img.shields.io/npm/v/@scenejs/effects.svg)](https://npmjs.com/package/@scenejs/effects)|Scene.js 特效收集库,可以添加场景剧本。|
|[**@scenejs/timeline**](https://github.com/daybrush/scenejs-timeline)|[![](https://img.shields.io/npm/v/@scenejs/timeline.svg)](https://npmjs.com/package/@scenejs/timeline)|代表Scene.js 中时间轴的库。 你可以控制时间,属性和项目。|
|[**@scenejs/media**](https://github.com/daybrush/scenejs-media)|[![](https://img.shields.io/npm/v/@scenejs/media.svg)](https://npmjs.com/package/@scenejs/media)|用于使用Scene.js播放或控制媒体的库。|
|[**@scenejs/iframe**](https://github.com/daybrush/scenejs-iframe)|[![](https://img.shields.io/npm/v/@scenejs/iframe.svg)](https://npmjs.com/package/@scenejs/iframe)|使用Scene.js控制iframe动画的库。|
|[**@scenejs/render**](https://github.com/daybrush/scenejs-render)|[![](https://img.shields.io/npm/v/@scenejs/render.svg)](https://npmjs.com/package/@scenejs/render)|通过Scene.js制作CSS动画电影。|

## 🎬 制作场景
```javascript
import Scene from "scenejs";

const scene = new Scene({
  ".class": {
    0: "left: 0px; top: 0px; transform: translate(0px);",
    1: {
      "left": "100px",
      "top": "0px",
      transform: "translate(50px)",
    },
    2: {
      "left": "200px",
      "top": "100px",
      transform: {
        translate: "100px",
      },
    }
  }
}, {
  selector: true,
  easing: "ease-in-out",
}).play();

```
## ✨ 特效

* [typing](https://daybrush.com/scenejs/features.html#typing)
* [flip](https://daybrush.com/scenejs/features.html#flip)
* [flipX](https://daybrush.com/scenejs/features.html#flipx)
* [flipY](https://daybrush.com/scenejs/features.html#flipy)
* [shake](https://daybrush.com/scenejs/features.html#shake)
* [shakeX](https://daybrush.com/scenejs/features.html#shakex)
* [shakeY](https://daybrush.com/scenejs/features.html#shakey)
* [wipeIn](https://daybrush.com/scenejs/features.html#wipein)
* [wipeOut](https://daybrush.com/scenejs/features.html#wipeout)
* [zoomIn](https://daybrush.com/scenejs/features.html#zoomin)
* [zoomOut](https://daybrush.com/scenejs/features.html#zoomout)
* [blink](https://daybrush.com/scenejs/features.html#bllink)
* [fadeIn](https://daybrush.com/scenejs/features.html#fadein)
* [fadeOut](https://daybrush.com/scenejs/features.html#fadeout)
* [transition](https://daybrush.com/scenejs/features.html#transition)


## 🌐 支持的浏览器

|Internet Explorer|Chrome|FireFox|Safari|Opera|
|---|---|---|---|---|
|9+(10+ playCSS)|最新|最新|最新|最新|

## ⭐️ 显示您的支持
如果这个项目对你有帮助，请给⭐️！

## 👏 贡献

如果您有任何问题或要求或想要参与`scenejs`或其他包，请提 issue 或提交请求。

## 🐞 Bug报告

如果您发现了错误，请向我们报告在[GitHub](https://github.com/daybrush/scenejs/issues)上打开新[问题](https://github.com/daybrush/scenejs/issues).

## 📝 证书

该项目获得[MIT](https://github.com/daybrush/scenejs/blob/master/LICENSE)许可。

```
MIT License

Copyright (c) 2016 Daybrush

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
