Skip to main content

Module: Extra-Helpers

Classes

Interfaces

Type aliases

TUpdaterType

Ƭ TUpdaterType: "scene" | "renderer" | "viewer"

Defined in

webgi/src/extras/animationObject.ts:6


IAnimationObject

Ƭ IAnimationObject<V>: AnimationOptions<V> & { access?: string ; duration?: number ; delay?: number ; ease?: Easing ; updater?: TUpdaterType[] ; animSet?: IAnimSet ; animSetParallel?: boolean ; uiRef?: UiObjectConfig ; name?: string ; uiObjectType?: UiObjectType ; targetObject?: Record<string, any> ; to?: V | (fromVal: V, target: any) => V }

Type parameters

Name
V

Defined in

webgi/src/extras/animationObject.ts:8


IAnimSet

Ƭ IAnimSet: IAnimationObject<any>[]

Defined in

webgi/src/extras/animationObject.ts:22


DropEventType

Ƭ DropEventType: "drop" | "dropstart" | "droperror"

Defined in

webgi/src/extras/dropzone.ts:236


ListenerCallback

Ƭ ListenerCallback: (data?: { files?: Map<string, DropFile> ; message?: string }) => void

Type declaration

▸ (data?): void

Parameters
NameType
data?Object
data.files?Map<string, DropFile>
data.message?string
Returns

void

Defined in

webgi/src/extras/dropzone.ts:237


EasingFunctionType

Ƭ EasingFunctionType: keyof typeof EasingFunctions

EasingFunctionType: anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, easeInOutSine

Defined in

webgi/src/helpers/animation.ts:49


AnyFunction

Ƭ AnyFunction: (...args: any[]) => any

Type declaration

▸ (...args): any

Parameters
NameType
...argsany[]
Returns

any

Defined in

webgi/src/helpers/refl.ts:99


TPointerLockEvents

Ƭ TPointerLockEvents: "change" | "lock" | "unlock"

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:12

Functions

extractAnimationKey

extractAnimationKey(o, target): { key: undefined = undefined; tar: any } | { key: string ; tar: any }

Parameters

NameType
oIAnimationObject<any>
targetany

Returns

{ key: undefined = undefined; tar: any } | { key: string ; tar: any }

Defined in

webgi/src/extras/animationObject.ts:24


makeSetterForAnimObject

makeSetterForAnimObject<V>(o, target, updaters?, setDirty?): (a: V) => void

Type parameters

Name
V

Parameters

NameType
oIAnimationObject<V>
targetany
updaters?Record<TUpdaterType, () => void>
setDirty?() => void

Returns

fn

▸ (a): void

Parameters
NameType
aV
Returns

void

Defined in

webgi/src/extras/animationObject.ts:37


animateObject

animateObject(target, o, updaters): Promise<any>

Parameters

NameType
targetany
oIAnimationObject<any>
updatersRecord<TUpdaterType, () => void>

Returns

Promise<any>

Defined in

webgi/src/extras/animationObject.ts:45


animateSet

animateSet(target, anims, updaters, parallel?): Promise<undefined | any[]>

Parameters

NameTypeDefault value
targetanyundefined
animsIAnimSetundefined
updatersRecord<TUpdaterType, () => void>undefined
parallelbooleanfalse

Returns

Promise<undefined | any[]>

Defined in

webgi/src/extras/animationObject.ts:67


syncAnimSetUi

syncAnimSetUi(uiConfig?, animSet?, targetObject?, updaters1?): void

Parameters

NameType
uiConfig?UiObjectConfig<any, string>[]
animSet?IAnimSet
targetObject?Record<string, any>
updaters1?Record<TUpdaterType, () => void>

Returns

void

Defined in

webgi/src/extras/animationObject.ts:77


computeOffsetMatrix

computeOffsetMatrix(geometry): Matrix4

Parameters

NameType
geometryBufferGeometry

Returns

Matrix4

Defined in

webgi/src/extras/ijewel/utils.ts:34


computeEigenVectors

computeEigenVectors(geometry): Matrix4

Parameters

NameType
geometryBufferGeometry

Returns

Matrix4

Defined in

webgi/src/extras/ijewel/utils.ts:140


timeout

timeout(duration): Promise<unknown>

Parameters

NameTypeDescription
durationnumberin ms

Returns

Promise<unknown>

Defined in

webgi/src/helpers/animation.ts:55


makeSetterFor

makeSetterFor<V>(target, key, setDirty?): (a: V) => void

Type parameters

Name
V

Parameters

NameType
targetany
keystring
setDirty?() => void

Returns

fn

▸ (a): void

Parameters
NameType
aV
Returns

void

Defined in

webgi/src/helpers/animation.ts:59


isAnimatableType

isAnimatableType(value): boolean

Parameters

NameType
valueany

Returns

boolean

Defined in

webgi/src/helpers/animation.ts:76


animateTarget

animateTarget<V>(target, key, options): Promise<void>

Type parameters

Name
V

Parameters

NameType
targetany
keystring
optionsAnimationOptions<V>

Returns

Promise<void>

Defined in

webgi/src/helpers/animation.ts:80


animateAsync

animateAsync<V>(options): Promise<void>

Type parameters

Name
V

Parameters

NameType
optionsAnimationOptions<V>

Returns

Promise<void>

Defined in

webgi/src/helpers/animation.ts:105


animatePromise

animatePromise<V>(options, animations): Promise<void>

Type parameters

NameType
Vnumber

Parameters

NameType
optionsAnimationOptions<V>
animationsany[]

Returns

Promise<void>

Defined in

webgi/src/helpers/animation.ts:120


createCanvasElement

createCanvasElement(): HTMLCanvasElement

Returns

HTMLCanvasElement

Defined in

webgi/src/helpers/dom.ts:1


pathJoin

pathJoin(parts, sep?): string

Parameters

NameType
partsstring[]
sep?string

Returns

string

Defined in

webgi/src/helpers/dom.ts:7


downloadBlob

downloadBlob(b, name): void

Parameters

NameType
bBlob
namestring

Returns

void

Defined in

webgi/src/helpers/dom.ts:13


blobToDataURL

blobToDataURL(blob): Promise<string>

Parameters

NameType
blobBlob

Returns

Promise<string>

Defined in

webgi/src/helpers/dom.ts:27


downloadFile

downloadFile(b, name?): void

Parameters

NameType
bFile
name?string

Returns

void

Defined in

webgi/src/helpers/dom.ts:37


uploadFile

uploadFile(multiple?, directory?, accept?): Promise<File[]>

Parameters

NameTypeDefault value
multiplebooleanfalse
directorybooleanfalse
accept?stringundefined

Returns

Promise<File[]>

Defined in

webgi/src/helpers/dom.ts:42


createDiv

createDiv<T>(__namedParameters): HTMLElementTagNameMap[T]

Type parameters

NameType
Textends keyof HTMLElementTagNameMap = "div"

Parameters

NameType
__namedParametersPartial<InnerHTML> & { id?: string ; classList?: string[] ; addToBody?: boolean ; elementTag?: T }

Returns

HTMLElementTagNameMap[T]

Defined in

webgi/src/helpers/dom.ts:60


createImage

createImage(url): Promise<HTMLImageElement>

Parameters

NameType
urlstring

Returns

Promise<HTMLImageElement>

Defined in

webgi/src/helpers/dom.ts:69


createStyles

createStyles(styles): HTMLStyleElement

Parameters

NameType
stylesstring

Returns

HTMLStyleElement

Defined in

webgi/src/helpers/dom.ts:80


createScriptFromURL

createScriptFromURL(url): Promise<unknown>

Parameters

NameType
urlstring

Returns

Promise<unknown>

Defined in

webgi/src/helpers/dom.ts:88


imageBitmapToBase64

imageBitmapToBase64(bitmap, maxWidth?, detachBitmap?): string

Parameters

NameTypeDefault value
bitmapCanvasImageSourceundefined
maxWidthnumber8192
detachBitmapbooleanfalse

Returns

string

Defined in

webgi/src/helpers/dom.ts:100


imageUrlToImageData

imageUrlToImageData(url): Promise<ImageData>

Parameters

NameType
urlstring

Returns

Promise<ImageData>

Defined in

webgi/src/helpers/dom.ts:129


now

now(): number

Returns

number

Defined in

