|
@@ -219,27 +219,27 @@ var initOverlay = function(THREE) {
|
|
|
if (info.type == "video") {
|
|
|
plane.material.map = new THREE.VideoTexture(info.media);
|
|
|
this.hasRequestLoad = true
|
|
|
-
|
|
|
- plane.material.map.wrapS = plane.material.map.wrapT = THREE.ClampToEdgeWrapping;
|
|
|
- plane.material.map.minFilter = THREE.LinearFilter;
|
|
|
- plane.material.map.magFilter = THREE.LinearFilter;
|
|
|
- plane.material.map.generateMipmaps = true;
|
|
|
-
|
|
|
- } else {
|
|
|
+
|
|
|
+ } else if(info.type == "photo"){
|
|
|
this._loadDones = []
|
|
|
- /* plane.material.map = Texture.load(info.file,()=>{
|
|
|
- if(this._loadDones){
|
|
|
- this._loadDones.forEach(e=>e())
|
|
|
- this._loadDones = null
|
|
|
- }
|
|
|
- }) */
|
|
|
+
|
|
|
+ }else{
|
|
|
+ plane.material.map = new THREE.Texture;
|
|
|
+ plane.material.map.image = info.media;
|
|
|
+ info.media.onload = ()=>{
|
|
|
+ plane.material.map.needsUpdate = true
|
|
|
+ this.computeMapRepeat(info)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- /* plane.material.map.wrapS = plane.material.map.wrapT = THREE.ClampToEdgeWrapping;
|
|
|
- plane.material.map.minFilter = THREE.LinearFilter;
|
|
|
- plane.material.map.magFilter = THREE.LinearFilter;
|
|
|
- plane.material.map.generateMipmaps = true; */
|
|
|
+
|
|
|
} else
|
|
|
plane.material.map.image = info.media;
|
|
|
+
|
|
|
+ plane.material.map.wrapS = plane.material.map.wrapT = THREE.ClampToEdgeWrapping;
|
|
|
+ plane.material.map.minFilter = THREE.LinearFilter;
|
|
|
+ plane.material.map.magFilter = THREE.LinearFilter;
|
|
|
+ plane.material.map.generateMipmaps = true;
|
|
|
this.file = info.file;
|
|
|
}
|
|
|
this.overlayType = info.type;
|