Vendor the landing cloud texture locally instead of fetching a CDN.
drei's volumetric clouds fetch their puff sprite from a GitHub CDN at runtime. Save that exact image to frontend/public/cloud.png and point <Clouds> at it, so the landing page never reaches out to any external site while keeping the original cloud look. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
@@ -105,6 +105,11 @@ function SceneLights() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// drei's volumetric clouds use a soft "puff" sprite. By default drei fetches it
|
||||||
|
// from a GitHub CDN at runtime; we vendor that exact image into /public instead
|
||||||
|
// (see public/cloud.png) so the page never reaches out to any external website.
|
||||||
|
const CLOUD_TEXTURE = '/cloud.png';
|
||||||
|
|
||||||
function CloudLayer({ clouds, segments }: { clouds: number; segments: number }) {
|
function CloudLayer({ clouds, segments }: { clouds: number; segments: number }) {
|
||||||
const group = useRef<THREE.Group>(null);
|
const group = useRef<THREE.Group>(null);
|
||||||
const specs = useMemo(() => makeCloudField(clouds), [clouds]);
|
const specs = useMemo(() => makeCloudField(clouds), [clouds]);
|
||||||
@@ -121,7 +126,7 @@ function CloudLayer({ clouds, segments }: { clouds: number; segments: number })
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<group ref={group}>
|
<group ref={group}>
|
||||||
<Clouds material={THREE.MeshLambertMaterial} limit={clouds * segments + 64} frustumCulled={false}>
|
<Clouds texture={CLOUD_TEXTURE} material={THREE.MeshLambertMaterial} limit={clouds * segments + 64} frustumCulled={false}>
|
||||||
{specs.map((c, i) => (
|
{specs.map((c, i) => (
|
||||||
<Cloud
|
<Cloud
|
||||||
key={i}
|
key={i}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user