add support for cross-origin image requests

This is setup for exporting the image view!
This commit is contained in:
Matt Dunn-Rankin 2020-04-24 21:38:18 -07:00
parent 846b26f4c5
commit 66c6998c58
3 changed files with 12 additions and 11 deletions

View file

@ -80,6 +80,7 @@ function OutfitPreview({ outfitState }) {
maxWidth="100%" maxWidth="100%"
maxHeight="100%" maxHeight="100%"
className="outfit-preview-layer-image" className="outfit-preview-layer-image"
crossOrigin="anonymous"
/> />
</FullScreenCenter> </FullScreenCenter>
</CSSTransition> </CSSTransition>

View file

@ -93,7 +93,7 @@ const resolvers = {
return ( return (
`https://impress-asset-images.s3.amazonaws.com/${layer.type}` + `https://impress-asset-images.s3.amazonaws.com/${layer.type}` +
`/${rid1}/${rid2}/${rid3}/${rid}/${sizeNum}x${sizeNum}.png?${time}` `/${rid1}/${rid2}/${rid3}/${rid}/${sizeNum}x${sizeNum}.png?v2-${time}`
); );
}, },
}, },

View file

@ -122,7 +122,7 @@ describe("Item", () => {
"layers": Array [ "layers": Array [
Object { Object {
"id": "37128", "id": "37128",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/014/14856/600x600.png?1587653266000", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/014/14856/600x600.png?v2-1587653266000",
"zone": Object { "zone": Object {
"depth": 30, "depth": 30,
"id": "26", "id": "26",
@ -147,7 +147,7 @@ describe("Item", () => {
"layers": Array [ "layers": Array [
Object { Object {
"id": "37129", "id": "37129",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/014/14857/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/014/14857/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 44, "depth": 44,
"id": "40", "id": "40",
@ -172,7 +172,7 @@ describe("Item", () => {
"layers": Array [ "layers": Array [
Object { Object {
"id": "30203", "id": "30203",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/006/6829/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/object/000/000/006/6829/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 3, "depth": 3,
"id": "3", "id": "3",
@ -278,49 +278,49 @@ describe("PetAppearance", () => {
"layers": Array [ "layers": Array [
Object { Object {
"id": "5995", "id": "5995",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7941/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7941/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 18, "depth": 18,
}, },
}, },
Object { Object {
"id": "5996", "id": "5996",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7942/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7942/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 7, "depth": 7,
}, },
}, },
Object { Object {
"id": "6000", "id": "6000",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7946/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/007/7946/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 40, "depth": 40,
}, },
}, },
Object { Object {
"id": "16467", "id": "16467",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/024/24008/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/024/24008/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 34, "depth": 34,
}, },
}, },
Object { Object {
"id": "19549", "id": "19549",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28548/600x600.png?1345719457000", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28548/600x600.png?v2-1345719457000",
"zone": Object { "zone": Object {
"depth": 37, "depth": 37,
}, },
}, },
Object { Object {
"id": "19550", "id": "19550",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28549/600x600.png?0", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28549/600x600.png?v2-0",
"zone": Object { "zone": Object {
"depth": 38, "depth": 38,
}, },
}, },
Object { Object {
"id": "163528", "id": "163528",
"imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28549/600x600.png?1326455337000", "imageUrl": "https://impress-asset-images.s3.amazonaws.com/biology/000/000/028/28549/600x600.png?v2-1326455337000",
"zone": Object { "zone": Object {
"depth": 38, "depth": 38,
}, },