webgi/src/helpers/dom.ts:156


mobileAndTabletCheck

mobileAndTabletCheck(): boolean

Returns

boolean

Defined in

webgi/src/helpers/dom.ts:162


getUrlQueryParam

getUrlQueryParam(p, def?): any

Parameters

NameTypeDefault value
pstringundefined
defanynull

Returns

any

Defined in

webgi/src/helpers/dom.ts:169


setUrlQueryParam

setUrlQueryParam(p, v, reload?): void

Parameters

NameTypeDefault value
pstringundefined
vnull | stringundefined
reloadbooleanfalse

Returns

void

Defined in

webgi/src/helpers/dom.ts:174


arrayBufferToBase64

arrayBufferToBase64(buffer): string

Parameters

NameType
bufferArrayBuffer

Returns

string

Defined in

webgi/src/helpers/dom.ts:186


base64ToArrayBuffer

base64ToArrayBuffer(base64): ArrayBufferLike

Parameters

NameType
base64string

Returns

ArrayBufferLike

Defined in

webgi/src/helpers/dom.ts:200


toTitleCase

toTitleCase(str): string

Parameters

NameType
strstring

Returns

string

Defined in

webgi/src/helpers/dom.ts:249


imageToCanvas

imageToCanvas(image, __namedParameters): HTMLCanvasElement

Parameters

NameType
imageHTMLImageElement
__namedParametersImageCanvasOptions

Returns

HTMLCanvasElement

Defined in

webgi/src/helpers/dom.ts:264


getTypedArray

getTypedArray(type, buffer): Uint8Array | Int8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array

Parameters

NameType
type"Uint8Array" | "Int8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array"
bufferArrayBuffer

Returns

Uint8Array | Int8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array

Defined in

webgi/src/helpers/dom.ts:316


parseFileExtension

parseFileExtension(path): string

Parameters

NameType
pathstring

Returns

string

Defined in

webgi/src/helpers/file.ts:1


getFilenameFromPath

getFilenameFromPath(url): string

Parameters

NameType
urlstring

Returns

string

Defined in

webgi/src/helpers/file.ts:12


writeFile

writeFile(fileHandle, contents): Promise<void>

Writes the contents to disk.

Parameters

NameTypeDescription
fileHandleFileSystemFileHandleFile handle to write to.
contentsFileSystemWriteChunkTypeContents to write.

Returns

Promise<void>

Defined in

webgi/src/helpers/fs-api.ts:9


verifyPermission

verifyPermission(fileHandle, withWrite): Promise<boolean>

Verify the user has granted permission to read or write to the file, if permission hasn't been granted, request permission.

Parameters

NameTypeDescription
fileHandleFileSystemFileHandleFile handle to check.
withWritebooleanTrue if write permission should be checked.

Returns

Promise<boolean>

True if the user has granted read/write permission.

Defined in

webgi/src/helpers/fs-api.ts:38


embedUrlRefs

embedUrlRefs(str, downloader?): Promise<string>

Download all urls in svg and replace with data urls.

Parameters

NameTypeDefault valueDescription
strstringundefinedstring
downloader(p: string) => Promise<string>defaultDownloaderfunction to download the urls in svg and return the data url

Returns

Promise<string>

Defined in

webgi/src/helpers/htmlToImage.ts:13


htmlToSvg

htmlToSvg(html, style, __namedParameters, toDataUrl?): string

HTML string to svg data url.

Parameters

NameTypeDefault value
htmlstringundefined
stylestringundefined
__namedParametersObjectundefined
__namedParameters.widthnumberundefined
__namedParameters.heightnumberundefined
toDataUrlbooleantrue

Returns

string

Defined in

webgi/src/helpers/htmlToImage.ts:32


htmlToCanvas

htmlToCanvas(html, style, options): Promise<HTMLCanvasElement>

Parameters

NameType
htmlstring
stylestring
optionsImageCanvasOptions

Returns

Promise<HTMLCanvasElement>

Defined in

webgi/src/helpers/htmlToImage.ts:48


htmlToPng

htmlToPng(html, style, options): Promise<string>

Parameters

NameType
htmlstring
stylestring
optionsImageCanvasOptions

Returns

Promise<string>

