@next2d/player 1.14.9 → 1.14.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/player/index.js +5 -3
- package/dist/player/next2d/display/GraphicsGradientFill.d.ts +1 -1
- package/dist/player/next2d/display/GraphicsGradientFill.js +6 -2
- package/dist/player/next2d/display/Loader.d.ts +1 -1
- package/dist/player/player/Next2D.d.ts +1 -2
- package/dist/player/player/Next2D.js +7 -11
- package/package.json +1 -1
- package/dist/interface/ClassNameMap.d.ts +0 -4
- package/dist/interface/ClassNameMap.js +0 -1
- package/dist/interface/RenderDisplayObjectImpl.d.ts +0 -2
- package/dist/interface/RenderDisplayObjectImpl.js +0 -1
- package/dist/interface/TextFormatImpl.d.ts +0 -16
- package/dist/interface/TextFormatImpl.js +0 -1
- package/dist/interface/TextModeImpl.d.ts +0 -1
- package/dist/interface/TextModeImpl.js +0 -1
- package/dist/renderer/RenderDisplayObject.d.ts +0 -129
- package/dist/renderer/RenderDisplayObject.js +0 -567
- package/dist/renderer/RenderDisplayObjectContainer.d.ts +0 -70
- package/dist/renderer/RenderDisplayObjectContainer.js +0 -670
- package/dist/renderer/RenderGlobal.d.ts +0 -76
- package/dist/renderer/RenderGlobal.js +0 -88
- package/dist/renderer/RenderGraphics.d.ts +0 -90
- package/dist/renderer/RenderGraphics.js +0 -597
- package/dist/renderer/RenderPlayer.d.ts +0 -164
- package/dist/renderer/RenderPlayer.js +0 -421
- package/dist/renderer/RenderShape.d.ts +0 -32
- package/dist/renderer/RenderShape.js +0 -104
- package/dist/renderer/RenderTextField.d.ts +0 -119
- package/dist/renderer/RenderTextField.js +0 -709
- package/dist/renderer/RenderVideo.d.ts +0 -59
- package/dist/renderer/RenderVideo.js +0 -272
package/dist/player/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { $currentPlayer, $initialize, $isSafari, $rendererWorker } from "./util/Util";
|
|
3
3
|
import { Next2D } from "./player/Next2D";
|
|
4
4
|
if (!("next2d" in window)) {
|
|
5
|
-
console.log("%c Next2D Player %c 1.14.
|
|
5
|
+
console.log("%c Next2D Player %c 1.14.13 %c https://next2d.app", "color: #fff; background: #5f5f5f", "color: #fff; background: #4bc729", "");
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
window.next2d = new Next2D([new Promise((resolve) => {
|
|
8
8
|
if (document.readyState === "loading") {
|
|
@@ -16,7 +16,8 @@ if (!("next2d" in window)) {
|
|
|
16
16
|
"isSafari": $isSafari
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
$currentPlayer()
|
|
19
|
+
$currentPlayer()
|
|
20
|
+
._$initializeCanvas();
|
|
20
21
|
resolve();
|
|
21
22
|
});
|
|
22
23
|
};
|
|
@@ -32,7 +33,8 @@ if (!("next2d" in window)) {
|
|
|
32
33
|
"isSafari": $isSafari
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
$currentPlayer()
|
|
36
|
+
$currentPlayer()
|
|
37
|
+
._$initializeCanvas();
|
|
36
38
|
resolve();
|
|
37
39
|
});
|
|
38
40
|
}
|
|
@@ -32,7 +32,7 @@ export declare class GraphicsGradientFill {
|
|
|
32
32
|
* @constructor
|
|
33
33
|
* @private
|
|
34
34
|
*/
|
|
35
|
-
constructor(type: GradientType, colors: number[], alphas: number[], ratios: number[], matrix?: Matrix | null, spread_method?: SpreadMethod, interpolation_method?: InterpolationMethod, focal_point_ratio?: number);
|
|
35
|
+
constructor(type: GradientType, colors: number[] | string[], alphas: number[], ratios: number[], matrix?: Matrix | null, spread_method?: SpreadMethod, interpolation_method?: InterpolationMethod, focal_point_ratio?: number);
|
|
36
36
|
/**
|
|
37
37
|
* @description 分配された色の情報を統合して配列で返却
|
|
38
38
|
* Integrate the distributed color information and return it in an array.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $getArray, $intToRGBA, $Math, $MATRIX_ARRAY_IDENTITY } from "../../util/RenderUtil";
|
|
1
|
+
import { $colorStringToInt, $getArray, $intToRGBA, $Math, $MATRIX_ARRAY_IDENTITY } from "../../util/RenderUtil";
|
|
2
2
|
/**
|
|
3
3
|
* グラデーション塗りを定義します。
|
|
4
4
|
* Defines a gradient fill.
|
|
@@ -121,7 +121,11 @@ export class GraphicsGradientFill {
|
|
|
121
121
|
if (!this._$colorStops.length) {
|
|
122
122
|
const length = $Math.min($Math.min(this._$alphas.length, this._$colors.length), this._$ratios.length);
|
|
123
123
|
for (let idx = 0; idx < length; ++idx) {
|
|
124
|
-
const
|
|
124
|
+
const value = this._$colors[idx];
|
|
125
|
+
const color = typeof value === "string"
|
|
126
|
+
? $colorStringToInt(value)
|
|
127
|
+
: value;
|
|
128
|
+
const object = $intToRGBA(color, this._$alphas[idx]);
|
|
125
129
|
this._$colorStops[idx] = {
|
|
126
130
|
"ratio": this._$ratios[idx] / 255,
|
|
127
131
|
"R": object.R,
|
|
@@ -79,7 +79,7 @@ export declare class Loader extends DisplayObjectContainer {
|
|
|
79
79
|
* @readonly
|
|
80
80
|
* @public
|
|
81
81
|
*/
|
|
82
|
-
get contentLoaderInfo(): LoaderInfo
|
|
82
|
+
get contentLoaderInfo(): LoaderInfo;
|
|
83
83
|
/**
|
|
84
84
|
* @description JSONファイルを、この Loader オブジェクトの子であるcontentプロパティにロードします。
|
|
85
85
|
* JPEG、GIF、PNGなどの画像データは loadImage で同様にcontentプロパティにロードします。
|
|
@@ -15,6 +15,7 @@ import type { UIImpl } from "../../interface/UIImpl";
|
|
|
15
15
|
* @class
|
|
16
16
|
*/
|
|
17
17
|
export declare class Next2D {
|
|
18
|
+
private readonly _$promises;
|
|
18
19
|
private readonly _$player;
|
|
19
20
|
readonly display: DisplayImpl;
|
|
20
21
|
readonly events: EventsImpl;
|
|
@@ -24,8 +25,6 @@ export declare class Next2D {
|
|
|
24
25
|
readonly net: NetImpl;
|
|
25
26
|
readonly text: TextImpl;
|
|
26
27
|
readonly ui: UIImpl;
|
|
27
|
-
fw: any;
|
|
28
|
-
private readonly _$promises;
|
|
29
28
|
/**
|
|
30
29
|
* @constructor
|
|
31
30
|
* @public
|
|
@@ -19,6 +19,7 @@ import { $clamp, $poolArray } from "../util/RenderUtil";
|
|
|
19
19
|
* @class
|
|
20
20
|
*/
|
|
21
21
|
export class Next2D {
|
|
22
|
+
_$promises;
|
|
22
23
|
_$player;
|
|
23
24
|
display;
|
|
24
25
|
events;
|
|
@@ -28,8 +29,6 @@ export class Next2D {
|
|
|
28
29
|
net;
|
|
29
30
|
text;
|
|
30
31
|
ui;
|
|
31
|
-
fw;
|
|
32
|
-
_$promises;
|
|
33
32
|
/**
|
|
34
33
|
* @constructor
|
|
35
34
|
* @public
|
|
@@ -85,12 +84,6 @@ export class Next2D {
|
|
|
85
84
|
* @public
|
|
86
85
|
*/
|
|
87
86
|
this.ui = ui;
|
|
88
|
-
/**
|
|
89
|
-
* @type {object}
|
|
90
|
-
* @default null
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
|
-
this.fw = null;
|
|
94
87
|
}
|
|
95
88
|
/**
|
|
96
89
|
* @member {Player}
|
|
@@ -145,14 +138,17 @@ export class Next2D {
|
|
|
145
138
|
this._$player.setOptions(options);
|
|
146
139
|
this._$player._$initialize();
|
|
147
140
|
const loader = new Loader();
|
|
148
|
-
|
|
149
|
-
|
|
141
|
+
loader
|
|
142
|
+
.contentLoaderInfo
|
|
143
|
+
.addEventListener(IOErrorEvent.IO_ERROR, (event) => {
|
|
150
144
|
if (event.target) {
|
|
151
145
|
event.target.removeEventListener(IOErrorEvent.IO_ERROR, event.listener);
|
|
152
146
|
}
|
|
153
147
|
alert("Error: " + event.text);
|
|
154
148
|
});
|
|
155
|
-
|
|
149
|
+
loader
|
|
150
|
+
.contentLoaderInfo
|
|
151
|
+
.addEventListener(Event.COMPLETE, (event) => {
|
|
156
152
|
const loaderInfo = event.target;
|
|
157
153
|
const player = this._$player;
|
|
158
154
|
loaderInfo
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/player",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.13",
|
|
4
4
|
"description": "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.",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@tvon.jp>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TextFormatAlignImpl } from "./TextFormatAlignImpl";
|
|
2
|
-
export interface TextFormatImpl {
|
|
3
|
-
_$font: string;
|
|
4
|
-
_$size: number;
|
|
5
|
-
_$color: number;
|
|
6
|
-
_$bold: boolean;
|
|
7
|
-
_$italic: boolean;
|
|
8
|
-
_$underline: boolean;
|
|
9
|
-
_$align: TextFormatAlignImpl;
|
|
10
|
-
_$leftMargin: number;
|
|
11
|
-
_$rightMargin: number;
|
|
12
|
-
_$indent: number;
|
|
13
|
-
_$leading: number;
|
|
14
|
-
_$blockIndent: number;
|
|
15
|
-
_$letterSpacing: number;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type TextModeImpl = "text" | "break" | "wrap" | "image";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { Rectangle } from "../player/next2d/geom/Rectangle";
|
|
2
|
-
import type { BlendModeImpl } from "../interface/BlendModeImpl";
|
|
3
|
-
import type { FilterArrayImpl } from "../interface/FilterArrayImpl";
|
|
4
|
-
import type { BoundsImpl } from "../interface/BoundsImpl";
|
|
5
|
-
import type { CanvasToWebGLContext } from "../webgl/CanvasToWebGLContext";
|
|
6
|
-
import type { PropertyMessageMapImpl } from "../interface/PropertyMessageMapImpl";
|
|
7
|
-
/**
|
|
8
|
-
* @class
|
|
9
|
-
*/
|
|
10
|
-
export declare class RenderDisplayObject {
|
|
11
|
-
_$instanceId: number;
|
|
12
|
-
_$parentId: number;
|
|
13
|
-
_$loaderInfoId: number;
|
|
14
|
-
_$characterId: number;
|
|
15
|
-
_$clipDepth: number;
|
|
16
|
-
_$depth: number;
|
|
17
|
-
_$isMask: boolean;
|
|
18
|
-
_$updated: boolean;
|
|
19
|
-
readonly _$matrix: Float32Array;
|
|
20
|
-
_$blendMode: BlendModeImpl;
|
|
21
|
-
readonly _$colorTransform: Float32Array;
|
|
22
|
-
_$filters: FilterArrayImpl | null;
|
|
23
|
-
_$visible: boolean;
|
|
24
|
-
_$maskId: number;
|
|
25
|
-
_$maskMatrix: Float32Array | null;
|
|
26
|
-
_$xMin: number;
|
|
27
|
-
_$yMin: number;
|
|
28
|
-
_$xMax: number;
|
|
29
|
-
_$yMax: number;
|
|
30
|
-
_$scale9Grid: Rectangle | null;
|
|
31
|
-
_$matrixBase: Float32Array | null;
|
|
32
|
-
/**
|
|
33
|
-
* @constructor
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
constructor();
|
|
37
|
-
/**
|
|
38
|
-
* @param {Float32Array} matrix
|
|
39
|
-
* @return {boolean}
|
|
40
|
-
* @method
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
_$shouldClip(matrix: Float32Array): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* @param {Float32Array} [matrix=null]
|
|
46
|
-
* @returns {object}
|
|
47
|
-
* @private
|
|
48
|
-
*/
|
|
49
|
-
_$getLayerBounds(matrix?: Float32Array | null): BoundsImpl;
|
|
50
|
-
/**
|
|
51
|
-
* @param {Float32Array} [matrix=null]
|
|
52
|
-
* @returns {object}
|
|
53
|
-
* @method
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
_$getBounds(matrix?: Float32Array | null): BoundsImpl;
|
|
57
|
-
/**
|
|
58
|
-
* @param {CanvasToWebGLContext} context
|
|
59
|
-
* @param {Float32Array} matrix
|
|
60
|
-
* @return {Float32Array|boolean|null}
|
|
61
|
-
* @method
|
|
62
|
-
* @private
|
|
63
|
-
*/
|
|
64
|
-
_$startClip(context: CanvasToWebGLContext, matrix: Float32Array): Float32Array | boolean | null;
|
|
65
|
-
/**
|
|
66
|
-
* @description 描画情報を更新
|
|
67
|
-
*
|
|
68
|
-
* @param {object} object
|
|
69
|
-
* @return {void}
|
|
70
|
-
* @method
|
|
71
|
-
* @private
|
|
72
|
-
*/
|
|
73
|
-
_$update(object: PropertyMessageMapImpl<any>): void;
|
|
74
|
-
/**
|
|
75
|
-
* @param {array} [filters]
|
|
76
|
-
* @return {boolean}
|
|
77
|
-
* @private
|
|
78
|
-
*/
|
|
79
|
-
_$canApply(filters?: FilterArrayImpl | null): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* @description Playerから登録を削除
|
|
82
|
-
*
|
|
83
|
-
* @return {void}
|
|
84
|
-
* @method
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
_$remove(): void;
|
|
88
|
-
/**
|
|
89
|
-
* @return {boolean}
|
|
90
|
-
* @method
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
_$isUpdated(): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* @param {number} width
|
|
96
|
-
* @param {number} height
|
|
97
|
-
* @param {Float32Array} matrix
|
|
98
|
-
* @param {array} [filters=null]
|
|
99
|
-
* @param {boolean} [can_apply=false]
|
|
100
|
-
* @param {number} [position_x=0]
|
|
101
|
-
* @param {number} [position_y=0]
|
|
102
|
-
* @return {boolean}
|
|
103
|
-
* @private
|
|
104
|
-
*/
|
|
105
|
-
_$isFilterUpdated(width: number, height: number, matrix: Float32Array, filters?: FilterArrayImpl | null, can_apply?: boolean, position_x?: number, position_y?: number): boolean;
|
|
106
|
-
/**
|
|
107
|
-
* @param {CanvasToWebGLContext} context
|
|
108
|
-
* @param {array} filters
|
|
109
|
-
* @param {WebGLTexture} target_texture
|
|
110
|
-
* @param {Float32Array} matrix
|
|
111
|
-
* @param {number} width
|
|
112
|
-
* @param {number} height
|
|
113
|
-
* @return {WebGLTexture}
|
|
114
|
-
* @private
|
|
115
|
-
*/
|
|
116
|
-
_$applyFilter(context: CanvasToWebGLContext, filters: FilterArrayImpl, target_texture: WebGLTexture, matrix: Float32Array, width: number, height: number): WebGLTexture;
|
|
117
|
-
/**
|
|
118
|
-
* @param {CanvasToWebGLContext} context
|
|
119
|
-
* @param {WebGLTexture} target_texture
|
|
120
|
-
* @param {Float32Array} matrix
|
|
121
|
-
* @param {array} filters
|
|
122
|
-
* @param {number} width
|
|
123
|
-
* @param {number} height
|
|
124
|
-
* @return {WebGLTexture}
|
|
125
|
-
* @method
|
|
126
|
-
* @private
|
|
127
|
-
*/
|
|
128
|
-
_$drawFilter(context: CanvasToWebGLContext, target_texture: WebGLTexture, matrix: Float32Array, filters: FilterArrayImpl, width: number, height: number): WebGLTexture;
|
|
129
|
-
}
|