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