Compare commits

..

3 Commits

Author SHA1 Message Date
Neil Mathew ff58cc16ff formatting 2024-01-10 15:06:47 -05:00
Neil Mathew fc89e9daf9
Merge pull request #9 from pleymor/bugfix/crash-at-image-generation
🐛 Add remotePattern on replicate.delivery in next.config.js
2024-01-10 14:46:48 -05:00
Adrien Laugueux 7bd3d2c7ac
🐛 Add remotePattern on replicate.delivery in next.config.js
Fixes image not displayed with REPLICATE_API_TOKEN created on replicate.com
2023-11-28 20:25:13 +01:00
3 changed files with 7687 additions and 16 deletions

View File

@ -60,12 +60,10 @@ function Model({ gltfModel, ...props }) {
const maxSize = Math.max(sizeModel.x, sizeModel.y, sizeModel.z); const maxSize = Math.max(sizeModel.x, sizeModel.y, sizeModel.z);
const scale = Math.min(size.width, size.height) / maxSize; const scale = Math.min(size.width, size.height) / maxSize;
console.log("scaling factor is ", scale) console.log("scaling factor is ", scale)
// Apply the scaling factor to the model // Apply the scaling factor to the model
modelRef.current.scale.set(scale, scale, scale); modelRef.current.scale.set(scale, scale, scale);
const boxAfterScaling = new Box3().setFromObject(modelRef.current); const boxAfterScaling = new Box3().setFromObject(modelRef.current);
const sizeModelAfterScaling = new Vector3(); const sizeModelAfterScaling = new Vector3();
boxAfterScaling.getSize(sizeModelAfterScaling); boxAfterScaling.getSize(sizeModelAfterScaling);

View File

@ -10,6 +10,11 @@ module.exports = {
protocol: "https", protocol: "https",
hostname: "pbxt.replicate.delivery", hostname: "pbxt.replicate.delivery",
}, },
{
protocol: "https",
hostname: "replicate.delivery",
pathname: '/pbxt/**',
},
], ],
}, },
// async headers() { // async headers() {
@ -21,7 +26,6 @@ module.exports = {
// key: 'Content-Security-Policy', // key: 'Content-Security-Policy',
// value: "default-src 'self'; img-src 'self' blob: https://replicate.com https://pbxt.replicate.delivery; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; connect-src 'self' blob:;" // value: "default-src 'self'; img-src 'self' blob: https://replicate.com https://pbxt.replicate.delivery; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; connect-src 'self' blob:;"
// } // }
// ], // ],
// }, // },
// ]; // ];

7669
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff