Pārlūkot izejas kodu

Merge pull request #4534 from sebavan/master

Add poster to videoDome
sebavan 7 gadi atpakaļ
vecāks
revīzija
10e025dec8
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      src/Helpers/babylon.videoDome.ts

+ 3 - 2
src/Helpers/babylon.videoDome.ts

@@ -51,7 +51,8 @@ module BABYLON {
             clickToPlay?: boolean,
             autoPlay?: boolean,
             loop?: boolean,
-            size?: number
+            size?: number,
+            poster?: string
         }, scene: Scene) {
             super(name, scene);
 
@@ -64,7 +65,7 @@ module BABYLON {
             options.size = Math.abs(options.size as any) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
 
             // create
-            let tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true };
+            let tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
             let texture = this._videoTexture = new VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
             this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {