Skip to content
/ player Public

Next2D Player supports WebGL and OffscreenCanvas, enabling advanced graphical expression. It can also be used in game production, advertisement production, and other scenes requiring rich expressions without having to deal with browser or device compatibility.

License

Notifications You must be signed in to change notification settings

Next2D/player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Next2D Player

Next2D Player

UnitTest CodeQL Lint

release Github All Releases Discord Twitter

[ๆ—ฅๆœฌ่ชž]
Next2D Playerใฏใ€WebGLใฎใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขใ‚ขใ‚ฏใ‚ปใƒฉใƒฌใƒผใ‚ทใƒงใƒณใงใ‚ฐใƒฉใƒ•ใ‚ฃใƒƒใ‚ฏใ‚นๅ‡ฆ็†่ฒ ่ทใ‚’่ปฝๆธ›ใ—ใ€OffscreenCanvasใฎใƒžใƒซใƒใ‚นใƒฌใƒƒใƒ‰ๅ‡ฆ็†ใงๆ็”ปใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นใ‚’ๅ‘ไธŠใ•ใ›ใฆใ„ใพใ™ใ€‚
ใƒ™ใ‚ฏใ‚ฟใƒผๆ็”ปใ€Tweenใ‚ขใƒ‹ใƒกใƒผใ‚ทใƒงใƒณใ€ใƒ†ใ‚ญใ‚นใƒˆใ€้Ÿณๅฃฐใ€ๅ‹•็”ปใชใฉใ€ใ•ใพใ–ใพใช่ฆ็ด ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใ‚‹ใฎใงใ€ใ‚ฒใƒผใƒ ๅˆถไฝœใ€ใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชใƒ‡ใƒผใ‚ฟใƒ“ใ‚ธใƒฅใ‚ขใƒฉใ‚คใ‚ผใƒผใ‚ทใƒงใƒณใ€ใ‚ฏใƒชใ‚จใ‚คใƒ†ใ‚ฃใƒ–ใชใ‚ฆใ‚งใƒ–ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใชใฉใ€่ฑŠใ‹ใช่กจ็พใŒๅฟ…่ฆใจใ•ใ‚Œใ‚‹ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใงๆดป็”จใŒๆœŸๅพ…ใงใใพใ™ใ€‚

[English]
Next2D Player reduces graphics processing load with WebGL hardware acceleration and improves drawing performance with OffscreenCanvas multi-threaded processing.
With support for vector rendering, tween animation, text, audio, video, and many other elements, Next2D Player can be used for game production, interactive data visualization, creative web applications, and other projects that require rich expression. The software is expected to be used in game production, interactive data visualization, creative web applications and other projects requiring rich expression.

[็ฎ€ไฝ“ไธญๆ–‡]
Next2D Player้€š่ฟ‡WebGL็กฌไปถๅŠ ้€Ÿ้™ไฝŽไบ†ๅ›พๅฝขๅค„็†่ดŸ่ฝฝ๏ผŒ้€š่ฟ‡OffscreenCanvasๅคš็บฟ็จ‹ๅค„็†ๆ้ซ˜ไบ†็ป˜ๅ›พๆ€ง่ƒฝใ€‚
็”ฑไบŽๆ”ฏๆŒ็Ÿข้‡็ป˜ๅ›พใ€TweenๅŠจ็”ปใ€ๆ–‡ๆœฌใ€้Ÿณ้ข‘ใ€่ง†้ข‘ๅ’Œ่ฎธๅคšๅ…ถไป–ๅ…ƒ็ด ๏ผŒๅฎƒๅฏ็”จไบŽๆธธๆˆๅˆถไฝœใ€ไบคไบ’ๅผๆ•ฐๆฎๅฏ่ง†ๅŒ–ใ€ๅˆ›ๆ„็ฝ‘็ปœๅบ”็”จๅ’Œๅ…ถไป–้œ€่ฆไธฐๅฏŒ่กจ่พพ็š„้กน็›ฎใ€‚ ่ฏฅ่ฝฏไปถๅฏ็”จไบŽ้œ€่ฆไธฐๅฏŒ่กจ็ŽฐๅŠ›็š„้กน็›ฎไธญใ€‚

Support

[ๆ—ฅๆœฌ่ชž]
ๆœ€ๆ–ฐใƒ‹ใƒฅใƒผใ‚นใ‚„ๆŠ€่ก“ๆƒ…ๅ ฑใฏใ€Twitterใฎ@Next2Dใ‚„ๅ…ฌๅผใฎWebsiteใง็™บไฟกใ—ใฆใ„ใใพใ™ใฎใงใ€ใƒใ‚งใƒƒใ‚ฏใ—ใฆใฟใฆใใ ใ•ใ„ใ€‚
Next2DใŒใŠๅฝนใซ็ซ‹ใคใ‚ˆใ†ใงใ—ใŸใ‚‰ใ€ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใ‚’ใ”ๆ”ฏๆดใ„ใŸใ ใ‘ใ‚Œใฐๅนธใ„ใงใ™ใ€‚

