Skip to Content
Bear documentation

urls

Import from bear/geometry/urls.

Type Aliases

ImageTransformOptions

type ImageTransformOptions = Record<string, string | number>;

Defined in: bear/geometry/urls.ts:53

Cloudflare image transform parameters (width, quality, format, etc.).

Functions

geometryUrlFromBucket()

function geometryUrlFromBucket(path): string;

Defined in: bear/geometry/urls.ts:27

Constructs a full URL from an S3 bucket path

Parameters

ParameterTypeDescription
pathstringThe path to the geometry file in the bucket

Returns

string

The full URL to access the geometry file


projectTextureUrl()

function projectTextureUrl(s3Uri, options?): string;

Defined in: bear/geometry/urls.ts:55

Parameters

ParameterType
s3Uristring
options?ImageTransformOptions

Returns

string


publicAssetEndpoint()

function publicAssetEndpoint(): string | undefined;

Defined in: bear/geometry/urls.ts:19

Where this build serves static assets from, if it serves them at all.

Not every way of running Bear has a bucket behind it: the package runs standalone, outside the app that configures one. A caller that cannot proceed without assets asks with geometryUrlFromBucket and gets a throw; a caller with something to fall back on asks here and gets undefined.

Returns

string | undefined


textureUrlFromBucket()

function textureUrlFromBucket(filename): string;

Defined in: bear/geometry/urls.ts:40

Constructs a full URL for a texture file from the S3 bucket

Parameters

ParameterTypeDescription
filenamestringThe texture filename (e.g., "plywood_diff_4k.avif")

Returns

string

The full URL to access the texture file

On this page