Next2D Player
About
Next2D Player is a project derived from the JavaScript FlashPlayer "swf2js".
The goal is to provide the fastest 2D engine that works on any device.
It fully supports WebGL and WebGL2, and it allows you to create rich, interactive graphics, cross-platform applications and games without having to deal with browser or device compatibility.
By using the Next2D NoCode Tool, you can intuitively create the animation you have imagined, and the exported JSON data can be easily played and published using the Next2D Player.
Next2D NoCode Tool is a web service that does not require installation and can be used immediately by anyone who accesses it.
2D entertainment development made easy! Fast! Comfortable!
Use Simple Sample
next2d.load("JSON Path...");
Use Program Sample
const { Loader } = next2d.display;
const { URLRequest } = next2d.net;
const { Event } = next2d.events;
// create root MovieClip
const root = next2d.createRootMovieClip();
const request = new URLRequest("JSON path");
const loader = new Loader(request);
loader
.contentLoaderInfo
.addEventListener(Event.COMPLETE, (event) =>
{
root.addChild(event.currentTarget.content);
});
loader.load(request);
CodePen
@see API Documentation
Option settings
name | value | default | description |
---|---|---|---|
base |
string | empty | When acquiring JSON by relative path, the URL set here will be applied as the root. For absolute paths, the URL set here will not be applied. |
fullScreen |
boolean | false | It will be drawn on the entire screen beyond the width and height set in the Stage class. |
tagId |
string | empty | When an ID is specified, drawing will be performed within the element with the specified ID. |
bgColor |
The [R,G,B,A] array of background colors can be specified from 0 to 255. false is colorless and transparent. |
Related sites
- Website
- Player API Documentation
- Next2D NoCode Tool(α version)
- Next2D Framework
- Tutorial & Reference.
- Chat Community(Discord)
License
This project is licensed under the MIT License - see the LICENSE file for details.