[English]
Please check @Next2D on Twitter and the official website for the latest news and technical information.
If Next2D is useful to you, we hope you will support our project.

[็ฎ€ไฝ“ไธญๆ–‡]
่ฏทๅœจTwitterไธŠๆŸฅ็œ‹@Next2Dๅ’Œๅฎ˜ๆ–น็ฝ‘็ซ™๏ผŒไบ†่งฃๆœ€ๆ–ฐ็š„ๆ–ฐ้—ปๅ’ŒๆŠ€ๆœฏไฟกๆฏใ€‚
ๅฆ‚ๆžœNext2Dๅฏนไฝ ๆœ‰็”จ๏ผŒๆˆ‘ไปฌๅธŒๆœ›ไฝ ่ƒฝๆ”ฏๆŒๆˆ‘ไปฌ็š„้กน็›ฎใ€‚

Related Sites

Examples

Use Simple Sample

next2d.load("Path to JSON output from Animation Tool");

Use Program Sample For JavaScript

const { Loader }     = next2d.display;
const { URLRequest } = next2d.net;
const { Event }      = next2d.events;

// create root MovieClip
const start = async () =>
{
    const request = new URLRequest("JSON path");
    const loader  = new Loader();
    await loader.load(request);

    const root = await next2d.createRootMovieClip();
    root.addChild(loader.contentLoaderInfo.content);
};

start();

Use Program Sample For TypeScript

import { Loader } from "@next2d/display";
import { URLRequest } from "@next2d/net";
import { Event } from "@next2d/events";

// create root MovieClip
const start = async (): Promise<void> =>
{
    const request = new URLRequest("JSON path");
    const loader  = new Loader();
    await loader.load(request);

    const root = await next2d.createRootMovieClip();
    root.addChild(loader.content);
};

start();

Option settings

[ๆ—ฅๆœฌ่ชž]

ใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃๅ ๅž‹ ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆๅ€ค ่ชฌๆ˜Ž
fullScreen boolean false Stageใ‚ฏใƒฉใ‚นใง่จญๅฎšใ—ใŸๅน…ใจ้ซ˜ใ•ใ‚’่ถ…ใˆใฆ็”ป้ขๅ…จไฝ“ใซๆ็”ปใ•ใ‚Œใพใ™ใ€‚
tagId string empty IDใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใจใ€ๆŒ‡ๅฎšใ—ใŸIDใฎใ‚จใƒฌใƒกใƒณใƒˆๅ†…ใงๆ็”ปใ‚’่กŒใ„ใพใ™ใ€‚
bgColor string "transparent" ่ƒŒๆ™ฏ่‰ฒใ‚’16้€ฒๆ•ฐใงๆŒ‡ๅฎšใงใใพใ™ใ€‚ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ็„ก่‰ฒ้€ๆ˜Žใงใ™ใ€‚

[English]

name type default description
fullScreen boolean false The entire screen is drawn beyond the width and height set in the Stage class.
tagId string empty When an ID is specified, drawing is performed within the element of the specified ID.
bgColor string "transparent" You can specify a background color in hexadecimal. The default is colorless.

[็ฎ€ไฝ“ไธญๆ–‡]

ๅ็งฐ ๅ€ผ็ฑปๅž‹ ้ป˜่ฎคๅ€ผ ่ฏดๆ˜Ž
fullScreen boolean false ๆ•ดไธชๅฑๅน•็š„็ป˜ๅˆถ่ถ…ๅ‡บไบ†Stage็ฑปไธญ่ฎพ็ฝฎ็š„ๅฎฝๅบฆๅ’Œ้ซ˜ๅบฆใ€‚
tagId string empty ๅฝ“ไธ€ไธชID่ขซๆŒ‡ๅฎšๆ—ถ๏ผŒๅœจๆŒ‡ๅฎšID็š„ๅ…ƒ็ด ๅ†…่ฟ›่กŒ็ป˜ๅ›พใ€‚
bgColor string "transparent" ไฝ ๅฏไปฅๆŒ‡ๅฎšไธ€ไธชๅๅ…ญ่ฟ›ๅˆถ็š„่ƒŒๆ™ฏ้ขœ่‰ฒใ€‚้ป˜่ฎคไธบๆ— ่‰ฒใ€‚

Flowchart