Defined in

webgi/src/helpers/htmlToImage.ts:53


shaderReplaceString

shaderReplaceString(shader, str, newStr, __namedParameters?): string

Parameters

NameType
shaderstring
strstring
newStrstring
__namedParametersObject
__namedParameters.replaceAllundefined | boolean
__namedParameters.prependundefined | boolean
__namedParameters.appendundefined | boolean

Returns

string

Defined in

webgi/src/helpers/material.ts:4


getPropertyDescriptor

getPropertyDescriptor<T>(obj, prop): PropertyDescriptor | undefined

Type parameters

Name
T

Parameters

NameType
objT
propkeyof T

Returns

PropertyDescriptor | undefined

Defined in

webgi/src/helpers/refl.ts:3


isPropertyWritable

isPropertyWritable<T>(object, prop, allowWritable?, allowAny?): boolean

Type parameters

Name
T

Parameters

NameTypeDefault value
objectTundefined
propkeyof Tundefined
allowWritablebooleanfalse
allowAnybooleanfalse

Returns

boolean

Defined in

webgi/src/helpers/refl.ts:11


safeSetProperty

safeSetProperty<T, K>(object, prop, value, allowWritable?, allowAny?): boolean

Set value only if setter exists

Type parameters

NameType
TT
Kextends string | number | symbol

Parameters

NameTypeDefault value
objectundefined | null | Tundefined
propKundefined
valueT[K]undefined
allowWritablebooleanfalse
allowAnybooleanfalse

Returns

boolean

Defined in

webgi/src/helpers/refl.ts:24


deepAccessObject

deepAccessObject(access, tar): any

Parameters

NameType
accessstring[]
tarany

Returns

any

Defined in

webgi/src/helpers/refl.ts:33


getKeyByValue

getKeyByValue(object, value): undefined | string

Parameters

NameType
objectRecord<string, any>
valueany

Returns

undefined | string

Defined in

webgi/src/helpers/refl.ts:48


getOrCall

getOrCall<T>(s, ...args): T | undefined

Type parameters

Name
T

Parameters

NameType
sundefined | T | (...a: any[]) => undefined | T
...argsany[]

Returns

T | undefined

Defined in

webgi/src/helpers/refl.ts:52


copyProps

copyProps(source, dest, propList): void

Parameters

NameType
sourceAnyOptions
destAnyOptions
propListstring[]

Returns

void

Defined in

webgi/src/helpers/refl.ts:57


escapeRegExp

escapeRegExp(str): string

Parameters

NameType
strstring

Returns

string

Defined in

webgi/src/helpers/refl.ts:65


replaceAll

replaceAll(str, find, replace): string

Parameters

NameType
strstring
findstring
replacestring

Returns

string

Defined in

webgi/src/helpers/refl.ts:69


glsl

glsl(strings, ...rest): string

Parameters

NameType
stringsany
...restany[]

Returns

string

Defined in

webgi/src/helpers/refl.ts:75


css

css(strings, ...rest): string

Parameters

NameType
stringsany
...restany[]

Returns

string

Defined in

webgi/src/helpers/refl.ts:76


html

html(strings, ...rest): string

Parameters

NameType
stringsany
...restany[]

Returns

string

Defined in

webgi/src/helpers/refl.ts:77


svgUrl

svgUrl(strings, ...rest): string

Parameters

NameType
stringsany
...restany[]

Returns

string

Defined in

webgi/src/helpers/refl.ts:78


onChange

onChange(fnKey): PropertyDecorator

Parameters

NameTypeDescription
fnKeystring | AnyFunctionuse: \<MyClass>.prototype.\<myFunction>.name

Returns

PropertyDecorator

Defined in

webgi/src/helpers/refl.ts:104


includesAll

includesAll(arr, subArr): boolean

Parameters

NameType
arrany[]
subArrIterableIterator<any>

Returns

boolean

Defined in

webgi/src/helpers/refl.ts:140


removeDuplicateGeometries

removeDuplicateGeometries(obj): void

Parameters

NameType
objObject3D<Event>

Returns

void

Defined in

webgi/src/helpers/removeDuplicateGeometries.ts:4


serialize

serialize(key?): PropertyDecorator

Parameters

NameType
key?string

Returns

PropertyDecorator

Defined in

webgi/src/helpers/serialize.ts:9


serializeObject

serializeObject(obj, isThis, meta?): any

Parameters

NameTypeDescription
objany
isThisbooleandoes not work for Texture, Material, Vector, Color
meta?any

Returns

any

Defined in

webgi/src/helpers/serialize.ts:122


deserializeObject

deserializeObject<T>(data, object, isThis, meta): T

todo: fix problem when deserializing twice. deserializeObject(deserializeObject(obj))

Type parameters

Name
T

Parameters

NameTypeDescription
dataany
objectTcurrent object that's set. If possible the data is deserialized into that instead of creating new objects.
isThisbooleanset it to true if called from the object itself like from fromJSON()
metaany

Returns

T

Defined in

webgi/src/helpers/serialize.ts:187


serializable

serializable(id): <T>(constructor: T) => T

Parameters

NameType
idstring

Returns

fn

▸ <T>(constructor): T

Type parameters
NameType
Textends (...args: any[]) => any
Parameters
NameType
constructorT
Returns

T

Defined in

webgi/src/helpers/serialize.ts:280


makeColorSvg

makeColorSvg(color, convertToSRGB?): string

Parameters

NameTypeDefault value
colorstring | number | Colorundefined
convertToSRGBbooleantrue

Returns

string

Defined in

webgi/src/helpers/svg.ts:4


makeColorSvgCircle

makeColorSvgCircle(color, convertToSRGB?): string

Parameters

NameTypeDefault value
colorstring | number | Colorundefined
convertToSRGBbooleantrue

Returns

string

Defined in

webgi/src/helpers/svg.ts:9


makeTextSvg

makeTextSvg(text): string

Parameters

NameType
textstring

Returns

string

Defined in

webgi/src/helpers/svg.ts:15


svgToCanvas

svgToCanvas(svgDataUrl, options): Promise<HTMLCanvasElement>

Parameters

NameType
svgDataUrlstring
optionsImageCanvasOptions

Returns

Promise<HTMLCanvasElement>

Defined in

webgi/src/helpers/svg.ts:19


svgToPng

svgToPng(svgDataUrl, options): Promise<string>

Parameters

NameType
svgDataUrlstring
optionsImageCanvasOptions

Returns

Promise<string>

Defined in

webgi/src/helpers/svg.ts:24


vRGBMToLinear

vRGBMToLinear(value, maxRange): Vector4

Parameters

NameType
valueVector4
maxRangenumber

Returns

Vector4

Defined in

webgi/src/helpers/threejs/colorEncodings.ts:5


cRGBMToLinear

cRGBMToLinear(value, maxRange): Color

Parameters

NameType
valueVector4
maxRangenumber

Returns

Color

Defined in

webgi/src/helpers/threejs/colorEncodings.ts:11


vLinearToRGBM

vLinearToRGBM(value, maxRange): Vector4

Parameters

NameType
valueVector4
maxRangenumber

Returns

Vector4

Defined in

webgi/src/helpers/threejs/colorEncodings.ts:16


cLinearToRGBM

cLinearToRGBM(value, maxRange): Vector4

Parameters

NameType
valueColor
maxRangenumber

Returns

Vector4

Defined in

webgi/src/helpers/threejs/colorEncodings.ts:24


rotateDuplicatedMesh

rotateDuplicatedMesh<T>(obj, rotations, skips, axis?): T | undefined

Type parameters

NameType
Textends Object3D<Event, T>

Parameters

NameTypeDefault value
objTundefined
rotationsnumberundefined
skipsundefined | number[]undefined
axis"x" | "y" | "z"'x'

Returns

T | undefined

Defined in

webgi/src/helpers/threejs/geometryUtils.ts:30


snapObject

snapObject(viewer, object?, root?, channel?, camOffset?): string

Parameters

NameTypeDefault value
viewerViewerAppundefined
object?Object3D<Event>undefined
root?Sceneundefined
channelnumber7
camOffsetVector3undefined

Returns

string

Defined in

webgi/src/helpers/threejs/snapObject.ts:7


computeScreenSpaceBoundingBox

computeScreenSpaceBoundingBox(obj, camera): Box2

