Giter Club home page Giter Club logo

powerlauncher's Introduction

PowerLauncher-Example

A framework for rhino.

Get start

git clone https://github.com/npofsi/PowerLauncher.git
cd PowerLauncher

Now,you can write your own JS file in ./source and put assets in ./assets

Then build it and get Release Edition from ./release

Build

Createjs:

LingSaTuo/Createjs

Download It

run ./build.js or ./beta.js in createjs

Output:

./release/Name-versionName.js

Certainly,you can pack it into an apk with createjs|autojs.

Doc

important

Please write " //" at the end of .js files to avoid illegal character exception.

Document structure:

./assets/*(name)
         icon/icon.png|
         src.mp4      |}PL.a(name)
         ...          |
./source/*(name)(.js)
         init(.js)|
         main(.js)|}PL.i(name)&PL.c(name)
         ...      |

Framework API:

Get byte array of file:

PL.a("icon/icon.png") 

Import script in function:

var init = PL.i("init")  //no ".js"

Run script in function:

PL.i("init")()  //no ".js"

Get script source code:

var code=PL.c("init")//no ".js"

Run script in global field:

rewrite the package.json

{
   ...
   "entrance":["main","beforemain","beforebeforemain"],
   ...
}

Use dexClass( 感谢 @那个谁 的帮助 ):

Place dex file in ./libs/dex/ .

Place so file in ./libs/so/ .

Edit libs.json to set label for dex&so file.

var DexClassLoader=PL.x(DexLabel,SoLabel);
var Class=DexClassLoader.loadClass("ClassName");

Logger:

rewrite the logLevel : dev to logLevel : rel to close logger.

PL.l("Log")

Adapt to autojs:

rewrite the package.json

{
   ...
   "ajmode":"ui"
   ...
}

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.