|
@@ -8,6 +8,10 @@
|
|
* @return Generated texture
|
|
* @return Generated texture
|
|
*/
|
|
*/
|
|
public static CreateResizedCopy(texture: BABYLON.Texture, width: number, height: number, useBilinearMode: boolean = true): BABYLON.Texture {
|
|
public static CreateResizedCopy(texture: BABYLON.Texture, width: number, height: number, useBilinearMode: boolean = true): BABYLON.Texture {
|
|
|
|
+
|
|
|
|
+ var scene = texture.getScene();
|
|
|
|
+ var engine = scene.getEngine();
|
|
|
|
+
|
|
let rtt = new BABYLON.RenderTargetTexture(
|
|
let rtt = new BABYLON.RenderTargetTexture(
|
|
'resized' + texture.name,
|
|
'resized' + texture.name,
|
|
{ width: width, height: height },
|
|
{ width: width, height: height },
|
|
@@ -20,9 +24,6 @@
|
|
false
|
|
false
|
|
);
|
|
);
|
|
|
|
|
|
- var scene = texture.getScene();
|
|
|
|
- var engine = scene.getEngine();
|
|
|
|
-
|
|
|
|
rtt.wrapU = texture.wrapU;
|
|
rtt.wrapU = texture.wrapU;
|
|
rtt.wrapV = texture.wrapV;
|
|
rtt.wrapV = texture.wrapV;
|
|
rtt.uOffset = texture.uOffset;
|
|
rtt.uOffset = texture.uOffset;
|