@lightningjs/renderer 3.0.0-beta11 → 3.0.0-beta12
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/src/common/CommonTypes.d.ts +2 -2
- package/dist/src/core/CoreNode.d.ts +8 -7
- package/dist/src/core/CoreNode.js +57 -61
- package/dist/src/core/CoreNode.js.map +1 -1
- package/dist/src/core/CoreTextNode.js +9 -9
- package/dist/src/core/CoreTextNode.js.map +1 -1
- package/dist/src/core/Stage.js +4 -4
- package/dist/src/core/Stage.js.map +1 -1
- package/dist/src/core/lib/textureCompression.js +4 -4
- package/dist/src/core/lib/textureCompression.js.map +1 -1
- package/dist/src/core/renderers/CoreShaderNode.js +2 -2
- package/dist/src/core/renderers/CoreShaderNode.js.map +1 -1
- package/dist/src/core/renderers/canvas/CanvasRenderer.js +1 -1
- package/dist/src/core/renderers/canvas/CanvasRenderer.js.map +1 -1
- package/dist/src/core/renderers/canvas/CanvasTexture.js +5 -5
- package/dist/src/core/renderers/canvas/CanvasTexture.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlCtxRenderTexture.js +5 -6
- package/dist/src/core/renderers/webgl/WebGlCtxRenderTexture.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.d.ts +13 -0
- package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.js +34 -5
- package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlCtxTexture.js +21 -21
- package/dist/src/core/renderers/webgl/WebGlCtxTexture.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlRenderOp.js +1 -1
- package/dist/src/core/renderers/webgl/WebGlRenderOp.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlRenderer.js +12 -11
- package/dist/src/core/renderers/webgl/WebGlRenderer.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlShaderProgram.js +2 -2
- package/dist/src/core/renderers/webgl/WebGlShaderProgram.js.map +1 -1
- package/dist/src/core/shaders/canvas/Border.js +4 -4
- package/dist/src/core/shaders/canvas/Border.js.map +1 -1
- package/dist/src/core/shaders/canvas/HolePunch.js +3 -3
- package/dist/src/core/shaders/canvas/HolePunch.js.map +1 -1
- package/dist/src/core/shaders/canvas/LinearGradient.js +2 -2
- package/dist/src/core/shaders/canvas/LinearGradient.js.map +1 -1
- package/dist/src/core/shaders/canvas/RadialGradient.js +4 -4
- package/dist/src/core/shaders/canvas/RadialGradient.js.map +1 -1
- package/dist/src/core/shaders/canvas/Rounded.js +1 -1
- package/dist/src/core/shaders/canvas/Rounded.js.map +1 -1
- package/dist/src/core/shaders/canvas/RoundedWithBorder.js +3 -3
- package/dist/src/core/shaders/canvas/RoundedWithBorder.js.map +1 -1
- package/dist/src/core/shaders/canvas/RoundedWithBorderAndShadow.js +3 -3
- package/dist/src/core/shaders/canvas/RoundedWithBorderAndShadow.js.map +1 -1
- package/dist/src/core/shaders/canvas/RoundedWithShadow.js +1 -1
- package/dist/src/core/shaders/canvas/RoundedWithShadow.js.map +1 -1
- package/dist/src/core/shaders/templates/BorderTemplate.d.ts +1 -1
- package/dist/src/core/shaders/templates/BorderTemplate.js +10 -10
- package/dist/src/core/shaders/templates/BorderTemplate.js.map +1 -1
- package/dist/src/core/shaders/templates/HolePunchTemplate.d.ts +2 -2
- package/dist/src/core/shaders/templates/HolePunchTemplate.js +2 -2
- package/dist/src/core/shaders/templates/HolePunchTemplate.js.map +1 -1
- package/dist/src/core/shaders/templates/RadialGradientTemplate.d.ts +2 -2
- package/dist/src/core/shaders/templates/RadialGradientTemplate.js +2 -2
- package/dist/src/core/shaders/templates/RadialGradientTemplate.js.map +1 -1
- package/dist/src/core/shaders/webgl/Border.js +1 -1
- package/dist/src/core/shaders/webgl/Border.js.map +1 -1
- package/dist/src/core/shaders/webgl/HolePunch.js +2 -2
- package/dist/src/core/shaders/webgl/HolePunch.js.map +1 -1
- package/dist/src/core/shaders/webgl/RadialGradient.js +2 -2
- package/dist/src/core/shaders/webgl/RadialGradient.js.map +1 -1
- package/dist/src/core/shaders/webgl/Rounded.js +1 -1
- package/dist/src/core/shaders/webgl/Rounded.js.map +1 -1
- package/dist/src/core/shaders/webgl/RoundedWithBorder.js +2 -2
- package/dist/src/core/shaders/webgl/RoundedWithBorder.js.map +1 -1
- package/dist/src/core/shaders/webgl/RoundedWithBorderAndShadow.js +2 -2
- package/dist/src/core/shaders/webgl/RoundedWithBorderAndShadow.js.map +1 -1
- package/dist/src/core/shaders/webgl/RoundedWithShadow.js +1 -1
- package/dist/src/core/shaders/webgl/RoundedWithShadow.js.map +1 -1
- package/dist/src/core/textures/ColorTexture.js +1 -1
- package/dist/src/core/textures/ColorTexture.js.map +1 -1
- package/dist/src/core/textures/ImageTexture.d.ts +2 -2
- package/dist/src/core/textures/ImageTexture.js +11 -11
- package/dist/src/core/textures/ImageTexture.js.map +1 -1
- package/dist/src/core/textures/NoiseTexture.d.ts +2 -2
- package/dist/src/core/textures/NoiseTexture.js +6 -6
- package/dist/src/core/textures/NoiseTexture.js.map +1 -1
- package/dist/src/core/textures/RenderTexture.d.ts +6 -6
- package/dist/src/core/textures/RenderTexture.js +10 -10
- package/dist/src/core/textures/RenderTexture.js.map +1 -1
- package/dist/src/core/textures/SubTexture.d.ts +4 -4
- package/dist/src/core/textures/SubTexture.js +8 -8
- package/dist/src/core/textures/SubTexture.js.map +1 -1
- package/dist/src/core/textures/Texture.d.ts +3 -4
- package/dist/src/core/textures/Texture.js +4 -4
- package/dist/src/core/textures/Texture.js.map +1 -1
- package/dist/src/main-api/Inspector.js +7 -7
- package/dist/src/main-api/Inspector.js.map +1 -1
- package/dist/src/main-api/Renderer.js +2 -2
- package/dist/src/main-api/Renderer.js.map +1 -1
- package/dist/tsconfig.dist.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/common/CommonTypes.ts +2 -2
- package/src/core/CoreNode.test.ts +12 -12
- package/src/core/CoreNode.ts +67 -77
- package/src/core/CoreTextNode.ts +9 -9
- package/src/core/Stage.ts +4 -4
- package/src/core/lib/textureCompression.ts +4 -4
- package/src/core/renderers/CoreShaderNode.ts +2 -2
- package/src/core/renderers/canvas/CanvasRenderer.ts +2 -2
- package/src/core/renderers/canvas/CanvasTexture.ts +5 -5
- package/src/core/renderers/webgl/WebGlCtxRenderTexture.ts +5 -15
- package/src/core/renderers/webgl/WebGlCtxSubTexture.ts +50 -5
- package/src/core/renderers/webgl/WebGlCtxTexture.ts +21 -30
- package/src/core/renderers/webgl/WebGlRenderOp.ts +1 -1
- package/src/core/renderers/webgl/WebGlRenderer.ts +12 -13
- package/src/core/renderers/webgl/WebGlShaderProgram.ts +2 -2
- package/src/core/shaders/canvas/Border.ts +4 -4
- package/src/core/shaders/canvas/HolePunch.ts +4 -11
- package/src/core/shaders/canvas/LinearGradient.ts +2 -2
- package/src/core/shaders/canvas/RadialGradient.ts +4 -4
- package/src/core/shaders/canvas/Rounded.ts +2 -2
- package/src/core/shaders/canvas/RoundedWithBorder.ts +4 -6
- package/src/core/shaders/canvas/RoundedWithBorderAndShadow.ts +4 -6
- package/src/core/shaders/canvas/RoundedWithShadow.ts +2 -2
- package/src/core/shaders/templates/BorderTemplate.ts +11 -11
- package/src/core/shaders/templates/HolePunchTemplate.ts +4 -4
- package/src/core/shaders/templates/RadialGradientTemplate.ts +4 -4
- package/src/core/shaders/webgl/Border.ts +1 -1
- package/src/core/shaders/webgl/HolePunch.ts +2 -2
- package/src/core/shaders/webgl/RadialGradient.ts +3 -3
- package/src/core/shaders/webgl/Rounded.ts +1 -5
- package/src/core/shaders/webgl/RoundedWithBorder.ts +2 -6
- package/src/core/shaders/webgl/RoundedWithBorderAndShadow.ts +2 -2
- package/src/core/shaders/webgl/RoundedWithShadow.ts +1 -5
- package/src/core/textures/ColorTexture.ts +1 -1
- package/src/core/textures/ImageTexture.ts +15 -15
- package/src/core/textures/NoiseTexture.ts +8 -8
- package/src/core/textures/RenderTexture.ts +12 -12
- package/src/core/textures/SubTexture.ts +10 -10
- package/src/core/textures/Texture.ts +7 -7
- package/src/main-api/Inspector.ts +8 -8
- package/src/main-api/Renderer.ts +2 -2
|
@@ -67,12 +67,12 @@ export interface ImageTextureProps {
|
|
|
67
67
|
* Width of the image to be used as a texture. If not provided, the image's
|
|
68
68
|
* natural width will be used.
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
w?: number | null;
|
|
71
71
|
/**
|
|
72
72
|
* Height of the image to be used as a texture. If not provided, the image's
|
|
73
73
|
* natural height will be used.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
h?: number | null;
|
|
76
76
|
/**
|
|
77
77
|
* Type, indicate an image type for overriding type detection
|
|
78
78
|
*
|
|
@@ -276,21 +276,21 @@ export class ImageTexture extends Texture {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
let
|
|
279
|
+
let w, h;
|
|
280
280
|
// check if resp.data is typeof Uint8ClampedArray else
|
|
281
281
|
// use resp.data.width and resp.data.height
|
|
282
282
|
if (resp.data instanceof Uint8Array) {
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
w = this.props.w ?? 0;
|
|
284
|
+
h = this.props.h ?? 0;
|
|
285
285
|
} else {
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
w = resp.data?.width ?? (this.props.w || 0);
|
|
287
|
+
h = resp.data?.height ?? (this.props.h || 0);
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
// we're loaded!
|
|
291
291
|
this.setState('fetched', {
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
w,
|
|
293
|
+
h,
|
|
294
294
|
});
|
|
295
295
|
|
|
296
296
|
return {
|
|
@@ -336,8 +336,8 @@ export class ImageTexture extends Texture {
|
|
|
336
336
|
if (type === 'svg') {
|
|
337
337
|
return loadSvg(
|
|
338
338
|
absoluteSrc,
|
|
339
|
-
this.props.
|
|
340
|
-
this.props.
|
|
339
|
+
this.props.w,
|
|
340
|
+
this.props.h,
|
|
341
341
|
this.props.sx,
|
|
342
342
|
this.props.sy,
|
|
343
343
|
this.props.sw,
|
|
@@ -348,8 +348,8 @@ export class ImageTexture extends Texture {
|
|
|
348
348
|
if (isSvgImage(src) === true) {
|
|
349
349
|
return loadSvg(
|
|
350
350
|
absoluteSrc,
|
|
351
|
-
this.props.
|
|
352
|
-
this.props.
|
|
351
|
+
this.props.w,
|
|
352
|
+
this.props.h,
|
|
353
353
|
this.props.sx,
|
|
354
354
|
this.props.sy,
|
|
355
355
|
this.props.sw,
|
|
@@ -405,8 +405,8 @@ export class ImageTexture extends Texture {
|
|
|
405
405
|
premultiplyAlpha: props.premultiplyAlpha ?? true, // null,
|
|
406
406
|
key: props.key ?? null,
|
|
407
407
|
type: props.type ?? null,
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
w: props.w ?? null,
|
|
409
|
+
h: props.h ?? null,
|
|
410
410
|
sx: props.sx ?? null,
|
|
411
411
|
sy: props.sy ?? null,
|
|
412
412
|
sw: props.sw ?? null,
|
|
@@ -29,13 +29,13 @@ export interface NoiseTextureProps {
|
|
|
29
29
|
*
|
|
30
30
|
* @default 128
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
w?: number;
|
|
33
33
|
/**
|
|
34
34
|
* Height of texture
|
|
35
35
|
*
|
|
36
36
|
* @default 128
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
h?: number;
|
|
39
39
|
/**
|
|
40
40
|
* A number value that can be varied to force new textures to be generated
|
|
41
41
|
*
|
|
@@ -64,8 +64,8 @@ export class NoiseTexture extends Texture {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
override async getTextureSource(): Promise<TextureData> {
|
|
67
|
-
const {
|
|
68
|
-
const size =
|
|
67
|
+
const { w, h } = this.props;
|
|
68
|
+
const size = w * h * 4;
|
|
69
69
|
const pixelData8 = new Uint8ClampedArray(size);
|
|
70
70
|
for (let i = 0; i < size; i += 4) {
|
|
71
71
|
const v = Math.floor(Math.random() * 256);
|
|
@@ -78,7 +78,7 @@ export class NoiseTexture extends Texture {
|
|
|
78
78
|
this.setState('fetched');
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
|
-
data: new ImageData(pixelData8,
|
|
81
|
+
data: new ImageData(pixelData8, w, h),
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -87,15 +87,15 @@ export class NoiseTexture extends Texture {
|
|
|
87
87
|
return false;
|
|
88
88
|
}
|
|
89
89
|
const resolvedProps = NoiseTexture.resolveDefaults(props);
|
|
90
|
-
return `NoiseTexture,${resolvedProps.
|
|
90
|
+
return `NoiseTexture,${resolvedProps.w},${resolvedProps.h},${resolvedProps.cacheId}`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
static override resolveDefaults(
|
|
94
94
|
props: NoiseTextureProps,
|
|
95
95
|
): Required<NoiseTextureProps> {
|
|
96
96
|
return {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
w: props.w ?? 128,
|
|
98
|
+
h: props.h ?? 128,
|
|
99
99
|
cacheId: props.cacheId ?? 0,
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -28,13 +28,13 @@ export interface RenderTextureProps {
|
|
|
28
28
|
* WebGL Texture width
|
|
29
29
|
* @default 256
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
w?: number;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* WebGL Texture height
|
|
35
35
|
* @default 256
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
h?: number;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export class RenderTexture extends Texture {
|
|
@@ -47,20 +47,20 @@ export class RenderTexture extends Texture {
|
|
|
47
47
|
this.props = RenderTexture.resolveDefaults(props || {});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
get
|
|
51
|
-
return this.props.
|
|
50
|
+
get w() {
|
|
51
|
+
return this.props.w;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
set
|
|
55
|
-
this.props.
|
|
54
|
+
set w(value: number) {
|
|
55
|
+
this.props.w = value;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
get
|
|
59
|
-
return this.props.
|
|
58
|
+
get h() {
|
|
59
|
+
return this.props.h;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
set
|
|
63
|
-
this.props.
|
|
62
|
+
set h(value: number) {
|
|
63
|
+
this.props.h = value;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
override async getTextureSource(): Promise<TextureData> {
|
|
@@ -76,8 +76,8 @@ export class RenderTexture extends Texture {
|
|
|
76
76
|
props: RenderTextureProps,
|
|
77
77
|
): Required<RenderTextureProps> {
|
|
78
78
|
return {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
w: props.w || 256,
|
|
80
|
+
h: props.h || 256,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -60,12 +60,12 @@ export interface SubTextureProps {
|
|
|
60
60
|
*
|
|
61
61
|
* @default 0
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
w?: number;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* The height of the sub-texture in pixels
|
|
67
67
|
**/
|
|
68
|
-
|
|
68
|
+
h?: number;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -75,8 +75,8 @@ export interface SubTextureProps {
|
|
|
75
75
|
* The parent texture can be a Sprite Sheet/Texture Atlas and set using the
|
|
76
76
|
* {@link SubTextureProps.texture} prop. The sub-region relative to the parent
|
|
77
77
|
* texture is defined with the {@link SubTextureProps.x},
|
|
78
|
-
* {@link SubTextureProps.y}, {@link SubTextureProps.
|
|
79
|
-
* {@link SubTextureProps.
|
|
78
|
+
* {@link SubTextureProps.y}, {@link SubTextureProps.w}, and
|
|
79
|
+
* {@link SubTextureProps.h} pixel values.
|
|
80
80
|
*/
|
|
81
81
|
export class SubTexture extends Texture {
|
|
82
82
|
props: Required<SubTextureProps>;
|
|
@@ -134,8 +134,8 @@ export class SubTexture extends Texture {
|
|
|
134
134
|
// We ignore the parent's passed dimensions, and simply use the SubTexture's
|
|
135
135
|
// configured dimensions (because that's all that matters here)
|
|
136
136
|
this.forwardParentTxState('loaded', {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
w: this.props.w,
|
|
138
|
+
h: this.props.h,
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
141
|
|
|
@@ -145,8 +145,8 @@ export class SubTexture extends Texture {
|
|
|
145
145
|
|
|
146
146
|
private onParentTxFetched = () => {
|
|
147
147
|
this.forwardParentTxState('fetched', {
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
w: this.props.w,
|
|
149
|
+
h: this.props.h,
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
|
|
@@ -196,8 +196,8 @@ export class SubTexture extends Texture {
|
|
|
196
196
|
texture: props.texture,
|
|
197
197
|
x: props.x || 0,
|
|
198
198
|
y: props.y || 0,
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
w: props.w || 0,
|
|
200
|
+
h: props.h || 0,
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
|
|
@@ -45,7 +45,7 @@ export type TextureLoadedEventHandler = (
|
|
|
45
45
|
/**
|
|
46
46
|
* Represents compressed texture data.
|
|
47
47
|
*/
|
|
48
|
-
interface CompressedData {
|
|
48
|
+
export interface CompressedData {
|
|
49
49
|
/**
|
|
50
50
|
* GLenum spcifying compression format
|
|
51
51
|
*/
|
|
@@ -66,12 +66,12 @@ interface CompressedData {
|
|
|
66
66
|
*
|
|
67
67
|
* @default 0
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
w: number;
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* The height of the compressed texture in pixels.
|
|
73
73
|
**/
|
|
74
|
-
|
|
74
|
+
h: number;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -296,10 +296,10 @@ export abstract class Texture extends EventEmitter {
|
|
|
296
296
|
if (state === 'loaded') {
|
|
297
297
|
if (
|
|
298
298
|
errorOrDimensions !== undefined &&
|
|
299
|
-
'
|
|
300
|
-
'
|
|
301
|
-
errorOrDimensions.
|
|
302
|
-
errorOrDimensions.
|
|
299
|
+
'w' in errorOrDimensions === true &&
|
|
300
|
+
'h' in errorOrDimensions === true &&
|
|
301
|
+
errorOrDimensions.w !== undefined &&
|
|
302
|
+
errorOrDimensions.h !== undefined
|
|
303
303
|
) {
|
|
304
304
|
this._dimensions = errorOrDimensions;
|
|
305
305
|
}
|
|
@@ -462,14 +462,14 @@ export class Inspector {
|
|
|
462
462
|
let value = mappedStyleResponse.value;
|
|
463
463
|
if (property === 'x') {
|
|
464
464
|
const mount = props.mountX;
|
|
465
|
-
const width = props.
|
|
465
|
+
const width = props.w;
|
|
466
466
|
|
|
467
467
|
if (mount) {
|
|
468
468
|
value = `${parseInt(value) - width * mount}px`;
|
|
469
469
|
}
|
|
470
470
|
} else if (property === 'y') {
|
|
471
471
|
const mount = props.mountY;
|
|
472
|
-
const height = props.
|
|
472
|
+
const height = props.h;
|
|
473
473
|
|
|
474
474
|
if (mount) {
|
|
475
475
|
value = `${parseInt(value) - height * mount}px`;
|
|
@@ -538,8 +538,8 @@ export class Inspector {
|
|
|
538
538
|
const {
|
|
539
539
|
x,
|
|
540
540
|
y,
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
w,
|
|
542
|
+
h,
|
|
543
543
|
alpha = 1,
|
|
544
544
|
rotation = 0,
|
|
545
545
|
scale = 1,
|
|
@@ -551,10 +551,10 @@ export class Inspector {
|
|
|
551
551
|
// ignoring loops and repeats for now, as that might be a bit too much for the inspector
|
|
552
552
|
function animate() {
|
|
553
553
|
setTimeout(() => {
|
|
554
|
-
div.style.top = `${y -
|
|
555
|
-
div.style.left = `${x -
|
|
556
|
-
div.style.width = `${
|
|
557
|
-
div.style.height = `${
|
|
554
|
+
div.style.top = `${y - h * mountY}px`;
|
|
555
|
+
div.style.left = `${x - w * mountX}px`;
|
|
556
|
+
div.style.width = `${w}px`;
|
|
557
|
+
div.style.height = `${h}px`;
|
|
558
558
|
div.style.opacity = `${alpha}`;
|
|
559
559
|
div.style.rotate = `${rotation}rad`;
|
|
560
560
|
div.style.scale = `${scale}`;
|
package/src/main-api/Renderer.ts
CHANGED
|
@@ -824,8 +824,8 @@ export class RendererMain extends EventEmitter {
|
|
|
824
824
|
|
|
825
825
|
this.stage.renderer.updateViewport();
|
|
826
826
|
|
|
827
|
-
this.root.
|
|
828
|
-
this.root.
|
|
827
|
+
this.root.w = appWidth;
|
|
828
|
+
this.root.h = appHeight;
|
|
829
829
|
this.stage.updateViewportBounds();
|
|
830
830
|
}
|
|
831
831
|
|