@react-three/test-renderer 8.2.1 → 8.2.2
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 +446 -440
- package/README.md +61 -61
- package/dist/react-three-test-renderer.cjs.dev.js +5 -5
- package/dist/react-three-test-renderer.cjs.prod.js +5 -5
- package/dist/react-three-test-renderer.esm.js +5 -5
- package/package.json +4 -4
- package/dist/declarations/src/WebGL2RenderingContext.d.ts +0 -16
- package/dist/declarations/src/createTestCanvas.d.ts +0 -2
- package/dist/declarations/src/createTestInstance.d.ts +0 -20
- package/dist/declarations/src/fireEvent.d.ts +0 -4
- package/dist/declarations/src/helpers/graph.d.ts +0 -3
- package/dist/declarations/src/helpers/is.d.ts +0 -9
- package/dist/declarations/src/helpers/strings.d.ts +0 -2
- package/dist/declarations/src/helpers/testInstance.d.ts +0 -5
- package/dist/declarations/src/helpers/tree.d.ts +0 -3
- package/dist/declarations/src/helpers/waitFor.d.ts +0 -5
- package/dist/declarations/src/index.d.ts +0 -14
- package/dist/declarations/src/types/index.d.ts +0 -1
- package/dist/declarations/src/types/internal.d.ts +0 -37
- package/dist/declarations/src/types/public.d.ts +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,440 +1,446 @@
|
|
|
1
|
-
# @react-three/test-renderer
|
|
2
|
-
|
|
3
|
-
## 8.2.
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
## 8.2.
|
|
10
|
-
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
## 8.
|
|
16
|
-
|
|
17
|
-
###
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
## 8.1.
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
## 8.1.
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
## 8.1.
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
## 8.1.
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
## 8.1.
|
|
46
|
-
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
## 8.0
|
|
52
|
-
|
|
53
|
-
###
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
## 8.0.
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
1
|
+
# @react-three/test-renderer
|
|
2
|
+
|
|
3
|
+
## 8.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ff1a16f1: fix: narrow React peer dep range
|
|
8
|
+
|
|
9
|
+
## 8.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 020bb194: fix(RTTR): set initial size for NaN in viewport
|
|
14
|
+
|
|
15
|
+
## 8.2.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- a5ffb08e: feat(RTTR): waitFor util
|
|
20
|
+
|
|
21
|
+
## 8.1.5
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 673927f7: fix(RTTR): implement HTMLCanvasElement.getContext
|
|
26
|
+
|
|
27
|
+
## 8.1.4
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 53ba22d3: fix(RTTR): fallback to canvas shim
|
|
32
|
+
|
|
33
|
+
## 8.1.3
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 2b0be267: fix: support WebGL2
|
|
38
|
+
|
|
39
|
+
## 8.1.2
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- d9e6316d: fix: transpile class properties
|
|
44
|
+
|
|
45
|
+
## 8.1.1
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 9a776b71: fix(RTTR): backport traverse, update fixes
|
|
50
|
+
|
|
51
|
+
## 8.1.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- 24c4dba4: shortcut for shadow type
|
|
56
|
+
|
|
57
|
+
## 8.0.17
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- 786ccb46: fix: restore RTTR version
|
|
62
|
+
|
|
63
|
+
## 8.0.16
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- 7b6df9df: fix: infinite loop updating cam viewport
|
|
68
|
+
- Updated dependencies [7b6df9df]
|
|
69
|
+
- @react-three/fiber@8.0.26
|
|
70
|
+
|
|
71
|
+
## 8.0.15
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- b7cd0f42: update viewport on camera changes
|
|
76
|
+
- Updated dependencies [b7cd0f42]
|
|
77
|
+
- @react-three/fiber@8.0.25
|
|
78
|
+
|
|
79
|
+
## 8.0.14
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- 29d03c64: revert multi attach
|
|
84
|
+
- Updated dependencies [29d03c64]
|
|
85
|
+
- @react-three/fiber@8.0.23
|
|
86
|
+
|
|
87
|
+
## 8.0.13
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- 4c87bce: fix: attach, devtools, and perf fixes
|
|
92
|
+
- Updated dependencies [4c87bce]
|
|
93
|
+
- @react-three/fiber@8.0.20
|
|
94
|
+
|
|
95
|
+
## 8.0.12
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- c4715d5f: allow invalidate to preempt more than 1 frame
|
|
100
|
+
- Updated dependencies [c4715d5f]
|
|
101
|
+
- @react-three/fiber@8.0.15
|
|
102
|
+
|
|
103
|
+
## 8.0.11
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- 5559a119: Add support for recoverable errors
|
|
108
|
+
- Updated dependencies [5559a119]
|
|
109
|
+
- @react-three/fiber@8.0.14
|
|
110
|
+
|
|
111
|
+
## 8.0.10
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- 9d77d8e2: fix: detach attribute removal
|
|
116
|
+
- Updated dependencies [9d77d8e2]
|
|
117
|
+
- @react-three/fiber@8.0.13
|
|
118
|
+
|
|
119
|
+
## 8.0.9
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- 3d10413f: fix portal layers
|
|
124
|
+
- Updated dependencies [3d10413f]
|
|
125
|
+
- @react-three/fiber@8.0.12
|
|
126
|
+
|
|
127
|
+
## 8.0.8
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- 5167b1e4: memoized.args can be undefined
|
|
132
|
+
- Updated dependencies [5167b1e4]
|
|
133
|
+
- @react-three/fiber@8.0.11
|
|
134
|
+
|
|
135
|
+
## 8.0.7
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- eb321afd: fix: remount bug, allow portals to inject custom size
|
|
140
|
+
- Updated dependencies [eb321afd]
|
|
141
|
+
- @react-three/fiber@8.0.10
|
|
142
|
+
|
|
143
|
+
## 8.0.6
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- 624df949: fix: canvas unmount race condition"
|
|
148
|
+
- Updated dependencies [624df949]
|
|
149
|
+
- @react-three/fiber@8.0.9
|
|
150
|
+
|
|
151
|
+
## 8.0.5
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- d4bafb9: fix re-parenting, useframe not working properly in portals, attach crash
|
|
156
|
+
- Updated dependencies [d4bafb9]
|
|
157
|
+
- @react-three/fiber@8.0.6
|
|
158
|
+
|
|
159
|
+
## 8.0.4
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- 227c328: fix pointer for root and portals
|
|
164
|
+
- Updated dependencies [227c328]
|
|
165
|
+
- @react-three/fiber@8.0.5
|
|
166
|
+
|
|
167
|
+
## 8.0.3
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- 3252aed: setevents needs to spread and be mirrored in portals
|
|
172
|
+
- Updated dependencies [3252aed]
|
|
173
|
+
- @react-three/fiber@8.0.3
|
|
174
|
+
|
|
175
|
+
## 8.0.2
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- 8035d1f: fix: legacy mode
|
|
180
|
+
- Updated dependencies [8035d1f]
|
|
181
|
+
- @react-three/fiber@8.0.2
|
|
182
|
+
|
|
183
|
+
## 8.0.1
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- 26db195: add legacy flag to turn of three.colormanagement
|
|
188
|
+
- Updated dependencies [26db195]
|
|
189
|
+
- @react-three/fiber@8.0.1
|
|
190
|
+
|
|
191
|
+
## 8.0.0
|
|
192
|
+
|
|
193
|
+
### Major Changes
|
|
194
|
+
|
|
195
|
+
- 385ba9c: v8 major, react-18 compat
|
|
196
|
+
- 04c07b8: v8 major, react-18 compat
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- 347ea79: new beta for library testing
|
|
201
|
+
- Updated dependencies [385ba9c]
|
|
202
|
+
- Updated dependencies [04c07b8]
|
|
203
|
+
- Updated dependencies [347ea79]
|
|
204
|
+
- @react-three/fiber@8.0.0
|
|
205
|
+
|
|
206
|
+
## 8.0.0-beta.0
|
|
207
|
+
|
|
208
|
+
### Major Changes
|
|
209
|
+
|
|
210
|
+
- 385ba9c: v8 major, react-18 compat
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- Updated dependencies [385ba9c]
|
|
215
|
+
- @react-three/fiber@8.0.0-beta.0
|
|
216
|
+
|
|
217
|
+
## 7.0.25-beta.0
|
|
218
|
+
|
|
219
|
+
### Patch Changes
|
|
220
|
+
|
|
221
|
+
- cf6316c: new beta for library testing
|
|
222
|
+
- Updated dependencies [cf6316c]
|
|
223
|
+
- @react-three/fiber@8.0.0-beta.0
|
|
224
|
+
|
|
225
|
+
## 7.0.24
|
|
226
|
+
|
|
227
|
+
### Patch Changes
|
|
228
|
+
|
|
229
|
+
- 8698734: Release latest patches
|
|
230
|
+
- Updated dependencies [8698734]
|
|
231
|
+
- @react-three/fiber@7.0.25
|
|
232
|
+
|
|
233
|
+
## 7.0.23
|
|
234
|
+
|
|
235
|
+
### Patch Changes
|
|
236
|
+
|
|
237
|
+
- 7f46ddf: cleanup captured pointers when released (#1914)
|
|
238
|
+
- Updated dependencies [7f46ddf]
|
|
239
|
+
- @react-three/fiber@7.0.24
|
|
240
|
+
|
|
241
|
+
## 7.0.22
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- 30d38b1: remove logs
|
|
246
|
+
- Updated dependencies [30d38b1]
|
|
247
|
+
- @react-three/fiber@7.0.23
|
|
248
|
+
|
|
249
|
+
## 7.0.21
|
|
250
|
+
|
|
251
|
+
### Patch Changes
|
|
252
|
+
|
|
253
|
+
- 259e1fa: add camera:manual
|
|
254
|
+
- Updated dependencies [259e1fa]
|
|
255
|
+
- @react-three/fiber@7.0.22
|
|
256
|
+
|
|
257
|
+
## 7.0.20
|
|
258
|
+
|
|
259
|
+
### Patch Changes
|
|
260
|
+
|
|
261
|
+
- 65e4147: up usemeasure, add last event to internals"
|
|
262
|
+
- Updated dependencies [65e4147]
|
|
263
|
+
- @react-three/fiber@7.0.21
|
|
264
|
+
|
|
265
|
+
## 7.0.19
|
|
266
|
+
|
|
267
|
+
### Patch Changes
|
|
268
|
+
|
|
269
|
+
- 54cb0fd: update react-use-measure, allow it to use the offsetSize
|
|
270
|
+
- Updated dependencies [54cb0fd]
|
|
271
|
+
- @react-three/fiber@7.0.20
|
|
272
|
+
|
|
273
|
+
## 7.0.18
|
|
274
|
+
|
|
275
|
+
### Patch Changes
|
|
276
|
+
|
|
277
|
+
- 7aa2eab: fix: remove zustand subcribe selector
|
|
278
|
+
- Updated dependencies [7aa2eab]
|
|
279
|
+
- @react-three/fiber@7.0.19
|
|
280
|
+
|
|
281
|
+
## 7.0.17
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- 6780f58: fix unmount pointer capture
|
|
286
|
+
- Updated dependencies [6780f58]
|
|
287
|
+
- @react-three/fiber@7.0.18
|
|
288
|
+
|
|
289
|
+
## 7.0.16
|
|
290
|
+
|
|
291
|
+
### Patch Changes
|
|
292
|
+
|
|
293
|
+
- 894c550: fix: event count
|
|
294
|
+
- Updated dependencies [894c550]
|
|
295
|
+
- @react-three/fiber@7.0.17
|
|
296
|
+
|
|
297
|
+
## 7.0.15
|
|
298
|
+
|
|
299
|
+
### Patch Changes
|
|
300
|
+
|
|
301
|
+
- c7a4220: patch: applyprops returns the same instance
|
|
302
|
+
- Updated dependencies [c7a4220]
|
|
303
|
+
- @react-three/fiber@7.0.16
|
|
304
|
+
|
|
305
|
+
## 7.0.14
|
|
306
|
+
|
|
307
|
+
### Patch Changes
|
|
308
|
+
|
|
309
|
+
- c5645e8: fix primitve leftovers on switch
|
|
310
|
+
- Updated dependencies [c5645e8]
|
|
311
|
+
- @react-three/fiber@7.0.15
|
|
312
|
+
|
|
313
|
+
## 7.0.13
|
|
314
|
+
|
|
315
|
+
### Patch Changes
|
|
316
|
+
|
|
317
|
+
- 05af996: fix: revert the is function
|
|
318
|
+
- Updated dependencies [05af996]
|
|
319
|
+
- @react-three/fiber@7.0.14
|
|
320
|
+
|
|
321
|
+
## 7.0.12
|
|
322
|
+
|
|
323
|
+
### Patch Changes
|
|
324
|
+
|
|
325
|
+
- 0df6073: fix: missed events
|
|
326
|
+
- Updated dependencies [0df6073]
|
|
327
|
+
- @react-three/fiber@7.0.12
|
|
328
|
+
|
|
329
|
+
## 7.0.11
|
|
330
|
+
|
|
331
|
+
### Patch Changes
|
|
332
|
+
|
|
333
|
+
- 62b0a3a: fix: event order of missed pointers
|
|
334
|
+
- Updated dependencies [62b0a3a]
|
|
335
|
+
- @react-three/fiber@7.0.11
|
|
336
|
+
|
|
337
|
+
## 7.0.10
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- e019dd4: fixes
|
|
342
|
+
- Updated dependencies [e019dd4]
|
|
343
|
+
- @react-three/fiber@7.0.10
|
|
344
|
+
|
|
345
|
+
## 7.0.8
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- cd266e4: Fix diffProps dashed keys
|
|
350
|
+
- Updated dependencies [cd266e4]
|
|
351
|
+
- @react-three/fiber@7.0.9
|
|
352
|
+
|
|
353
|
+
## 7.0.7
|
|
354
|
+
|
|
355
|
+
### Patch Changes
|
|
356
|
+
|
|
357
|
+
- 0375896: Simplify useframe, support instanced event cancelation, silence disposal
|
|
358
|
+
- Updated dependencies [0375896]
|
|
359
|
+
- @react-three/fiber@7.0.7
|
|
360
|
+
|
|
361
|
+
## 7.0.6
|
|
362
|
+
|
|
363
|
+
### Patch Changes
|
|
364
|
+
|
|
365
|
+
- fb052ad: Fix babel-env browserslist transpiling into old code"
|
|
366
|
+
- Updated dependencies [fb052ad]
|
|
367
|
+
- @react-three/fiber@7.0.6
|
|
368
|
+
|
|
369
|
+
## 7.0.5
|
|
370
|
+
|
|
371
|
+
### Patch Changes
|
|
372
|
+
|
|
373
|
+
- c97794a: Add useLoader.clear(Loader, input)
|
|
374
|
+
- Updated dependencies [c97794a]
|
|
375
|
+
- @react-three/fiber@7.0.5
|
|
376
|
+
|
|
377
|
+
## 7.0.4
|
|
378
|
+
|
|
379
|
+
### Patch Changes
|
|
380
|
+
|
|
381
|
+
- 974ecfb: Allow elements to define attachFns for specific mount/unmount
|
|
382
|
+
- Updated dependencies [974ecfb]
|
|
383
|
+
- @react-three/fiber@7.0.4
|
|
384
|
+
|
|
385
|
+
## 7.0.1
|
|
386
|
+
|
|
387
|
+
### Patch Changes
|
|
388
|
+
|
|
389
|
+
- a97aca3: Add controls state field
|
|
390
|
+
- Updated dependencies [a97aca3]
|
|
391
|
+
- 4c703d6: fix rttr didn't work with r130
|
|
392
|
+
- Updated dependencies [4c703d6]
|
|
393
|
+
- @react-three/fiber@7.0.2
|
|
394
|
+
|
|
395
|
+
## 7.0.0
|
|
396
|
+
|
|
397
|
+
### Major Changes
|
|
398
|
+
|
|
399
|
+
- 96ae1ad: fix javascript interpreting renderpriority as positive
|
|
400
|
+
|
|
401
|
+
### Patch Changes
|
|
402
|
+
|
|
403
|
+
- Updated dependencies [96ae1ad]
|
|
404
|
+
- @react-three/fiber@7.0.0
|
|
405
|
+
|
|
406
|
+
## 6.2.3
|
|
407
|
+
|
|
408
|
+
### Patch Changes
|
|
409
|
+
|
|
410
|
+
- 26bc7eb: typescript changes
|
|
411
|
+
- Updated dependencies [26bc7eb]
|
|
412
|
+
- @react-three/fiber@6.2.3
|
|
413
|
+
|
|
414
|
+
## 6.2.2
|
|
415
|
+
|
|
416
|
+
### Patch Changes
|
|
417
|
+
|
|
418
|
+
- 4f44a2c: use more helpful name with event handling in rttr
|
|
419
|
+
- Updated dependencies [4f44a2c]
|
|
420
|
+
- @react-three/fiber@6.2.2
|
|
421
|
+
|
|
422
|
+
## 6.1.5
|
|
423
|
+
|
|
424
|
+
### Patch Changes
|
|
425
|
+
|
|
426
|
+
- fix(rttr): if children is undefined return an array to map with
|
|
427
|
+
- Updated dependencies [undefined]
|
|
428
|
+
- @react-three/fiber@6.1.5
|
|
429
|
+
|
|
430
|
+
## 6.1.3
|
|
431
|
+
|
|
432
|
+
### Patch Changes
|
|
433
|
+
|
|
434
|
+
- 6faa090: Add shape to types, exclude event functions from event data
|
|
435
|
+
- Updated dependencies [6faa090]
|
|
436
|
+
- @react-three/fiber@6.1.4
|
|
437
|
+
|
|
438
|
+
## 6.1.2
|
|
439
|
+
|
|
440
|
+
### Patch Changes
|
|
441
|
+
|
|
442
|
+
- 71e72c0: Fix constructor args with attached children (#1348)
|
|
443
|
+
- Updated dependencies [71e72c0]
|
|
444
|
+
- @react-three/fiber@6.1.3
|
|
445
|
+
|
|
446
|
+
## 6.1.1
|
package/README.md
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
# React Three Test Renderer ⚛️🔼🧪
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.com/package/@react-three/test-renderer)
|
|
4
|
-
[](https://npmjs.com/package/@react-three/test-renderer)
|
|
5
|
-
[](https://twitter.com/pmndrs)
|
|
6
|
-
[](https://twitter.com/_josh_ellis_)
|
|
7
|
-
[](https://discord.gg/ZZjjNvJ)
|
|
8
|
-
|
|
9
|
-
`@react-three/test-renderer` is a React testing <a href="https://reactjs.org/docs/codebase-overview.html#renderers">renderer</a> for threejs in node.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
yarn add @react-three/fiber three
|
|
13
|
-
yarn add -D @react-three/test-renderer
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## The problem
|
|
19
|
-
|
|
20
|
-
You've written a complex and amazing webgl experience using [`@react-three/fiber`](https://github.com/pmndrs/react-three-fiber) and you want to test it to make sure it works even after you add even more features.
|
|
21
|
-
|
|
22
|
-
You go to use `react-dom` but hang on, `THREE` elements aren't in the DOM! You decide to use `@react-three/test-renderer` you can see the container & the canvas but you can't see the tree for the scene!? That's because `@react-three/fiber` renders to a different react root with it's own reconciler.
|
|
23
|
-
|
|
24
|
-
## The solution
|
|
25
|
-
|
|
26
|
-
You use `@react-three/test-renderer` ⚛️-🔼-🧪, an experimental React renderer using `@react-three/fiber` under the hood to expose the scene graph wrapped in a test instance providing helpful utilities to test with.
|
|
27
|
-
|
|
28
|
-
Essentially, this package makes it easy to grab a snapshot of the Scene Graph rendered by `three` without the need for webgl & browser.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
RTTR is testing library agnostic, so we hope that it works with libraries such as [`jest`](https://jestjs.io/), [`jasmine`](https://jasmine.github.io/) etc.
|
|
35
|
-
|
|
36
|
-
```tsx
|
|
37
|
-
import ReactThreeTestRenderer from '@react-three/test-renderer'
|
|
38
|
-
|
|
39
|
-
const renderer = await ReactThreeTestRenderer.create(
|
|
40
|
-
<mesh>
|
|
41
|
-
<boxGeometry args={[2, 2]} />
|
|
42
|
-
<meshStandardMaterial
|
|
43
|
-
args={[
|
|
44
|
-
{
|
|
45
|
-
color: 0x0000ff,
|
|
46
|
-
},
|
|
47
|
-
]}
|
|
48
|
-
/>
|
|
49
|
-
</mesh>,
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
// assertions using the TestInstance & Scene Graph
|
|
53
|
-
console.log(renderer.toGraph())
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## API
|
|
59
|
-
|
|
60
|
-
- [React Three Test Renderer API](/packages/test-renderer/markdown/rttr.md)
|
|
61
|
-
- [React Three Test Instance API](/packages/test-renderer/markdown/rttr-instance.md)
|
|
1
|
+
# React Three Test Renderer ⚛️🔼🧪
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/@react-three/test-renderer)
|
|
4
|
+
[](https://npmjs.com/package/@react-three/test-renderer)
|
|
5
|
+
[](https://twitter.com/pmndrs)
|
|
6
|
+
[](https://twitter.com/_josh_ellis_)
|
|
7
|
+
[](https://discord.gg/ZZjjNvJ)
|
|
8
|
+
|
|
9
|
+
`@react-three/test-renderer` is a React testing <a href="https://reactjs.org/docs/codebase-overview.html#renderers">renderer</a> for threejs in node.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add @react-three/fiber three
|
|
13
|
+
yarn add -D @react-three/test-renderer
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## The problem
|
|
19
|
+
|
|
20
|
+
You've written a complex and amazing webgl experience using [`@react-three/fiber`](https://github.com/pmndrs/react-three-fiber) and you want to test it to make sure it works even after you add even more features.
|
|
21
|
+
|
|
22
|
+
You go to use `react-dom` but hang on, `THREE` elements aren't in the DOM! You decide to use `@react-three/test-renderer` you can see the container & the canvas but you can't see the tree for the scene!? That's because `@react-three/fiber` renders to a different react root with it's own reconciler.
|
|
23
|
+
|
|
24
|
+
## The solution
|
|
25
|
+
|
|
26
|
+
You use `@react-three/test-renderer` ⚛️-🔼-🧪, an experimental React renderer using `@react-three/fiber` under the hood to expose the scene graph wrapped in a test instance providing helpful utilities to test with.
|
|
27
|
+
|
|
28
|
+
Essentially, this package makes it easy to grab a snapshot of the Scene Graph rendered by `three` without the need for webgl & browser.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
RTTR is testing library agnostic, so we hope that it works with libraries such as [`jest`](https://jestjs.io/), [`jasmine`](https://jasmine.github.io/) etc.
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import ReactThreeTestRenderer from '@react-three/test-renderer'
|
|
38
|
+
|
|
39
|
+
const renderer = await ReactThreeTestRenderer.create(
|
|
40
|
+
<mesh>
|
|
41
|
+
<boxGeometry args={[2, 2]} />
|
|
42
|
+
<meshStandardMaterial
|
|
43
|
+
args={[
|
|
44
|
+
{
|
|
45
|
+
color: 0x0000ff,
|
|
46
|
+
},
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
</mesh>,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
// assertions using the TestInstance & Scene Graph
|
|
53
|
+
console.log(renderer.toGraph())
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## API
|
|
59
|
+
|
|
60
|
+
- [React Three Test Renderer API](/packages/test-renderer/markdown/rttr.md)
|
|
61
|
+
- [React Three Test Instance API](/packages/test-renderer/markdown/rttr-instance.md)
|
|
@@ -629,9 +629,9 @@ const createCanvas = ({
|
|
|
629
629
|
}
|
|
630
630
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
631
631
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
632
|
-
// @ts-
|
|
632
|
+
// @ts-expect-error
|
|
633
633
|
(_globalThis$WebGLRend = globalThis.WebGLRenderingContext) != null ? _globalThis$WebGLRend : globalThis.WebGLRenderingContext = WebGLRenderingContext;
|
|
634
|
-
// @ts-
|
|
634
|
+
// @ts-expect-error
|
|
635
635
|
(_globalThis$WebGL2Ren = globalThis.WebGL2RenderingContext) != null ? _globalThis$WebGL2Ren : globalThis.WebGL2RenderingContext = WebGL2RenderingContext;
|
|
636
636
|
return canvas;
|
|
637
637
|
};
|
|
@@ -713,9 +713,9 @@ class ReactThreeTestInstance {
|
|
|
713
713
|
exhaustive: false
|
|
714
714
|
}) => {
|
|
715
715
|
if (opts.exhaustive) {
|
|
716
|
-
/**
|
|
717
|
-
* this will return objects like
|
|
718
|
-
* color or effects etc.
|
|
716
|
+
/**
|
|
717
|
+
* this will return objects like
|
|
718
|
+
* color or effects etc.
|
|
719
719
|
*/
|
|
720
720
|
return [...(fiber.children || []).map(fib => wrapFiber(fib)), ...fiber.__r3f.objects.map(fib => wrapFiber(fib))];
|
|
721
721
|
} else {
|
|
@@ -629,9 +629,9 @@ const createCanvas = ({
|
|
|
629
629
|
}
|
|
630
630
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
631
631
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
632
|
-
// @ts-
|
|
632
|
+
// @ts-expect-error
|
|
633
633
|
(_globalThis$WebGLRend = globalThis.WebGLRenderingContext) != null ? _globalThis$WebGLRend : globalThis.WebGLRenderingContext = WebGLRenderingContext;
|
|
634
|
-
// @ts-
|
|
634
|
+
// @ts-expect-error
|
|
635
635
|
(_globalThis$WebGL2Ren = globalThis.WebGL2RenderingContext) != null ? _globalThis$WebGL2Ren : globalThis.WebGL2RenderingContext = WebGL2RenderingContext;
|
|
636
636
|
return canvas;
|
|
637
637
|
};
|
|
@@ -713,9 +713,9 @@ class ReactThreeTestInstance {
|
|
|
713
713
|
exhaustive: false
|
|
714
714
|
}) => {
|
|
715
715
|
if (opts.exhaustive) {
|
|
716
|
-
/**
|
|
717
|
-
* this will return objects like
|
|
718
|
-
* color or effects etc.
|
|
716
|
+
/**
|
|
717
|
+
* this will return objects like
|
|
718
|
+
* color or effects etc.
|
|
719
719
|
*/
|
|
720
720
|
return [...(fiber.children || []).map(fib => wrapFiber(fib)), ...fiber.__r3f.objects.map(fib => wrapFiber(fib))];
|
|
721
721
|
} else {
|
|
@@ -604,9 +604,9 @@ const createCanvas = ({
|
|
|
604
604
|
}
|
|
605
605
|
beforeReturn == null ? void 0 : beforeReturn(canvas);
|
|
606
606
|
class WebGLRenderingContext extends WebGL2RenderingContext {}
|
|
607
|
-
// @ts-
|
|
607
|
+
// @ts-expect-error
|
|
608
608
|
(_globalThis$WebGLRend = globalThis.WebGLRenderingContext) != null ? _globalThis$WebGLRend : globalThis.WebGLRenderingContext = WebGLRenderingContext;
|
|
609
|
-
// @ts-
|
|
609
|
+
// @ts-expect-error
|
|
610
610
|
(_globalThis$WebGL2Ren = globalThis.WebGL2RenderingContext) != null ? _globalThis$WebGL2Ren : globalThis.WebGL2RenderingContext = WebGL2RenderingContext;
|
|
611
611
|
return canvas;
|
|
612
612
|
};
|
|
@@ -688,9 +688,9 @@ class ReactThreeTestInstance {
|
|
|
688
688
|
exhaustive: false
|
|
689
689
|
}) => {
|
|
690
690
|
if (opts.exhaustive) {
|
|
691
|
-
/**
|
|
692
|
-
* this will return objects like
|
|
693
|
-
* color or effects etc.
|
|
691
|
+
/**
|
|
692
|
+
* this will return objects like
|
|
693
|
+
* color or effects etc.
|
|
694
694
|
*/
|
|
695
695
|
return [...(fiber.children || []).map(fib => wrapFiber(fib)), ...fiber.__r3f.objects.map(fib => wrapFiber(fib))];
|
|
696
696
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/test-renderer",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.2",
|
|
4
4
|
"description": "Test Renderer for react-three-fiber",
|
|
5
5
|
"author": "Josh Ellis",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"react": ">=
|
|
26
|
-
"@react-three/fiber": ">=8
|
|
27
|
-
"three": ">=0.
|
|
25
|
+
"react": ">=18 <19",
|
|
26
|
+
"@react-three/fiber": ">=8 < 9",
|
|
27
|
+
"three": ">=0.133"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare class WebGL2RenderingContext {
|
|
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): string[] | number[] | undefined;
|
|
13
|
-
getExtension(ext: string): any;
|
|
14
|
-
getProgramInfoLog: () => string;
|
|
15
|
-
getShaderInfoLog: () => string;
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
|
-
import type { MockInstance, MockScene, Obj } from './types/internal';
|
|
3
|
-
export declare class ReactThreeTestInstance<TInstance extends Object3D = Object3D> {
|
|
4
|
-
_fiber: MockInstance;
|
|
5
|
-
constructor(fiber: MockInstance | MockScene);
|
|
6
|
-
get instance(): Object3D;
|
|
7
|
-
get type(): string;
|
|
8
|
-
get props(): Obj;
|
|
9
|
-
get parent(): ReactThreeTestInstance | null;
|
|
10
|
-
get children(): ReactThreeTestInstance[];
|
|
11
|
-
get allChildren(): ReactThreeTestInstance[];
|
|
12
|
-
private getChildren;
|
|
13
|
-
find: (decider: (node: ReactThreeTestInstance) => boolean) => ReactThreeTestInstance;
|
|
14
|
-
findAll: (decider: (node: ReactThreeTestInstance) => boolean) => ReactThreeTestInstance[];
|
|
15
|
-
findByType: (type: string) => ReactThreeTestInstance;
|
|
16
|
-
findAllByType: (type: string) => ReactThreeTestInstance[];
|
|
17
|
-
findByProps: (props: Obj) => ReactThreeTestInstance;
|
|
18
|
-
findAllByProps: (props: Obj) => ReactThreeTestInstance[];
|
|
19
|
-
}
|
|
20
|
-
export declare const wrapFiber: (fiber: MockInstance | MockScene) => ReactThreeTestInstance;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import ReactReconciler from 'react-reconciler';
|
|
2
|
-
import { ReactThreeTestInstance } from './createTestInstance';
|
|
3
|
-
import type { MockUseStoreState, MockEventData } from './types/internal';
|
|
4
|
-
export declare const createEventFirer: (act: ReactReconciler.Reconciler<unknown, unknown, unknown, unknown, unknown>['act'], store: MockUseStoreState) => (element: ReactThreeTestInstance, eventName: string, data?: MockEventData) => Promise<any>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReactThreeTestInstance } from '../createTestInstance';
|
|
2
|
-
import type { Obj } from '../types/internal';
|
|
3
|
-
export declare const expectOne: <TItem>(items: TItem[], msg: string) => TItem;
|
|
4
|
-
export declare const matchProps: (props: Obj, filter: Obj) => boolean;
|
|
5
|
-
export declare const findAll: (root: ReactThreeTestInstance, decider: (node: ReactThreeTestInstance) => boolean) => ReactThreeTestInstance<import("three").Object3D<import("three").Event>>[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { CreateOptions, Renderer, Act } from './types/public';
|
|
3
|
-
import { waitFor, WaitOptions } from './helpers/waitFor';
|
|
4
|
-
declare const act: Act;
|
|
5
|
-
declare const create: (element: React.ReactNode, options?: Partial<CreateOptions> | undefined) => Promise<Renderer>;
|
|
6
|
-
export { create, act, waitFor };
|
|
7
|
-
export type { WaitOptions };
|
|
8
|
-
export * as ReactThreeTest from './types';
|
|
9
|
-
declare const _default: {
|
|
10
|
-
create: (element: React.ReactNode, options?: Partial<CreateOptions> | undefined) => Promise<Renderer>;
|
|
11
|
-
act: Act;
|
|
12
|
-
waitFor: typeof waitFor;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { UseBoundStore } from 'zustand';
|
|
3
|
-
import type { BaseInstance, LocalState, RootState } from '@react-three/fiber';
|
|
4
|
-
export declare type MockUseStoreState = UseBoundStore<RootState>;
|
|
5
|
-
export interface MockInstance extends Omit<BaseInstance, '__r3f'> {
|
|
6
|
-
__r3f: Omit<LocalState, 'root' | 'objects' | 'parent'> & {
|
|
7
|
-
root: MockUseStoreState;
|
|
8
|
-
objects: MockSceneChild[];
|
|
9
|
-
parent: MockInstance;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface MockSceneChild extends Omit<MockInstance, 'children'> {
|
|
13
|
-
children: MockSceneChild[];
|
|
14
|
-
}
|
|
15
|
-
export interface MockScene extends Omit<THREE.Scene, 'children'>, Pick<MockInstance, '__r3f'> {
|
|
16
|
-
children: MockSceneChild[];
|
|
17
|
-
}
|
|
18
|
-
export declare type CreateCanvasParameters = {
|
|
19
|
-
beforeReturn?: (canvas: HTMLCanvasElement) => void;
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
};
|
|
23
|
-
export interface Obj {
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* this is an empty object of any,
|
|
28
|
-
* the data is passed to a new event
|
|
29
|
-
* and subsequently passed to the
|
|
30
|
-
* event handler you're calling
|
|
31
|
-
*/
|
|
32
|
-
export declare type MockEventData = {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
};
|
|
35
|
-
export interface TestInstanceChildOpts {
|
|
36
|
-
exhaustive: boolean;
|
|
37
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Camera, RenderProps } from '@react-three/fiber';
|
|
2
|
-
import { ReactThreeTestInstance } from '../createTestInstance';
|
|
3
|
-
import type { MockEventData, CreateCanvasParameters } from './internal';
|
|
4
|
-
export { ReactThreeTestInstance };
|
|
5
|
-
export declare type MockSyntheticEvent = {
|
|
6
|
-
camera: Camera;
|
|
7
|
-
stopPropagation: () => void;
|
|
8
|
-
target: ReactThreeTestInstance;
|
|
9
|
-
currentTarget: ReactThreeTestInstance;
|
|
10
|
-
sourceEvent: MockEventData;
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
export declare type CreateOptions = CreateCanvasParameters & RenderProps<HTMLCanvasElement>;
|
|
14
|
-
export declare type Act = (cb: () => Promise<any>) => Promise<any>;
|
|
15
|
-
export declare type Renderer = {
|
|
16
|
-
scene: ReactThreeTestInstance;
|
|
17
|
-
unmount: () => Promise<void>;
|
|
18
|
-
getInstance: () => null | unknown;
|
|
19
|
-
update: (el: React.ReactNode) => Promise<void>;
|
|
20
|
-
toTree: () => Tree | undefined;
|
|
21
|
-
toGraph: () => SceneGraph | undefined;
|
|
22
|
-
fireEvent: (element: ReactThreeTestInstance, handler: string, data?: MockEventData) => Promise<any>;
|
|
23
|
-
advanceFrames: (frames: number, delta: number | number[]) => Promise<void>;
|
|
24
|
-
};
|
|
25
|
-
export interface SceneGraphItem {
|
|
26
|
-
type: string;
|
|
27
|
-
name: string;
|
|
28
|
-
children: SceneGraphItem[] | null;
|
|
29
|
-
}
|
|
30
|
-
export declare type SceneGraph = SceneGraphItem[];
|
|
31
|
-
export interface TreeNode {
|
|
32
|
-
type: string;
|
|
33
|
-
props: {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
};
|
|
36
|
-
children: TreeNode[];
|
|
37
|
-
}
|
|
38
|
-
export declare type Tree = TreeNode[];
|