|
|
@@ -73,13 +73,23 @@ class Source {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Returns the dimensions of the source into the given target vector.
|
|
|
+ *
|
|
|
+ * @param {(Vector2|Vector3)} target - The target object the result is written into.
|
|
|
+ * @return {(Vector2|Vector3)} The dimensions of the source.
|
|
|
+ */
|
|
|
getSize( target ) {
|
|
|
|
|
|
const data = this.data;
|
|
|
|
|
|
if ( data instanceof HTMLVideoElement ) {
|
|
|
|
|
|
- target.set( data.videoWidth, data.videoHeight );
|
|
|
+ target.set( data.videoWidth, data.videoHeight, 0 );
|
|
|
+
|
|
|
+ } else if ( data instanceof VideoFrame ) {
|
|
|
+
|
|
|
+ target.set( data.displayHeight, data.displayWidth, 0 );
|
|
|
|
|
|
} else if ( data !== null ) {
|
|
|
|