flowchart TB
    %% Main Drawing Flow Chart
    subgraph MainFlow["๐ŸŽจ Drawing Flow Chart - Main Rendering Pipeline"]
        direction TB
        
        subgraph Inputs["Display Objects"]
            Shape["Shape<br/>(Bitmap/Vector)"]
            TextField["TextField<br/>(canvas2d)"]
            Video["Video Element"]
        end
        
        Shape --> MaskCheck
        TextField --> MaskCheck
        Video --> MaskCheck
        
        MaskCheck{"mask<br/>rendering?"}
        
        MaskCheck -->|YES| DirectRender["Direct Rendering"]
        DirectRender -->|drawArrays| FinalRender
        
        MaskCheck -->|NO| CacheCheck1{"cache<br/>exists?"}
        
        CacheCheck1 -->|NO| TextureAtlas["๐Ÿ“ฆ Texture Atlas<br/>(Binary Tree Packing)"]
        TextureAtlas --> Coordinates
        
        CacheCheck1 -->|YES| Coordinates["๐Ÿ“ Coordinates DB<br/>(x, y, w, h)"]
        
        Coordinates --> FilterBlendCheck{"filter or<br/>blend?"}
        
        FilterBlendCheck -->|NO| MainArrays
        FilterBlendCheck -->|YES| NeedCache{"cache<br/>exists?"}
        
        NeedCache -->|NO| CacheRender["Render to Cache"]
        CacheRender --> TextureCache
        NeedCache -->|YES| TextureCache["๐Ÿ’พ Texture Cache"]
        
        TextureCache -->|drawArrays| FinalRender
        
        MainArrays["โšก Instanced Arrays<br/>โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”<br/>matrix<br/>colorTransform<br/>Coordinates<br/>โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”<br/><b>Batch Rendering</b>"]
        
        MainArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| FinalRender["๐ŸŽฌ Final Rendering"]
        
        FinalRender -->|60fps| MainFramebuffer["๐Ÿ–ฅ๏ธ Main Framebuffer<br/>(Display)"]
    end
    
    %% Branch Flow for Filter/Blend/Mask
    subgraph BranchFlow["๐ŸŽญ Filter/Blend/Mask - Branch Processing"]
        direction TB
        
        subgraph FilterInputs["Display Objects"]
            Shape2["Shape<br/>(Bitmap/Vector)"]
            TextField2["TextField<br/>(canvas2d)"]
            Video2["Video Element"]
        end
        
        Shape2 --> CacheCheck2
        TextField2 --> CacheCheck2
        Video2 --> CacheCheck2
        
        CacheCheck2{"cache<br/>exists?"}
        
        CacheCheck2 -->|NO| EffectRender["Effect Rendering"]
        CacheCheck2 -->|YES| BranchArrays
        EffectRender --> BranchArrays
        
        BranchArrays["โšก Instanced Arrays<br/>โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”<br/>matrix<br/>colorTransform<br/>Coordinates<br/>โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”<br/><b>Batch Rendering</b>"]
        
        BranchArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| BranchRender["Effect Result"]
        
        BranchRender -->|filter/blend| TextureCache
    end
    
    %% Connections between flows
    FilterBlendCheck -.->|"trigger<br/>branch flow"| BranchFlow
    BranchArrays -.->|"rendering info<br/>(coordinates)"| MainArrays
    
    %% Styling
    style MainFlow fill:#e3f2fd,stroke:#1976d2,stroke-width:3px
    style BranchFlow fill:#fff3e0,stroke:#f57c00,stroke-width:3px
    style Inputs fill:#f5f5f5,stroke:#9e9e9e,stroke-width:1px
    style FilterInputs fill:#f5f5f5,stroke:#9e9e9e,stroke-width:1px
    
    style MainArrays fill:#c8e6c9,stroke:#388e3c,stroke-width:3px
    style BranchArrays fill:#c8e6c9,stroke:#388e3c,stroke-width:3px
    style FinalRender fill:#ffecb3,stroke:#f57f17,stroke-width:2px
    style MainFramebuffer fill:#c5e1a5,stroke:#689f38,stroke-width:3px
    style TextureCache fill:#e1bee7,stroke:#8e24aa,stroke-width:2px
    style Coordinates fill:#b3e5fc,stroke:#0277bd,stroke-width:2px
    style TextureAtlas fill:#fff9c4,stroke:#f9a825,stroke-width:2px
Loading

License

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

About

Next2D Player supports WebGL and OffscreenCanvas, enabling advanced graphical expression. It can also be used in game production, advertisement production, and other scenes requiring rich expressions without having to deal with browser or device compatibility.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors 5

Languages