Parameters

NameType
objObject3D<Event>
cameraCamera

Returns

Box2

Defined in

webgi/src/helpers/threejs/threeUtils.ts:27


getEncodingComponents

getEncodingComponents(encoding): string[]

Parameters

NameType
encodingTextureEncoding

Returns

string[]

Defined in

webgi/src/helpers/threejs/threeUtils.ts:106


getTextureEncodingFromMap

getTextureEncodingFromMap(map, isWebGL2): TextureEncoding

Parameters

NameType
mapany
isWebGL2boolean

Returns

TextureEncoding

Defined in

webgi/src/helpers/threejs/threeUtils.ts:134


getTexelDecodingFunction

getTexelDecodingFunction(functionName, encoding): string

Parameters

NameType
functionNamestring
encodingTextureEncoding

Returns

string

Defined in

webgi/src/helpers/threejs/threeUtils.ts:167


getTexelDecoding

getTexelDecoding(mapName, map, isWebGL2): string

Parameters

NameType
mapNamestring
mapundefined | ITexture<any>
isWebGL2boolean

Returns

string

Defined in

webgi/src/helpers/threejs/threeUtils.ts:174


getTexelDecoding2

getTexelDecoding2(mapName, encoding): string

Parameters

NameType
mapNamestring
encodingTextureEncoding

Returns

string

Defined in

webgi/src/helpers/threejs/threeUtils.ts:180


getTexelEncodingFunction

getTexelEncodingFunction(functionName, encoding): string

Parameters

NameType
functionNamestring
encodingTextureEncoding

Returns

string

Defined in

webgi/src/helpers/threejs/threeUtils.ts:186


getTexelEncoding

getTexelEncoding(functionName, map, isWebGL2): string

Parameters

NameType
functionNamestring
mapITexture<any>
isWebGL2boolean

Returns

string

Defined in

webgi/src/helpers/threejs/threeUtils.ts:193


uniform

uniform(__namedParameters?): PropertyDecorator

Parameters

NameType
__namedParametersObject
__namedParameters.uniforms?any
__namedParameters.propKey?string | symbol
__namedParameters.thisTarget?boolean

Returns

PropertyDecorator

Defined in

webgi/src/helpers/threejs/threeUtils.ts:205


matDefine

matDefine(key?, customDefines?, thisMat?, onChange?): PropertyDecorator

Parameters

NameTypeDefault valueDescription
key?string | symbolundefineddefine name
customDefines?anyundefinedobject for setting define value (like ShaderMaterial.defines), otherwise this.material.defines is taken
thisMatbooleanfalseaccess this.defines instead of this.material.defines
onChange?(...args: any[]) => anyundefined-

Returns

PropertyDecorator

Defined in

webgi/src/helpers/threejs/threeUtils.ts:243


dataTextureFromColor

dataTextureFromColor(color): DataTexture

Parameters

NameType
colorColor

Returns

DataTexture

Defined in

webgi/src/helpers/threejs/threeUtils.ts:285


dataTextureFromVec4

dataTextureFromVec4(color): DataTexture

Parameters

NameType
colorVector4

Returns

DataTexture

Defined in

webgi/src/helpers/threejs/threeUtils.ts:292


setThreeRendererMode

setThreeRendererMode(renderer, ud, render): void

Parameters

NameType
rendererWebGLRenderer
udObject
ud.shadowMapRender?boolean
ud.backgroundRender?boolean
ud.sceneRender?boolean
ud.opaqueRender?boolean
ud.transparentRender?boolean
ud.transmissionRender?boolean
ud.mainRenderPass?boolean
ud.screenSpaceRendering?boolean
render() => void

Returns

void

Defined in

webgi/src/helpers/threejs/threeUtils.ts:298


autoCenterObject3D

autoCenterObject3D(obj): void

Parameters

NameType
objObject3D<Event>

Returns

void

Defined in

webgi/src/helpers/threejs/threeUtils.ts:333


autoScaleObject3D

autoScaleObject3D(obj, autoScaleRadius?): Object3D<Event>

Parameters

NameType
objObject3D<Event>
autoScaleRadius?number

Returns

Object3D<Event>

Defined in

