Lines Matching refs:asset
14 function getScaledAssetPath(asset): string {
15 const scale = AssetSourceResolver.pickScale(asset.scales, PixelRatio.get());
17 const type = !asset.type ? '' : `.${asset.type}`;
19 return asset.httpServerLocation + '/' + asset.name + scaleSuffix + type;
21 return asset.httpServerLocation.replace(/\.\.\//g, '_') + '/' + asset.name + scaleSuffix + type;
31 asset: PackagerAsset;
36 asset: PackagerAsset
40 this.asset = asset;
61 const fromUrl = new URL(getScaledAssetPath(this.asset), this.serverUrl);
63 fromUrl.searchParams.set('hash', this.asset.hash);
73 width: this.asset.width ?? undefined,
74 height: this.asset.height ?? undefined,
76 scale: AssetSourceResolver.pickScale(this.asset.scales, PixelRatio.get()),