
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@robotlegsjs/openfl
Advanced tools
Integrate RobotlegsJS framework with OpenFL.
You can get the latest release and the type definitions using NPM:
npm install @robotlegsjs/openfl --save
Or using Yarn:
yarn add @robotlegsjs/openfl
The OpenFL dependency is added as peerDependencies, allowing the final user to choose the desired version of the openfl library on each project.
The @robotlegsjs/openfl
package is compatible with versions between the >=8.3.0
version range of openfl
library.
As example, when you would like to use the version 8.3.0
of openfl
library, you can run:
npm install openfl@8.3.0 reflect-metadata --save
or
yarn add openfl@8.3.0 reflect-metadata
Then follow the installation instructions of RobotlegsJS library to complete the setup of your project.
Dependencies
Peer Dependencies
import "reflect-metadata";
import { Context, MVCSBundle } from "@robotlegsjs/core";
import { ContextView, OpenFLBundle } from "@robotlegsjs/openfl";
import { MyConfig } from "./config/MyConfig";
import { GameView } from "./view/GameView";
import Stage from "openfl/display/Stage";
export class Game {
private _loading: HTMLDivElement;
private _canvas: HTMLDivElement;
private _stage: Stage;
private _context: Context;
constructor() {
this.init();
}
private init(): void {
// remove loader
this._loading = <HTMLDivElement>(document.getElementById("loading"));
document.body.removeChild(this._loading);
// create stage
this._stage = new Stage(960, 400, 0xffffff, GameView);
// create robotlegs context
this._context = new Context();
this._context.install(MVCSBundle, OpenFLBundle).
configure(new ContextView(this._stage)).
configure(MyConfig).
initialize();
// add stage to html body
this._canvas = <HTMLDivElement>(document.getElementById("canvas"));
this._canvas.appendChild(this._stage.element);
}
}
Run the following commands to run the example:
npm install
npm start
or:
yarn install
yarn start
Available as part of the Tidelift Subscription
The maintainers of @robotlegsjs/openfl and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
FAQs
OpenFL View Integration with RobotlegsJS
The npm package @robotlegsjs/openfl receives a total of 1 weekly downloads. As such, @robotlegsjs/openfl popularity was classified as not popular.
We found that @robotlegsjs/openfl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.