@react-three/test-renderer 8.2.1 → 8.2.3

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