| | 1 | | using System; |
| | 2 | | using DCL; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace NFTShape_Internal |
| | 6 | | { |
| | 7 | | public static class NFTAssetFactory |
| | 8 | | { |
| | 9 | | public static INFTAsset CreateAsset(ITexture asset, NFTShapeConfig shapeConfig, |
| | 10 | | Action<Texture2D> textureUpdateCallback, GifPlayer gifPlayer) |
| | 11 | | { |
| 9 | 12 | | if (asset == null) |
| | 13 | | { |
| 2 | 14 | | return null; |
| | 15 | | } |
| | 16 | |
|
| 7 | 17 | | if (asset is Asset_Gif gif) |
| | 18 | | { |
| 0 | 19 | | return new NFTGifAsset(gif, shapeConfig.hqGifResolution, gifPlayer); |
| | 20 | | } |
| | 21 | |
|
| 7 | 22 | | return new NFTImageAsset(asset, shapeConfig.hqImgResolution, textureUpdateCallback); |
| | 23 | | } |
| | 24 | | } |
| | 25 | | } |