Giter VIP home page Giter VIP logo

wooly's People

Contributors

afterwind-io avatar

Watchers

 avatar  avatar

wooly's Issues

重新实现`Diagnosis`工具

Why

目前使用Diagnosis需要在游戏初始化时手动显式调用,并且需要Engine有全局的事件支持(LoopStart, LoopEnd)。这种方式为Engine带来了不必要的API,并且在使用上并不是顺手。

How

Diagnosis重新实现为内置的Entity派生类。

优化Input实现及使用方式

Why

目前Input的初始化方式不是很友好,需要使用者手动在初始化代码中显式绑定canvas实例。由于Input几乎是一定会使用到的功能,额外的显式初始化代码没有必要。

How

在提供的框架create方法中直接完成初始化。

优化渲染性能

Why

当前所有节点无论自身是否有独立的绘图步骤(重载_Draw方法),均会调用节点的$Draw方法,从而导致多余的计算及Canvas API调用。

public Draw(root: CanvasTreeItem, ctx: CanvasRenderingContext2D) {
this.ResetCanvas(ctx);
this.RebuildTree(root);
this.Traverse((node: CanvasTreeItem) => {
node.$Draw(ctx);
node.$Melt();
});
}

How

CanvasItem类增加标示字段customDrawing,所有需要重载_Draw方法的派生类,均须显式声明或将该字段赋值为true,并且在渲染阶段跳过所有customDrawing不为true的_Draw方法调用。

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.