Skip to content

copper3d / Modules / Utils/utils

Module: Utils/utils

Table of contents

Functions

Functions

H3

H3(x): number[]

Cubic-Hermite basis function.

Parameters

NameType
xnumber

Returns

number[]

Defined in

src/Utils/utils.ts:217


L3

L3(x): number[]

Cubic-Lagrange basis function

Parameters

NameType
xnumber

Returns

number[]

Defined in

src/Utils/utils.ts:199


calcDistance

calcDistance(x0, x1): number

Euclidean distance n dimensions

Parameters

NameType
x0number[]
x1number[]

Returns

number

Defined in

src/Utils/utils.ts:289


fullScreenListenner

fullScreenListenner(container): void

Parameters

NameType
containerHTMLDivElement | HTMLCanvasElement

Returns

void

Defined in

src/Utils/utils.ts:2


getWightsH3H3H3

getWightsH3H3H3(Xi): number[][]

Parameters

NameType
Xinumber[][]

Returns

number[][]

Defined in

src/Utils/utils.ts:249


getWightsL3L3L3

getWightsL3L3L3(Xi): number[]

To calculate the weights for each element of Xi using the cubic Lagrange basis functions.

Parameters

NameType
Xinumber[]

Returns

number[]

Defined in

src/Utils/utils.ts:233


isIOS

isIOS(): boolean

Returns

boolean

Defined in

src/Utils/utils.ts:22


loading

loading(loadingGif?): Object

Parameters

NameType
loadingGif?string

Returns

Object

NameType
loadingContainerHTMLDivElement
progressHTMLDivElement

Defined in

src/Utils/utils.ts:50


perturbRandom

perturbRandom(x, dx): number[]

Parameters

NameType
xnumber[]
dxnumber

Returns

number[]

Defined in

src/Utils/utils.ts:298


switchEraserSize

switchEraserSize(size, urls?): string

Parameters

NameType
sizenumber
urls?string[]

Returns

string

Defined in

src/Utils/utils.ts:124


switchPencilIcon

switchPencilIcon(icon, urls?): string

Parameters

NameType
iconstring
urls?string[]

Returns

string

Defined in

src/Utils/utils.ts:85


throttle

throttle(callback, wait): (event: MouseEvent) => void

Parameters

NameType
callback(event: MouseEvent) => void
waitnumber

Returns

fn

▸ (event): void

Parameters
NameType
eventMouseEvent
Returns

void

Defined in

src/Utils/utils.ts:183


traverseMaterials

traverseMaterials(object, callback): void

Parameters

NameType
objectGroup<Object3DEventMap>
callback(material: any) => void

Returns

void

Defined in

src/Utils/utils.ts:36