@react-three/test-renderer 8.1.3 → 8.1.4
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/CHANGELOG.md
CHANGED
|
@@ -603,9 +603,7 @@ const createCanvas = ({
|
|
|
603
603
|
height = 800
|
|
604
604
|
} = {}) => {
|
|
605
605
|
var _globalThis$WebGLRend, _globalThis$WebGL2Ren;
|
|
606
|
-
const canvas = {
|
|
607
|
-
width,
|
|
608
|
-
height,
|
|
606
|
+
const canvas = typeof document !== 'undefined' && typeof document.createElement === 'function' ? document.createElement('canvas') : {
|
|
609
607
|
style: {},
|
|
610
608
|
addEventListener: () => {},
|
|
611
609
|
removeEventListener: () => {},
|
|
@@ -613,6 +611,8 @@ const createCanvas = ({
|
|
|
613
611
|
clientHeight: height,
|
|
614
612
|
getContext: () => new WebGL2RenderingContext(canvas)
|
|
615
613
|
};
|
|
614
|
+
canvas.width = width;
|
|
615
|
+
canvas.height = height;
|
|
616
616
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
617
617
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
618
618
|
// @ts-ignore
|
|
@@ -603,9 +603,7 @@ const createCanvas = ({
|
|
|
603
603
|
height = 800
|
|
604
604
|
} = {}) => {
|
|
605
605
|
var _globalThis$WebGLRend, _globalThis$WebGL2Ren;
|
|
606
|
-
const canvas = {
|
|
607
|
-
width,
|
|
608
|
-
height,
|
|
606
|
+
const canvas = typeof document !== 'undefined' && typeof document.createElement === 'function' ? document.createElement('canvas') : {
|
|
609
607
|
style: {},
|
|
610
608
|
addEventListener: () => {},
|
|
611
609
|
removeEventListener: () => {},
|
|
@@ -613,6 +611,8 @@ const createCanvas = ({
|
|
|
613
611
|
clientHeight: height,
|
|
614
612
|
getContext: () => new WebGL2RenderingContext(canvas)
|
|
615
613
|
};
|
|
614
|
+
canvas.width = width;
|
|
615
|
+
canvas.height = height;
|
|
616
616
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
617
617
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
618
618
|
// @ts-ignore
|
|
@@ -579,9 +579,7 @@ const createCanvas = ({
|
|
|
579
579
|
height = 800
|
|
580
580
|
} = {}) => {
|
|
581
581
|
var _globalThis$WebGLRend, _globalThis$WebGL2Ren;
|
|
582
|
-
const canvas = {
|
|
583
|
-
width,
|
|
584
|
-
height,
|
|
582
|
+
const canvas = typeof document !== 'undefined' && typeof document.createElement === 'function' ? document.createElement('canvas') : {
|
|
585
583
|
style: {},
|
|
586
584
|
addEventListener: () => {},
|
|
587
585
|
removeEventListener: () => {},
|
|
@@ -589,6 +587,8 @@ const createCanvas = ({
|
|
|
589
587
|
clientHeight: height,
|
|
590
588
|
getContext: () => new WebGL2RenderingContext(canvas)
|
|
591
589
|
};
|
|
590
|
+
canvas.width = width;
|
|
591
|
+
canvas.height = height;
|
|
592
592
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
593
593
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
594
594
|
// @ts-ignore
|