1.1.1 • Published 8 years ago

miox-animate v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

Miox-animate

Miox 动画引擎

使用方法:

import MioxCore from 'miox-core';
import Router from 'miox-router';
import Animate from 'miox-animate';
import { engine, webview } from 'miox-vue';

const Ro = new Router();

Ro.patch('/', async ctx => {
    await ctx.render(indexPage);
});

Ro.patch('/list', async ctx => {
    await ctx.render(listPage);
});

MioxCore(async app => {
    app.set('animate', Animate());
    app.set('engine', engine);
    app.use(Ro.routes());
});

class indexPage extends webview {
    constructor(el){
        super(el);
    }

    template(){
        return `<p v-forward patch="/list">Click to list page</p>`;
    }
}

class listPage extends webview {
    constructor(el){
        super(el);
    }

    template(){
        return `<p v-backward>Back to index page</p>`
    }
}

注意事项:

动画引擎本身已经经过优化,但是由于安卓机器对dom渲染能力有限,如果webview中有大量的dom,在切换回来时会发生白屏/卡顿现象,优化方案:

  • 改为 fade 动画, app.set('animate', Animate({effect: 'fade'}));
  • 对于dom较多的页面,如果边切换动画边渲染,低端机可能会有性能问题。可以将新的webview先放置空的loading,等待 webview:in 方法之后再进行初始化。
1.1.1

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago