Browse Source

half video

master
cailean 1 hour ago
parent
commit
0e116d6945
  1. 2
      js/Content.js

2
js/Content.js

@ -221,7 +221,7 @@ export class VideoContent extends Content {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.video.addEventListener('loadedmetadata', () => { this.video.addEventListener('loadedmetadata', () => {
const aspect = this.video.videoWidth / this.video.videoHeight; const aspect = this.video.videoWidth / this.video.videoHeight;
const height = 4; // or any desired height const height = 2; // or any desired height
const width = height * aspect; const width = height * aspect;
this.texture = new THREE.VideoTexture(this.video); this.texture = new THREE.VideoTexture(this.video);

Loading…
Cancel
Save