@react-three/test-renderer 9.0.0 → 10.0.0

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
@@ -1,5 +1,16 @@
1
1
  # @react-three/test-renderer
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5a7b5321: Add eventTarget and eventPrefix
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [5a7b5321]
12
+ - @react-three/fiber@8.4.0
13
+
3
14
  ## 9.0.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -38,7 +38,7 @@ import ReactThreeTestRenderer from '@react-three/test-renderer'
38
38
 
39
39
  const renderer = await ReactThreeTestRenderer.create(
40
40
  <mesh>
41
- <boxBufferGeometry args={[2, 2]} />
41
+ <boxGeometry args={[2, 2]} />
42
42
  <meshStandardMaterial
43
43
  args={[
44
44
  {
@@ -1,18 +1 @@
1
- declare class WebGLRenderingContext {
2
- [key: string]: any;
3
- constructor(canvas: HTMLCanvasElement);
4
- getShaderPrecisionFormat: () => {
5
- rangeMin: number;
6
- rangeMax: number;
7
- precision: number;
8
- };
9
- private GL_VERSION;
10
- private SCISSOR_BOX;
11
- private VIEWPORT;
12
- getParameter: (paramId: number) => number[] | string[] | undefined;
13
- getExtension: (ext: string) => any;
14
- getProgramInfoLog: () => string;
15
- getShaderInfoLog: () => string;
16
- }
17
- export declare const createWebGLContext: (canvas: HTMLCanvasElement) => WebGLRenderingContext;
18
- export {};
1
+ export declare const createWebGLContext: (canvas: HTMLCanvasElement) => RenderingContext;
@@ -655,12 +655,15 @@ const create = async (element, options) => {
655
655
  width: options == null ? void 0 : options.width,
656
656
  height: options == null ? void 0 : options.height,
657
657
  beforeReturn: canvas => {
658
- //@ts-ignore
659
- canvas.getContext = type => {
660
- if (type === 'webgl' || type === 'webgl2') {
658
+ function getContext(contextId) {
659
+ if (contextId === 'webgl' || contextId === 'webgl2') {
661
660
  return createWebGLContext(canvas);
662
661
  }
663
- };
662
+
663
+ return null;
664
+ }
665
+
666
+ canvas.getContext = getContext;
664
667
  }
665
668
  });
666
669
  const _fiber = canvas;
@@ -655,12 +655,15 @@ const create = async (element, options) => {
655
655
  width: options == null ? void 0 : options.width,
656
656
  height: options == null ? void 0 : options.height,
657
657
  beforeReturn: canvas => {
658
- //@ts-ignore
659
- canvas.getContext = type => {
660
- if (type === 'webgl' || type === 'webgl2') {
658
+ function getContext(contextId) {
659
+ if (contextId === 'webgl' || contextId === 'webgl2') {
661
660
  return createWebGLContext(canvas);
662
661
  }
663
- };
662
+
663
+ return null;
664
+ }
665
+
666
+ canvas.getContext = getContext;
664
667
  }
665
668
  });
666
669
  const _fiber = canvas;
@@ -631,12 +631,15 @@ const create = async (element, options) => {
631
631
  width: options == null ? void 0 : options.width,
632
632
  height: options == null ? void 0 : options.height,
633
633
  beforeReturn: canvas => {
634
- //@ts-ignore
635
- canvas.getContext = type => {
636
- if (type === 'webgl' || type === 'webgl2') {
634
+ function getContext(contextId) {
635
+ if (contextId === 'webgl' || contextId === 'webgl2') {
637
636
  return createWebGLContext(canvas);
638
637
  }
639
- };
638
+
639
+ return null;
640
+ }
641
+
642
+ canvas.getContext = getContext;
640
643
  }
641
644
  });
642
645
  const _fiber = canvas;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/test-renderer",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Test Renderer for react-three-fiber",
5
5
  "author": "Josh Ellis",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=17.0",
26
- "@react-three/fiber": ">=8.1.0",
26
+ "@react-three/fiber": ">=8.4.0",
27
27
  "three": ">=0.126"
28
28
  }
29
29
  }