webgi/src/helpers/threejs/threeUtils.ts:342


toIndexedGeometry

toIndexedGeometry(geometry, tolerance?): BufferGeometry

Convert geometry to BufferGeometry with indexed attributes.

Parameters

NameTypeDefault value
geometryBufferGeometryundefined
tolerancenumber-1

Returns

BufferGeometry

Defined in

webgi/src/helpers/threejs/threeUtils.ts:383


patchShaderEncodingSupport

patchShaderEncodingSupport(shader, ...textureIds): ShaderMaterialEncodingSupport

Parameters

NameType
shaderany
...textureIdsstring[]

Returns

ShaderMaterialEncodingSupport

Defined in

webgi/src/passes/threejs/ShaderPass2.ts:165

Variables

diamondMaterialPropList

Const diamondMaterialPropList: Partial<DiamondMaterial> | Record<string, any>

Defined in

webgi/src/extras/ijewel/utils.ts:206


EasingFunctions

Const EasingFunctions: Object

Type declaration

NameType
linearEasing
easeInEasing
easeOutEasing
easeInOutEasing
circInEasing
circOutEasing
circInOutEasing
backInEasing
backOutEasing
backInOutEasing
anticipateEasing
bounceOut(p: number) => number
bounceInEasing
bounceInOut(p: number) => number
easeInOutSine(x: number) => number

Defined in

webgi/src/helpers/animation.ts:28


SETTLING_TIME

Const SETTLING_TIME: 10000

Defined in

webgi/src/helpers/damper.ts:21


DECAY_MILLISECONDS

Const DECAY_MILLISECONDS: 50

Defined in

webgi/src/helpers/damper.ts:23


serializers

Const serializers: Object

Type declaration

NameType
obj(obj: any, meta: any) => { [k: string]: T; }
vec4(v: Vector4) => { x: number = v.x; y: number = v.y; z: number = v.z; w: number = v.w; isVector4: boolean = true }
vec3(v: Vector3) => { x: number = v.x; y: number = v.y; z: number = v.z; isVector3: boolean = true }
vec2(v: Vector2) => { x: number = v.x; y: number = v.y; isVector2: boolean = true }
color(c: Color) => { r: number = c.r; g: number = c.g; b: number = c.b; isColor: boolean = true }
quat(v: Quaternion) => { x: number = v.x; y: number = v.y; z: number = v.z; w: number = v.w; isQuaternion: boolean = true }
texture(obj: any, meta?: any) => any
material(obj: any, meta?: any) => any

Defined in

webgi/src/helpers/serialize.ts:19


deserializers

Const deserializers: Object

Type declaration

NameType
obj(data: any, obj: any, meta: any) => any
vec4(v: any, o: any) => any
vec3(v: any, o: any) => any
vec2(v: any, o: any) => any
color(v: any, o: any) => any
quat(v: any, o: any) => any

Defined in

webgi/src/helpers/serialize.ts:99


RGBM16Encoding_

Const RGBM16Encoding_: TextureEncoding = 3005

Defined in

webgi/src/helpers/threejs/threeUtils.ts:103


combineDofShader

Const combineDofShader: Object

Type declaration

NameType
uniforms{ colorTexture: { value: null = null } ; tNormalDepth: { value: null = null } ; blurTexture: { value: null = null } ; cocTexture: { value: null = null } ; cocTextureSize: { value: Vector2 } ; cameraNearFar: { value: Vector2 } }
uniforms.colorTexture{ value: null = null }
uniforms.colorTexture.valuenull
uniforms.tNormalDepth{ value: null = null }
uniforms.tNormalDepth.valuenull
uniforms.blurTexture{ value: null = null }
uniforms.blurTexture.valuenull
uniforms.cocTexture{ value: null = null }
uniforms.cocTexture.valuenull
uniforms.cocTextureSize{ value: Vector2 }
uniforms.cocTextureSize.valueVector2
uniforms.cameraNearFar{ value: Vector2 }
uniforms.cameraNearFar.valueVector2
vertexShaderany
fragmentShaderstring

Defined in

webgi/src/passes/threejs/DepthOfFieldPass.ts:27

References

IEvent

Re-exports IEvent


IEventDispatcher

Re-exports IEventDispatcher