UNPKG

@tresjs/cientos

Version:

Collection of useful helpers and fully functional, ready-made abstractions for Tres

1,231 lines (1,229 loc) 978 kB
/** * name: @tresjs/cientos * version: v5.7.1 * (c) 2026 * description: Collection of useful helpers and fully functional, ready-made abstractions for Tres * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/) */ import * as vue164 from "vue"; import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref } from "vue"; import * as _tresjs_core0 from "@tresjs/core"; import { TresCamera, TresColor, TresObject, TresObject3D, TresOptions, TresRenderer, TresTimer, TresVector2, TresVector3, VectorFlexibleParams } from "@tresjs/core"; import * as three0 from "three"; import { AnimationAction, AnimationClip, AnimationMixer, Blending, Box3, BoxGeometry, BufferGeometry, Camera, CircleGeometry, Color, ColorRepresentation, ConeGeometry, CubeCamera, CubeTexture, CylinderGeometry, DodecahedronGeometry, Euler, Fog, FogExp2, Group, IcosahedronGeometry, InstancedMesh, InterleavedBuffer, LOD, LineSegments, LoadingManager, Matrix4, Mesh, MeshBasicMaterialParameters, Object3D, Object3DEventMap, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PlaneGeometry, Points, PointsMaterial, PointsMaterialParameters, PositionalAudio, Quaternion, Raycaster, RenderTargetOptions, RingGeometry, Scene, ShaderMaterial, Side, Sphere, SphereGeometry, TetrahedronGeometry, Texture, TorusGeometry, TorusKnotGeometry, TubeGeometry, Vector2, Vector3, VideoTexture, WebGLCubeRenderTarget, WebGLRenderTarget } from "three"; import { Fn, Mutable } from "@vueuse/core"; import * as three_stdlib0 from "three-stdlib"; import { GLTF, MapControls, MarchingCubes, OrbitControls, Reflector, SVGResult, Sky, TransformControls } from "three-stdlib"; import BaseCameraControls, { default as CameraControls } from "camera-controls"; //#region src/core/abstractions/AnimatedSprite/Atlas.d.ts type AtlasData = TexturePackerFrameDataArray | TexturePackerFrameDataObject; type Atlasish = AtlasData | [number, number] | number; interface TexturePackerFrameData { filename: string; frame: { x: number; y: number; w: number; h: number; }; } interface TexturePackerFrameDataArray { frames: TexturePackerFrameData[]; } interface TexturePackerFrameDataObject { frames: Record<string, TexturePackerFrameData>; } //#endregion //#region src/core/abstractions/AnimatedSprite/component.vue.d.ts interface AnimatedSpriteProps { /** URL of the image texture or an image dataURL. This prop is not reactive. */ image: string; /** * If `string`, the URL of the JSON atlas. * If `number`, the number of columns in the texture. * If `[number, number]`, the number of columns/rows in the texture. * If `AtlasData`, the atlas as a JS object. * This prop is not reactive. */ atlas: string | Atlasish; /** * Specify playback frame order and repeated frames (delays). `definitions` is a record where keys are atlas animation names and values are strings containing an animation definition. * A "animation definition" comma-separated string of frame numbers with optional parentheses-surrounded durations. * Here is how various definition strings convert to arrays of frames for playback: * "0,2,1" - [0,2,1], i.e., play frame 0, 2, then 1. * "2(10)" - [2,2,2,2,2,2,2,2,2,2], i.e., play from 2 10 times. * "1-4" - [1,2,3,4] * "10-5(2)" - [10,10,9,9,8,8,7,7,6,6,5,5] * "1-4(3),10(2)" - [1,1,1,2,2,2,3,3,3,4,4,4,10,10] */ definitions?: Record<string, string>; /** Desired frames per second of the animation. */ fps?: number; /** Whether or not the animation should loop. */ loop?: boolean; /** If `string`, name of the animation to play. If `[number, number]`, start and end frames of the animation. If `number`, frame number to display. */ animation?: string | [number, number] | number; /** Whether the animation is paused. */ paused?: boolean; /** Whether to play the animation in reverse. */ reversed?: boolean; /** Whether the sprite should be flipped, left to right. */ flipX?: boolean; /** For a non-looping animation, when the animation ends, whether to display the zeroth frame. */ resetOnEnd?: boolean; /** Whether to display the object as a THREE.Sprite. [See THREE.Sprite](https://threejs.org/docs/?q=sprite#api/en/objects/Sprite) */ asSprite?: boolean; /** Anchor point of the object. A value of [0.5, 0.5] corresponds to the center. [0, 0] is left, bottom. */ center?: TresVector2; /** Alpha test value for the material. [See THREE.Material.alphaTest](https://threejs.org/docs/#api/en/materials/Material.alphaTest) */ alphaTest?: number; /** Depth test value for the material. [See THREE.Material.depthTest](https://threejs.org/docs/#api/en/materials/Material.depthTest) */ depthTest?: boolean; /** Depth write value for the material. [See THREE.Material.depthWrite](https://threejs.org/docs/#api/en/materials/Material.depthWrite) */ depthWrite?: boolean; } declare var __VLS_36: {}; type __VLS_Slots$42 = {} & { default?: (props: typeof __VLS_36) => any; }; declare const __VLS_base$42: vue164.DefineComponent<AnimatedSpriteProps, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {} & { end: (frameName: string) => any; loop: (frameName: string) => any; frame: (frameName: string) => any; }, string, vue164.PublicProps, Readonly<AnimatedSpriteProps> & Readonly<{ onEnd?: ((frameName: string) => any) | undefined; onLoop?: ((frameName: string) => any) | undefined; onFrame?: ((frameName: string) => any) | undefined; }>, { center: TresVector2; fps: number; loop: boolean; animation: string | [number, number] | number; paused: boolean; reversed: boolean; flipX: boolean; resetOnEnd: boolean; asSprite: boolean; alphaTest: number; depthTest: boolean; depthWrite: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$82: __VLS_WithSlots$42<typeof __VLS_base$42, __VLS_Slots$42>; declare const _default$2: typeof __VLS_export$82; type __VLS_WithSlots$42<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/CubeCamera/useCubeCamera.d.ts interface CubeCameraOptions { /** Resolution of the FBO, 255 */ resolution?: MaybeRefOrGetter<number>; /** Camera near, 0.1 */ near?: MaybeRefOrGetter<number>; /** Camera far, 1000 */ far?: MaybeRefOrGetter<number>; /** Custom environment map that is temporarily set as the scene's background */ envMap?: MaybeRefOrGetter<Texture>; /** Custom fog that is temporarily set as the scene's fog */ fog?: MaybeRefOrGetter<Fog | FogExp2>; /** Renderer */ renderer?: MaybeRefOrGetter<TresRenderer>; /** Scene */ scene?: MaybeRefOrGetter<Scene>; } //#endregion //#region src/core/abstractions/CubeCamera/component.vue.d.ts type Props$2 = { /** Number of frames to render, Infinity */ frames?: MaybeRefOrGetter<number>; } & CubeCameraOptions; declare var __VLS_14$16: {}; type __VLS_Slots$41 = {} & { default?: (props: typeof __VLS_14$16) => any; }; declare const __VLS_base$41: vue164.DefineComponent<Props$2, { instance: vue164.ShallowRef<Group<three0.Object3DEventMap> | undefined, Group<three0.Object3DEventMap> | undefined>; fbo: vue164.ComputedRef<three0.WebGLCubeRenderTarget>; camera: vue164.ComputedRef<three0.CubeCamera>; update: () => void; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<Props$2> & Readonly<{}>, { frames: MaybeRefOrGetter<number>; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$81: __VLS_WithSlots$41<typeof __VLS_base$41, __VLS_Slots$41>; declare const _default$14: typeof __VLS_export$81; type __VLS_WithSlots$41<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/Billboard.vue.d.ts interface BillboardProps { /** * Whether the Billboard should face the camera automatically on every frame. */ autoUpdate?: boolean; /** * Whether to lock the x-axis. */ lockX?: boolean; /** * Whether to lock the y-axis. */ lockY?: boolean; /** * Whether to lock the z-axis. */ lockZ?: boolean; } declare function update$1(camera?: Camera): void; declare var __VLS_17$2: {}; type __VLS_Slots$40 = {} & { default?: (props: typeof __VLS_17$2) => any; }; declare const __VLS_base$40: vue164.DefineComponent<BillboardProps, { instance: vue164.ShallowRef<Group<three0.Object3DEventMap>, Group<three0.Object3DEventMap>>; update: typeof update$1; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<BillboardProps> & Readonly<{}>, { autoUpdate: boolean; lockX: boolean; lockY: boolean; lockZ: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$80: __VLS_WithSlots$40<typeof __VLS_base$40, __VLS_Slots$40>; declare const _default$4: typeof __VLS_export$80; type __VLS_WithSlots$40<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/GlobalAudio.d.ts interface AudioProps { /** * Path to your audio file. * @type {string} * @memberof AudioProps * */ src: string; /** * Id of the DOM element that trigger the play/pause state. * @type {string} * @memberof AudioProps * @default renderer.domElement * */ playTrigger?: string; /** * Id of the DOM element that trigger the stop state. * @type {string} * @memberof AudioProps * @default * */ stopTrigger?: string; /** * If the audio must be replayed when ends. * @type {boolean} * @memberof AudioProps * @default false * */ loop?: boolean; /** * Volume of the audio. * @type {number} * @memberof AudioProps * @default 0.5 * */ volume?: number; /** * PlaybackRate of the audio. * @type {number} * @memberof AudioProps * @default 1 * */ playbackRate?: number; } declare const GlobalAudio: vue164.DefineComponent<AudioProps, {}, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<AudioProps> & Readonly<{}>, {}, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; //#endregion //#region src/core/abstractions/GradientTexture.vue.d.ts type GradientType = 'linear' | 'radial'; interface Props$1 { /** * A `number[]` of values between `0` and `1` representing the color positions in the gradient. `stops.length` should match `color. */ stops: Array<number>; /** * A `THREE.ColorRepresentation[]` representing the colors in the gradient. */ colors: Array<three0.ColorRepresentation>; /** * Where the component should be attached within its parent. */ attach?: string; /** * Height of the canvas used to draw the gradient. */ height?: number; /** * Width of the canvas used to draw the gradient. */ width?: number; /** * `'linear' \| 'radial'` Type of gradient to draw. */ type?: GradientType; /** * Radius of the inner circle of a radial gradient. */ innerCircleRadius?: number; /** * Radius of the outer circle of a radial gradient. */ outerCircleRadius?: string | number; } declare const __VLS_export$79: vue164.DefineComponent<Props$1, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<Props$1> & Readonly<{}>, { type: GradientType; attach: string; height: number; width: number; innerCircleRadius: number; outerCircleRadius: string | number; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$25: typeof __VLS_export$79; //#endregion //#region src/core/abstractions/Image/component.vue.d.ts declare var __VLS_9$11: {}; type __VLS_Slots$39 = {} & { default?: (props: typeof __VLS_9$11) => any; }; declare const __VLS_base$39: vue164.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, vue164.PublicProps>; declare const __VLS_export$78: __VLS_WithSlots$39<typeof __VLS_base$39, __VLS_Slots$39>; declare const _default$31: typeof __VLS_export$78; type __VLS_WithSlots$39<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/Lensflare/LensflareImpl.d.ts declare class Lensflare extends Mesh { static Geometry: BufferGeometry; isLensflare: boolean; type: string; addElement(_: LensflareElement): void; dispose(): void; constructor(); } declare class LensflareElement { texture: Texture; size: number; distance: number; color: Color; static Shader: { name: string; vertexShader: string; fragmentShader: string; uniforms: Record<string, any>; }; constructor(texture: Texture, size?: number, distance?: number, color?: Color); } //#endregion //#region src/core/abstractions/Lensflare/index.d.ts interface SeedProps { texture: string[]; color: TresColor[]; distance: [number, number]; size: [number, number]; length: [number, number]; seed?: number; } interface LensflareElementProps { texture: Texture | string; size: number; distance: number; color: TresColor; } //#endregion //#region src/core/abstractions/Lensflare/component.vue.d.ts interface LensflareProps { /** * scale of the lensflare element sizes */ scale?: number; /** * multiplier for element distances from flare center */ distance?: number; /** * array of lensflare element properties */ elements?: Partial<LensflareElementProps>[]; /** * random seed for generating random seeded elements */ seed?: number; /** * specifications for generating random seeded elements */ seedProps?: SeedProps[]; /** * default color of lensflare elements */ color?: TresColor; /** * default texture of lensflare elements */ texture?: Texture | string; } declare const __VLS_export$77: vue164.DefineComponent<LensflareProps, { instance: vue164.ShallowRef<Lensflare | undefined, Lensflare | undefined>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<LensflareProps> & Readonly<{}>, { color: TresColor; scale: number; texture: Texture | string; distance: number; elements: Partial<LensflareElementProps>[]; seed: number; seedProps: SeedProps[]; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$34: typeof __VLS_export$77; //#endregion //#region src/core/abstractions/Levioso.vue.d.ts type __VLS_Props$6 = { speed?: number; rotationFactor?: number; floatFactor?: number; range?: [number, number]; }; declare var __VLS_9$10: {}; type __VLS_Slots$38 = {} & { default?: (props: typeof __VLS_9$10) => any; }; declare const __VLS_base$38: vue164.DefineComponent<__VLS_Props$6, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<__VLS_Props$6> & Readonly<{}>, { speed: number; rotationFactor: number; floatFactor: number; range: [number, number]; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$76: __VLS_WithSlots$38<typeof __VLS_base$38, __VLS_Slots$38>; declare const _default$35: typeof __VLS_export$76; type __VLS_WithSlots$38<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/MarchingCubes/MarchingCube.vue.d.ts interface MarchingCubeProps { strength?: number; subtract?: number; color?: ColorRepresentation; } declare const __VLS_export$75: vue164.DefineComponent<MarchingCubeProps, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<MarchingCubeProps> & Readonly<{}>, { strength: number; subtract: number; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$39: typeof __VLS_export$75; //#endregion //#region src/core/abstractions/MarchingCubes/MarchingCubes.vue.d.ts interface MarchingCubesProps { resolution?: number; maxPolyCount?: number; enableUvs?: boolean; enableColors?: boolean; } declare var __VLS_8$1: {}; type __VLS_Slots$37 = {} & { default?: (props: typeof __VLS_8$1) => any; }; declare const __VLS_base$37: vue164.DefineComponent<MarchingCubesProps, { instance: vue164.ComputedRef<MarchingCubes>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<MarchingCubesProps> & Readonly<{}>, { resolution: number; maxPolyCount: number; enableUvs: boolean; enableColors: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$74: __VLS_WithSlots$37<typeof __VLS_base$37, __VLS_Slots$37>; declare const _default$40: typeof __VLS_export$74; type __VLS_WithSlots$37<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/MarchingCubes/MarchingPlane.vue.d.ts interface MarchingPlaneProps { planeType?: 'x' | 'y' | 'z'; strength?: number; subtract?: number; } declare const __VLS_export$73: vue164.DefineComponent<MarchingPlaneProps, {}, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<MarchingPlaneProps> & Readonly<{}>, { strength: number; subtract: number; planeType: "x" | "y" | "z"; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$41: typeof __VLS_export$73; //#endregion //#region src/core/abstractions/Mask/component.vue.d.ts interface MaskProps { /** Id of the stencil buffer to use. Each mask must have an id. Multiple masks can refer to the same id. */ id: number; /** Whether the colors of the masks own material will leak through, default: false */ colorWrite?: boolean; /** Whether the depth of the masks own material will leak through, default: false */ depthWrite?: boolean; } declare var __VLS_9$9: {}; type __VLS_Slots$36 = {} & { default?: (props: typeof __VLS_9$9) => any; }; declare const __VLS_base$36: vue164.DefineComponent<MaskProps, { instance: vue164.ShallowRef<Mesh<three0.BufferGeometry<three0.NormalBufferAttributes, three0.BufferGeometryEventMap>, three0.Material | three0.Material[], three0.Object3DEventMap> | undefined, Mesh<three0.BufferGeometry<three0.NormalBufferAttributes, three0.BufferGeometryEventMap>, three0.Material | three0.Material[], three0.Object3DEventMap> | undefined>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<MaskProps> & Readonly<{}>, { id: number; depthWrite: boolean; colorWrite: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$72: __VLS_WithSlots$36<typeof __VLS_base$36, __VLS_Slots$36>; declare const _default$42: typeof __VLS_export$72; type __VLS_WithSlots$36<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/MouseParallax.vue.d.ts interface MouseParallaxProps { /** * Whether to disable the mouse controls. * @type {boolean} * @default false * @memberof MouseParallaxProps * */ disabled?: boolean; /** * The factor to multiply the mouse movement by. * @type {number | [number, number]} * @default 2.5 * @memberof MouseParallaxProps * */ factor?: number | [number, number]; /** * The factor to smooth the mouse movement by. * @type {number | [number, number]} * @default 2.5 * @memberof MouseParallaxProps * */ ease?: number | [number, number]; /** * Whether to apply the parallax effect to the local canvas. * @type {boolean} * @default false * @memberof MouseParallaxProps * */ local?: boolean; } declare const __VLS_export$71: vue164.DefineComponent<MouseParallaxProps, {}, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<MouseParallaxProps> & Readonly<{}>, { local: boolean; disabled: boolean; factor: number | [number, number]; ease: number | [number, number]; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$47: typeof __VLS_export$71; //#endregion //#region src/core/abstractions/Outline/component.vue.d.ts interface OutlineProps { /** Outline color, default: black */ color?: TresColor; /** Line thickness is independent of zoom, default: false */ screenspace?: boolean; /** Outline opacity, default: 1 */ opacity?: number; /** Outline transparency, default: false */ transparent?: boolean; /** Outline thickness, default 0.05 */ thickness?: number; /** Geometry crease angle (-1 === no crease), default: Math.PI, See [BufferGeometryUtils.toCreasedNormals](https://threejs.org/docs/#examples/en/utils/BufferGeometryUtils.toCreasedNormals) */ angle?: number; toneMapped?: boolean; polygonOffset?: boolean; polygonOffsetFactor?: number; renderOrder?: number; } declare const __VLS_export$70: vue164.DefineComponent<OutlineProps, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<OutlineProps> & Readonly<{}>, { color: TresColor; toneMapped: boolean; transparent: boolean; opacity: number; polygonOffset: boolean; polygonOffsetFactor: number; screenspace: boolean; thickness: number; angle: number; renderOrder: number; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$51: typeof __VLS_export$70; //#endregion //#region src/core/abstractions/PositionalAudio.vue.d.ts interface PositionalAudioProps { ready: boolean; url: string; distance?: number; helper?: boolean; loop?: boolean; autoplay?: boolean; innerAngle?: number; outerAngle?: number; outerGain?: number; } declare const __VLS_export$69: vue164.DefineComponent<PositionalAudioProps, { instance: vue164.ShallowRef<PositionalAudio | null, PositionalAudio | null>; play: () => void; stop: () => void; pause: () => void; dispose: () => void; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, { isPlaying: (...args: any[]) => void; }, string, vue164.PublicProps, Readonly<PositionalAudioProps> & Readonly<{ onIsPlaying?: ((...args: any[]) => any) | undefined; }>, { loop: boolean; distance: number; ready: boolean; helper: boolean; autoplay: boolean; innerAngle: number; outerAngle: number; outerGain: number; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$55: typeof __VLS_export$69; //#endregion //#region src/core/abstractions/Reflector.vue.d.ts interface ReflectorProps { /** * The color of the reflector. * * @default '#333' * @type {TresColor} * @memberof ReflectorProps * */ color?: TresColor; /** * The textureWidth of the internal WebGLRenderTarget. * * @default window.innerWidth * @type {number} * @memberof ReflectorProps * */ textureWidth?: number; /** * The textureHeight of the internal WebGLRenderTarget. * * @default window.innerHeight * @type {number} * @memberof ReflectorProps * */ textureHeight?: number; /** * The clipBias. * * @default 0 * @type {number} * @memberof ReflectorProps * */ clipBias?: number; /** * The multisample. * * @default 4 * @type {number} * @memberof ReflectorProps * */ multisample?: number; /** * Custom shader. * * @default Reflector.ReflectorShader * @type {object} * @memberof ReflectorProps * */ shader?: object; } declare var __VLS_9$8: {}; type __VLS_Slots$35 = {} & { default?: (props: typeof __VLS_9$8) => any; }; declare const __VLS_base$35: vue164.DefineComponent<ReflectorProps, { instance: vue164.ShallowRef<Reflector | undefined, Reflector | undefined>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<ReflectorProps> & Readonly<{}>, { color: TresColor; textureWidth: number; textureHeight: number; clipBias: number; multisample: number; shader: object; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$68: __VLS_WithSlots$35<typeof __VLS_base$35, __VLS_Slots$35>; declare const _default$59: typeof __VLS_export$68; type __VLS_WithSlots$35<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/ScreenSpace.vue.d.ts interface ScreenSpaceProps { depth?: number; top?: number; bottom?: number; left?: number; right?: number; } declare var __VLS_15: {}; type __VLS_Slots$34 = {} & { default?: (props: typeof __VLS_15) => any; }; declare const __VLS_base$34: vue164.DefineComponent<ScreenSpaceProps, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<ScreenSpaceProps> & Readonly<{}>, { depth: number; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$67: __VLS_WithSlots$34<typeof __VLS_base$34, __VLS_Slots$34>; declare const _default$65: typeof __VLS_export$67; type __VLS_WithSlots$34<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/Text3D.vue.d.ts interface Glyph { _cachedOutline: string[]; ha: number; o: string; } interface FontData { boundingBox: { yMax: number; yMin: number; }; familyName: string; glyphs: { [k: string]: Glyph; }; resolution: number; underlineThickness: number; } interface Text3DProps { /** * * The JSON font to use for the text. * Text3D requires fonts in JSON format generated through [typeface.json](http://gero3.github.io/facetype.js) * * @type {(FontData | string)} * @memberof Text3DProps * @see https://threejs.org/docs/index.html?q=TEXT#examples/en/geometries/TextGeometry */ font: FontData | string; /** * The text to display. * * @type {string} * @memberof Text3DProps */ text?: string; /** * The size of the text. * * @type {number} * @memberof Text3DProps * @default 0.5 */ size?: number; /** * The height of the text. * * @type {number} * @memberof Text3DProps * @default 0.2 */ height?: number; /** * The curve segments of the text. * * @type {number} * @memberof Text3DProps * @default 5 */ curveSegments?: number; /** * Turn on bevel * * @type {boolean} * @memberof Text3DProps * @default true */ bevelEnabled?: boolean; /** * How deep into text bevel goes. * * @type {number} * @memberof Text3DProps * @default 0.05 */ bevelThickness?: number; /** * How far from text outline is bevel. * * @type {number} * @memberof Text3DProps * @default 0.02 */ bevelSize?: number; /** * How far from text outline is bevel. * * @type {number} * @memberof Text3DProps * @default 0 */ bevelOffset?: number; /** * How many bevel segments. * * @type {number} * @memberof Text3DProps * @default 4 */ bevelSegments?: number; /** * Whether to center the text. * * @type {boolean} * @memberof Text3DProps * @default false */ center?: boolean; /** * Whether to update the text. * * @type {boolean} * @memberof Text3DProps * @default false */ needUpdates?: boolean; } declare var __VLS_14$15: {}; type __VLS_Slots$33 = {} & { default?: (props: typeof __VLS_14$15) => any; }; declare const __VLS_base$33: vue164.DefineComponent<Text3DProps, { instance: vue164.ShallowRef<any, any>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<Text3DProps> & Readonly<{}>, { center: boolean; size: number; height: number; curveSegments: number; bevelEnabled: boolean; bevelThickness: number; bevelSize: number; bevelOffset: number; bevelSegments: number; needUpdates: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$66: __VLS_WithSlots$33<typeof __VLS_base$33, __VLS_Slots$33>; declare const _default$76: typeof __VLS_export$66; type __VLS_WithSlots$33<T, S> = T & { new (): { $slots: S; }; }; //#endregion //#region src/core/abstractions/useAnimations.d.ts /** * Creates an AnimationMixer and returns it. * * @export * @template T * @param {T[]} animations * @param {(Scene | Ref<Object3D | undefined | null>)} [modelRef] * @return {*} */ declare function useAnimations<T extends AnimationClip>(animations: MaybeRef<T[]>, modelRef?: MaybeRef<Object3D | undefined | null>, options?: { manualUpdate?: boolean; }): { actions: vue164.ShallowReactive<{ [key: string]: AnimationAction | undefined; }>; mixer: vue164.ComputedRef<AnimationMixer>; }; //#endregion //#region src/core/abstractions/Mask/useMask.d.ts declare function useMask(id: Ref<number> | number, inverse?: Ref<boolean> | boolean): { stencilWrite: boolean; stencilRef: number; stencilFunc: 517 | 514; stencilFail: 7680; stencilZFail: 7680; stencilZPass: 7680; }; //#endregion //#region src/core/abstractions/useFBO/index.d.ts interface FboOptions { width?: number; height?: number; depth?: boolean; settings?: RenderTargetOptions; /** * Whether to automatically render the FBO on the default scene. * * @default true * @type {boolean} * @memberof FboProps */ autoRender?: boolean; } declare function useFBO(options: FboOptions): Ref<WebGLRenderTarget<three0.Texture<unknown>> | null, WebGLRenderTarget<three0.Texture<unknown>> | null>; //#endregion //#region src/core/abstractions/useFBO/component.vue.d.ts declare const __VLS_export$65: vue164.DefineComponent<FboOptions, { instance: vue164.Ref<three0.WebGLRenderTarget<three0.Texture<unknown>> | null, three0.WebGLRenderTarget<three0.Texture<unknown>> | null>; }, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {}, string, vue164.PublicProps, Readonly<FboOptions> & Readonly<{}>, { depth: boolean; settings: three0.RenderTargetOptions; autoRender: boolean; }, {}, {}, {}, string, vue164.ComponentProvideOptions, false, {}, any>; declare const _default$22: typeof __VLS_export$65; //#endregion //#region src/core/abstractions/useSurfaceSampler/index.d.ts interface useSurfaceSamplerProps { transform?: TransformFn; weight?: string; count?: number; mesh?: Mesh; instanceMesh?: InstancedMesh | null; } interface SamplePayload { /** * The position of the sample. */ position: Vector3; /** * The normal of the mesh at the sampled position. */ normal: Vector3; /** * The vertex color of the mesh at the sampled position. */ color: Color; } type TransformPayload = SamplePayload & { /** * The dummy object used to transform each instance. * This object's matrix will be updated after transforming & it will be used * to set the instance's matrix. */ dummy: TresObject; /** * The mesh that's initially passed to the sampler. * Use this if you need to apply transforms from your mesh to your instances * or if you need to grab attributes from the geometry. */ sampledMesh: Mesh; }; type TransformFn = (payload: TransformPayload, i: number) => void; declare const useSurfaceSampler: (mesh: Mesh, count?: number, instanceMesh?: InstancedMesh | null, weight?: string, transform?: TransformFn) => { buffer: vue164.Ref<{ readonly isInterleavedBuffer: true; array: { [x: number]: number; readonly BYTES_PER_ELEMENT: number; readonly buffer: { readonly byteLength: number; slice: (begin?: number, end?: number) => ArrayBuffer; readonly maxByteLength: number; readonly resizable: boolean; resize: (newByteLength?: number) => void; readonly detached: boolean; transfer: (newByteLength?: number) => ArrayBuffer; transferToFixedLength: (newByteLength?: number) => ArrayBuffer; readonly [Symbol.toStringTag]: string; } | { readonly byteLength: number; slice: (begin?: number, end?: number) => SharedArrayBuffer; readonly growable: boolean; readonly maxByteLength: number; grow: (newByteLength?: number) => void; readonly [Symbol.species]: SharedArrayBuffer; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; }; readonly byteLength: number; readonly byteOffset: number; copyWithin: (target: number, start: number, end?: number) => Int8Array<ArrayBufferLike>; every: (predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; fill: (value: number, start?: number, end?: number) => Int8Array<ArrayBufferLike>; filter: (predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => any, thisArg?: any) => Int8Array<ArrayBuffer>; find: (predicate: (value: number, index: number, obj: Int8Array<ArrayBufferLike>) => boolean, thisArg?: any) => number | undefined; findIndex: (predicate: (value: number, index: number, obj: Int8Array<ArrayBufferLike>) => boolean, thisArg?: any) => number; forEach: (callbackfn: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => void, thisArg?: any) => void; indexOf: (searchElement: number, fromIndex?: number) => number; join: (separator?: string) => string; lastIndexOf: (searchElement: number, fromIndex?: number) => number; readonly length: number; map: (callbackfn: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => number, thisArg?: any) => Int8Array<ArrayBuffer>; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array<ArrayBufferLike>) => U, initialValue: U): U; }; reverse: () => Int8Array<ArrayBufferLike>; set: (array: ArrayLike<number>, offset?: number) => void; slice: (start?: number, end?: number) => Int8Array<ArrayBuffer>; some: (predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; sort: (compareFn?: ((a: number, b: number) => number) | undefined) => Int8Array<ArrayBufferLike>; subarray: (begin?: number, end?: number) => Int8Array<ArrayBufferLike>; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }; toString: () => string; valueOf: () => Int8Array<ArrayBufferLike>; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator<number>; values: () => ArrayIterator<number>; includes: (searchElement: number, fromIndex?: number) => boolean; at: (index: number) => number | undefined; findLast: { <S extends number>(predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => value is S, thisArg?: any): S | undefined; (predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => unknown, thisArg?: any): number | undefined; }; findLastIndex: (predicate: (value: number, index: number, array: Int8Array<ArrayBufferLike>) => unknown, thisArg?: any) => number; toReversed: () => Int8Array<ArrayBuffer>; toSorted: (compareFn?: ((a: number, b: number) => number) | undefined) => Int8Array<ArrayBuffer>; with: (index: number, value: number) => Int8Array<ArrayBuffer>; [Symbol.iterator]: () => ArrayIterator<number>; readonly [Symbol.toStringTag]: "Int8Array"; } | { [x: number]: number; readonly BYTES_PER_ELEMENT: number; readonly buffer: { readonly byteLength: number; slice: (begin?: number, end?: number) => ArrayBuffer; readonly maxByteLength: number; readonly resizable: boolean; resize: (newByteLength?: number) => void; readonly detached: boolean; transfer: (newByteLength?: number) => ArrayBuffer; transferToFixedLength: (newByteLength?: number) => ArrayBuffer; readonly [Symbol.toStringTag]: string; } | { readonly byteLength: number; slice: (begin?: number, end?: number) => SharedArrayBuffer; readonly growable: boolean; readonly maxByteLength: number; grow: (newByteLength?: number) => void; readonly [Symbol.species]: SharedArrayBuffer; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; }; readonly byteLength: number; readonly byteOffset: number; copyWithin: (target: number, start: number, end?: number) => Uint8Array<ArrayBufferLike>; every: (predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; fill: (value: number, start?: number, end?: number) => Uint8Array<ArrayBufferLike>; filter: (predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => any, thisArg?: any) => Uint8Array<ArrayBuffer>; find: (predicate: (value: number, index: number, obj: Uint8Array<ArrayBufferLike>) => boolean, thisArg?: any) => number | undefined; findIndex: (predicate: (value: number, index: number, obj: Uint8Array<ArrayBufferLike>) => boolean, thisArg?: any) => number; forEach: (callbackfn: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => void, thisArg?: any) => void; indexOf: (searchElement: number, fromIndex?: number) => number; join: (separator?: string) => string; lastIndexOf: (searchElement: number, fromIndex?: number) => number; readonly length: number; map: (callbackfn: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => number, thisArg?: any) => Uint8Array<ArrayBuffer>; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array<ArrayBufferLike>) => U, initialValue: U): U; }; reverse: () => Uint8Array<ArrayBufferLike>; set: (array: ArrayLike<number>, offset?: number) => void; slice: (start?: number, end?: number) => Uint8Array<ArrayBuffer>; some: (predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; sort: (compareFn?: ((a: number, b: number) => number) | undefined) => Uint8Array<ArrayBufferLike>; subarray: (begin?: number, end?: number) => Uint8Array<ArrayBufferLike>; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }; toString: () => string; valueOf: () => Uint8Array<ArrayBufferLike>; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator<number>; values: () => ArrayIterator<number>; includes: (searchElement: number, fromIndex?: number) => boolean; at: (index: number) => number | undefined; findLast: { <S extends number>(predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => value is S, thisArg?: any): S | undefined; (predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => unknown, thisArg?: any): number | undefined; }; findLastIndex: (predicate: (value: number, index: number, array: Uint8Array<ArrayBufferLike>) => unknown, thisArg?: any) => number; toReversed: () => Uint8Array<ArrayBuffer>; toSorted: (compareFn?: ((a: number, b: number) => number) | undefined) => Uint8Array<ArrayBuffer>; with: (index: number, value: number) => Uint8Array<ArrayBuffer>; [Symbol.iterator]: () => ArrayIterator<number>; readonly [Symbol.toStringTag]: "Uint8Array"; } | { [x: number]: number; readonly BYTES_PER_ELEMENT: number; readonly buffer: { readonly byteLength: number; slice: (begin?: number, end?: number) => ArrayBuffer; readonly maxByteLength: number; readonly resizable: boolean; resize: (newByteLength?: number) => void; readonly detached: boolean; transfer: (newByteLength?: number) => ArrayBuffer; transferToFixedLength: (newByteLength?: number) => ArrayBuffer; readonly [Symbol.toStringTag]: string; } | { readonly byteLength: number; slice: (begin?: number, end?: number) => SharedArrayBuffer; readonly growable: boolean; readonly maxByteLength: number; grow: (newByteLength?: number) => void; readonly [Symbol.species]: SharedArrayBuffer; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; }; readonly byteLength: number; readonly byteOffset: number; copyWithin: (target: number, start: number, end?: number) => Uint8ClampedArray<ArrayBufferLike>; every: (predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; fill: (value: number, start?: number, end?: number) => Uint8ClampedArray<ArrayBufferLike>; filter: (predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => any, thisArg?: any) => Uint8ClampedArray<ArrayBuffer>; find: (predicate: (value: number, index: number, obj: Uint8ClampedArray<ArrayBufferLike>) => boolean, thisArg?: any) => number | undefined; findIndex: (predicate: (value: number, index: number, obj: Uint8ClampedArray<ArrayBufferLike>) => boolean, thisArg?: any) => number; forEach: (callbackfn: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => void, thisArg?: any) => void; indexOf: (searchElement: number, fromIndex?: number) => number; join: (separator?: string) => string; lastIndexOf: (searchElement: number, fromIndex?: number) => number; readonly length: number; map: (callbackfn: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => number, thisArg?: any) => Uint8ClampedArray<ArrayBuffer>; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray<ArrayBufferLike>) => U, initialValue: U): U; }; reverse: () => Uint8ClampedArray<ArrayBufferLike>; set: (array: ArrayLike<number>, offset?: number) => void; slice: (start?: number, end?: number) => Uint8ClampedArray<ArrayBuffer>; some: (predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; sort: (compareFn?: ((a: number, b: number) => number) | undefined) => Uint8ClampedArray<ArrayBufferLike>; subarray: (begin?: number, end?: number) => Uint8ClampedArray<ArrayBufferLike>; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }; toString: () => string; valueOf: () => Uint8ClampedArray<ArrayBufferLike>; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator<number>; values: () => ArrayIterator<number>; includes: (searchElement: number, fromIndex?: number) => boolean; at: (index: number) => number | undefined; findLast: { <S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => value is S, thisArg?: any): S | undefined; (predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => unknown, thisArg?: any): number | undefined; }; findLastIndex: (predicate: (value: number, index: number, array: Uint8ClampedArray<ArrayBufferLike>) => unknown, thisArg?: any) => number; toReversed: () => Uint8ClampedArray<ArrayBuffer>; toSorted: (compareFn?: ((a: number, b: number) => number) | undefined) => Uint8ClampedArray<ArrayBuffer>; with: (index: number, value: number) => Uint8ClampedArray<ArrayBuffer>; [Symbol.iterator]: () => ArrayIterator<number>; readonly [Symbol.toStringTag]: "Uint8ClampedArray"; } | { [x: number]: number; readonly BYTES_PER_ELEMENT: number; readonly buffer: { readonly byteLength: number; slice: (begin?: number, end?: number) => ArrayBuffer; readonly maxByteLength: number; readonly resizable: boolean; resize: (newByteLength?: number) => void; readonly detached: boolean; transfer: (newByteLength?: number) => ArrayBuffer; transferToFixedLength: (newByteLength?: number) => ArrayBuffer; readonly [Symbol.toStringTag]: string; } | { readonly byteLength: number; slice: (begin?: number, end?: number) => SharedArrayBuffer; readonly growable: boolean; readonly maxByteLength: number; grow: (newByteLength?: number) => void; readonly [Symbol.species]: SharedArrayBuffer; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; }; readonly byteLength: number; readonly byteOffset: number; copyWithin: (target: number, start: number, end?: number) => Int16Array<ArrayBufferLike>; every: (predicate: (value: number, index: number, array: Int16Array<ArrayBufferLike>) => unknown, thisArg?: any) => boolean; fill: (value: number, start?: number, end?: number) => Int16Array<ArrayBufferLike>; filter: (predicate: (value: number, index: number, array: Int16Array<ArrayBufferLike>) => any, thisArg?: any) => Int16Array<ArrayBuffer>; find: (predicate: (value: number, index: number, obj: Int16Array<ArrayBufferLike>) => boolean, thisArg?: any) => number | undefined; findIndex: (predicate: (value: number, index: number, obj: Int16Array<ArrayBufferLike>) => boolean, thisArg?: any) => number; forEach: (callbackfn: (value: number, index: number, array: Int16Array<ArrayBufferLike>) => void, thisArg?: any) => void; indexOf: (searchElement: number, fromIndex?: number) => number; join: (separator?: string) => string; lastIndexOf: (searchElement: number, fromIndex?: number) => number; readonly length: number; map: (callbackfn: (value: number, index: number, array: Int16Array<ArrayBufferLike>) => number, thisArg?: any) => Int16Array<ArrayBuffer>; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike>) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike>) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike>) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array<ArrayBufferLike