Next2D Player is a project derived from the JavaScript FlashPlayer "swf2js" and aims to provide the fastest 2D engine that works on any device.
It fully supports WebGL and WebGL2, and can be used to create rich and interactive web content, without having to deal with browser or device compatibility. With full support for WebGL and WebGL2, you can create rich, interactive web content and games without having to deal with browser or device compatibility.
With the Next2D NoCode Tool, you can intuitively create the animations you envision, and the exported JSON data can be easily played and published with 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.
next2d.load("JSON Path...");
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
name | type | 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 |
array | empty | The [R,G,B,A] array of background colors can be specified from 0 to 255. false is colorless and transparent. |
- Website
- Player API Documentation
- Next2D NoCode Tool(β version)
- Next2D Framework
- Tutorial & Reference.
- Chat Community(Discord)
This project is licensed under the MIT License - see the LICENSE file for details.