File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,12 @@ class Textures extends DataMap {
372
372
target . height = image . videoHeight || 1 ;
373
373
target . depth = 1 ;
374
374
375
+ } else if ( image instanceof VideoFrame ) {
376
+
377
+ target . width = image . displayWidth || 1 ;
378
+ target . height = image . displayHeight || 1 ;
379
+ target . depth = 1 ;
380
+
375
381
} else {
376
382
377
383
target . width = image . width || 1 ;
Original file line number Diff line number Diff line change @@ -73,13 +73,23 @@ class Source {
73
73
74
74
}
75
75
76
+ /**
77
+ * Returns the dimensions of the source into the given target vector.
78
+ *
79
+ * @param {(Vector2|Vector3) } target - The target object the result is written into.
80
+ * @return {(Vector2|Vector3) } The dimensions of the source.
81
+ */
76
82
getSize ( target ) {
77
83
78
84
const data = this . data ;
79
85
80
86
if ( data instanceof HTMLVideoElement ) {
81
87
82
- target . set ( data . videoWidth , data . videoHeight ) ;
88
+ target . set ( data . videoWidth , data . videoHeight , 0 ) ;
89
+
90
+ } else if ( data instanceof VideoFrame ) {
91
+
92
+ target . set ( data . displayHeight , data . displayWidth , 0 ) ;
83
93
84
94
} else if ( data !== null ) {
85
95
You can’t perform that action at this time.
0 commit comments