Giter VIP home page Giter VIP logo

luacxx's Introduction

chaos3d

Build Statue

Animation

  • action, an execution unit that can be a sequence, or a group, of others. it has basic endpoints to do the work, i.e. start, end and update. it should maintain the internal state of the execution, only to support forward playing. it should not contain much info and be easily created, stopped, or ditched.
  • animator, the holder of actions, the conceptual entity that can exist in various forms. it is the controller to start the action, and control and transist the actions. right now, there is no common animators because the use cases vary. only action component is one kind of animator. there could be skeleton animator, ui animator, etc. and maybe the common functions will be moved up

Memory Management

  • Use unique_ptr and shared_ptr, deprecating referenced_count unique_ptr: used for only one instance to exist at any time shared_ptr: used for shared scoping instance
  • Returning raw pointers is OK but it's not for releasing ownership
  • Use move semantics to pass pointers; const pointers (T *const) can be used, indicating the callee will not be able to take over the onwership, that is, (T *) is disallowed.
  • Objects shall define type ptr and const_ptr
  • Class inheriting from enable_shared_ptr_from_this should hide the contructors but provide alternative helper functions to create objects, at least when exposing API's, for consistency

Object

Layer

  • io
  • render, sg, asset, go
  • application

Resource Management

  • Resources are expensive data loading from IO to memories while keeping lightweight meta-data
  • Abstraction:
    actual data type (texture, audio, font, etc.) ==>
    resource wrapper (load async/sync, unload) ==>
    loader (decoding the IO format to data format, i.e. png => RGBA) ==>
    locator (mapping resource id to IO, this could also load all resources in the same batch)
  • Manager:
    different strategies (framed-base, zone-based, shared_ptr)
    purge/unload
    threading
  • Locator
    dir/package locator
    texture locator would wrap another locator and produce different results depending on the device

luacxx's People

Contributors

wuhao5 avatar

Watchers

 avatar  avatar

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.