bansicloud / player

Experience the fast and beautiful anti-aliased rendering of WebGL. You can create rich, interactive graphics, cross-platform applications and games without worrying about browser or device compatibility.

Home Page:https://next2d.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next2D Player

Next2D Player Logo

UnitTest CodeQL Lint
release license Docs Discord Follow us on Twitter

日本語 | 简体中文

About

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.

Use Simple Sample

next2d.load("JSON Path...");

CodePen

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 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.

Related sites

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Experience the fast and beautiful anti-aliased rendering of WebGL. You can create rich, interactive graphics, cross-platform applications and games without worrying about browser or device compatibility.

https://next2d.app

License:MIT License