Giter Club home page Giter Club logo

layaykfamework's Introduction

LAYAYKFramework

license PRs Welcome QQ群

YKFramework简介

[TOC]

简介

引擎:layaAIRIDE UI: Fairygui 服务器:YKSkynet

目录说明

  • layaFramework
    • src/YKFarmework 框架源码
    • src/Game 案例代码
    • protobuf pb-egret 工程文件
    • bin/resFairygui打包文件

如何快速入门

需要具备的知识

  • 1.熟练使用layaBox
  • 2.熟悉TS
  • 3.熟练使用Fairygui

运行第一个例子

安装LayaAirIDE F5 使用账号1234567 密码:123456 进行测试 (能用多久我暂时也不能保证,也有可能被挤账号)

最后

由于没有太多的时间和经历写文档所以只能暂时让各位动手能力强的一起完善 如果在这个过程当中有发现任何BUG和有任何意见都可以提issues 也可以加入QQ群:931217607

layaykfamework's People

Contributors

sheenli 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

Watchers

 avatar  avatar  avatar  avatar  avatar

layaykfamework's Issues

laya 2.x 无法使用命名空间(namespace)

最近考虑项目从1.x切换到2.x,对于两者编码规范和编译都有很多差异,论坛上有几位同学提出相关问题,但可惜没有答案。所以特意去学习相关信息,总结出下面的经验,如有错误,希望指出,谢谢!
1.x
没有模块(module)的概念,只有命名空间(namespace),两个关键字都能编译通过,但是没有差别。

所有代码都能直接访问,不需要也没办法使用require("./xxx")或者import * as xxx from "./xxx",可以通过使用别名访问:import a = x.y;

2.x
有模块(module)的概念,但是不能使用命名空间(namespace), 虽然都能编译通过,但是namespace的代码不会被编译进去bundle.js。原因看后面。
模块的导出和加载使用ES6标准的export或者export defaultimport a from "./a"
由于使用了browserify和tsify编译,browerify是根据入口文件开始查找所有import文件,根据依赖关系进行编译,所以根本找不到namespace的定义文件。也就是说namespace没办法使用。

补充:目前laya不支持require,否则应该能通过require加载namespace的文件,这样就能通过全局直接访问了。

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.