From 9a7d8eaa9b4af873b20761e03335e51db83a1df9 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Wed, 28 Apr 2021 18:07:58 +0200 Subject: [PATCH] 0.3.0-beta.0 --- .gitignore | 1 + .npmignore | 3 +- api-extractor.json | 13 - build/trois.d.ts | 6127 +++++++++++++++++++++++++++++ build/trois.js | 3225 +++++++-------- build/trois.js.map | 1 + build/trois.module.cdn.js | 3220 +++++++-------- build/trois.module.cdn.js.map | 2 +- build/trois.module.cdn.min.js | 135 +- build/trois.module.cdn.min.js.map | 2 +- build/trois.module.js | 3220 +++++++-------- build/trois.module.js.map | 2 +- build/trois.module.min.js | 135 +- build/trois.module.min.js.map | 2 +- package.json | 11 +- src/materials/index.ts | 2 +- src/use/useTextures.ts | 4 +- 17 files changed, 11301 insertions(+), 4804 deletions(-) delete mode 100644 api-extractor.json create mode 100644 build/trois.d.ts create mode 100644 build/trois.js.map diff --git a/.gitignore b/.gitignore index 362162a..900efbf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .DS_Store dist temp +types *.local \ No newline at end of file diff --git a/.npmignore b/.npmignore index a5da6c3..08e29d4 100644 --- a/.npmignore +++ b/.npmignore @@ -1,9 +1,10 @@ dist -docs screenshots temp +types .eslintrc.js .gitignore index.html rollup.config.js +tsconfig.json vite.config.js diff --git a/api-extractor.json b/api-extractor.json deleted file mode 100644 index 3f6626c..0000000 --- a/api-extractor.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "mainEntryPointFilePath": "./types/export.d.ts", - "apiReport": { - "enabled": true - }, - "docModel": { - "enabled": true - }, - "dtsRollup": { - "enabled": true, - "publicTrimmedFilePath": "./dist/trois.d.ts" - } -} diff --git a/build/trois.d.ts b/build/trois.d.ts new file mode 100644 index 0000000..c465d5e --- /dev/null +++ b/build/trois.d.ts @@ -0,0 +1,6127 @@ +import * as vue from 'vue'; +import { InjectionKey, PropType, ComponentPublicInstance, ComponentPropsOptions, App } from 'vue'; +import * as three from 'three'; +import { Mesh as Mesh$1, InstancedMesh, Vector2, Vector3, Intersection, WebGLRenderer, Camera, Scene, Object3D, OrthographicCamera, PerspectiveCamera, Group, WebGLCubeRenderTarget, CubeCamera, BufferGeometry, Material, Curve, Light, Texture, MeshBasicMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshPhongMaterial, MeshPhysicalMaterial, ShaderMaterial, MeshStandardMaterial, MeshToonMaterial, TextGeometry, Font, SpriteMaterial, Sprite, TextureLoader } from 'three'; +import { EffectComposer as EffectComposer$1 } from 'three/examples/jsm/postprocessing/EffectComposer'; +import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; +import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'; +import * as three_examples_jsm_postprocessing_Pass from 'three/examples/jsm/postprocessing/Pass'; +import { Pass } from 'three/examples/jsm/postprocessing/Pass'; +import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'; + +interface PointerEventInterface { + type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'; + position?: Vector2; + positionN?: Vector2; + positionV3?: Vector3; +} +interface PointerIntersectEventInterface { + type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'; + component: any; + over?: boolean; + intersect?: Intersection; +} +declare type PointerCallbackType = (e: PointerEventInterface) => void; +declare type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void; +declare type IntersectObject = Mesh$1 | InstancedMesh; +interface PointerPublicConfigInterface { + intersectMode?: 'frame'; + touch?: boolean; + resetOnEnd?: boolean; + resetPosition?: Vector2; + resetPositionV3?: Vector3; + onEnter?: PointerCallbackType; + onMove?: PointerCallbackType; + onLeave?: PointerCallbackType; + onClick?: PointerCallbackType; + onIntersectEnter?: PointerIntersectCallbackType; + onIntersectOver?: PointerIntersectCallbackType; + onIntersectMove?: PointerIntersectCallbackType; + onIntersectLeave?: PointerIntersectCallbackType; + onIntersectClick?: PointerIntersectCallbackType; +} +interface PointerInterface { + position: Vector2; + positionN: Vector2; + positionV3: Vector3; + intersectObjects: IntersectObject[]; + listeners: boolean; + addListeners(cb: void): void; + removeListeners(cb: void): void; + intersect(): void; +} + +interface SizeInterface { + width: number; + height: number; + wWidth: number; + wHeight: number; + ratio: number; +} +interface ThreeConfigInterface { + canvas?: HTMLCanvasElement; + antialias: boolean; + alpha: boolean; + autoClear: boolean; + orbitCtrl: boolean | Record; + pointer: boolean | PointerPublicConfigInterface; + resize: boolean | string; + width?: number; + height?: number; + onResize?(size: SizeInterface): void; + [index: string]: any; +} +interface ThreeInterface { + config: ThreeConfigInterface; + renderer: WebGLRenderer; + composer?: EffectComposer; + camera?: Camera; + cameraCtrl?: OrbitControls; + scene?: Scene; + pointer?: PointerInterface; + size: SizeInterface; + init(): boolean; + dispose(): void; + render(): void; + renderC(): void; + setSize(width: number, height: number): void; + addIntersectObject(o: IntersectObject): void; + removeIntersectObject(o: IntersectObject): void; +} + +declare type CallbackType = (event: T) => void; +interface EventInterface { + type: 'init' | 'mounted'; + renderer: RendererInterface; +} +interface RenderEventInterface { + type: 'beforerender' | 'afterrender'; + renderer: RendererInterface; + time: number; +} +interface ResizeEventInterface { + type: 'resize'; + renderer: RendererInterface; + size: SizeInterface; +} +declare type InitCallbackType = CallbackType; +declare type MountedCallbackType = CallbackType; +declare type RenderCallbackType = CallbackType; +declare type ResizeCallbackType = CallbackType; +interface EventCallbackMap { + 'init': InitCallbackType; + 'mounted': MountedCallbackType; + 'beforerender': RenderCallbackType; + 'afterrender': RenderCallbackType; + 'resize': ResizeCallbackType; +} +interface RendererSetupInterface { + canvas: HTMLCanvasElement; + three: ThreeInterface; + renderer: WebGLRenderer; + size: SizeInterface; + renderFn(): void; + raf: boolean; + initCallbacks: InitCallbackType[]; + mountedCallbacks: MountedCallbackType[]; + beforeRenderCallbacks: RenderCallbackType[]; + afterRenderCallbacks: RenderCallbackType[]; + resizeCallbacks: ResizeCallbackType[]; +} +interface RendererInterface extends RendererSetupInterface { + scene?: Scene; + camera?: Camera; + composer?: EffectComposer$1; + onInit(cb: InitCallbackType): void; + onMounted(cb: MountedCallbackType): void; + onBeforeRender(cb: RenderCallbackType): void; + offBeforeRender(cb: RenderCallbackType): void; + onAfterRender(cb: RenderCallbackType): void; + offAfterRender(cb: RenderCallbackType): void; + onResize(cb: ResizeCallbackType): void; + offResize(cb: ResizeCallbackType): void; + addListener(t: T, cb: EventCallbackMap[T]): void; + removeListener(t: T, cb: EventCallbackMap[T]): void; +} +declare const RendererInjectionKey: InjectionKey; +declare const _default$1a: vue.DefineComponent<{ + antialias: BooleanConstructor; + alpha: BooleanConstructor; + autoClear: { + type: BooleanConstructor; + default: boolean; + }; + orbitCtrl: { + type: PropType>; + default: boolean; + }; + pointer: { + type: PropType; + default: boolean; + }; + resize: { + type: PropType; + default: boolean; + }; + shadow: BooleanConstructor; + width: StringConstructor; + height: StringConstructor; + xr: BooleanConstructor; + onReady: PropType<(r: RendererInterface) => void>; + onClick: PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>; +}, RendererSetupInterface, unknown, { + camera: { + get: () => Camera | undefined; + set: (camera: Camera) => void; + }; + scene: { + get: () => Scene | undefined; + set: (scene: Scene) => void; + }; + composer: { + get: () => EffectComposer$1 | undefined; + set: (composer: EffectComposer$1) => void; + }; +}, { + onInit(cb: InitCallbackType): void; + onMounted(cb: MountedCallbackType): void; + onBeforeRender(cb: RenderCallbackType): void; + offBeforeRender(cb: RenderCallbackType): void; + onAfterRender(cb: RenderCallbackType): void; + offAfterRender(cb: RenderCallbackType): void; + onResize(cb: ResizeCallbackType): void; + offResize(cb: ResizeCallbackType): void; + addListener(type: string, cb: (e?: any) => void): void; + removeListener(type: string, cb: (e?: any) => void): void; + getCallbacks(type: string): InitCallbackType[] | RenderCallbackType[] | ResizeCallbackType[]; + render(time: number): void; + renderLoop(time: number): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + resize: string | boolean; + pointer: boolean | PointerPublicConfigInterface; + alpha: boolean; + antialias: boolean; + autoClear: boolean; + orbitCtrl: boolean | Record; + shadow: boolean; + xr: boolean; +} & { + onClick?: ((this: HTMLCanvasElement, ev: MouseEvent) => any) | undefined; + width?: string | undefined; + height?: string | undefined; + onReady?: ((r: RendererInterface) => void) | undefined; +}>, { + resize: string | boolean; + pointer: boolean | PointerPublicConfigInterface; + alpha: boolean; + antialias: boolean; + autoClear: boolean; + orbitCtrl: boolean | Record; + shadow: boolean; + xr: boolean; +}>; + +interface Object3DSetupInterface { + renderer?: RendererInterface; + scene?: Scene; + o3d?: Object3D; + parent?: ComponentPublicInstance; +} +interface Vector2PropInterface { + x?: number; + y?: number; +} +interface Vector3PropInterface extends Vector2PropInterface { + z?: number; +} +interface EulerPropInterface extends Vector3PropInterface { + order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'; +} +declare const _default$19: vue.DefineComponent<{ + position: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: Object3D): void; + getParent(): undefined | ComponentPublicInstance; + addToParent(o?: Object3D | undefined): boolean; + removeFromParent(o?: Object3D | undefined): boolean; + add(o: Object3D): void; + remove(o: Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>; + +declare const _default$18: vue.DefineComponent<{ + left: { + type: NumberConstructor; + default: number; + }; + right: { + type: NumberConstructor; + default: number; + }; + top: { + type: NumberConstructor; + default: number; + }; + bottom: { + type: NumberConstructor; + default: number; + }; + near: { + type: NumberConstructor; + default: number; + }; + far: { + type: NumberConstructor; + default: number; + }; + zoom: { + type: NumberConstructor; + default: number; + }; + position: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; +}, { + renderer: RendererInterface; + camera: OrthographicCamera; +} | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + left: number; + right: number; + bottom: number; + top: number; + position: Vector3PropInterface; + zoom: number; + near: number; + far: number; +} & {}>, { + left: number; + right: number; + bottom: number; + top: number; + position: Vector3PropInterface; + zoom: number; + near: number; + far: number; +}>; + +declare const _default$17: vue.DefineComponent<{ + aspect: { + type: NumberConstructor; + default: number; + }; + far: { + type: NumberConstructor; + default: number; + }; + fov: { + type: NumberConstructor; + default: number; + }; + near: { + type: NumberConstructor; + default: number; + }; + position: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + lookAt: { + type: PropType; + default: null; + }; +}, { + renderer: RendererInterface; + camera: PerspectiveCamera; +} | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + lookAt: Vector3PropInterface; + near: number; + far: number; + aspect: number; + fov: number; +} & {}>, { + position: Vector3PropInterface; + lookAt: Vector3PropInterface; + near: number; + far: number; + aspect: number; + fov: number; +}>; + +declare const _default$16: vue.DefineComponent<{}, { + group: Group; +}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const SceneInjectionKey: InjectionKey; +declare const _default$15: vue.DefineComponent<{ + background: (ObjectConstructor | StringConstructor | NumberConstructor)[]; +}, { + scene: Scene; + add: (o: Object3D) => void; + remove: (o: Object3D) => void; +} | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + background?: unknown; +}>, {}>; + +interface RaycasterSetupInterface { + renderer?: RendererInterface; + pointer?: PointerInterface; +} +declare const _default$14: vue.DefineComponent<{ + onPointerEnter: { + type: PropType; + default: PointerIntersectCallbackType; + }; + onPointerOver: { + type: PropType; + default: PointerIntersectCallbackType; + }; + onPointerMove: { + type: PropType; + default: PointerIntersectCallbackType; + }; + onPointerLeave: { + type: PropType; + default: PointerIntersectCallbackType; + }; + onClick: { + type: PropType; + default: PointerIntersectCallbackType; + }; + intersectMode: { + type: StringConstructor; + default: string; + }; +}, RaycasterSetupInterface, unknown, {}, { + getIntersectObjects(): IntersectObject[]; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + onClick: PointerIntersectCallbackType; + onPointerEnter: PointerIntersectCallbackType; + onPointerOver: PointerIntersectCallbackType; + onPointerMove: PointerIntersectCallbackType; + onPointerLeave: PointerIntersectCallbackType; + intersectMode: string; +} & {}>, { + onClick: PointerIntersectCallbackType; + onPointerEnter: PointerIntersectCallbackType; + onPointerOver: PointerIntersectCallbackType; + onPointerMove: PointerIntersectCallbackType; + onPointerLeave: PointerIntersectCallbackType; + intersectMode: string; +}>; + +declare const _default$13: vue.DefineComponent<{ + cubeRTSize: { + type: NumberConstructor; + default: number; + }; + cubeCameraNear: { + type: NumberConstructor; + default: number; + }; + cubeCameraFar: { + type: NumberConstructor; + default: number; + }; + autoUpdate: BooleanConstructor; +}, { + cubeRT: WebGLCubeRenderTarget; + cubeCamera: CubeCamera; +} | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + cubeRTSize: number; + cubeCameraNear: number; + cubeCameraFar: number; + autoUpdate: boolean; +} & {}>, { + cubeRTSize: number; + cubeCameraNear: number; + cubeCameraFar: number; + autoUpdate: boolean; +}>; + +interface MeshSetupInterface extends Object3DSetupInterface { + mesh?: Mesh$1; + geometry?: BufferGeometry; + material?: Material; + loading?: boolean; +} +interface MeshInterface extends MeshSetupInterface { + setGeometry(g: BufferGeometry): void; + setMaterial(m: Material): void; +} +declare const MeshInjectionKey: InjectionKey; +declare const Mesh: vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly): void; + setGeometry(geometry: BufferGeometry): void; + setMaterial(material: Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>; + +interface GeometrySetupInterface { + mesh?: MeshInterface; + geometry?: BufferGeometry; + watchProps?: string[]; +} + +declare const _default$12: vue.DefineComponent<{ + readonly size: NumberConstructor; + readonly width: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly depth: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly depthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + width: number; + height: number; + depth: number; + widthSegments: number; + heightSegments: number; + depthSegments: number; +} & { + size?: number | undefined; +}>, { + width: number; + height: number; + depth: number; + widthSegments: number; + heightSegments: number; + depthSegments: number; +}>; + +declare const _default$11: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly segments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + segments: number; + radius: number; + thetaStart: number; + thetaLength: number; +} & {}>, { + segments: number; + radius: number; + thetaStart: number; + thetaLength: number; +}>; + +declare const _default$10: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly openEnded: { + readonly type: BooleanConstructor; + readonly default: false; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + height: number; + heightSegments: number; + radius: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; +} & {}>, { + height: number; + heightSegments: number; + radius: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; +}>; + +declare const _default$$: vue.DefineComponent<{ + readonly radiusTop: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radiusBottom: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly openEnded: { + readonly type: BooleanConstructor; + readonly default: false; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + height: number; + heightSegments: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; + radiusTop: number; + radiusBottom: number; +} & {}>, { + height: number; + heightSegments: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; + radiusTop: number; + radiusBottom: number; +}>; + +declare const _default$_: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$Z: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$Y: vue.DefineComponent<{ + readonly points: ArrayConstructor; + readonly segments: { + readonly type: NumberConstructor; + readonly default: 12; + }; + readonly phiStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly phiLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + segments: number; + phiStart: number; + phiLength: number; +} & { + points?: unknown[] | undefined; +}>, { + segments: number; + phiStart: number; + phiLength: number; +}>; + +declare const _default$X: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$W: vue.DefineComponent<{ + readonly width: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + width: number; + height: number; + widthSegments: number; + heightSegments: number; +} & {}>, { + width: number; + height: number; + widthSegments: number; + heightSegments: number; +}>; + +declare const _default$V: vue.DefineComponent<{ + readonly vertices: ArrayConstructor; + readonly indices: ArrayConstructor; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & { + vertices?: unknown[] | undefined; + indices?: unknown[] | undefined; +}>, { + radius: number; + detail: number; +}>; + +declare const _default$U: vue.DefineComponent<{ + readonly innerRadius: { + readonly type: NumberConstructor; + readonly default: 0.5; + }; + readonly outerRadius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly thetaSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly phiSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + thetaStart: number; + thetaLength: number; + innerRadius: number; + outerRadius: number; + thetaSegments: number; + phiSegments: number; +} & {}>, { + thetaStart: number; + thetaLength: number; + innerRadius: number; + outerRadius: number; + thetaSegments: number; + phiSegments: number; +}>; + +declare const _default$T: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 12; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 12; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + widthSegments: number; + heightSegments: number; + radius: number; +} & {}>, { + widthSegments: number; + heightSegments: number; + radius: number; +}>; + +declare const _default$S: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$R: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly tube: { + readonly type: NumberConstructor; + readonly default: 0.4; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 6; + }; + readonly arc: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; + arc: number; +} & {}>, { + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; + arc: number; +}>; + +declare const _default$Q: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly tube: { + readonly type: NumberConstructor; + readonly default: 0.4; + }; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 64; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly p: { + readonly type: NumberConstructor; + readonly default: 2; + }; + readonly q: { + readonly type: NumberConstructor; + readonly default: 3; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + p: number; + q: number; + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; +} & {}>, { + p: number; + q: number; + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; +}>; + +declare const _default$P: vue.DefineComponent<{ + readonly points: ArrayConstructor; + readonly path: typeof Curve; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 64; + }; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly closed: { + readonly type: BooleanConstructor; + readonly default: false; + }; +}, unknown, unknown, {}, { + createGeometry(): void; + updatePoints(points: Vector3[]): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + closed: boolean; + radius: number; + radialSegments: number; + tubularSegments: number; +} & { + path?: Curve | undefined; + points?: unknown[] | undefined; +}>, { + closed: boolean; + radius: number; + radialSegments: number; + tubularSegments: number; +}>; + +interface LightSetupInterface { + light?: Light; +} + +declare const _default$O: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: vue.PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const _default$N: vue.DefineComponent<{ + target: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + target: Vector2PropInterface; +} & {}>, { + target: Vector2PropInterface; +}>; + +declare const _default$M: vue.DefineComponent<{ + groundColor: { + type: StringConstructor; + default: string; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: vue.PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + groundColor: string; +} & {}>, { + groundColor: string; +}>; + +declare const _default$L: vue.DefineComponent<{ + distance: { + type: NumberConstructor; + default: number; + }; + decay: { + type: NumberConstructor; + default: number; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: vue.PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + distance: number; + decay: number; +} & {}>, { + distance: number; + decay: number; +}>; + +declare const _default$K: vue.DefineComponent<{ + width: { + type: NumberConstructor; + default: number; + }; + height: { + type: NumberConstructor; + default: number; + }; + helper: BooleanConstructor; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: vue.PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + width: number; + height: number; + helper: boolean; +} & {}>, { + width: number; + height: number; + helper: boolean; +}>; + +declare const _default$J: vue.DefineComponent<{ + angle: { + type: NumberConstructor; + default: number; + }; + decay: { + type: NumberConstructor; + default: number; + }; + distance: { + type: NumberConstructor; + default: number; + }; + penumbra: { + type: NumberConstructor; + default: number; + }; + target: ObjectConstructor; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: StringConstructor; + default: string; + }; + intensity: { + type: NumberConstructor; + default: number; + }; + castShadow: { + type: BooleanConstructor; + default: boolean; + }; + shadowMapSize: { + type: vue.PropType; + default: () => { + x: number; + y: number; + }; + }; + shadowCamera: { + type: ObjectConstructor; + default: () => {}; + }; +}, LightSetupInterface, unknown, {}, { + initLight(light: three.Light): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +} & {}>, { + color: string; + castShadow: boolean; + intensity: number; + shadowMapSize: Vector2PropInterface; + shadowCamera: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + distance: number; + decay: number; + angle: number; + penumbra: number; +} & { + target?: Record | undefined; +}>, { + distance: number; + decay: number; + angle: number; + penumbra: number; +}>; + +interface MaterialSetupInterface { + mesh?: MeshInterface; + material?: Material; + createMaterial?(): Material; +} +interface MaterialInterface extends MaterialSetupInterface { + setProp(key: string, value: unknown, needsUpdate: boolean): void; + setTexture(texture: Texture | null, key: string): void; +} +declare const MaterialInjectionKey: InjectionKey; +declare const _default$I: vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>; + +declare const _default$H: vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; +}, unknown, unknown, {}, { + createMaterial(): MeshBasicMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; +}>; + +declare const _default$G: vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; +}, unknown, unknown, {}, { + createMaterial(): MeshLambertMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; +}>; + +declare const _default$F: vue.DefineComponent<{ + src: StringConstructor; + name: { + type: StringConstructor; + default: string; + }; + flatShading: BooleanConstructor; +}, unknown, unknown, {}, { + createMaterial(): MeshMatcapMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + name: string; + flatShading: boolean; +} & { + src?: string | undefined; +}>, { + name: string; + flatShading: boolean; +}>; + +declare const _default$E: vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; + emissive: { + type: (StringConstructor | NumberConstructor)[]; + default: number; + }; + emissiveIntensity: { + type: NumberConstructor; + default: number; + }; + reflectivity: { + type: NumberConstructor; + default: number; + }; + shininess: { + type: NumberConstructor; + default: number; + }; + specular: { + type: (StringConstructor | NumberConstructor)[]; + default: number; + }; + flatShading: BooleanConstructor; +}, unknown, unknown, {}, { + createMaterial(): MeshPhongMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + reflectivity: number; + shininess: number; + specular: string | number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + reflectivity: number; + shininess: number; + specular: string | number; +}>; + +declare const _default$D: vue.DefineComponent<{ + flatShading: BooleanConstructor; +}, unknown, unknown, {}, { + createMaterial(): MeshPhysicalMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; + aoMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + bumpScale: { + readonly type: NumberConstructor; + readonly default: 1; + }; + displacementBias: { + readonly type: NumberConstructor; + readonly default: 0; + }; + displacementScale: { + readonly type: NumberConstructor; + readonly default: 1; + }; + emissive: { + readonly type: vue.PropType; + readonly default: 0; + }; + emissiveIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + envMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + lightMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + metalness: { + readonly type: NumberConstructor; + readonly default: 0; + }; + normalScale: { + readonly type: vue.PropType; + readonly default: () => { + x: number; + y: number; + }; + }; + roughness: { + readonly type: NumberConstructor; + readonly default: 1; + }; + refractionRatio: { + readonly type: NumberConstructor; + readonly default: 0.98; + }; + flatShading: BooleanConstructor; +}, unknown, unknown, {}, { + createMaterial(): three.MeshStandardMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + aoMapIntensity: number; + bumpScale: number; + displacementBias: number; + displacementScale: number; + envMapIntensity: number; + lightMapIntensity: number; + metalness: number; + normalScale: Vector2PropInterface; + roughness: number; + refractionRatio: number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + aoMapIntensity: number; + bumpScale: number; + displacementBias: number; + displacementScale: number; + envMapIntensity: number; + lightMapIntensity: number; + metalness: number; + normalScale: Vector2PropInterface; + roughness: number; + refractionRatio: number; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + flatShading: boolean; +} & {}>, { + flatShading: boolean; +}>; + +declare const _default$C: vue.DefineComponent<{ + uniforms: { + type: ObjectConstructor; + default: () => {}; + }; + vertexShader: { + type: StringConstructor; + default: string; + }; + fragmentShader: { + type: StringConstructor; + default: string; + }; +}, unknown, unknown, {}, { + createMaterial(): ShaderMaterial; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + uniforms: Record; + vertexShader: string; + fragmentShader: string; +} & {}>, { + uniforms: Record; + vertexShader: string; + fragmentShader: string; +}>; + +declare const _default$B: vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; + aoMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + bumpScale: { + readonly type: NumberConstructor; + readonly default: 1; + }; + displacementBias: { + readonly type: NumberConstructor; + readonly default: 0; + }; + displacementScale: { + readonly type: NumberConstructor; + readonly default: 1; + }; + emissive: { + readonly type: PropType; + readonly default: 0; + }; + emissiveIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + envMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + lightMapIntensity: { + readonly type: NumberConstructor; + readonly default: 1; + }; + metalness: { + readonly type: NumberConstructor; + readonly default: 0; + }; + normalScale: { + readonly type: PropType; + readonly default: () => { + x: number; + y: number; + }; + }; + roughness: { + readonly type: NumberConstructor; + readonly default: 1; + }; + refractionRatio: { + readonly type: NumberConstructor; + readonly default: 0.98; + }; + flatShading: BooleanConstructor; +}, unknown, unknown, {}, { + createMaterial(): MeshStandardMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + aoMapIntensity: number; + bumpScale: number; + displacementBias: number; + displacementScale: number; + envMapIntensity: number; + lightMapIntensity: number; + metalness: number; + normalScale: Vector2PropInterface; + roughness: number; + refractionRatio: number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; + flatShading: boolean; + emissive: string | number; + emissiveIntensity: number; + aoMapIntensity: number; + bumpScale: number; + displacementBias: number; + displacementScale: number; + envMapIntensity: number; + lightMapIntensity: number; + metalness: number; + normalScale: Vector2PropInterface; + roughness: number; + refractionRatio: number; +}>; + +declare const _default$A: vue.DefineComponent<{ + readonly color: { + readonly type: PropType; + readonly default: "#ffffff"; + }; + readonly thicknessColor: { + readonly type: PropType; + readonly default: "#ffffff"; + }; + readonly thicknessDistortion: { + readonly type: NumberConstructor; + readonly default: 0.4; + }; + readonly thicknessAmbient: { + readonly type: NumberConstructor; + readonly default: 0.01; + }; + readonly thicknessAttenuation: { + readonly type: NumberConstructor; + readonly default: 0.7; + }; + readonly thicknessPower: { + readonly type: NumberConstructor; + readonly default: 2; + }; + readonly thicknessScale: { + readonly type: NumberConstructor; + readonly default: 4; + }; +}, unknown, unknown, {}, { + createMaterial(): ShaderMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + color: string | number; + thicknessColor: string | number; + thicknessDistortion: number; + thicknessAmbient: number; + thicknessAttenuation: number; + thicknessPower: number; + thicknessScale: number; +} & {}>, { + color: string | number; + thicknessColor: string | number; + thicknessDistortion: number; + thicknessAmbient: number; + thicknessAttenuation: number; + thicknessPower: number; + thicknessScale: number; +}>; + +declare const _default$z: vue.DefineComponent<{ + wireframe: { + type: BooleanConstructor; + default: boolean; + }; + wireframeLinewidth: { + type: NumberConstructor; + default: number; + }; +}, unknown, unknown, {}, { + createMaterial(): MeshToonMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: (StringConstructor | NumberConstructor)[]; + default: string; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + wireframe: boolean; + wireframeLinewidth: number; +} & {}>, { + wireframe: boolean; + wireframeLinewidth: number; +}>; + +interface TexureInterface { + material?: MaterialInterface; + texture?: Texture; +} +declare const _default$y: vue.DefineComponent<{ + name: { + type: StringConstructor; + default: string; + }; + uniform: StringConstructor; + src: StringConstructor; + onLoad: PropType<(t: Texture) => void>; + onProgress: PropType<(e: ProgressEvent) => void>; + onError: PropType<(e: ErrorEvent) => void>; + mapping: { + type: NumberConstructor; + default: three.Mapping; + }; + wrapS: { + type: NumberConstructor; + default: three.Wrapping; + }; + wrapT: { + type: NumberConstructor; + default: three.Wrapping; + }; + magFilter: { + type: NumberConstructor; + default: three.TextureFilter; + }; + minFilter: { + type: NumberConstructor; + default: three.TextureFilter; + }; + repeat: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; + rotation: { + type: NumberConstructor; + default: number; + }; + center: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; +}, TexureInterface, unknown, {}, { + createTexture(): Texture | undefined; + refreshTexture(): void; + onLoaded(t: Texture): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + repeat: Vector2PropInterface; + center: Vector2PropInterface; + name: string; + rotation: number; + mapping: number; + wrapS: number; + wrapT: number; + magFilter: number; + minFilter: number; +} & { + onError?: ((e: ErrorEvent) => void) | undefined; + onLoad?: ((t: Texture) => void) | undefined; + onProgress?: ((e: ProgressEvent) => void) | undefined; + src?: string | undefined; + uniform?: string | undefined; +}>, { + repeat: Vector2PropInterface; + center: Vector2PropInterface; + name: string; + rotation: number; + mapping: number; + wrapS: number; + wrapT: number; + magFilter: number; + minFilter: number; +}>; + +declare const _default$x: vue.DefineComponent<{ + path: { + type: StringConstructor; + required: true; + }; + urls: { + type: PropType; + default: () => string[]; + }; + mapping: { + type: NumberConstructor; + default: three.Mapping; + }; +}, unknown, unknown, {}, { + createTexture(): three.CubeTexture; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + name: { + type: StringConstructor; + default: string; + }; + uniform: StringConstructor; + src: StringConstructor; + onLoad: PropType<(t: three.Texture) => void>; + onProgress: PropType<(e: ProgressEvent) => void>; + onError: PropType<(e: ErrorEvent) => void>; + mapping: { + type: NumberConstructor; + default: three.Mapping; + }; + wrapS: { + type: NumberConstructor; + default: three.Wrapping; + }; + wrapT: { + type: NumberConstructor; + default: three.Wrapping; + }; + magFilter: { + type: NumberConstructor; + default: three.TextureFilter; + }; + minFilter: { + type: NumberConstructor; + default: three.TextureFilter; + }; + repeat: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; + rotation: { + type: NumberConstructor; + default: number; + }; + center: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; +}, TexureInterface, unknown, {}, { + createTexture(): three.Texture | undefined; + refreshTexture(): void; + onLoaded(t: three.Texture): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + repeat: Vector2PropInterface; + center: Vector2PropInterface; + name: string; + rotation: number; + mapping: number; + wrapS: number; + wrapT: number; + magFilter: number; + minFilter: number; +} & { + onError?: ((e: ErrorEvent) => void) | undefined; + onLoad?: ((t: three.Texture) => void) | undefined; + onProgress?: ((e: ProgressEvent) => void) | undefined; + src?: string | undefined; + uniform?: string | undefined; +}>, { + repeat: Vector2PropInterface; + center: Vector2PropInterface; + name: string; + rotation: number; + mapping: number; + wrapS: number; + wrapT: number; + magFilter: number; + minFilter: number; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + path: string; + mapping: number; + urls: string[]; +} & {}>, { + mapping: number; + urls: string[]; +}>; + +declare const _default$w: vue.DefineComponent<{ + readonly size: NumberConstructor; + readonly width: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly depth: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly depthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + width: number; + height: number; + depth: number; + widthSegments: number; + heightSegments: number; + depthSegments: number; +} & { + size?: number | undefined; +}>, { + width: number; + height: number; + depth: number; + widthSegments: number; + heightSegments: number; + depthSegments: number; +}>; + +declare const _default$v: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly segments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + segments: number; + radius: number; + thetaStart: number; + thetaLength: number; +} & {}>, { + segments: number; + radius: number; + thetaStart: number; + thetaLength: number; +}>; + +declare const _default$u: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly openEnded: { + readonly type: BooleanConstructor; + readonly default: false; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + height: number; + heightSegments: number; + radius: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; +} & {}>, { + height: number; + heightSegments: number; + radius: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; +}>; + +declare const _default$t: vue.DefineComponent<{ + readonly radiusTop: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radiusBottom: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly openEnded: { + readonly type: BooleanConstructor; + readonly default: false; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + height: number; + heightSegments: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; + radiusTop: number; + radiusBottom: number; +} & {}>, { + height: number; + heightSegments: number; + thetaStart: number; + thetaLength: number; + radialSegments: number; + openEnded: boolean; + radiusTop: number; + radiusBottom: number; +}>; + +declare const _default$s: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$r: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$q: vue.DefineComponent<{ + readonly points: ArrayConstructor; + readonly segments: { + readonly type: NumberConstructor; + readonly default: 12; + }; + readonly phiStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly phiLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + segments: number; + phiStart: number; + phiLength: number; +} & { + points?: unknown[] | undefined; +}>, { + segments: number; + phiStart: number; + phiLength: number; +}>; + +declare const _default$p: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +declare const _default$o: vue.DefineComponent<{ + readonly width: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + width: number; + height: number; + widthSegments: number; + heightSegments: number; +} & {}>, { + width: number; + height: number; + widthSegments: number; + heightSegments: number; +}>; + +declare const _default$n: vue.DefineComponent<{ + readonly vertices: ArrayConstructor; + readonly indices: ArrayConstructor; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & { + vertices?: unknown[] | undefined; + indices?: unknown[] | undefined; +}>, { + radius: number; + detail: number; +}>; + +declare const _default$m: vue.DefineComponent<{ + readonly innerRadius: { + readonly type: NumberConstructor; + readonly default: 0.5; + }; + readonly outerRadius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly thetaSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly phiSegments: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly thetaStart: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly thetaLength: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + thetaStart: number; + thetaLength: number; + innerRadius: number; + outerRadius: number; + thetaSegments: number; + phiSegments: number; +} & {}>, { + thetaStart: number; + thetaLength: number; + innerRadius: number; + outerRadius: number; + thetaSegments: number; + phiSegments: number; +}>; + +declare const _default$l: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly widthSegments: { + readonly type: NumberConstructor; + readonly default: 12; + }; + readonly heightSegments: { + readonly type: NumberConstructor; + readonly default: 12; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + widthSegments: number; + heightSegments: number; + radius: number; +} & {}>, { + widthSegments: number; + heightSegments: number; + radius: number; +}>; + +declare const _default$k: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly detail: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + detail: number; +} & {}>, { + radius: number; + detail: number; +}>; + +interface TextSetupInterface extends MeshSetupInterface { + geometry?: TextGeometry; + font?: Font; +} +declare const _default$j: vue.DefineComponent<{ + readonly text: { + readonly type: StringConstructor; + readonly required: true; + readonly default: "Text"; + }; + readonly fontSrc: { + readonly type: StringConstructor; + readonly required: true; + }; + readonly size: { + readonly type: NumberConstructor; + readonly default: 80; + }; + readonly height: { + readonly type: NumberConstructor; + readonly default: 5; + }; + readonly depth: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly curveSegments: { + readonly type: NumberConstructor; + readonly default: 12; + }; + readonly bevelEnabled: { + readonly type: BooleanConstructor; + readonly default: false; + }; + readonly bevelThickness: { + readonly type: NumberConstructor; + readonly default: 10; + }; + readonly bevelSize: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly bevelOffset: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly bevelSegments: { + readonly type: NumberConstructor; + readonly default: 5; + }; + readonly align: { + readonly type: PropType; + readonly default: false; + }; +}, TextSetupInterface, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + text: string; + size: number; + height: number; + depth: number; + fontSrc: string; + curveSegments: number; + bevelEnabled: boolean; + bevelThickness: number; + bevelSize: number; + bevelOffset: number; + bevelSegments: number; + align: string | boolean; +} & {}>, { + text: string; + size: number; + height: number; + depth: number; + curveSegments: number; + bevelEnabled: boolean; + bevelThickness: number; + bevelSize: number; + bevelOffset: number; + bevelSegments: number; + align: string | boolean; +}>; + +declare const _default$i: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly tube: { + readonly type: NumberConstructor; + readonly default: 0.4; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 6; + }; + readonly arc: { + readonly type: NumberConstructor; + readonly default: number; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; + arc: number; +} & {}>, { + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; + arc: number; +}>; + +declare const _default$h: vue.DefineComponent<{ + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly tube: { + readonly type: NumberConstructor; + readonly default: 0.4; + }; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 64; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly p: { + readonly type: NumberConstructor; + readonly default: 2; + }; + readonly q: { + readonly type: NumberConstructor; + readonly default: 3; + }; +}, unknown, unknown, {}, { + createGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + p: number; + q: number; + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; +} & {}>, { + p: number; + q: number; + radius: number; + radialSegments: number; + tube: number; + tubularSegments: number; +}>; + +declare const _default$g: vue.DefineComponent<{ + readonly points: ArrayConstructor; + readonly path: typeof three.Curve; + readonly tubularSegments: { + readonly type: NumberConstructor; + readonly default: 64; + }; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radialSegments: { + readonly type: NumberConstructor; + readonly default: 8; + }; + readonly closed: { + readonly type: BooleanConstructor; + readonly default: false; + }; +}, unknown, unknown, {}, { + createGeometry(): void; + updatePoints(points: Vector3[]): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + closed: boolean; + radius: number; + radialSegments: number; + tubularSegments: number; +} & { + path?: three.Curve | undefined; + points?: unknown[] | undefined; +}>, { + closed: boolean; + radius: number; + radialSegments: number; + tubularSegments: number; +}>; + +interface ImageSetupInterface extends MeshSetupInterface { + material?: MeshBasicMaterial; + texture?: Texture; +} +declare const _default$f: vue.DefineComponent<{ + src: { + type: StringConstructor; + required: true; + }; + width: NumberConstructor; + height: NumberConstructor; + widthSegments: { + type: NumberConstructor; + default: number; + }; + heightSegments: { + type: NumberConstructor; + default: number; + }; + keepSize: BooleanConstructor; +}, ImageSetupInterface, unknown, {}, { + loadTexture(): Texture; + refreshTexture(): void; + onLoaded(texture: Texture): void; + resize(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, "loaded"[], "loaded", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + widthSegments: number; + heightSegments: number; + src: string; + keepSize: boolean; +} & { + width?: number | undefined; + height?: number | undefined; +}>, { + widthSegments: number; + heightSegments: number; + keepSize: boolean; +}>; + +declare const _default$e: vue.DefineComponent<{ + count: { + type: NumberConstructor; + required: true; + }; +}, unknown, unknown, {}, { + initMesh(): false | undefined; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + onPointerEnter: FunctionConstructor; + onPointerOver: FunctionConstructor; + onPointerMove: FunctionConstructor; + onPointerLeave: FunctionConstructor; + onPointerDown: FunctionConstructor; + onPointerUp: FunctionConstructor; + onClick: FunctionConstructor; + castShadow: BooleanConstructor; + receiveShadow: BooleanConstructor; +}, MeshSetupInterface, unknown, {}, { + initMesh(): void; + createGeometry(): void; + addGeometryWatchers(props: Readonly>): void; + setGeometry(geometry: three.BufferGeometry): void; + setMaterial(material: three.Material): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + castShadow: boolean; + receiveShadow: boolean; +} & { + onClick?: Function | undefined; + onPointerEnter?: Function | undefined; + onPointerOver?: Function | undefined; + onPointerMove?: Function | undefined; + onPointerLeave?: Function | undefined; + onPointerDown?: Function | undefined; + onPointerUp?: Function | undefined; +}>, { + castShadow: boolean; + receiveShadow: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + count: number; +} & {}>, {}>; + +interface SpriteSetupInterface extends Object3DSetupInterface { + texture?: Texture; + material?: SpriteMaterial; + sprite?: Sprite; +} +declare const _default$d: vue.DefineComponent<{ + src: { + type: StringConstructor; + required: true; + }; +}, SpriteSetupInterface, unknown, {}, { + onLoaded(): void; + updateUV(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, "loaded"[], "loaded", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + src: string; +} & {}>, {}>; + +declare const _default$c: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + src: { + type: StringConstructor; + required: true; + }; +}, unknown, { + progress: number; +}, {}, { + onLoad(model: three.Object3D): void; + onProgress(progress: ProgressEvent): void; + onError(error: ErrorEvent): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, ("error" | "progress" | "load")[], "error" | "progress" | "load", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + src: string; +} & {}>, {}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const _default$b: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + src: { + type: StringConstructor; + required: true; + }; +}, unknown, { + progress: number; +}, {}, { + onLoad(model: three.Object3D): void; + onProgress(progress: ProgressEvent): void; + onError(error: ErrorEvent): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, ("error" | "progress" | "load")[], "error" | "progress" | "load", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + src: string; +} & {}>, {}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +interface EffectComposerSetupInterface { + renderer?: RendererInterface; + composer?: EffectComposer; +} +interface EffectComposerInterface extends EffectComposerSetupInterface { + addPass(pass: Pass): void; + removePass(pass: Pass): void; +} +declare const ComposerInjectionKey: InjectionKey; +declare const _default$a: vue.DefineComponent<{}, EffectComposerSetupInterface, {}, {}, { + addPass(pass: Pass): void; + removePass(pass: Pass): void; + resize(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +interface EffectSetupInterface { + renderer?: RendererInterface; + composer?: EffectComposerInterface; + pass?: Pass; +} + +declare const _default$9: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const _default$8: vue.DefineComponent<{ + readonly focus: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly aperture: { + readonly type: NumberConstructor; + readonly default: 0.025; + }; + readonly maxblur: { + readonly type: NumberConstructor; + readonly default: 0.01; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + focus: number; + aperture: number; + maxblur: number; +} & {}>, { + focus: number; + aperture: number; + maxblur: number; +}>; + +declare const _default$7: vue.DefineComponent<{ + readonly noiseIntensity: { + readonly type: NumberConstructor; + readonly default: 0.5; + }; + readonly scanlinesIntensity: { + readonly type: NumberConstructor; + readonly default: 0.05; + }; + readonly scanlinesCount: { + readonly type: NumberConstructor; + readonly default: 4096; + }; + readonly grayscale: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + noiseIntensity: number; + scanlinesIntensity: number; + scanlinesCount: number; + grayscale: number; +} & {}>, { + noiseIntensity: number; + scanlinesIntensity: number; + scanlinesCount: number; + grayscale: number; +}>; + +declare const _default$6: vue.DefineComponent<{}, {}, {}, {}, { + resize({ size }: { + size: SizeInterface; + }): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const _default$5: vue.DefineComponent<{ + readonly shape: { + readonly type: NumberConstructor; + readonly default: 1; + }; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 4; + }; + readonly rotateR: { + readonly type: NumberConstructor; + readonly default: number; + }; + readonly rotateG: { + readonly type: NumberConstructor; + readonly default: number; + }; + readonly rotateB: { + readonly type: NumberConstructor; + readonly default: number; + }; + readonly scatter: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + shape: number; + rotateR: number; + rotateG: number; + rotateB: number; + scatter: number; +} & {}>, { + radius: number; + shape: number; + rotateR: number; + rotateG: number; + rotateB: number; + scatter: number; +}>; + +declare const _default$4: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + +declare const _default$3: vue.DefineComponent<{ + options: { + type: ObjectConstructor; + default: () => {}; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + options: Record; +} & {}>, { + options: Record; +}>; + +interface TiltShiftPassSetupInterface { + uniforms1: { + [name: string]: { + value: any; + }; + }; + uniforms2: { + [name: string]: { + value: any; + }; + }; + pass1?: ShaderPass; + pass2?: ShaderPass; +} +declare const _default$2: vue.DefineComponent<{ + readonly blurRadius: { + readonly type: NumberConstructor; + readonly default: 10; + }; + readonly gradientRadius: { + readonly type: NumberConstructor; + readonly default: 100; + }; + readonly start: { + readonly type: PropType; + readonly default: () => { + x: number; + y: number; + }; + }; + readonly end: { + readonly type: PropType; + readonly default: () => { + x: number; + y: number; + }; + }; +}, TiltShiftPassSetupInterface, unknown, {}, { + updateFocusLine(): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + end: Vector2PropInterface; + start: Vector2PropInterface; + blurRadius: number; + gradientRadius: number; +} & {}>, { + end: Vector2PropInterface; + start: Vector2PropInterface; + blurRadius: number; + gradientRadius: number; +}>; + +declare const _default$1: vue.DefineComponent<{ + readonly strength: { + readonly type: NumberConstructor; + readonly default: 1.5; + }; + readonly radius: { + readonly type: NumberConstructor; + readonly default: 0; + }; + readonly threshold: { + readonly type: NumberConstructor; + readonly default: 0; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + radius: number; + strength: number; + threshold: number; +} & {}>, { + radius: number; + strength: number; + threshold: number; +}>; + +declare const _default: vue.DefineComponent<{ + center: { + type: PropType; + default: () => { + x: number; + y: number; + }; + }; + strength: { + type: NumberConstructor; + default: number; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{}, EffectSetupInterface, {}, {}, { + initEffectPass(pass: three_examples_jsm_postprocessing_Pass.Pass): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + center: Vector2PropInterface; + strength: number; +} & {}>, { + center: Vector2PropInterface; + strength: number; +}>; + +declare function setFromProp(o: Record, prop: Record): void; +declare function bindProps(src: any, props: string[], dst: any): void; +declare function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void; +declare function propsValues(props: Record, exclude?: string[]): Record; +declare function lerp(value1: number, value2: number, amount: number): number; +declare function limit(val: number, min: number, max: number): number; +declare function getMatcapUrl(hash?: string, format?: number): string; + +declare const TroisJSVuePlugin: { + install(app: App): void; +}; +declare function createApp(params: any): App; + +interface TextureConfigInterface { + src: string; +} +interface TexturesInterface { + loader: TextureLoader; + count: number; + textures: Texture[]; + loadProgress: number; + loadTextures(images: TextureConfigInterface[], cb: { + (): void; + }): void; + dispose(): void; +} +declare function useTextures(): TexturesInterface; + +export { _default$O as AmbientLight, _default$H as BasicMaterial, _default$8 as BokehPass, _default$w as Box, _default$12 as BoxGeometry, _default$17 as Camera, _default$v as Circle, _default$11 as CircleGeometry, ComposerInjectionKey, _default$u as Cone, _default$10 as ConeGeometry, _default$13 as CubeCamera, _default$x as CubeTexture, _default$t as Cylinder, _default$$ as CylinderGeometry, _default$N as DirectionalLight, _default$s as Dodecahedron, _default$_ as DodecahedronGeometry, _default$a as EffectComposer, _default$b as FBXModel, _default$6 as FXAAPass, _default$7 as FilmPass, _default$c as GLTFModel, _default$16 as Group, _default$5 as HalftonePass, _default$M as HemisphereLight, _default$r as Icosahedron, _default$Z as IcosahedronGeometry, _default$f as Image, _default$e as InstancedMesh, _default$G as LambertMaterial, _default$q as Lathe, _default$Y as LatheGeometry, _default$F as MatcapMaterial, _default$I as Material, MaterialInjectionKey, Mesh, MeshInjectionKey, _default$19 as Object3D, _default$p as Octahedron, _default$X as OctahedronGeometry, _default$18 as OrthographicCamera, _default$17 as PerspectiveCamera, _default$E as PhongMaterial, _default$D as PhysicalMaterial, _default$o as Plane, _default$W as PlaneGeometry, _default$L as PointLight, _default$n as Polyhedron, _default$V as PolyhedronGeometry, _default$14 as Raycaster, _default$K as RectAreaLight, _default$9 as RenderPass, _default$1a as Renderer, RendererInjectionKey, _default$m as Ring, _default$U as RingGeometry, _default$4 as SMAAPass, _default$3 as SSAOPass, _default$15 as Scene, SceneInjectionKey, _default$C as ShaderMaterial, _default$l as Sphere, _default$T as SphereGeometry, _default$J as SpotLight, _default$d as Sprite, _default$B as StandardMaterial, _default$A as SubSurfaceMaterial, _default$k as Tetrahedron, _default$S as TetrahedronGeometry, _default$j as Text, _default$y as Texture, _default$2 as TiltShiftPass, _default$z as ToonMaterial, _default$i as Torus, _default$R as TorusGeometry, _default$h as TorusKnot, _default$Q as TorusKnotGeometry, TroisJSVuePlugin, _default$g as Tube, _default$P as TubeGeometry, _default$1 as UnrealBloomPass, _default as ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; diff --git a/build/trois.js b/build/trois.js index 302b539..63c928a 100644 --- a/build/trois.js +++ b/build/trois.js @@ -23,28 +23,24 @@ var UnrealBloomPass_js = require('three/examples/jsm/postprocessing/UnrealBloomP function useRaycaster(options) { const { camera, - resetPosition = new three.Vector3(0, 0, 0), + resetPosition = new three.Vector3(0, 0, 0) } = options; - const raycaster = new three.Raycaster(); const position = resetPosition.clone(); const plane = new three.Plane(new three.Vector3(0, 0, 1), 0); - const updatePosition = (coords) => { raycaster.setFromCamera(coords, camera); camera.getWorldDirection(plane.normal); raycaster.ray.intersectPlane(plane, position); }; - const intersect = (coords, objects) => { raycaster.setFromCamera(coords, camera); return raycaster.intersectObjects(objects); }; - return { position, updatePosition, - intersect, + intersect }; } @@ -57,22 +53,29 @@ function usePointer(options) { resetOnEnd = false, resetPosition = new three.Vector2(0, 0), resetPositionV3 = new three.Vector3(0, 0, 0), - onEnter = () => {}, - onMove = () => {}, - onLeave = () => {}, - onIntersectEnter = () => {}, - onIntersectOver = () => {}, - onIntersectMove = () => {}, - onIntersectLeave = () => {}, - onIntersectClick = () => {}, + onEnter = () => { + }, + onMove = () => { + }, + onLeave = () => { + }, + onClick = () => { + }, + onIntersectEnter = () => { + }, + onIntersectOver = () => { + }, + onIntersectMove = () => { + }, + onIntersectLeave = () => { + }, + onIntersectClick = () => { + } } = options; - const position = resetPosition.clone(); const positionN = new three.Vector2(0, 0); - - const raycaster = useRaycaster({ camera }); + const raycaster = useRaycaster({camera}); const positionV3 = raycaster.position; - const obj = { position, positionN, @@ -81,29 +84,26 @@ function usePointer(options) { listeners: false, addListeners, removeListeners, - intersect, + intersect }; - return obj; - function reset() { position.copy(resetPosition); positionV3.copy(resetPositionV3); } function updatePosition(event) { let x, y; - if (event.touches && event.touches.length > 0) { + if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { x = event.clientX; y = event.clientY; } - const rect = domElement.getBoundingClientRect(); position.x = x - rect.left; position.y = y - rect.top; - positionN.x = (position.x / rect.width) * 2 - 1; + positionN.x = position.x / rect.width * 2 - 1; positionN.y = -(position.y / rect.height) * 2 + 1; raycaster.updatePosition(positionN); } @@ -112,55 +112,51 @@ function usePointer(options) { const intersects = raycaster.intersect(positionN, intersectObjects); const offObjects = [...intersectObjects]; const iMeshes = []; - - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a, _b, _c; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof three.InstancedMesh) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - if (!object.over) { - object.over = true; - const overEvent = { type: 'pointerover', over: true, component, intersect }; - const enterEvent = { ...overEvent, type: 'pointerenter' }; + if (!object.userData.over) { + object.userData.over = true; + const overEvent = {type: "pointerover", over: true, component, intersect: intersect2}; + const enterEvent = {...overEvent, type: "pointerenter"}; onIntersectOver(overEvent); onIntersectEnter(enterEvent); - component.onPointerOver?.(overEvent); - component.onPointerEnter?.(enterEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerEnter) == null ? void 0 : _b.call(component, enterEvent); } - - const moveEvent = { type: 'pointermove', component, intersect }; + const moveEvent = {type: "pointermove", component, intersect: intersect2}; onIntersectMove(moveEvent); - component.onPointerMove?.(moveEvent); - + (_c = component.onPointerMove) == null ? void 0 : _c.call(component, moveEvent); offObjects.splice(offObjects.indexOf(object), 1); }); - - offObjects.forEach(object => { - const { component } = object; - if (object.over) { - object.over = false; - const overEvent = { type: 'pointerover', over: false, component }; - const leaveEvent = { ...overEvent, type: 'pointerleave' }; + offObjects.forEach((object) => { + var _a, _b; + const {component} = object.userData; + if (object.userData.over) { + object.userData.over = false; + const overEvent = {type: "pointerover", over: false, component}; + const leaveEvent = {...overEvent, type: "pointerleave"}; onIntersectOver(overEvent); onIntersectLeave(leaveEvent); - component.onPointerOver?.(overEvent); - component.onPointerLeave?.(leaveEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerLeave) == null ? void 0 : _b.call(component, leaveEvent); } }); } } function pointerEnter(event) { updatePosition(event); - onEnter({ type: 'pointerenter', position, positionN, positionV3 }); + onEnter({type: "pointerenter", position, positionN, positionV3}); } function pointerMove(event) { updatePosition(event); - onMove({ type: 'pointermove', position, positionN, positionV3 }); + onMove({type: "pointermove", position, positionN, positionV3}); intersect(); } function pointerClick(event) { @@ -168,352 +164,319 @@ function usePointer(options) { if (intersectObjects.length) { const intersects = raycaster.intersect(positionN, intersectObjects); const iMeshes = []; - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof three.InstancedMesh) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - const event = { type: 'click', component, intersect }; - onIntersectClick(event); - component.onClick?.(event); + const event2 = {type: "click", component, intersect: intersect2}; + onIntersectClick(event2); + (_a = component.onClick) == null ? void 0 : _a.call(component, event2); }); } + onClick({type: "click", position, positionN, positionV3}); } function pointerLeave() { - if (resetOnEnd) reset(); - onLeave({ type: 'pointerleave' }); + if (resetOnEnd) + reset(); + onLeave({type: "pointerleave"}); } function addListeners() { - domElement.addEventListener('mouseenter', pointerEnter); - domElement.addEventListener('mousemove', pointerMove); - domElement.addEventListener('mouseleave', pointerLeave); - domElement.addEventListener('click', pointerClick); + domElement.addEventListener("mouseenter", pointerEnter); + domElement.addEventListener("mousemove", pointerMove); + domElement.addEventListener("mouseleave", pointerLeave); + domElement.addEventListener("click", pointerClick); if (touch) { - domElement.addEventListener('touchstart', pointerEnter); - domElement.addEventListener('touchmove', pointerMove); - domElement.addEventListener('touchend', pointerLeave); + domElement.addEventListener("touchstart", pointerEnter); + domElement.addEventListener("touchmove", pointerMove); + domElement.addEventListener("touchend", pointerLeave); } obj.listeners = true; } function removeListeners() { - domElement.removeEventListener('mouseenter', pointerEnter); - domElement.removeEventListener('mousemove', pointerMove); - domElement.removeEventListener('mouseleave', pointerLeave); - domElement.removeEventListener('click', pointerClick); - - domElement.removeEventListener('touchstart', pointerEnter); - domElement.removeEventListener('touchmove', pointerMove); - domElement.removeEventListener('touchend', pointerLeave); + domElement.removeEventListener("mouseenter", pointerEnter); + domElement.removeEventListener("mousemove", pointerMove); + domElement.removeEventListener("mouseleave", pointerLeave); + domElement.removeEventListener("click", pointerClick); + domElement.removeEventListener("touchstart", pointerEnter); + domElement.removeEventListener("touchmove", pointerMove); + domElement.removeEventListener("touchend", pointerLeave); obj.listeners = false; - }} + } +} -/** - * Three.js helper - */ -function useThree() { - // default conf - const conf = { - canvas: null, +function useThree(params) { + const config = { antialias: true, alpha: false, autoClear: true, - orbit_ctrl: false, + orbitCtrl: false, pointer: false, resize: false, width: 300, - height: 150, + height: 150 }; - - // size + if (params) { + Object.entries(params).forEach(([key, value]) => { + config[key] = value; + }); + } const size = { - width: 1, height: 1, - wWidth: 1, wHeight: 1, - ratio: 1, + width: 1, + height: 1, + wWidth: 1, + wHeight: 1, + ratio: 1 }; - - // handlers - const afterInitCallbacks = []; - let afterResizeCallbacks = []; - let beforeRenderCallbacks = []; - + const beforeRenderCallbacks = []; const intersectObjects = []; - - // returned object + const renderer = createRenderer(); const obj = { - conf, - renderer: null, - camera: null, - cameraCtrl: null, - scene: null, - pointer: null, + config, + renderer, size, init, dispose, render, renderC, setSize, - onAfterInit, - onAfterResize, offAfterResize, - // onBeforeRender, offBeforeRender, - addIntersectObject, removeIntersectObject, + addIntersectObject, + removeIntersectObject }; - - /** - * init three - */ - function init(params) { - if (params) { - Object.entries(params).forEach(([key, value]) => { - conf[key] = value; - }); - } - + return obj; + function createRenderer() { + const renderer2 = new three.WebGLRenderer({canvas: config.canvas, antialias: config.antialias, alpha: config.alpha}); + renderer2.autoClear = config.autoClear; + return renderer2; + } + function init() { if (!obj.scene) { - console.error('Missing Scene'); - return; + console.error("Missing Scene"); + return false; } - if (!obj.camera) { - console.error('Missing Camera'); - return; + console.error("Missing Camera"); + return false; } - - obj.renderer = new three.WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha }); - obj.renderer.autoClear = conf.autoClear; - - if (conf.resize) { + if (config.resize) { onResize(); - window.addEventListener('resize', onResize); - } else { - setSize(conf.width, conf.height); + window.addEventListener("resize", onResize); + } else if (config.width && config.height) { + setSize(config.width, config.height); } - initPointer(); - - if (conf.orbit_ctrl) { - obj.orbitCtrl = new OrbitControls_js.OrbitControls(obj.camera, obj.renderer.domElement); - if (conf.orbit_ctrl instanceof Object) { - Object.entries(conf.orbit_ctrl).forEach(([key, value]) => { - obj.orbitCtrl[key] = value; + if (config.orbitCtrl) { + const cameraCtrl = new OrbitControls_js.OrbitControls(obj.camera, obj.renderer.domElement); + if (config.orbitCtrl instanceof Object) { + Object.entries(config.orbitCtrl).forEach(([key, value]) => { + cameraCtrl[key] = value; }); } + onBeforeRender(() => { + cameraCtrl.update(); + }); + obj.cameraCtrl = cameraCtrl; } - - afterInitCallbacks.forEach(c => c()); - return true; } function initPointer() { let pointerConf = { camera: obj.camera, domElement: obj.renderer.domElement, - intersectObjects, + intersectObjects }; - - if (conf.pointer && conf.pointer instanceof Object) { - pointerConf = { ...pointerConf, ...conf.pointer }; + if (config.pointer && config.pointer instanceof Object) { + pointerConf = {...pointerConf, ...config.pointer}; } - - obj.pointer = usePointer(pointerConf); - if (conf.pointer || intersectObjects.length) { - obj.pointer.addListeners(); - if (conf.pointer.intersectMode === 'frame') { - onBeforeRender(() => { - obj.pointer.intersect(); - }); + const pointer = obj.pointer = usePointer(pointerConf); + if (config.pointer || intersectObjects.length) { + pointer.addListeners(); + if (pointerConf.intersectMode === "frame") { + onBeforeRender(pointer.intersect); } } } - - /** - * add after init callback - */ - function onAfterInit(callback) { - afterInitCallbacks.push(callback); + function onBeforeRender(cb) { + beforeRenderCallbacks.push(cb); } - - /** - * add after resize callback - */ - function onAfterResize(callback) { - afterResizeCallbacks.push(callback); - } - - /** - * remove after resize callback - */ - function offAfterResize(callback) { - afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback); - } - - /** - * add before render callback - */ - function onBeforeRender(callback) { - beforeRenderCallbacks.push(callback); - } - - /** - * default render - */ function render() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.renderer.render(obj.scene, obj.camera); } - - /** - * composer render - */ function renderC() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.composer.render(); } - - /** - * add intersect object - */ function addIntersectObject(o) { if (intersectObjects.indexOf(o) === -1) { intersectObjects.push(o); } - // add listeners if needed if (obj.pointer && !obj.pointer.listeners) { obj.pointer.addListeners(); } } - - /** - * remove intersect object - */ function removeIntersectObject(o) { const i = intersectObjects.indexOf(o); if (i !== -1) { intersectObjects.splice(i, 1); } - // remove listeners if needed - if (obj.pointer && !conf.pointer && intersectObjects.length === 0) { + if (obj.pointer && !config.pointer && intersectObjects.length === 0) { obj.pointer.removeListeners(); } } - - /** - * remove listeners and dispose - */ function dispose() { - beforeRenderCallbacks = []; - window.removeEventListener('resize', onResize); - if (obj.pointer) obj.pointer.removeListeners(); - if (obj.orbitCtrl) obj.orbitCtrl.dispose(); - if (obj.renderer) obj.renderer.dispose(); + window.removeEventListener("resize", onResize); + if (obj.pointer) + obj.pointer.removeListeners(); + if (obj.cameraCtrl) + obj.cameraCtrl.dispose(); + if (obj.renderer) + obj.renderer.dispose(); } - - /** - * resize listener - */ function onResize() { - if (conf.resize === 'window') { + var _a; + if (config.resize === "window") { setSize(window.innerWidth, window.innerHeight); } else { const elt = obj.renderer.domElement.parentNode; - setSize(elt.clientWidth, elt.clientHeight); + if (elt) + setSize(elt.clientWidth, elt.clientHeight); } - afterResizeCallbacks.forEach(c => c()); + (_a = config.onResize) == null ? void 0 : _a.call(config, size); } - - /** - * update renderer size and camera - */ function setSize(width, height) { size.width = width; size.height = height; size.ratio = width / height; - obj.renderer.setSize(width, height, false); - obj.camera.aspect = size.ratio; - obj.camera.updateProjectionMatrix(); - - if (obj.composer) { - obj.composer.setSize(width, height); + const camera = obj.camera; + if (camera.type === "PerspectiveCamera") { + const pCamera = camera; + pCamera.aspect = size.ratio; + pCamera.updateProjectionMatrix(); } - - if (obj.camera.type === 'OrthographicCamera') { - size.wWidth = obj.camera.right - obj.camera.left; - size.wHeight = obj.camera.top - obj.camera.bottom; + if (camera.type === "OrthographicCamera") { + const oCamera = camera; + size.wWidth = oCamera.right - oCamera.left; + size.wHeight = oCamera.top - oCamera.bottom; } else { const wsize = getCameraSize(); - size.wWidth = wsize[0]; size.wHeight = wsize[1]; + size.wWidth = wsize[0]; + size.wHeight = wsize[1]; } } - - /** - * calculate camera visible area size - */ function getCameraSize() { - const vFOV = (obj.camera.fov * Math.PI) / 180; - const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z); - const w = h * obj.camera.aspect; + const camera = obj.camera; + const vFOV = camera.fov * Math.PI / 180; + const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z); + const w = h * camera.aspect; return [w, h]; } - - return obj; } +const RendererInjectionKey = Symbol("Renderer"); var Renderer = vue.defineComponent({ - name: 'Renderer', + name: "Renderer", props: { antialias: Boolean, alpha: Boolean, - autoClear: { type: Boolean, default: true }, - orbitCtrl: { type: [Boolean, Object], default: false }, - pointer: { type: [Boolean, Object], default: false }, - resize: { type: [Boolean, String], default: false }, + autoClear: {type: Boolean, default: true}, + orbitCtrl: {type: [Boolean, Object], default: false}, + pointer: {type: [Boolean, Object], default: false}, + resize: {type: [Boolean, String], default: false}, shadow: Boolean, width: String, height: String, xr: Boolean, + onReady: Function, + onClick: Function }, - setup() { - return { - three: useThree(), - raf: true, - onMountedCallbacks: [], - beforeRenderCallbacks: [], - afterRenderCallbacks: [], + setup(props) { + const initCallbacks = []; + const mountedCallbacks = []; + const beforeRenderCallbacks = []; + const afterRenderCallbacks = []; + const resizeCallbacks = []; + const canvas = document.createElement("canvas"); + const config = { + canvas, + antialias: props.antialias, + alpha: props.alpha, + autoClear: props.autoClear, + orbitCtrl: props.orbitCtrl, + pointer: props.pointer, + resize: props.resize }; + if (props.width) + config.width = parseInt(props.width); + if (props.height) + config.height = parseInt(props.height); + const three = useThree(config); + const renderFn = () => { + }; + if (props.onClick) { + canvas.addEventListener("click", props.onClick); + } + return { + canvas, + three, + renderer: three.renderer, + size: three.size, + renderFn, + raf: true, + initCallbacks, + mountedCallbacks, + beforeRenderCallbacks, + afterRenderCallbacks, + resizeCallbacks + }; + }, + computed: { + camera: { + get: function() { + return this.three.camera; + }, + set: function(camera) { + this.three.camera = camera; + } + }, + scene: { + get: function() { + return this.three.scene; + }, + set: function(scene) { + this.three.scene = scene; + } + }, + composer: { + get: function() { + return this.three.composer; + }, + set: function(composer) { + this.three.composer = composer; + } + } }, provide() { return { - three: this.three, - // renderer: this.three.renderer, - rendererComponent: this, + [RendererInjectionKey]: this }; }, mounted() { - const params = { - canvas: this.$el, - antialias: this.antialias, - alpha: this.alpha, - autoClear: this.autoClear, - orbit_ctrl: this.orbitCtrl, - pointer: this.pointer, - resize: this.resize, - width: this.width, - height: this.height, - }; - - if (this.three.init(params)) { - this.renderer = this.three.renderer; + var _a; + this.$el.parentNode.insertBefore(this.canvas, this.$el); + if (this.three.init()) { + this.three.config.onResize = (size) => { + this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); + }; this.renderer.shadowMap.enabled = this.shadow; - - this._render = this.three.composer ? this.three.renderC : this.three.render; - + this.renderFn = this.three.composer ? this.three.renderC : this.three.render; + this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); + (_a = this.onReady) == null ? void 0 : _a.call(this, this); if (this.xr) { this.renderer.xr.enabled = true; this.renderer.setAnimationLoop(this.render); @@ -521,50 +484,78 @@ var Renderer = vue.defineComponent({ requestAnimationFrame(this.renderLoop); } } - this.onMountedCallbacks.forEach(c => c()); + this.mountedCallbacks.forEach((e) => e({type: "mounted", renderer: this})); }, beforeUnmount() { + this.canvas.remove(); this.beforeRenderCallbacks = []; this.afterRenderCallbacks = []; this.raf = false; this.three.dispose(); }, methods: { + onInit(cb) { + this.addListener("init", cb); + }, onMounted(cb) { - this.onMountedCallbacks.push(cb); + this.addListener("mounted", cb); }, onBeforeRender(cb) { - this.beforeRenderCallbacks.push(cb); + this.addListener("beforerender", cb); }, offBeforeRender(cb) { - this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb); + this.removeListener("beforerender", cb); }, onAfterRender(cb) { - this.afterRenderCallbacks.push(cb); + this.addListener("afterrender", cb); }, offAfterRender(cb) { - this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb); + this.removeListener("afterrender", cb); }, - onAfterResize(cb) { - this.three.onAfterResize(cb); + onResize(cb) { + this.addListener("resize", cb); }, - offAfterResize(cb) { - this.three.offAfterResize(cb); + offResize(cb) { + this.removeListener("resize", cb); + }, + addListener(type, cb) { + const callbacks = this.getCallbacks(type); + callbacks.push(cb); + }, + removeListener(type, cb) { + const callbacks = this.getCallbacks(type); + const index = callbacks.indexOf(cb); + if (index) + callbacks.splice(index, 1); + }, + getCallbacks(type) { + if (type === "init") { + return this.initCallbacks; + } else if (type === "mounted") { + return this.mountedCallbacks; + } else if (type === "beforerender") { + return this.beforeRenderCallbacks; + } else if (type === "afterrender") { + return this.afterRenderCallbacks; + } else { + return this.resizeCallbacks; + } }, render(time) { - this.beforeRenderCallbacks.forEach(c => c({ time })); - this._render(); - this.afterRenderCallbacks.forEach(c => c({ time })); + this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); + this.renderFn(); + this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { - if (this.raf) requestAnimationFrame(this.renderLoop); + if (this.raf) + requestAnimationFrame(this.renderLoop); this.render(time); - }, + } }, render() { - return vue.h('canvas', {}, this.$slots.default()); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Renderer', + __hmrId: "Renderer" }); function setFromProp(o, prop) { @@ -575,25 +566,30 @@ function setFromProp(o, prop) { } } function bindProps(src, props, dst) { - props.forEach(prop => { - bindProp(src, prop, dst); + props.forEach((prop) => { + bindProp(src, prop, dst, prop); }); } function bindProp(src, srcProp, dst, dstProp) { - if (!dstProp) dstProp = srcProp; + const _dstProp = dstProp || srcProp; const ref = vue.toRef(src, srcProp); if (ref.value instanceof Object) { - setFromProp(dst[dstProp], ref.value); - vue.watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true }); + setFromProp(dst[_dstProp], ref.value); + vue.watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); } else { - if (ref.value) dst[dstProp] = src[srcProp]; - vue.watch(ref, (value) => { dst[dstProp] = value; }); + if (ref.value) + dst[_dstProp] = src[srcProp]; + vue.watch(ref, (value) => { + dst[_dstProp] = value; + }); } } -function propsValues(props, exclude) { +function propsValues(props, exclude = []) { const values = {}; Object.entries(props).forEach(([key, value]) => { - if (!exclude || (exclude && !exclude.includes(key))) { + if (!exclude || exclude && !exclude.includes(key)) { values[key] = value; } }); @@ -604,319 +600,510 @@ function lerp(value1, value2, amount) { amount = amount > 1 ? 1 : amount; return value1 + (value2 - value1) * amount; } -function lerpv2(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); -} -function lerpv3(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); - v1.z = lerp(v1.z, v2.z, amount); -} function limit(val, min, max) { - return val < min ? min : (val > max ? max : val); + return val < min ? min : val > max ? max : val; } -// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx -const MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'; - -function getMatcapUrl(hash, format = 1024) { +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { const fileName = `${hash}${getMatcapFormatString(format)}.png`; return `${MATCAP_ROOT}/${format}/${fileName}`; } function getMatcapFormatString(format) { switch (format) { case 64: - return '-64px'; + return "-64px"; case 128: - return '-128px'; + return "-128px"; case 256: - return '-256px'; + return "-256px"; case 512: - return '-512px'; + return "-512px"; default: - return ''; + return ""; } } -// import Object3D from '../core/Object3D.js'; - var Camera = vue.defineComponent({ - // TODO: eventually extend Object3D, for now: error 'injection "scene" not found' - // because camera is a sibling of scene in Trois - // extends: Object3D, - inject: ['three'], render() { return this.$slots.default ? this.$slots.default() : []; - }, + } }); var OrthographicCamera = vue.defineComponent({ extends: Camera, - name: 'OrthographicCamera', - inject: ['three'], + name: "OrthographicCamera", props: { - left: { type: Number, default: -1 }, - right: { type: Number, default: 1 }, - top: { type: Number, default: 1 }, - bottom: { type: Number, default: -1 }, - near: { type: Number, default: 0.1 }, - far: { type: Number, default: 2000 }, - zoom: { type: Number, default: 1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, + left: {type: Number, default: -1}, + right: {type: Number, default: 1}, + top: {type: Number, default: 1}, + bottom: {type: Number, default: -1}, + near: {type: Number, default: 0.1}, + far: {type: Number, default: 2e3}, + zoom: {type: Number, default: 1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, - created() { - this.camera = new three.OrthographicCamera(this.left, this.right, this.top, this.bottom, this.near, this.far); - bindProp(this, 'position', this.camera); - - ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => { - vue.watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + const renderer = vue.inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new three.OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + const watchProps = ["left", "right", "top", "bottom", "near", "far", "zoom"]; + watchProps.forEach((p) => { + vue.watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'OrthographicCamera', + __hmrId: "OrthographicCamera" }); var PerspectiveCamera = vue.defineComponent({ extends: Camera, - name: 'PerspectiveCamera', - inject: ['three'], + name: "PerspectiveCamera", props: { - aspect: { type: Number, default: 1 }, - far: { type: Number, default: 2000 }, - fov: { type: Number, default: 50 }, - near: { type: Number, default: 0.1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - lookAt: { type: Object, default: null }, + aspect: {type: Number, default: 1}, + far: {type: Number, default: 2e3}, + fov: {type: Number, default: 50}, + near: {type: Number, default: 0.1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + lookAt: {type: Object, default: null} }, - created() { - this.camera = new three.PerspectiveCamera(this.fov, this.aspect, this.near, this.far); - bindProp(this, 'position', this.camera); - - if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - vue.watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true }); - - ['aspect', 'far', 'fov', 'near'].forEach(p => { - vue.watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + var _a; + const renderer = vue.inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new three.PerspectiveCamera(props.fov, props.aspect, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + if (props.lookAt) + camera.lookAt((_a = props.lookAt.x) != null ? _a : 0, props.lookAt.y, props.lookAt.z); + vue.watch(() => props.lookAt, (v) => { + var _a2; + camera.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + const watchProps = ["aspect", "far", "fov", "near"]; + watchProps.forEach((p) => { + vue.watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'PerspectiveCamera', + __hmrId: "PerspectiveCamera" +}); + +const SceneInjectionKey = Symbol("Scene"); +var Scene = vue.defineComponent({ + name: "Scene", + props: { + background: [String, Number, Object] + }, + setup(props) { + const renderer = vue.inject(RendererInjectionKey); + const scene = new three.Scene(); + if (!renderer) { + console.error("Renderer not found"); + return; + } + renderer.scene = scene; + vue.provide(SceneInjectionKey, scene); + const setBackground = (value) => { + if (!value) + return; + if (typeof value === "string" || typeof value === "number") { + if (scene.background instanceof three.Color) + scene.background.set(value); + else + scene.background = new three.Color(value); + } else if (value instanceof three.Texture) { + scene.background = value; + } + }; + setBackground(props.background); + vue.watch(() => props.background, setBackground); + const add = (o) => { + scene.add(o); + }; + const remove = (o) => { + scene.remove(o); + }; + return {scene, add, remove}; + }, + render() { + return this.$slots.default ? this.$slots.default() : []; + }, + __hmrId: "Scene" }); var Object3D = vue.defineComponent({ - name: 'Object3D', - inject: ['three', 'scene', 'rendererComponent'], - emits: ['created', 'ready'], - props: { - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - rotation: { type: Object, default: { x: 0, y: 0, z: 0 } }, - scale: { type: Object, default: { x: 1, y: 1, z: 1 } }, - lookAt: { type: Object, default: null }, - autoRemove: { type: Boolean, default: true }, - userData: { type: Object, default: () => ({}) }, + name: "Object3D", + inject: { + renderer: RendererInjectionKey, + scene: SceneInjectionKey + }, + emits: ["created", "ready"], + props: { + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + rotation: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + scale: {type: Object, default: () => ({x: 1, y: 1, z: 1, order: "XYZ"})}, + lookAt: {type: Object, default: null}, + autoRemove: {type: Boolean, default: true}, + userData: {type: Object, default: () => ({})} + }, + setup() { + return {}; + }, + created() { + if (!this.renderer) { + console.error("Missing parent Renderer"); + } + if (!this.scene) { + console.error("Missing parent Scene"); + } }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.autoRemove) this.removeFromParent(); + if (this.autoRemove) + this.removeFromParent(); }, methods: { initObject3D(o3d) { + var _a; this.o3d = o3d; - this.o3d.userData = this.userData; - this.$emit('created', this.o3d); - - bindProp(this, 'position', this.o3d); - bindProp(this, 'rotation', this.o3d); - bindProp(this, 'scale', this.o3d); - - // TODO : fix lookat.x - if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - vue.watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true }); - - this._parent = this.getParent(); - if (this.addToParent()) this.$emit('ready', this); - else console.error('Missing parent (Scene, Group...)'); + this.$emit("created", o3d); + bindProp(this, "position", o3d); + bindProp(this, "rotation", o3d); + bindProp(this, "scale", o3d); + bindProp(this, "userData", o3d.userData); + if (this.lookAt) + o3d.lookAt((_a = this.lookAt.x) != null ? _a : 0, this.lookAt.y, this.lookAt.z); + vue.watch(() => this.lookAt, (v) => { + var _a2; + o3d.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + this.parent = this.getParent(); + if (this.addToParent()) + this.$emit("ready", this); + else + console.error("Missing parent (Scene, Group...)"); }, getParent() { let parent = this.$parent; while (parent) { - if (parent.add) return parent; + if (parent.add) + return parent; parent = parent.$parent; } - return false; + return void 0; }, addToParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.add(o3d); + if (this.parent) { + this.parent.add(o3d); return true; } return false; }, removeFromParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.remove(o3d); + if (this.parent) { + this.parent.remove(o3d); return true; } return false; }, - add(o) { this.o3d.add(o); }, - remove(o) { this.o3d.remove(o); }, + add(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.add(o); + }, + remove(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.remove(o); + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Object3D', + __hmrId: "Object3D" }); var Group = vue.defineComponent({ - name: 'Group', + name: "Group", extends: Object3D, - created() { - this.group = new three.Group(); - this.initObject3D(this.group); - }, - __hmrId: 'Group', -}); - -var Scene = vue.defineComponent({ - name: 'Scene', - inject: ['three'], - props: { - id: String, - background: [String, Number], - }, - setup(props) { - const scene = new three.Scene(); - if (props.background) scene.background = new three.Color(props.background); - vue.watch(() => props.background, (value) => { scene.background.set(value); }); - return { scene }; - }, - provide() { + setup() { return { - scene: this.scene, + group: new three.Group() }; }, - mounted() { - if (!this.three.scene) { - this.three.scene = this.scene; - } + created() { + this.initObject3D(this.group); }, - methods: { - add(o) { this.scene.add(o); }, - remove(o) { this.scene.remove(o); }, - }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'Scene', + __hmrId: "Group" }); +const emptyCallBack = () => { +}; var Raycaster = vue.defineComponent({ - name: 'Raycaster', - inject: ['three', 'rendererComponent'], + name: "Raycaster", props: { - onPointerEnter: { type: Function, default: () => {} }, - onPointerOver: { type: Function, default: () => {} }, - onPointerMove: { type: Function, default: () => {} }, - onPointerLeave: { type: Function, default: () => {} }, - onClick: { type: Function, default: () => {} }, - intersectMode: { type: String, default: 'move' }, + onPointerEnter: {type: Function, default: emptyCallBack}, + onPointerOver: {type: Function, default: emptyCallBack}, + onPointerMove: {type: Function, default: emptyCallBack}, + onPointerLeave: {type: Function, default: emptyCallBack}, + onClick: {type: Function, default: emptyCallBack}, + intersectMode: {type: String, default: "move"} + }, + setup() { + const renderer = vue.inject(RendererInjectionKey); + return {renderer}; }, mounted() { - this.rendererComponent.onMounted(() => { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + this.renderer.onMounted(() => { + if (!renderer.camera) + return; this.pointer = usePointer({ - camera: this.three.camera, - domElement: this.three.renderer.domElement, + camera: renderer.camera, + domElement: renderer.canvas, intersectObjects: this.getIntersectObjects(), onIntersectEnter: this.onPointerEnter, onIntersectOver: this.onPointerOver, onIntersectMove: this.onPointerMove, onIntersectLeave: this.onPointerLeave, - onIntersectClick: this.onClick, + onIntersectClick: this.onClick }); this.pointer.addListeners(); - - if (this.intersectMode === 'frame') { - this.rendererComponent.onBeforeRender(this.pointer.intersect); + if (this.intersectMode === "frame") { + renderer.onBeforeRender(this.pointer.intersect); } }); }, unmounted() { + var _a; if (this.pointer) { this.pointer.removeListeners(); - this.rendererComponent.offBeforeRender(this.pointer.intersect); + (_a = this.renderer) == null ? void 0 : _a.offBeforeRender(this.pointer.intersect); } }, methods: { getIntersectObjects() { - return this.three.scene.children.filter(e => e.type === 'Mesh'); - }, + if (this.renderer && this.renderer.scene) { + const children = this.renderer.scene.children.filter((c) => ["Mesh", "InstancedMesh"].includes(c.type)); + return children; + } + return []; + } }, render() { return []; }, - __hmrId: 'Raycaster', + __hmrId: "Raycaster" }); -const Geometry = vue.defineComponent({ - inject: ['mesh'], +var CubeCamera = vue.defineComponent({ + extends: Object3D, props: { - rotateX: Number, - rotateY: Number, - rotateZ: Number, + cubeRTSize: {type: Number, default: 256}, + cubeCameraNear: {type: Number, default: 0.1}, + cubeCameraFar: {type: Number, default: 2e3}, + autoUpdate: Boolean }, - created() { - if (!this.mesh) { - console.error('Missing parent Mesh'); + setup(props) { + const rendererC = vue.inject(RendererInjectionKey); + if (!rendererC || !rendererC.scene) { + console.error("Missing Renderer / Scene"); + return; } - - this.watchProps = []; - Object.entries(this.$props).forEach(e => this.watchProps.push(e[0])); - - this.createGeometry(); - this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - - this.addWatchers(); + const renderer = rendererC.renderer, scene = rendererC.scene; + const cubeRT = new three.WebGLCubeRenderTarget(props.cubeRTSize, {format: three.RGBFormat, generateMipmaps: true, minFilter: three.LinearMipmapLinearFilter}); + const cubeCamera = new three.CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT); + const updateRT = () => { + cubeCamera.update(renderer, scene); + }; + if (props.autoUpdate) { + rendererC.onBeforeRender(updateRT); + vue.onUnmounted(() => { + rendererC.offBeforeRender(updateRT); + }); + } else { + rendererC.onMounted(updateRT); + } + return {cubeRT, cubeCamera}; }, - unmounted() { - this.geometry.dispose(); + render() { + return []; + }, + __hmrId: "CubeCamera" +}); + +const pointerProps = { + onPointerEnter: Function, + onPointerOver: Function, + onPointerMove: Function, + onPointerLeave: Function, + onPointerDown: Function, + onPointerUp: Function, + onClick: Function +}; +const MeshInjectionKey = Symbol("Mesh"); +const Mesh = vue.defineComponent({ + name: "Mesh", + extends: Object3D, + props: { + castShadow: Boolean, + receiveShadow: Boolean, + ...pointerProps + }, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + if (!this.mesh && !this.loading) + this.initMesh(); }, methods: { - addWatchers() { - this.watchProps.forEach(prop => { + initMesh() { + const mesh = new three.Mesh(this.geometry, this.material); + mesh.userData.component = this; + bindProp(this, "castShadow", mesh); + bindProp(this, "receiveShadow", mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + if (this.renderer) + this.renderer.three.addIntersectObject(mesh); + } + this.mesh = mesh; + this.initObject3D(mesh); + }, + createGeometry() { + }, + addGeometryWatchers(props) { + Object.keys(props).forEach((prop) => { vue.watch(() => this[prop], () => { this.refreshGeometry(); }); }); }, + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + }, + refreshGeometry() { + const oldGeo = this.geometry; + this.createGeometry(); + if (this.mesh && this.geometry) + this.mesh.geometry = this.geometry; + oldGeo == null ? void 0 : oldGeo.dispose(); + } + }, + unmounted() { + if (this.mesh) { + if (this.renderer) + this.renderer.three.removeIntersectObject(this.mesh); + } + if (this.geometry) + this.geometry.dispose(); + if (this.material) + this.material.dispose(); + }, + __hmrId: "Mesh" +}); +function meshComponent(name, props, createGeometry) { + return vue.defineComponent({ + name, + extends: Mesh, + props, + created() { + this.createGeometry(); + this.addGeometryWatchers(props); + }, + methods: { + createGeometry() { + this.geometry = createGeometry(this); + } + } + }); +} + +const Geometry = vue.defineComponent({ + props: { + rotateX: Number, + rotateY: Number, + rotateZ: Number + }, + inject: { + mesh: MeshInjectionKey + }, + setup() { + return {}; + }, + created() { + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + this.createGeometry(); + this.rotateGeometry(); + if (this.geometry) + this.mesh.setGeometry(this.geometry); + Object.keys(this.$props).forEach((prop) => { + vue.watch(() => this[prop], this.refreshGeometry); + }); + }, + unmounted() { + var _a; + (_a = this.geometry) == null ? void 0 : _a.dispose(); + }, + methods: { + createGeometry() { + }, rotateGeometry() { - if (this.rotateX) this.geometry.rotateX(this.rotateX); - if (this.rotateY) this.geometry.rotateY(this.rotateY); - if (this.rotateZ) this.geometry.rotateZ(this.rotateZ); + if (!this.geometry) + return; + if (this.rotateX) + this.geometry.rotateX(this.rotateX); + if (this.rotateY) + this.geometry.rotateY(this.rotateY); + if (this.rotateZ) + this.geometry.rotateZ(this.rotateZ); }, refreshGeometry() { const oldGeo = this.geometry; this.createGeometry(); this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - oldGeo.dispose(); - }, + if (this.geometry && this.mesh) + this.mesh.setGeometry(this.geometry); + oldGeo == null ? void 0 : oldGeo.dispose(); + } }, - render() { return []; }, + render() { + return []; + } }); - function geometryComponent(name, props, createGeometry) { return vue.defineComponent({ name, @@ -925,21 +1112,20 @@ function geometryComponent(name, props, createGeometry) { methods: { createGeometry() { this.geometry = createGeometry(this); - }, - }, + } + } }); } -const props$h = { +const props$n = { size: Number, - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - depth: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, - depthSegments: { type: Number, default: 1 }, + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + depth: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + depthSegments: {type: Number, default: 1} }; - function createGeometry$f(comp) { if (comp.size) { return new three.BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments); @@ -947,188 +1133,173 @@ function createGeometry$f(comp) { return new three.BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments); } } -var BoxGeometry = geometryComponent('BoxGeometry', props$h, createGeometry$f); +var BoxGeometry = geometryComponent("BoxGeometry", props$n, createGeometry$f); -const props$g = { - radius: { type: Number, default: 1 }, - segments: { type: Number, default: 8 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$m = { + radius: {type: Number, default: 1}, + segments: {type: Number, default: 8}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$e(comp) { return new three.CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength); } -var CircleGeometry = geometryComponent('CircleGeometry', props$g, createGeometry$e); +var CircleGeometry = geometryComponent("CircleGeometry", props$m, createGeometry$e); -const props$f = { - radius: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$l = { + radius: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$d(comp) { return new three.ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var ConeGeometry = geometryComponent('ConeGeometry', props$f, createGeometry$d); +var ConeGeometry = geometryComponent("ConeGeometry", props$l, createGeometry$d); -const props$e = { - radiusTop: { type: Number, default: 1 }, - radiusBottom: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$k = { + radiusTop: {type: Number, default: 1}, + radiusBottom: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$c(comp) { return new three.CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var CylinderGeometry = geometryComponent('CylinderGeometry', props$e, createGeometry$c); +var CylinderGeometry = geometryComponent("CylinderGeometry", props$k, createGeometry$c); -const props$d = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$j = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$b(comp) { return new three.DodecahedronGeometry(comp.radius, comp.detail); } -var DodecahedronGeometry = geometryComponent('DodecahedronGeometry', props$d, createGeometry$b); +var DodecahedronGeometry = geometryComponent("DodecahedronGeometry", props$j, createGeometry$b); -const props$c = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$i = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$a(comp) { return new three.IcosahedronGeometry(comp.radius, comp.detail); } -var IcosahedronGeometry = geometryComponent('IcosahedronGeometry', props$c, createGeometry$a); +var IcosahedronGeometry = geometryComponent("IcosahedronGeometry", props$i, createGeometry$a); -const props$b = { +const props$h = { points: Array, - segments: { type: Number, default: 12 }, - phiStart: { type: Number, default: 0 }, - phiLength: { type: Number, default: Math.PI * 2 }, + segments: {type: Number, default: 12}, + phiStart: {type: Number, default: 0}, + phiLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$9(comp) { return new three.LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength); } -var LatheGeometry = geometryComponent('LatheGeometry', props$b, createGeometry$9); +var LatheGeometry = geometryComponent("LatheGeometry", props$h, createGeometry$9); -const props$a = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$g = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$8(comp) { return new three.OctahedronGeometry(comp.radius, comp.detail); } -var OctahedronGeometry = geometryComponent('OctahedronGeometry', props$a, createGeometry$8); +var OctahedronGeometry = geometryComponent("OctahedronGeometry", props$g, createGeometry$8); -const props$9 = { - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, +const props$f = { + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1} }; - function createGeometry$7(comp) { return new three.PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments); } -var PlaneGeometry = geometryComponent('PlaneGeometry', props$9, createGeometry$7); +var PlaneGeometry = geometryComponent("PlaneGeometry", props$f, createGeometry$7); -const props$8 = { +const props$e = { vertices: Array, indices: Array, - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$6(comp) { return new three.PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail); } -var PolyhedronGeometry = geometryComponent('PolyhedronGeometry', props$8, createGeometry$6); +var PolyhedronGeometry = geometryComponent("PolyhedronGeometry", props$e, createGeometry$6); -const props$7 = { - innerRadius: { type: Number, default: 0.5 }, - outerRadius: { type: Number, default: 1 }, - thetaSegments: { type: Number, default: 8 }, - phiSegments: { type: Number, default: 1 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$d = { + innerRadius: {type: Number, default: 0.5}, + outerRadius: {type: Number, default: 1}, + thetaSegments: {type: Number, default: 8}, + phiSegments: {type: Number, default: 1}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$5(comp) { return new three.RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength); } -var RingGeometry = geometryComponent('RingGeometry', props$7, createGeometry$5); +var RingGeometry = geometryComponent("RingGeometry", props$d, createGeometry$5); -const props$6 = { - radius: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 12 }, - heightSegments: { type: Number, default: 12 }, +const props$c = { + radius: {type: Number, default: 1}, + widthSegments: {type: Number, default: 12}, + heightSegments: {type: Number, default: 12} }; - function createGeometry$4(comp) { return new three.SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments); } -var SphereGeometry = geometryComponent('SphereGeometry', props$6, createGeometry$4); +var SphereGeometry = geometryComponent("SphereGeometry", props$c, createGeometry$4); -const props$5 = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$b = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$3(comp) { return new three.TetrahedronGeometry(comp.radius, comp.detail); } -var TetrahedronGeometry = geometryComponent('TetrahedronGeometry', props$5, createGeometry$3); +var TetrahedronGeometry = geometryComponent("TetrahedronGeometry", props$b, createGeometry$3); -const props$4 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - radialSegments: { type: Number, default: 8 }, - tubularSegments: { type: Number, default: 6 }, - arc: { type: Number, default: Math.PI * 2 }, +const props$a = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + radialSegments: {type: Number, default: 8}, + tubularSegments: {type: Number, default: 6}, + arc: {type: Number, default: Math.PI * 2} }; - function createGeometry$2(comp) { return new three.TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc); } -var TorusGeometry = geometryComponent('TorusGeometry', props$4, createGeometry$2); +var TorusGeometry = geometryComponent("TorusGeometry", props$a, createGeometry$2); -const props$3 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - tubularSegments: { type: Number, default: 64 }, - radialSegments: { type: Number, default: 8 }, - p: { type: Number, default: 2 }, - q: { type: Number, default: 3 }, +const props$9 = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + tubularSegments: {type: Number, default: 64}, + radialSegments: {type: Number, default: 8}, + p: {type: Number, default: 2}, + q: {type: Number, default: 3} }; - function createGeometry$1(comp) { return new three.TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q); } -var TorusKnotGeometry = geometryComponent('TorusKnotGeometry', props$3, createGeometry$1); +var TorusKnotGeometry = geometryComponent("TorusKnotGeometry", props$9, createGeometry$1); -const props$2 = { +const props$8 = { points: Array, path: three.Curve, - tubularSegments: { type: Number, default: 64 }, - radius: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - closed: { type: Boolean, default: false }, + tubularSegments: {type: Number, default: 64}, + radius: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + closed: {type: Boolean, default: false} }; - function createGeometry(comp) { let curve; if (comp.points) { @@ -1136,509 +1307,464 @@ function createGeometry(comp) { } else if (comp.path) { curve = comp.path; } else { - console.error('Missing path curve or points.'); + console.error("Missing path curve or points."); } return new three.TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed); } var TubeGeometry = vue.defineComponent({ extends: Geometry, - props: props$2, + props: props$8, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, - }, + } + } }); - function updateTubeGeometryPoints(tube, points) { const curve = new three.CatmullRomCurve3(points); - const { radialSegments, radius, tubularSegments, closed } = tube.parameters; + const {radialSegments, radius, tubularSegments, closed} = tube.parameters; const frames = curve.computeFrenetFrames(tubularSegments, closed); tube.tangents = frames.tangents; tube.normals = frames.normals; tube.binormals = frames.binormals; tube.parameters.path = curve; - - const pArray = tube.attributes.position.array; - const nArray = tube.attributes.normal.array; + const pAttribute = tube.getAttribute("position"); + const nAttribute = tube.getAttribute("normal"); const normal = new three.Vector3(); - let P; - + const P = new three.Vector3(); for (let i = 0; i < tubularSegments; i++) { updateSegment(i); } updateSegment(tubularSegments); - tube.attributes.position.needsUpdate = true; tube.attributes.normal.needsUpdate = true; - function updateSegment(i) { - P = curve.getPointAt(i / tubularSegments, P); + curve.getPointAt(i / tubularSegments, P); const N = frames.normals[i]; const B = frames.binormals[i]; for (let j = 0; j <= radialSegments; j++) { const v = j / radialSegments * Math.PI * 2; const sin = Math.sin(v); const cos = -Math.cos(v); - normal.x = (cos * N.x + sin * B.x); - normal.y = (cos * N.y + sin * B.y); - normal.z = (cos * N.z + sin * B.z); + normal.x = cos * N.x + sin * B.x; + normal.y = cos * N.y + sin * B.y; + normal.z = cos * N.z + sin * B.z; normal.normalize(); - const index = (i * (radialSegments + 1) + j) * 3; - nArray[index] = normal.x; - nArray[index + 1] = normal.y; - nArray[index + 2] = normal.z; - pArray[index] = P.x + radius * normal.x; - pArray[index + 1] = P.y + radius * normal.y; - pArray[index + 2] = P.z + radius * normal.z; + const index = i * (radialSegments + 1) + j; + nAttribute.setXYZ(index, normal.x, normal.y, normal.z); + pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z); } } } var Light = vue.defineComponent({ extends: Object3D, - name: 'Light', + name: "Light", props: { - color: { type: String, default: '#ffffff' }, - intensity: { type: Number, default: 1 }, - castShadow: { type: Boolean, default: false }, - shadowMapSize: { type: Object, default: { x: 512, y: 512 } }, - shadowCamera: { type: Object, default: {} }, + color: {type: String, default: "#ffffff"}, + intensity: {type: Number, default: 1}, + castShadow: {type: Boolean, default: false}, + shadowMapSize: {type: Object, default: () => ({x: 512, y: 512})}, + shadowCamera: {type: Object, default: () => ({})} + }, + setup() { + return {}; }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.light.target) this.removeFromParent(this.light.target); + if (this.light instanceof three.SpotLight || this.light instanceof three.DirectionalLight) { + this.removeFromParent(this.light.target); + } }, methods: { - initLight() { - if (this.light.target) { - bindProp(this, 'target', this.light.target, 'position'); + initLight(light) { + this.light = light; + if (light.shadow) { + light.castShadow = this.castShadow; + setFromProp(light.shadow.mapSize, this.shadowMapSize); + setFromProp(light.shadow.camera, this.shadowCamera); } - - if (this.light.shadow) { - this.light.castShadow = this.castShadow; - setFromProp(this.light.shadow.mapSize, this.shadowMapSize); - setFromProp(this.light.shadow.camera, this.shadowCamera); - } - - ['color', 'intensity', 'castShadow'].forEach(p => { - vue.watch(() => this[p], () => { - if (p === 'color') { - this.light.color.set(this.color); + ["color", "intensity", "castShadow"].forEach((p) => { + vue.watch(() => this[p], (value) => { + if (p === "color") { + light.color.set(value); } else { - this.light[p] = this[p]; + light[p] = value; } }); }); - - this.initObject3D(this.light); - if (this.light.target) this.addToParent(this.light.target); - }, + this.initObject3D(light); + if (light instanceof three.SpotLight || light instanceof three.DirectionalLight) { + bindProp(this, "target", light.target, "position"); + this.addToParent(light.target); + } + } }, - __hmrId: 'Light', + __hmrId: "Light" }); var AmbientLight = vue.defineComponent({ extends: Light, created() { - this.light = new three.AmbientLight(this.color, this.intensity); - this.initLight(); + this.initLight(new three.AmbientLight(this.color, this.intensity)); }, - __hmrId: 'AmbientLight', + __hmrId: "AmbientLight" }); var DirectionalLight = vue.defineComponent({ extends: Light, props: { - target: Object, + target: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, created() { - this.light = new three.DirectionalLight(this.color, this.intensity); - this.initLight(); + this.initLight(new three.DirectionalLight(this.color, this.intensity)); }, - __hmrId: 'DirectionalLight', + __hmrId: "DirectionalLight" }); var HemisphereLight = vue.defineComponent({ extends: Light, props: { - groundColor: { type: String, default: '#444444' }, + groundColor: {type: String, default: "#444444"} }, created() { - this.light = new three.HemisphereLight(this.color, this.groundColor, this.intensity); - vue.watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); }); - this.initLight(); + const light = new three.HemisphereLight(this.color, this.groundColor, this.intensity); + vue.watch(() => this.groundColor, (value) => { + light.groundColor.set(value); + }); + this.initLight(light); }, - __hmrId: 'HemisphereLight', + __hmrId: "HemisphereLight" }); var PointLight = vue.defineComponent({ extends: Light, props: { - distance: { - type: Number, - default: 0, - }, - decay: { - type: Number, - default: 1, - }, + distance: {type: Number, default: 0}, + decay: {type: Number, default: 1} }, created() { - this.light = new three.PointLight(this.color, this.intensity, this.distance, this.decay); - this.initLight(); + this.initLight(new three.PointLight(this.color, this.intensity, this.distance, this.decay)); }, - __hmrId: 'PointLight', + __hmrId: "PointLight" }); var RectAreaLight = vue.defineComponent({ extends: Light, props: { - width: { type: Number, default: 10 }, - height: { type: Number, default: 10 }, - helper: Boolean, + width: {type: Number, default: 10}, + height: {type: Number, default: 10}, + helper: Boolean }, created() { RectAreaLightUniformsLib_js.RectAreaLightUniformsLib.init(); - this.light = new three.RectAreaLight(this.color, this.intensity, this.width, this.height); - - ['width', 'height'].forEach(p => { - vue.watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new three.RectAreaLight(this.color, this.intensity, this.width, this.height); + const watchProps = ["width", "height"]; + watchProps.forEach((p) => { + vue.watch(() => this[p], (value) => { + light[p] = value; }); }); - if (this.helper) { - this.lightHelper = new RectAreaLightHelper_js.RectAreaLightHelper(this.light); - this.light.add(this.lightHelper); + const lightHelper = new RectAreaLightHelper_js.RectAreaLightHelper(light); + light.add(lightHelper); } - - this.initLight(); + this.initLight(light); }, - unmounted() { - if (this.lightHelper) this.removeFromParent(this.lightHelper); - }, - __hmrId: 'RectAreaLight', + __hmrId: "RectAreaLight" }); var SpotLight = vue.defineComponent({ extends: Light, props: { - angle: { type: Number, default: Math.PI / 3 }, - decay: { type: Number, default: 1 }, - distance: { type: Number, default: 0 }, - penumbra: { type: Number, default: 0 }, - target: Object, + angle: {type: Number, default: Math.PI / 3}, + decay: {type: Number, default: 1}, + distance: {type: Number, default: 0}, + penumbra: {type: Number, default: 0}, + target: Object }, created() { - this.light = new three.SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); - ['angle', 'decay', 'distance', 'penumbra'].forEach(p => { - vue.watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new three.SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); + const watchProps = ["angle", "decay", "distance", "penumbra"]; + watchProps.forEach((p) => { + vue.watch(() => this[p], (value) => { + light[p] = value; }); }); - this.initLight(); + this.initLight(light); }, - __hmrId: 'SpotLight', + __hmrId: "SpotLight" }); +const MaterialInjectionKey = Symbol("Material"); var Material = vue.defineComponent({ - inject: ['three', 'mesh'], + inject: { + mesh: MeshInjectionKey + }, props: { - color: { type: [String, Number], default: '#ffffff' }, - depthTest: { type: Boolean, default: true }, - depthWrite: { type: Boolean, default: true }, - fog: { type: Boolean, default: true }, - opacity: { type: Number, default: 1 }, - side: { type: Number, default: three.FrontSide }, + color: {type: [String, Number], default: "#ffffff"}, + depthTest: {type: Boolean, default: true}, + depthWrite: {type: Boolean, default: true}, + fog: {type: Boolean, default: true}, + opacity: {type: Number, default: 1}, + side: {type: Number, default: three.FrontSide}, transparent: Boolean, - vertexColors: Boolean, + vertexColors: Boolean + }, + setup() { + return {}; }, provide() { return { - material: this, + [MaterialInjectionKey]: this }; }, created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - - this._addWatchers(); - if (this.addWatchers) this.addWatchers(); + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + if (this.createMaterial) { + this.material = this.createMaterial(); + this.mesh.setMaterial(this.material); + this.addWatchers(); + } }, unmounted() { - this.material.dispose(); + var _a; + (_a = this.material) == null ? void 0 : _a.dispose(); }, methods: { setProp(key, value, needsUpdate = false) { - this.material[key] = value; - this.material.needsUpdate = needsUpdate; + if (this.material) { + this.material[key] = value; + this.material.needsUpdate = needsUpdate; + } }, - setTexture(texture, key = 'map') { + setTexture(texture, key = "map") { this.setProp(key, texture, true); }, - _addWatchers() { - ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => { - vue.watch(() => this[p], () => { - if (p === 'color') { - this.material.color.set(this.color); + addWatchers() { + ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + vue.watch(() => this[p], (value) => { + if (p === "color") { + this.material.color.set(value); } else { - this.material[p] = this[p]; + this.material[p] = value; } }); }); - }, + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Material', + __hmrId: "Material" }); - const wireframeProps = { - wireframe: { type: Boolean, default: false }, - // not needed for WebGL - // wireframeLinecap: { type: String, default: 'round' }, - // wireframeLinejoin: { type: String, default: 'round' }, - wireframeLinewidth: { type: Number, default: 1 }, // not really useful + wireframe: {type: Boolean, default: false}, + wireframeLinewidth: {type: Number, default: 1} }; var BasicMaterial = vue.defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new three.MeshBasicMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new three.MeshBasicMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'BasicMaterial', + __hmrId: "BasicMaterial" }); var LambertMaterial = vue.defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new three.MeshLambertMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new three.MeshLambertMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'LambertMaterial', + __hmrId: "LambertMaterial" }); var MatcapMaterial = vue.defineComponent({ extends: Material, props: { src: String, - name: String, - flatShading: Boolean, + name: {type: String, default: "0404E8_0404B5_0404CB_3333FC"}, + flatShading: Boolean }, methods: { createMaterial() { - const src = this.name ? getMatcapUrl(this.name) : this.src; - const opts = propsValues(this.$props, ['src', 'name']); + const src = this.src ? this.src : getMatcapUrl(this.name); + const opts = propsValues(this.$props, ["src", "name"]); opts.matcap = new three.TextureLoader().load(src); - this.material = new three.MeshMatcapMaterial(opts); - }, - addWatchers() { - // TODO - }, + return new three.MeshMatcapMaterial(opts); + } }, - __hmrId: 'MatcapMaterial', + __hmrId: "MatcapMaterial" }); var PhongMaterial = vue.defineComponent({ extends: Material, props: { - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - reflectivity: { type: Number, default: 1 }, - shininess: { type: Number, default: 30 }, - specular: { type: [String, Number], default: 0x111111 }, + emissive: {type: [Number, String], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + reflectivity: {type: Number, default: 1}, + shininess: {type: Number, default: 30}, + specular: {type: [String, Number], default: 1118481}, flatShading: Boolean, - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new three.MeshPhongMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO : handle flatShading ? - ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => { + const material = new three.MeshPhongMaterial(propsValues(this.$props)); + const watchProps = ["emissive", "emissiveIntensity", "reflectivity", "shininess", "specular"]; + watchProps.forEach((p) => { vue.watch(() => this[p], (value) => { - if (p === 'emissive' || p === 'specular') { - this.material[p].set(value); + if (p === "emissive" || p === "specular") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'PhongMaterial', + __hmrId: "PhongMaterial" }); -const props$1 = { - aoMapIntensity: { type: Number, default: 1 }, - bumpScale: { type: Number, default: 1 }, - displacementBias: { type: Number, default: 0 }, - displacementScale: { type: Number, default: 1 }, - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - envMapIntensity: { type: Number, default: 1 }, - lightMapIntensity: { type: Number, default: 1 }, - metalness: { type: Number, default: 0 }, - normalScale: { type: Object, default: { x: 1, y: 1 } }, - roughness: { type: Number, default: 1 }, - refractionRatio: { type: Number, default: 0.98 }, - flatShading: Boolean, +const props$7 = { + aoMapIntensity: {type: Number, default: 1}, + bumpScale: {type: Number, default: 1}, + displacementBias: {type: Number, default: 0}, + displacementScale: {type: Number, default: 1}, + emissive: {type: [String, Number], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + envMapIntensity: {type: Number, default: 1}, + lightMapIntensity: {type: Number, default: 1}, + metalness: {type: Number, default: 0}, + normalScale: {type: Object, default: () => ({x: 1, y: 1})}, + roughness: {type: Number, default: 1}, + refractionRatio: {type: Number, default: 0.98}, + flatShading: Boolean }; - var StandardMaterial = vue.defineComponent({ extends: Material, props: { - ...props$1, - ...wireframeProps, + ...props$7, + ...wireframeProps }, methods: { createMaterial() { - this.material = new three.MeshStandardMaterial(propsValues(this.$props, ['normalScale'])); - }, - addWatchers() { - // TODO : use setProp, handle flatShading ? - Object.keys(props$1).forEach(p => { - if (p === 'normalScale') return; + const material = new three.MeshStandardMaterial(propsValues(this.$props, ["normalScale"])); + Object.keys(props$7).forEach((p) => { + if (p === "normalScale") + return; vue.watch(() => this[p], (value) => { - if (p === 'emissive') { - this.material[p].set(value); + if (p === "emissive") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProp(this, 'normalScale', this.material); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProp(this, "normalScale", material); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'StandardMaterial', + __hmrId: "StandardMaterial" }); var PhysicalMaterial = vue.defineComponent({ extends: StandardMaterial, props: { - flatShading: Boolean, + flatShading: Boolean }, methods: { createMaterial() { - this.material = new three.MeshPhysicalMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO - }, + return new three.MeshPhysicalMaterial(propsValues(this.$props)); + } }, - __hmrId: 'PhysicalMaterial', + __hmrId: "PhysicalMaterial" }); const defaultVertexShader = ` -varying vec2 vUv; -void main(){ - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); -}`; - + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); + } +`; const defaultFragmentShader = ` -varying vec2 vUv; -void main() { - gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); -}`; - + varying vec2 vUv; + void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); + } +`; var ShaderMaterial = vue.defineComponent({ - inject: ['three', 'mesh'], + extends: Material, props: { - uniforms: { type: Object, default: () => { return {}; } }, - vertexShader: { type: String, default: defaultVertexShader }, - fragmentShader: { type: String, default: defaultFragmentShader }, - }, - provide() { - return { - material: this, - }; - }, - created() { - this.createMaterial(); - ['vertexShader', 'fragmentShader'].forEach(p => { - vue.watch(() => this[p], () => { - // recreate material if we change either shader - this.material.dispose(); - this.createMaterial(); - }); - }); - }, - unmounted() { - this.material.dispose(); + uniforms: {type: Object, default: () => ({})}, + vertexShader: {type: String, default: defaultVertexShader}, + fragmentShader: {type: String, default: defaultFragmentShader} }, methods: { createMaterial() { - this.material = new three.ShaderMaterial(propsValues(this.$props)); - this.mesh.setMaterial(this.material); + const material = new three.ShaderMaterial({ + uniforms: this.uniforms, + vertexShader: this.vertexShader, + fragmentShader: this.fragmentShader + }); + const watchProps = ["vertexShader", "fragmentShader"]; + watchProps.forEach((p) => { + vue.watch(() => this[p], (value) => { + this.setProp(p, value, true); + }); + }); + return material; }, + addWatchers() { + } }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'ShaderMaterial', + __hmrId: "ShaderMaterial" }); -/** - * ------------------------------------------------------------------------------------------ - * Subsurface Scattering shader - * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js - * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look - * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/ - *------------------------------------------------------------------------------------------ - */ - function replaceAll(string, find, replace) { return string.split(find).join(replace); } - -const meshphongFragHead = three.ShaderChunk.meshphong_frag.slice(0, three.ShaderChunk.meshphong_frag.indexOf('void main() {')); -const meshphongFragBody = three.ShaderChunk.meshphong_frag.slice(three.ShaderChunk.meshphong_frag.indexOf('void main() {')); - +const meshphongFragHead = three.ShaderChunk.meshphong_frag.slice(0, three.ShaderChunk.meshphong_frag.indexOf("void main() {")); +const meshphongFragBody = three.ShaderChunk.meshphong_frag.slice(three.ShaderChunk.meshphong_frag.indexOf("void main() {")); const SubsurfaceScatteringShader = { - uniforms: three.UniformsUtils.merge([ three.ShaderLib.phong.uniforms, { - thicknessColor: { value: new three.Color(0xffffff) }, - thicknessDistortion: { value: 0.1 }, - thicknessAmbient: { value: 0.0 }, - thicknessAttenuation: { value: 0.1 }, - thicknessPower: { value: 2.0 }, - thicknessScale: { value: 10.0 }, - }, + thicknessColor: {value: new three.Color(16777215)}, + thicknessDistortion: {value: 0.1}, + thicknessAmbient: {value: 0}, + thicknessAttenuation: {value: 0.1}, + thicknessPower: {value: 2}, + thicknessScale: {value: 10} + } ]), - vertexShader: ` #define USE_UV ${three.ShaderChunk.meshphong_vert} `, - fragmentShader: ` #define USE_UV #define SUBSURFACE @@ -1663,357 +1789,222 @@ const SubsurfaceScatteringShader = { vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; } - ` + meshphongFragBody.replace( - '#include ', - replaceAll( - three.ShaderChunk.lights_fragment_begin, - 'RE_Direct( directLight, geometry, material, reflectedLight );', - ` + ` + meshphongFragBody.replace("#include ", replaceAll(three.ShaderChunk.lights_fragment_begin, "RE_Direct( directLight, geometry, material, reflectedLight );", ` RE_Direct( directLight, geometry, material, reflectedLight ); #if defined( SUBSURFACE ) && defined( USE_UV ) RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); #endif - ` - ) - ), + `)) }; +const props$6 = { + color: {type: [String, Number], default: "#ffffff"}, + thicknessColor: {type: [String, Number], default: "#ffffff"}, + thicknessDistortion: {type: Number, default: 0.4}, + thicknessAmbient: {type: Number, default: 0.01}, + thicknessAttenuation: {type: Number, default: 0.7}, + thicknessPower: {type: Number, default: 2}, + thicknessScale: {type: Number, default: 4} +}; var SubSurfaceMaterial = vue.defineComponent({ - inject: ['three', 'mesh'], - props: { - color: { type: String, default: '#ffffff' }, - thicknessColor: { type: String, default: '#ffffff' }, - thicknessDistortion: { type: Number, default: 0.4 }, - thicknessAmbient: { type: Number, default: 0.01 }, - thicknessAttenuation: { type: Number, default: 0.7 }, - thicknessPower: { type: Number, default: 2 }, - thicknessScale: { type: Number, default: 4 }, - transparent: { type: Boolean, default: false }, - opacity: { type: Number, default: 1 }, - vertexColors: { type: Boolean, default: false }, - }, - created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - }, - unmounted() { - this.material.dispose(); - }, + extends: Material, + props: props$6, methods: { createMaterial() { const params = SubsurfaceScatteringShader; const uniforms = three.UniformsUtils.clone(params.uniforms); - - Object.entries(this.$props).forEach(([key, value]) => { + Object.keys(props$6).forEach((key) => { + const value = this[key]; let _key = key, _value = value; - if (['color', 'thicknessColor'].includes(key)) { - if (key === 'color') _key = 'diffuse'; + if (["color", "thicknessColor"].includes(key)) { + if (key === "color") + _key = "diffuse"; _value = new three.Color(value); } - if (!['transparent', 'vertexColors'].includes(key)) { - uniforms[_key].value = _value; - } + uniforms[_key].value = _value; }); - - this.material = new three.ShaderMaterial({ + const material = new three.ShaderMaterial({ ...params, uniforms, lights: true, transparent: this.transparent, - vertexColors: this.vertexColors, + vertexColors: this.vertexColors }); - }, + return material; + } }, - render() { - return []; - }, - __hmrId: 'SubSurfaceMaterial', + __hmrId: "SubSurfaceMaterial" }); var ToonMaterial = vue.defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new three.MeshToonMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new three.MeshToonMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'ToonMaterial', + __hmrId: "ToonMaterial" }); var Texture = vue.defineComponent({ - inject: ['material'], - emits: ['loaded'], + inject: { + material: MaterialInjectionKey + }, props: { - name: { type: String, default: 'map' }, - uniform: { type: String, default: null }, + name: {type: String, default: "map"}, + uniform: String, src: String, onLoad: Function, onProgress: Function, onError: Function, - mapping: { type: Number, default: three.UVMapping }, - wrapS: { type: Number, default: three.ClampToEdgeWrapping }, - wrapT: { type: Number, default: three.ClampToEdgeWrapping }, - magFilter: { type: Number, default: three.LinearFilter }, - minFilter: { type: Number, default: three.LinearMipmapLinearFilter }, - repeat: { type: Object, default: { x: 1, y: 1 } }, - rotation: { type: Number, default: 0 }, - center: { type: Object, default: { x: 0, y: 0 } }, + mapping: {type: Number, default: three.UVMapping}, + wrapS: {type: Number, default: three.ClampToEdgeWrapping}, + wrapT: {type: Number, default: three.ClampToEdgeWrapping}, + magFilter: {type: Number, default: three.LinearFilter}, + minFilter: {type: Number, default: three.LinearMipmapLinearFilter}, + repeat: {type: Object, default: () => ({x: 1, y: 1})}, + rotation: {type: Number, default: 0}, + center: {type: Object, default: () => ({x: 0, y: 0})} + }, + setup() { + return {}; }, created() { this.refreshTexture(); vue.watch(() => this.src, this.refreshTexture); }, unmounted() { - if (this.material && this.material.setTexture) this.material.setTexture(null, this.name); - this.texture.dispose(); + var _a, _b; + (_a = this.material) == null ? void 0 : _a.setTexture(null, this.name); + (_b = this.texture) == null ? void 0 : _b.dispose(); }, methods: { createTexture() { - this.texture = new three.TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center']; - wathProps.forEach(prop => { - bindProp(this, prop, this.texture); + if (!this.src) + return void 0; + const texture = new three.TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); + const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + wathProps.forEach((prop) => { + bindProp(this, prop, texture); }); + return texture; }, refreshTexture() { - this.createTexture(); - // handle standard material - if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); } - // handle shader material - else if (this.material && this.material.material.type === "ShaderMaterial") { - // require a `uniform` prop so we know what to call the uniform - if (!this.uniform) { - console.warn('"uniform" prop required to use texture in a shader.'); - return + this.texture = this.createTexture(); + if (this.texture && this.material) { + this.material.setTexture(this.texture, this.name); + if (this.material.material instanceof three.ShaderMaterial && this.uniform) { + this.material.uniforms[this.uniform] = {value: this.texture}; } - this.material.uniforms[this.uniform] = { value: this.texture }; } }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, - }, - render() { return []; }, -}); - -var CubeTexture = vue.defineComponent({ - inject: ['material'], - emits: ['loaded'], - props: { - path: String, - urls: { - type: Array, - default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'], - }, - onLoad: Function, - onProgress: Function, - onError: Function, - name: { type: String, default: 'envMap' }, - refraction: Boolean, - // todo: remove ? - refractionRatio: { type: Number, default: 0.98 }, - }, - created() { - this.refreshTexture(); - vue.watch(() => this.path, this.refreshTexture); - vue.watch(() => this.urls, this.refreshTexture); - }, - unmounted() { - this.material.setTexture(null, this.name); - this.texture.dispose(); - }, - methods: { - createTexture() { - this.texture = new three.CubeTextureLoader() - .setPath(this.path) - .load(this.urls, this.onLoaded, this.onProgress, this.onError); - }, - refreshTexture() { - this.createTexture(); - this.material.setTexture(this.texture, this.name); - if (this.refraction) { - this.texture.mapping = three.CubeRefractionMapping; - this.material.setProp('refractionRatio', this.refractionRatio); - } - }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, + onLoaded(t) { + var _a; + (_a = this.onLoad) == null ? void 0 : _a.call(this, t); + } }, render() { return []; - }, + } }); -const pointerProps = { - onPointerEnter: Function, - onPointerOver: Function, - onPointerMove: Function, - onPointerLeave: Function, - onPointerDown: Function, - onPointerUp: Function, - onClick: Function, -}; - -const Mesh = vue.defineComponent({ - name: 'Mesh', - extends: Object3D, +var CubeTexture = vue.defineComponent({ + extends: Texture, props: { - castShadow: Boolean, - receiveShadow: Boolean, - ...pointerProps, - }, - // can't use setup because it will not be used in sub components - // setup() {}, - provide() { - return { - mesh: this, - }; - }, - mounted() { - if (!this.mesh && !this.loading) this.initMesh(); - }, - methods: { - initMesh() { - this.mesh = new three.Mesh(this.geometry, this.material); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); - } - - this.initObject3D(this.mesh); + path: {type: String, required: true}, + urls: { + type: Array, + default: () => ["px.jpg", "nx.jpg", "py.jpg", "ny.jpg", "pz.jpg", "nz.jpg"] }, - addGeometryWatchers(props) { - Object.keys(props).forEach(prop => { - vue.watch(() => this[prop], () => { - this.refreshGeometry(); - }); - }); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - if (this.mesh) this.mesh.material = material; - }, - refreshGeometry() { - const oldGeo = this.geometry; - this.createGeometry(); - this.mesh.geometry = this.geometry; - oldGeo.dispose(); - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); - } - // for predefined mesh (geometry is not unmounted) - if (this.geometry) this.geometry.dispose(); - }, - __hmrId: 'Mesh', -}); - -function meshComponent(name, props, createGeometry) { - return vue.defineComponent({ - name, - extends: Mesh, - props, - created() { - this.createGeometry(); - this.addGeometryWatchers(props); - }, - methods: { - createGeometry() { - this.geometry = createGeometry(this); - }, - }, - __hmrId: name, - }); -} - -var Box = meshComponent('Box', props$h, createGeometry$f); - -var Circle = meshComponent('Circle', props$g, createGeometry$e); - -var Cone = meshComponent('Cone', props$f, createGeometry$d); - -var Cylinder = meshComponent('Cylinder', props$e, createGeometry$c); - -var Dodecahedron = meshComponent('Dodecahedron', props$d, createGeometry$b); - -var Icosahedron = meshComponent('Icosahedron', props$c, createGeometry$a); - -var Lathe = meshComponent('Lathe', props$b, createGeometry$9); - -var Octahedron = meshComponent('Octahedron', props$a, createGeometry$8); - -var Plane = meshComponent('Plane', props$9, createGeometry$7); - -var Polyhedron = meshComponent('Polyhedron', props$8, createGeometry$6); - -var Ring = meshComponent('Ring', props$7, createGeometry$5); - -var Sphere = meshComponent('Sphere', props$6, createGeometry$4); - -var Tetrahedron = meshComponent('Tetrahedron', props$5, createGeometry$3); - -const props = { - text: String, - fontSrc: String, - size: { type: Number, default: 80 }, - height: { type: Number, default: 5 }, - depth: { type: Number, default: 1 }, - curveSegments: { type: Number, default: 12 }, - bevelEnabled: { type: Boolean, default: false }, - bevelThickness: { type: Number, default: 10 }, - bevelSize: { type: Number, default: 8 }, - bevelOffset: { type: Number, default: 0 }, - bevelSegments: { type: Number, default: 5 }, - align: { type: [Boolean, String], default: false }, -}; - -var Text = vue.defineComponent({ - extends: Mesh, - props, - data() { - return { - loading: true, - }; + mapping: {type: Number, default: three.CubeReflectionMapping} }, created() { - // add watchers + vue.watch(() => this.path, this.refreshTexture); + vue.watch(() => this.urls, this.refreshTexture); + }, + methods: { + createTexture() { + return new three.CubeTextureLoader().setPath(this.path).load(this.urls, this.onLoaded, this.onProgress, this.onError); + } + } +}); + +var Box = meshComponent("Box", props$n, createGeometry$f); + +var Circle = meshComponent("Circle", props$m, createGeometry$e); + +var Cone = meshComponent("Cone", props$l, createGeometry$d); + +var Cylinder = meshComponent("Cylinder", props$k, createGeometry$c); + +var Dodecahedron = meshComponent("Dodecahedron", props$j, createGeometry$b); + +var Icosahedron = meshComponent("Icosahedron", props$i, createGeometry$a); + +var Lathe = meshComponent("Lathe", props$h, createGeometry$9); + +var Octahedron = meshComponent("Octahedron", props$g, createGeometry$8); + +var Plane = meshComponent("Plane", props$f, createGeometry$7); + +var Polyhedron = meshComponent("Polyhedron", props$e, createGeometry$6); + +var Ring = meshComponent("Ring", props$d, createGeometry$5); + +var Sphere = meshComponent("Sphere", props$c, createGeometry$4); + +var Tetrahedron = meshComponent("Tetrahedron", props$b, createGeometry$3); + +const props$5 = { + text: {type: String, required: true, default: "Text"}, + fontSrc: {type: String, required: true}, + size: {type: Number, default: 80}, + height: {type: Number, default: 5}, + depth: {type: Number, default: 1}, + curveSegments: {type: Number, default: 12}, + bevelEnabled: {type: Boolean, default: false}, + bevelThickness: {type: Number, default: 10}, + bevelSize: {type: Number, default: 8}, + bevelOffset: {type: Number, default: 0}, + bevelSegments: {type: Number, default: 5}, + align: {type: [Boolean, String], default: false} +}; +var Text = vue.defineComponent({ + extends: Mesh, + props: props$5, + setup() { + return {}; + }, + created() { + if (!this.fontSrc) { + console.error('Missing required prop: "font-src"'); + return; + } const watchProps = [ - 'text', 'size', 'height', 'curveSegments', - 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments', - 'align', + "text", + "size", + "height", + "curveSegments", + "bevelEnabled", + "bevelThickness", + "bevelSize", + "bevelOffset", + "bevelSegments", + "align" ]; - watchProps.forEach(p => { + watchProps.forEach((p) => { vue.watch(() => this[p], () => { - if (this.font) this.refreshGeometry(); + if (this.font) + this.refreshGeometry(); }); }); - const loader = new three.FontLoader(); + this.loading = true; loader.load(this.fontSrc, (font) => { this.loading = false; this.font = font; @@ -2033,88 +2024,93 @@ var Text = vue.defineComponent({ bevelThickness: this.bevelThickness, bevelSize: this.bevelSize, bevelOffset: this.bevelOffset, - bevelSegments: this.bevelSegments, + bevelSegments: this.bevelSegments }); - - if (this.align === 'center') { + if (this.align === "center") { this.geometry.center(); } - }, - }, + } + } }); -var Torus = meshComponent('Torus', props$4, createGeometry$2); +var Torus = meshComponent("Torus", props$a, createGeometry$2); -var TorusKnot = meshComponent('TorusKnot', props$3, createGeometry$1); +var TorusKnot = meshComponent("TorusKnot", props$9, createGeometry$1); var Tube = vue.defineComponent({ extends: Mesh, - props: props$2, + props: props$8, created() { this.createGeometry(); - this.addGeometryWatchers(props$2); + this.addGeometryWatchers(props$8); }, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update curve points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, + } }, - __hmrId: 'Tube', + __hmrId: "Tube" }); var Image = vue.defineComponent({ - emits: ['loaded'], + emits: ["loaded"], extends: Mesh, props: { - src: String, + src: {type: String, required: true}, width: Number, height: Number, - keepSize: Boolean, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + keepSize: Boolean + }, + setup() { + return {}; }, created() { - this.createGeometry(); - this.createMaterial(); - this.initMesh(); - + if (!this.renderer) + return; + this.geometry = new three.PlaneGeometry(1, 1, this.widthSegments, this.heightSegments); + this.material = new three.MeshBasicMaterial({side: three.DoubleSide, map: this.loadTexture()}); vue.watch(() => this.src, this.refreshTexture); - - ['width', 'height'].forEach(p => { + ["width", "height"].forEach((p) => { vue.watch(() => this[p], this.resize); }); - - if (this.keepSize) this.three.onAfterResize(this.resize); + this.resize(); + if (this.keepSize) + this.renderer.onResize(this.resize); + }, + unmounted() { + var _a; + (_a = this.renderer) == null ? void 0 : _a.offResize(this.resize); }, methods: { - createGeometry() { - this.geometry = new three.PlaneGeometry(1, 1, 1, 1); - }, - createMaterial() { - this.material = new three.MeshBasicMaterial({ side: three.DoubleSide, map: this.loadTexture() }); - }, loadTexture() { return new three.TextureLoader().load(this.src, this.onLoaded); }, refreshTexture() { - if (this.texture) this.texture.dispose(); - this.material.map = this.loadTexture(); - this.material.needsUpdate = true; + var _a; + (_a = this.texture) == null ? void 0 : _a.dispose(); + if (this.material) { + this.material.map = this.loadTexture(); + this.material.needsUpdate = true; + } }, onLoaded(texture) { this.texture = texture; this.resize(); - this.$emit('loaded'); + this.$emit("loaded", texture); }, resize() { - if (!this.texture) return; - const screen = this.three.size; + if (!this.renderer || !this.texture) + return; + const screen = this.renderer.size; const iW = this.texture.image.width; const iH = this.texture.image.height; const iRatio = iW / iH; - let w, h; + let w = 1, h = 1; if (this.width && this.height) { w = this.width * screen.wWidth / screen.width; h = this.height * screen.wHeight / screen.height; @@ -2124,395 +2120,398 @@ var Image = vue.defineComponent({ } else if (this.height) { h = this.height * screen.wHeight / screen.height; w = h * iRatio; + } else { + if (iRatio > 1) + w = h * iRatio; + else + h = w / iRatio; } - this.mesh.scale.x = w; - this.mesh.scale.y = h; - }, + if (this.mesh) { + this.mesh.scale.x = w; + this.mesh.scale.y = h; + } + } }, - __hmrId: 'Image', + __hmrId: "Image" }); var InstancedMesh = vue.defineComponent({ - extends: Object3D, + extends: Mesh, props: { - castShadow: Boolean, - receiveShadow: Boolean, - count: Number, - ...pointerProps, - }, - provide() { - return { - mesh: this, - }; - }, - beforeMount() { - if (!this.$slots.default) { - console.error('Missing Geometry'); - } - }, - mounted() { - this.initMesh(); + count: {type: Number, required: true} }, methods: { initMesh() { - this.mesh = new three.InstancedMesh(this.geometry, this.material, this.count); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); + if (!this.renderer) + return; + if (!this.geometry || !this.material) { + console.error("Missing geometry and/or material"); + return false; + } + this.mesh = new three.InstancedMesh(this.geometry, this.material, this.count); + this.mesh.userData.component = this; + bindProp(this, "castShadow", this.mesh); + bindProp(this, "receiveShadow", this.mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + this.renderer.three.addIntersectObject(this.mesh); } - this.initObject3D(this.mesh); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - this.material.instancingColor = true; - if (this.mesh) this.mesh.material = material; - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); } }, - __hmrId: 'InstancedMesh', + __hmrId: "InstancedMesh" }); var Sprite = vue.defineComponent({ extends: Object3D, - emits: ['loaded'], + emits: ["loaded"], props: { - src: String, + src: {type: String, required: true} }, - data() { - return { - loading: true, - }; + setup() { + return {}; }, created() { this.texture = new three.TextureLoader().load(this.src, this.onLoaded); - this.material = new three.SpriteMaterial({ map: this.texture }); + this.material = new three.SpriteMaterial({map: this.texture}); this.sprite = new three.Sprite(this.material); - this.geometry = this.sprite.geometry; this.initObject3D(this.sprite); }, unmounted() { - this.texture.dispose(); - this.material.dispose(); + var _a, _b; + (_a = this.texture) == null ? void 0 : _a.dispose(); + (_b = this.material) == null ? void 0 : _b.dispose(); }, methods: { onLoaded() { - this.loading = false; this.updateUV(); - this.$emit('loaded'); + this.$emit("loaded"); }, updateUV() { - this.iWidth = this.texture.image.width; - this.iHeight = this.texture.image.height; - this.iRatio = this.iWidth / this.iHeight; - + if (!this.texture || !this.sprite) + return; + const iWidth = this.texture.image.width; + const iHeight = this.texture.image.height; + const iRatio = iWidth / iHeight; let x = 0.5, y = 0.5; - if (this.iRatio > 1) { - y = 0.5 / this.iRatio; + if (iRatio > 1) { + x = 0.5 * iRatio; } else { - x = 0.5 / this.iRatio; + y = 0.5 / iRatio; } - - const positions = this.geometry.attributes.position.array; - positions[0] = -x; positions[1] = -y; - positions[5] = x; positions[6] = -y; - positions[10] = x; positions[11] = y; - positions[15] = -x; positions[16] = y; - this.geometry.attributes.position.needsUpdate = true; - }, + const positions = this.sprite.geometry.attributes.position.array; + positions[0] = -x; + positions[1] = -y; + positions[5] = x; + positions[6] = -y; + positions[10] = x; + positions[11] = y; + positions[15] = -x; + positions[16] = y; + this.sprite.geometry.attributes.position.needsUpdate = true; + } }, - __hmrId: 'Sprite', + __hmrId: "Sprite" }); var Model = vue.defineComponent({ extends: Object3D, - emits: ['load', 'progress', 'error'], + emits: ["load", "progress", "error"], + props: { + src: {type: String, required: true} + }, data() { return { - progress: 0, + progress: 0 }; }, methods: { onLoad(model) { - this.$emit('load', model); + this.$emit("load", model); this.initObject3D(model); }, onProgress(progress) { this.progress = progress.loaded / progress.total; - this.$emit('progress', progress); + this.$emit("progress", progress); }, onError(error) { - this.$emit('error', error); - }, - }, + this.$emit("error", error); + } + } }); var GLTF = vue.defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new GLTFLoader_js.GLTFLoader(); loader.load(this.src, (gltf) => { this.onLoad(gltf.scene); }, this.onProgress, this.onError); - }, + } }); var FBX = vue.defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new FBXLoader_js.FBXLoader(); loader.load(this.src, (fbx) => { this.onLoad(fbx); }, this.onProgress, this.onError); - }, + } }); +const ComposerInjectionKey = Symbol("Composer"); var EffectComposer = vue.defineComponent({ setup() { - return { - passes: [], - }; + const renderer = vue.inject(RendererInjectionKey); + return {renderer}; }, - inject: ['three'], provide() { return { - passes: this.passes, + [ComposerInjectionKey]: this }; }, - mounted() { - this.three.onAfterInit(() => { - this.composer = new EffectComposer_js.EffectComposer(this.three.renderer); - this.three.renderer.autoClear = false; - this.passes.forEach(pass => { - this.composer.addPass(pass); - }); - this.three.composer = this.composer; - + created() { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + const composer = new EffectComposer_js.EffectComposer(this.renderer.renderer); + this.composer = composer; + this.renderer.composer = composer; + renderer.addListener("init", () => { + renderer.renderer.autoClear = false; this.resize(); - this.three.onAfterResize(this.resize); + renderer.addListener("resize", this.resize); }); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - this.composer.setSize(this.three.size.width, this.three.size.height); + addPass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.addPass(pass); }, + removePass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.removePass(pass); + }, + resize() { + if (this.composer && this.renderer) { + this.composer.setSize(this.renderer.size.width, this.renderer.size.height); + } + } }, render() { - return this.$slots.default(); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'EffectComposer', + __hmrId: "EffectComposer" }); var EffectPass = vue.defineComponent({ - inject: ['three', 'passes'], - emits: ['ready'], - beforeMount() { - if (!this.passes) { - console.error('Missing parent EffectComposer'); + inject: { + renderer: RendererInjectionKey, + composer: ComposerInjectionKey + }, + emits: ["ready"], + setup() { + return {}; + }, + created() { + if (!this.composer) { + console.error("Missing parent EffectComposer"); + } + if (!this.renderer) { + console.error("Missing parent Renderer"); } }, unmounted() { - if (this.pass.dispose) this.pass.dispose(); + var _a, _b, _c; + if (this.pass) { + (_a = this.composer) == null ? void 0 : _a.removePass(this.pass); + (_c = (_b = this.pass).dispose) == null ? void 0 : _c.call(_b); + } }, methods: { - completePass(pass) { - this.passes.push(pass); + initEffectPass(pass) { + var _a; this.pass = pass; - this.$emit('ready', pass); - }, + (_a = this.composer) == null ? void 0 : _a.addPass(pass); + this.$emit("ready", pass); + } }, render() { return []; }, - __hmrId: 'EffectPass', + __hmrId: "EffectPass" }); var RenderPass = vue.defineComponent({ extends: EffectPass, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } - const pass = new RenderPass_js.RenderPass(this.three.scene, this.three.camera); - this.completePass(pass); + const pass = new RenderPass_js.RenderPass(this.renderer.scene, this.renderer.camera); + this.initEffectPass(pass); }, - __hmrId: 'RenderPass', + __hmrId: "RenderPass" }); +const props$4 = { + focus: {type: Number, default: 1}, + aperture: {type: Number, default: 0.025}, + maxblur: {type: Number, default: 0.01} +}; var BokehPass = vue.defineComponent({ extends: EffectPass, - props: { - focus: { - type: Number, - default: 1, - }, - aperture: { - type: Number, - default: 0.025, - }, - maxblur: { - type: Number, - default: 0.01, - }, - }, - watch: { - focus() { this.pass.uniforms.focus.value = this.focus; }, - aperture() { this.pass.uniforms.aperture.value = this.aperture; }, - maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; }, - }, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + props: props$4, + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } const params = { focus: this.focus, aperture: this.aperture, maxblur: this.maxblur, - width: this.three.size.width, - height: this.three.size.height, + width: this.renderer.size.width, + height: this.renderer.size.height }; - const pass = new BokehPass_js.BokehPass(this.three.scene, this.three.camera, params); - this.completePass(pass); + const pass = new BokehPass_js.BokehPass(this.renderer.scene, this.renderer.camera, params); + Object.keys(props$4).forEach((p) => { + vue.watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'BokehPass', + __hmrId: "BokehPass" }); +const props$3 = { + noiseIntensity: {type: Number, default: 0.5}, + scanlinesIntensity: {type: Number, default: 0.05}, + scanlinesCount: {type: Number, default: 4096}, + grayscale: {type: Number, default: 0} +}; var FilmPass = vue.defineComponent({ extends: EffectPass, - props: { - noiseIntensity: { type: Number, default: 0.5 }, - scanlinesIntensity: { type: Number, default: 0.05 }, - scanlinesCount: { type: Number, default: 4096 }, - grayscale: { type: Number, default: 0 }, - }, - watch: { - noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; }, - scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; }, - scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; }, - grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; }, - }, - mounted() { + props: props$3, + created() { const pass = new FilmPass_js.FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale); - this.completePass(pass); + Object.keys(props$3).forEach((p) => { + vue.watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'FilmPass', + __hmrId: "FilmPass" }); var FXAAPass = vue.defineComponent({ extends: EffectPass, - mounted() { + created() { + var _a; const pass = new ShaderPass_js.ShaderPass(FXAAShader_js.FXAAShader); - this.completePass(pass); - - // resize will be called in three init - this.three.onAfterResize(this.resize); + (_a = this.renderer) == null ? void 0 : _a.addListener("resize", this.resize); + this.initEffectPass(pass); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - const { resolution } = this.pass.material.uniforms; - resolution.value.x = 1 / this.three.size.width; - resolution.value.y = 1 / this.three.size.height; - }, + resize({size}) { + if (this.pass) { + const {resolution} = this.pass.material.uniforms; + resolution.value.x = 1 / size.width; + resolution.value.y = 1 / size.height; + } + } }, - __hmrId: 'FXAAPass', + __hmrId: "FXAAPass" }); +const props$2 = { + shape: {type: Number, default: 1}, + radius: {type: Number, default: 4}, + rotateR: {type: Number, default: Math.PI / 12 * 1}, + rotateG: {type: Number, default: Math.PI / 12 * 2}, + rotateB: {type: Number, default: Math.PI / 12 * 3}, + scatter: {type: Number, default: 0} +}; var HalftonePass = vue.defineComponent({ extends: EffectPass, - props: { - shape: { type: Number, default: 1 }, - radius: { type: Number, default: 4 }, - rotateR: { type: Number, default: Math.PI / 12 * 1 }, - rotateG: { type: Number, default: Math.PI / 12 * 2 }, - rotateB: { type: Number, default: Math.PI / 12 * 3 }, - scatter: { type: Number, default: 0 }, - }, - mounted() { - const pass = new HalftonePass_js.HalftonePass(this.three.size.width, this.three.size.height, {}); - - ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => { + props: props$2, + created() { + if (!this.renderer) + return; + const pass = new HalftonePass_js.HalftonePass(this.renderer.size.width, this.renderer.size.height, {}); + Object.keys(props$2).forEach((p) => { pass.uniforms[p].value = this[p]; - vue.watch(() => this[p], () => { - pass.uniforms[p].value = this[p]; + vue.watch(() => this[p], (value) => { + pass.uniforms[p].value = value; }); }); - - this.completePass(pass); + this.initEffectPass(pass); }, - __hmrId: 'HalftonePass', + __hmrId: "HalftonePass" }); var SMAAPass = vue.defineComponent({ extends: EffectPass, - mounted() { - // three size is not set yet, but this pass will be resized by effect composer - const pass = new SMAAPass_js.SMAAPass(this.three.size.width, this.three.size.height); - this.completePass(pass); + created() { + if (!this.renderer) + return; + const pass = new SMAAPass_js.SMAAPass(this.renderer.size.width, this.renderer.size.height); + this.initEffectPass(pass); }, - __hmrId: 'SMAAPass', + __hmrId: "SMAAPass" }); var SSAOPass = vue.defineComponent({ extends: EffectPass, props: { - scene: null, - camera: null, options: { type: Object, - default: () => ({}), - }, - }, - mounted() { - const pass = new SSAOPass_js.SSAOPass( - this.scene || this.three.scene, - this.camera || this.three.camera, - this.three.size.width, - this.three.size.height - ); - - for (const key of Object.keys(this.options)) { - pass[key] = this.options[key]; + default: () => ({}) } - - this.completePass(pass); }, - __hmrId: 'SSAOPass', + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; + } + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; + } + const pass = new SSAOPass_js.SSAOPass(this.renderer.scene, this.renderer.camera, this.renderer.size.width, this.renderer.size.height); + Object.keys(this.options).forEach((key) => { + pass[key] = this.options[key]; + }); + this.initEffectPass(pass); + }, + __hmrId: "SSAOPass" }); var DefaultShader = { @@ -2529,20 +2528,18 @@ var DefaultShader = { void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } - `, + ` }; -// From https://github.com/evanw/glfx.js - var TiltShift = { uniforms: { - tDiffuse: { value: null }, - blurRadius: { value: 0 }, - gradientRadius: { value: 0 }, - start: { value: new three.Vector2() }, - end: { value: new three.Vector2() }, - delta: { value: new three.Vector2() }, - texSize: { value: new three.Vector2() }, + tDiffuse: {value: null}, + blurRadius: {value: 0}, + gradientRadius: {value: 0}, + start: {value: new three.Vector2()}, + end: {value: new three.Vector2()}, + delta: {value: new three.Vector2()}, + texSize: {value: new three.Vector2()} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2588,87 +2585,89 @@ var TiltShift = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; +const props$1 = { + blurRadius: {type: Number, default: 10}, + gradientRadius: {type: Number, default: 100}, + start: {type: Object, default: () => ({x: 0, y: 100})}, + end: {type: Object, default: () => ({x: 10, y: 100})} +}; var TiltShiftPass = vue.defineComponent({ extends: EffectPass, - props: { - blurRadius: { type: Number, default: 10 }, - gradientRadius: { type: Number, default: 100 }, - start: { type: Object, default: { x: 0, y: 100 } }, - end: { type: Object, default: { x: 10, y: 100 } }, + props: props$1, + setup() { + return {uniforms1: {}, uniforms2: {}}; }, - mounted() { - this.pass = new ShaderPass_js.ShaderPass(TiltShift); - this.passes.push(this.pass); - + created() { + if (!this.composer) + return; this.pass1 = new ShaderPass_js.ShaderPass(TiltShift); - this.passes.push(this.pass1); - - const uniforms = this.uniforms = this.pass.uniforms; + this.pass2 = new ShaderPass_js.ShaderPass(TiltShift); const uniforms1 = this.uniforms1 = this.pass1.uniforms; - uniforms1.blurRadius = uniforms.blurRadius; - uniforms1.gradientRadius = uniforms.gradientRadius; - uniforms1.start = uniforms.start; - uniforms1.end = uniforms.end; - uniforms1.texSize = uniforms.texSize; - - bindProp(this, 'blurRadius', uniforms.blurRadius, 'value'); - bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value'); - + const uniforms2 = this.uniforms2 = this.pass2.uniforms; + uniforms2.blurRadius = uniforms1.blurRadius; + uniforms2.gradientRadius = uniforms1.gradientRadius; + uniforms2.start = uniforms1.start; + uniforms2.end = uniforms1.end; + uniforms2.texSize = uniforms1.texSize; + bindProp(this, "blurRadius", uniforms1.blurRadius, "value"); + bindProp(this, "gradientRadius", uniforms1.gradientRadius, "value"); this.updateFocusLine(); - ['start', 'end'].forEach(p => { - vue.watch(() => this[p], this.updateFocusLine, { deep: true }); + ["start", "end"].forEach((p) => { + vue.watch(() => this[p], this.updateFocusLine, {deep: true}); }); - - this.pass.setSize = (width, height) => { - uniforms.texSize.value.set(width, height); + this.pass1.setSize = (width, height) => { + uniforms1.texSize.value.set(width, height); }; - - // emit ready event with two passes - do so manually in this file instead - // of calling `completePass` like in other effect types - this.$emit('ready', [this.pass, this.pass1]); + this.initEffectPass(this.pass1); + this.composer.addPass(this.pass2); + }, + unmounted() { + if (this.composer && this.pass2) + this.composer.removePass(this.pass2); }, methods: { updateFocusLine() { - this.uniforms.start.value.copy(this.start); - this.uniforms.end.value.copy(this.end); + this.uniforms1.start.value.copy(this.start); + this.uniforms1.end.value.copy(this.end); const dv = new three.Vector2().copy(this.end).sub(this.start).normalize(); - this.uniforms.delta.value.copy(dv); - this.uniforms1.delta.value.set(-dv.y, dv.x); - }, + this.uniforms1.delta.value.copy(dv); + this.uniforms2.delta.value.set(-dv.y, dv.x); + } }, - __hmrId: 'TiltShiftPass', + __hmrId: "TiltShiftPass" }); +const props = { + strength: {type: Number, default: 1.5}, + radius: {type: Number, default: 0}, + threshold: {type: Number, default: 0} +}; var UnrealBloomPass = vue.defineComponent({ extends: EffectPass, - props: { - strength: { type: Number, default: 1.5 }, - radius: { type: Number, default: 0 }, - threshold: { type: Number, default: 0 }, - }, - watch: { - strength() { this.pass.strength = this.strength; }, - radius() { this.pass.radius = this.radius; }, - threshold() { this.pass.threshold = this.threshold; }, - }, - mounted() { - const size = new three.Vector2(this.three.size.width, this.three.size.height); + props, + created() { + if (!this.renderer) + return; + const size = new three.Vector2(this.renderer.size.width, this.renderer.size.height); const pass = new UnrealBloomPass_js.UnrealBloomPass(size, this.strength, this.radius, this.threshold); - this.completePass(pass); + Object.keys(props).forEach((p) => { + vue.watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'UnrealBloomPass', + __hmrId: "UnrealBloomPass" }); -// From https://github.com/evanw/glfx.js - var ZoomBlur = { uniforms: { - tDiffuse: { value: null }, - center: { value: new three.Vector2(0.5, 0.5) }, - strength: { value: 0 }, + tDiffuse: {value: null}, + center: {value: new three.Vector2(0.5, 0.5)}, + strength: {value: 0} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2707,37 +2706,37 @@ var ZoomBlur = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; var ZoomBlurPass = vue.defineComponent({ extends: EffectPass, props: { - center: { type: Object, default: { x: 0.5, y: 0.5 } }, - strength: { type: Number, default: 0.5 }, + center: {type: Object, default: () => ({x: 0.5, y: 0.5})}, + strength: {type: Number, default: 0.5} }, - mounted() { + created() { const pass = new ShaderPass_js.ShaderPass(ZoomBlur); - - const uniforms = this.uniforms = pass.uniforms; - bindProp(this, 'center', uniforms.center, 'value'); - bindProp(this, 'strength', uniforms.strength, 'value'); - - this.completePass(pass); + bindProp(this, "center", pass.uniforms.center, "value"); + bindProp(this, "strength", pass.uniforms.strength, "value"); + this.initEffectPass(pass); }, - __hmrId: 'ZoomBlurPass', + __hmrId: "ZoomBlurPass" }); var TROIS = /*#__PURE__*/Object.freeze({ __proto__: null, Renderer: Renderer, + RendererInjectionKey: RendererInjectionKey, OrthographicCamera: OrthographicCamera, PerspectiveCamera: PerspectiveCamera, Camera: PerspectiveCamera, Group: Group, Scene: Scene, + SceneInjectionKey: SceneInjectionKey, Object3D: Object3D, Raycaster: Raycaster, + CubeCamera: CubeCamera, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2760,6 +2759,8 @@ var TROIS = /*#__PURE__*/Object.freeze({ PointLight: PointLight, RectAreaLight: RectAreaLight, SpotLight: SpotLight, + Material: Material, + MaterialInjectionKey: MaterialInjectionKey, BasicMaterial: BasicMaterial, LambertMaterial: LambertMaterial, MatcapMaterial: MatcapMaterial, @@ -2772,6 +2773,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Texture: Texture, CubeTexture: CubeTexture, Mesh: Mesh, + MeshInjectionKey: MeshInjectionKey, Box: Box, Circle: Circle, Cone: Cone, @@ -2795,6 +2797,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, + ComposerInjectionKey: ComposerInjectionKey, RenderPass: RenderPass, BokehPass: BokehPass, FilmPass: FilmPass, @@ -2810,96 +2813,129 @@ var TROIS = /*#__PURE__*/Object.freeze({ bindProp: bindProp, propsValues: propsValues, lerp: lerp, - lerpv2: lerpv2, - lerpv3: lerpv3, limit: limit, getMatcapUrl: getMatcapUrl }); const TroisJSVuePlugin = { - install: (app) => { + install(app) { const comps = [ - 'Camera', - 'OrthographicCamera', - 'PerspectiveCamera', - 'Raycaster', - 'Renderer', - 'Scene', - 'Group', - - 'AmbientLight', - 'DirectionalLight', - 'HemisphereLight', - 'PointLight', - 'RectAreaLight', - 'SpotLight', - - 'BasicMaterial', - 'LambertMaterial', - 'MatcapMaterial', - 'PhongMaterial', - 'PhysicalMaterial', - 'ShaderMaterial', - 'StandardMaterial', - 'SubSurfaceMaterial', - 'ToonMaterial', - - 'Texture', - 'CubeTexture', - - 'Mesh', - - 'Box', 'BoxGeometry', - 'Circle', 'CircleGeometry', - 'Cone', 'ConeGeometry', - 'Cylinder', 'CylinderGeometry', - 'Dodecahedron', 'DodecahedronGeometry', - 'Icosahedron', 'IcosahedronGeometry', - 'Lathe', 'LatheGeometry', - 'Octahedron', 'OctahedronGeometry', - 'Plane', 'PlaneGeometry', - 'Polyhedron', 'PolyhedronGeometry', - 'Ring', 'RingGeometry', - 'Sphere', 'SphereGeometry', - 'Tetrahedron', 'TetrahedronGeometry', - 'Text', - 'Torus', 'TorusGeometry', - 'TorusKnot', 'TorusKnotGeometry', - 'Tube', 'TubeGeometry', - - 'Image', - 'InstancedMesh', - 'Sprite', - - 'FBXModel', - 'GLTFModel', - - 'BokehPass', - 'EffectComposer', - 'FilmPass', - 'FXAAPass', - 'HalftonePass', - 'RenderPass', - 'SAOPass', - 'SMAAPass', - 'SSAOPass', - 'TiltShiftPass', - 'UnrealBloomPass', - 'ZoomBlurPass', - - 'GLTFViewer', + "Camera", + "OrthographicCamera", + "PerspectiveCamera", + "Raycaster", + "Renderer", + "Scene", + "Group", + "AmbientLight", + "DirectionalLight", + "HemisphereLight", + "PointLight", + "RectAreaLight", + "SpotLight", + "BasicMaterial", + "LambertMaterial", + "MatcapMaterial", + "PhongMaterial", + "PhysicalMaterial", + "ShaderMaterial", + "StandardMaterial", + "SubSurfaceMaterial", + "ToonMaterial", + "Texture", + "CubeTexture", + "Mesh", + "Box", + "BoxGeometry", + "Circle", + "CircleGeometry", + "Cone", + "ConeGeometry", + "Cylinder", + "CylinderGeometry", + "Dodecahedron", + "DodecahedronGeometry", + "Icosahedron", + "IcosahedronGeometry", + "Lathe", + "LatheGeometry", + "Octahedron", + "OctahedronGeometry", + "Plane", + "PlaneGeometry", + "Polyhedron", + "PolyhedronGeometry", + "Ring", + "RingGeometry", + "Sphere", + "SphereGeometry", + "Tetrahedron", + "TetrahedronGeometry", + "Text", + "Torus", + "TorusGeometry", + "TorusKnot", + "TorusKnotGeometry", + "Tube", + "TubeGeometry", + "Image", + "InstancedMesh", + "Sprite", + "FBXModel", + "GLTFModel", + "BokehPass", + "EffectComposer", + "FilmPass", + "FXAAPass", + "HalftonePass", + "RenderPass", + "SAOPass", + "SMAAPass", + "SSAOPass", + "TiltShiftPass", + "UnrealBloomPass", + "ZoomBlurPass", + "GLTFViewer" ]; - - comps.forEach(comp => { + comps.forEach((comp) => { app.component(comp, TROIS[comp]); }); - }, + } }; - function createApp(params) { return vue.createApp(params).use(TroisJSVuePlugin); } +function useTextures() { + const obj = { + loader: new three.TextureLoader(), + count: 0, + textures: [], + loadProgress: 0, + loadTextures, + dispose + }; + return obj; + function loadTextures(images, cb) { + obj.count = images.length; + obj.textures.splice(0); + obj.loadProgress = 0; + Promise.all(images.map(loadTexture)).then(cb); + } + function loadTexture(img, index) { + return new Promise((resolve) => { + obj.loader.load(img.src, (texture) => { + obj.loadProgress += 1 / obj.count; + obj.textures[index] = texture; + resolve(texture); + }); + }); + } + function dispose() { + obj.textures.forEach((t) => t.dispose()); + } +} + exports.AmbientLight = AmbientLight; exports.BasicMaterial = BasicMaterial; exports.BokehPass = BokehPass; @@ -2908,8 +2944,10 @@ exports.BoxGeometry = BoxGeometry; exports.Camera = PerspectiveCamera; exports.Circle = Circle; exports.CircleGeometry = CircleGeometry; +exports.ComposerInjectionKey = ComposerInjectionKey; exports.Cone = Cone; exports.ConeGeometry = ConeGeometry; +exports.CubeCamera = CubeCamera; exports.CubeTexture = CubeTexture; exports.Cylinder = Cylinder; exports.CylinderGeometry = CylinderGeometry; @@ -2932,7 +2970,10 @@ exports.LambertMaterial = LambertMaterial; exports.Lathe = Lathe; exports.LatheGeometry = LatheGeometry; exports.MatcapMaterial = MatcapMaterial; +exports.Material = Material; +exports.MaterialInjectionKey = MaterialInjectionKey; exports.Mesh = Mesh; +exports.MeshInjectionKey = MeshInjectionKey; exports.Object3D = Object3D; exports.Octahedron = Octahedron; exports.OctahedronGeometry = OctahedronGeometry; @@ -2949,11 +2990,13 @@ exports.Raycaster = Raycaster; exports.RectAreaLight = RectAreaLight; exports.RenderPass = RenderPass; exports.Renderer = Renderer; +exports.RendererInjectionKey = RendererInjectionKey; exports.Ring = Ring; exports.RingGeometry = RingGeometry; exports.SMAAPass = SMAAPass; exports.SSAOPass = SSAOPass; exports.Scene = Scene; +exports.SceneInjectionKey = SceneInjectionKey; exports.ShaderMaterial = ShaderMaterial; exports.Sphere = Sphere; exports.SphereGeometry = SphereGeometry; @@ -2981,8 +3024,8 @@ exports.bindProps = bindProps; exports.createApp = createApp; exports.getMatcapUrl = getMatcapUrl; exports.lerp = lerp; -exports.lerpv2 = lerpv2; -exports.lerpv3 = lerpv3; exports.limit = limit; exports.propsValues = propsValues; exports.setFromProp = setFromProp; +exports.useTextures = useTextures; +//# sourceMappingURL=trois.js.map diff --git a/build/trois.js.map b/build/trois.js.map new file mode 100644 index 0000000..31d1804 --- /dev/null +++ b/build/trois.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trois.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { Camera, Intersection, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.copy(resetPosition)\n positionV3.copy(resetPositionV3)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: IntersectObject): void\n removeIntersectObject(o: IntersectObject): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: IntersectObject[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: IntersectObject) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: IntersectObject) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): void\n raf: boolean\n\n // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener(t: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n const config: ThreeConfigInterface = {\n canvas,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n // if (this.three.pointer) {\n // this.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\n // }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn()\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, PropType, watch } from 'vue'\nimport { bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (this.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: this.getIntersectObjects(),\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n },\r\n setup(props) {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => { cubeCamera.update(renderer, scene) }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera }\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport const MeshInjectionKey: InjectionKey = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {},\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { defineComponent, InjectionKey, watch } from 'vue'\nimport { FrontSide, Material, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material from './Material'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\n },\n __hmrId: 'ShaderMaterial',\n})\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, default: () => ({ x: 0, y: 0 }) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n path: { type: String, required: true },\n urls: {\n type: Array as PropType,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: CubeReflectionMapping },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Font, FontLoader, TextGeometry } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n this.initObject3D(model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["Vector3","Raycaster","Plane","Vector2","InstancedMesh","WebGLRenderer","OrbitControls","defineComponent","toRef","inject","OrthographicCamera","PerspectiveCamera","Scene","Color","Texture","Group","WebGLCubeRenderTarget","RGBFormat","LinearMipmapLinearFilter","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","Curve","CatmullRomCurve3","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","RectAreaLightHelper","FrontSide","MeshBasicMaterial","MeshLambertMaterial","TextureLoader","MeshMatcapMaterial","MeshPhongMaterial","MeshStandardMaterial","MeshPhysicalMaterial","ShaderMaterial","ShaderChunk","UniformsUtils","ShaderLib","MeshToonMaterial","UVMapping","ClampToEdgeWrapping","LinearFilter","CubeReflectionMapping","CubeTextureLoader","FontLoader","TextGeometry","DoubleSide","SpriteMaterial","Sprite","GLTFLoader","FBXLoader","EffectComposer","RenderPass","BokehPass","FilmPass","ShaderPass","FXAAShader","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAIA,cAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIC;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,YAAM,IAAIF,cAAQ,GAAG,GAAG,IAAI;AAE9C,Q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,OAAK,EAAE;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/build/trois.module.cdn.js b/build/trois.module.cdn.js index dc87711..70e4268 100644 --- a/build/trois.module.cdn.js +++ b/build/trois.module.cdn.js @@ -1,5 +1,5 @@ -import { defineComponent, h, toRef, watch, createApp as createApp$1 } from 'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js'; -import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Group as Group$1, Scene as Scene$1, Color, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, AmbientLight as AmbientLight$1, DirectionalLight as DirectionalLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, SpotLight as SpotLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, CubeTextureLoader, CubeRefractionMapping, Mesh as Mesh$1, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'https://unpkg.com/three@0.127.0/build/three.module.js'; +import { defineComponent, toRef, watch, inject, provide, onUnmounted, createApp as createApp$1 } from 'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js'; +import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'https://unpkg.com/three@0.127.0/build/three.module.js'; import { OrbitControls } from 'https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js'; import { RectAreaLightUniformsLib } from 'https://unpkg.com/three@0.127.0/examples/jsm/lights/RectAreaLightUniformsLib.js'; import { RectAreaLightHelper } from 'https://unpkg.com/three@0.127.0/examples/jsm/helpers/RectAreaLightHelper.js'; @@ -19,28 +19,24 @@ import { UnrealBloomPass as UnrealBloomPass$1 } from 'https://unpkg.com/three@0. function useRaycaster(options) { const { camera, - resetPosition = new Vector3(0, 0, 0), + resetPosition = new Vector3(0, 0, 0) } = options; - const raycaster = new Raycaster$1(); const position = resetPosition.clone(); const plane = new Plane$1(new Vector3(0, 0, 1), 0); - const updatePosition = (coords) => { raycaster.setFromCamera(coords, camera); camera.getWorldDirection(plane.normal); raycaster.ray.intersectPlane(plane, position); }; - const intersect = (coords, objects) => { raycaster.setFromCamera(coords, camera); return raycaster.intersectObjects(objects); }; - return { position, updatePosition, - intersect, + intersect }; } @@ -53,22 +49,29 @@ function usePointer(options) { resetOnEnd = false, resetPosition = new Vector2(0, 0), resetPositionV3 = new Vector3(0, 0, 0), - onEnter = () => {}, - onMove = () => {}, - onLeave = () => {}, - onIntersectEnter = () => {}, - onIntersectOver = () => {}, - onIntersectMove = () => {}, - onIntersectLeave = () => {}, - onIntersectClick = () => {}, + onEnter = () => { + }, + onMove = () => { + }, + onLeave = () => { + }, + onClick = () => { + }, + onIntersectEnter = () => { + }, + onIntersectOver = () => { + }, + onIntersectMove = () => { + }, + onIntersectLeave = () => { + }, + onIntersectClick = () => { + } } = options; - const position = resetPosition.clone(); const positionN = new Vector2(0, 0); - - const raycaster = useRaycaster({ camera }); + const raycaster = useRaycaster({camera}); const positionV3 = raycaster.position; - const obj = { position, positionN, @@ -77,29 +80,26 @@ function usePointer(options) { listeners: false, addListeners, removeListeners, - intersect, + intersect }; - return obj; - function reset() { position.copy(resetPosition); positionV3.copy(resetPositionV3); } function updatePosition(event) { let x, y; - if (event.touches && event.touches.length > 0) { + if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { x = event.clientX; y = event.clientY; } - const rect = domElement.getBoundingClientRect(); position.x = x - rect.left; position.y = y - rect.top; - positionN.x = (position.x / rect.width) * 2 - 1; + positionN.x = position.x / rect.width * 2 - 1; positionN.y = -(position.y / rect.height) * 2 + 1; raycaster.updatePosition(positionN); } @@ -108,55 +108,51 @@ function usePointer(options) { const intersects = raycaster.intersect(positionN, intersectObjects); const offObjects = [...intersectObjects]; const iMeshes = []; - - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a, _b, _c; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof InstancedMesh$1) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - if (!object.over) { - object.over = true; - const overEvent = { type: 'pointerover', over: true, component, intersect }; - const enterEvent = { ...overEvent, type: 'pointerenter' }; + if (!object.userData.over) { + object.userData.over = true; + const overEvent = {type: "pointerover", over: true, component, intersect: intersect2}; + const enterEvent = {...overEvent, type: "pointerenter"}; onIntersectOver(overEvent); onIntersectEnter(enterEvent); - component.onPointerOver?.(overEvent); - component.onPointerEnter?.(enterEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerEnter) == null ? void 0 : _b.call(component, enterEvent); } - - const moveEvent = { type: 'pointermove', component, intersect }; + const moveEvent = {type: "pointermove", component, intersect: intersect2}; onIntersectMove(moveEvent); - component.onPointerMove?.(moveEvent); - + (_c = component.onPointerMove) == null ? void 0 : _c.call(component, moveEvent); offObjects.splice(offObjects.indexOf(object), 1); }); - - offObjects.forEach(object => { - const { component } = object; - if (object.over) { - object.over = false; - const overEvent = { type: 'pointerover', over: false, component }; - const leaveEvent = { ...overEvent, type: 'pointerleave' }; + offObjects.forEach((object) => { + var _a, _b; + const {component} = object.userData; + if (object.userData.over) { + object.userData.over = false; + const overEvent = {type: "pointerover", over: false, component}; + const leaveEvent = {...overEvent, type: "pointerleave"}; onIntersectOver(overEvent); onIntersectLeave(leaveEvent); - component.onPointerOver?.(overEvent); - component.onPointerLeave?.(leaveEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerLeave) == null ? void 0 : _b.call(component, leaveEvent); } }); } } function pointerEnter(event) { updatePosition(event); - onEnter({ type: 'pointerenter', position, positionN, positionV3 }); + onEnter({type: "pointerenter", position, positionN, positionV3}); } function pointerMove(event) { updatePosition(event); - onMove({ type: 'pointermove', position, positionN, positionV3 }); + onMove({type: "pointermove", position, positionN, positionV3}); intersect(); } function pointerClick(event) { @@ -164,352 +160,319 @@ function usePointer(options) { if (intersectObjects.length) { const intersects = raycaster.intersect(positionN, intersectObjects); const iMeshes = []; - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof InstancedMesh$1) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - const event = { type: 'click', component, intersect }; - onIntersectClick(event); - component.onClick?.(event); + const event2 = {type: "click", component, intersect: intersect2}; + onIntersectClick(event2); + (_a = component.onClick) == null ? void 0 : _a.call(component, event2); }); } + onClick({type: "click", position, positionN, positionV3}); } function pointerLeave() { - if (resetOnEnd) reset(); - onLeave({ type: 'pointerleave' }); + if (resetOnEnd) + reset(); + onLeave({type: "pointerleave"}); } function addListeners() { - domElement.addEventListener('mouseenter', pointerEnter); - domElement.addEventListener('mousemove', pointerMove); - domElement.addEventListener('mouseleave', pointerLeave); - domElement.addEventListener('click', pointerClick); + domElement.addEventListener("mouseenter", pointerEnter); + domElement.addEventListener("mousemove", pointerMove); + domElement.addEventListener("mouseleave", pointerLeave); + domElement.addEventListener("click", pointerClick); if (touch) { - domElement.addEventListener('touchstart', pointerEnter); - domElement.addEventListener('touchmove', pointerMove); - domElement.addEventListener('touchend', pointerLeave); + domElement.addEventListener("touchstart", pointerEnter); + domElement.addEventListener("touchmove", pointerMove); + domElement.addEventListener("touchend", pointerLeave); } obj.listeners = true; } function removeListeners() { - domElement.removeEventListener('mouseenter', pointerEnter); - domElement.removeEventListener('mousemove', pointerMove); - domElement.removeEventListener('mouseleave', pointerLeave); - domElement.removeEventListener('click', pointerClick); - - domElement.removeEventListener('touchstart', pointerEnter); - domElement.removeEventListener('touchmove', pointerMove); - domElement.removeEventListener('touchend', pointerLeave); + domElement.removeEventListener("mouseenter", pointerEnter); + domElement.removeEventListener("mousemove", pointerMove); + domElement.removeEventListener("mouseleave", pointerLeave); + domElement.removeEventListener("click", pointerClick); + domElement.removeEventListener("touchstart", pointerEnter); + domElement.removeEventListener("touchmove", pointerMove); + domElement.removeEventListener("touchend", pointerLeave); obj.listeners = false; - }} + } +} -/** - * Three.js helper - */ -function useThree() { - // default conf - const conf = { - canvas: null, +function useThree(params) { + const config = { antialias: true, alpha: false, autoClear: true, - orbit_ctrl: false, + orbitCtrl: false, pointer: false, resize: false, width: 300, - height: 150, + height: 150 }; - - // size + if (params) { + Object.entries(params).forEach(([key, value]) => { + config[key] = value; + }); + } const size = { - width: 1, height: 1, - wWidth: 1, wHeight: 1, - ratio: 1, + width: 1, + height: 1, + wWidth: 1, + wHeight: 1, + ratio: 1 }; - - // handlers - const afterInitCallbacks = []; - let afterResizeCallbacks = []; - let beforeRenderCallbacks = []; - + const beforeRenderCallbacks = []; const intersectObjects = []; - - // returned object + const renderer = createRenderer(); const obj = { - conf, - renderer: null, - camera: null, - cameraCtrl: null, - scene: null, - pointer: null, + config, + renderer, size, init, dispose, render, renderC, setSize, - onAfterInit, - onAfterResize, offAfterResize, - // onBeforeRender, offBeforeRender, - addIntersectObject, removeIntersectObject, + addIntersectObject, + removeIntersectObject }; - - /** - * init three - */ - function init(params) { - if (params) { - Object.entries(params).forEach(([key, value]) => { - conf[key] = value; - }); - } - + return obj; + function createRenderer() { + const renderer2 = new WebGLRenderer({canvas: config.canvas, antialias: config.antialias, alpha: config.alpha}); + renderer2.autoClear = config.autoClear; + return renderer2; + } + function init() { if (!obj.scene) { - console.error('Missing Scene'); - return; + console.error("Missing Scene"); + return false; } - if (!obj.camera) { - console.error('Missing Camera'); - return; + console.error("Missing Camera"); + return false; } - - obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha }); - obj.renderer.autoClear = conf.autoClear; - - if (conf.resize) { + if (config.resize) { onResize(); - window.addEventListener('resize', onResize); - } else { - setSize(conf.width, conf.height); + window.addEventListener("resize", onResize); + } else if (config.width && config.height) { + setSize(config.width, config.height); } - initPointer(); - - if (conf.orbit_ctrl) { - obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); - if (conf.orbit_ctrl instanceof Object) { - Object.entries(conf.orbit_ctrl).forEach(([key, value]) => { - obj.orbitCtrl[key] = value; + if (config.orbitCtrl) { + const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); + if (config.orbitCtrl instanceof Object) { + Object.entries(config.orbitCtrl).forEach(([key, value]) => { + cameraCtrl[key] = value; }); } + onBeforeRender(() => { + cameraCtrl.update(); + }); + obj.cameraCtrl = cameraCtrl; } - - afterInitCallbacks.forEach(c => c()); - return true; } function initPointer() { let pointerConf = { camera: obj.camera, domElement: obj.renderer.domElement, - intersectObjects, + intersectObjects }; - - if (conf.pointer && conf.pointer instanceof Object) { - pointerConf = { ...pointerConf, ...conf.pointer }; + if (config.pointer && config.pointer instanceof Object) { + pointerConf = {...pointerConf, ...config.pointer}; } - - obj.pointer = usePointer(pointerConf); - if (conf.pointer || intersectObjects.length) { - obj.pointer.addListeners(); - if (conf.pointer.intersectMode === 'frame') { - onBeforeRender(() => { - obj.pointer.intersect(); - }); + const pointer = obj.pointer = usePointer(pointerConf); + if (config.pointer || intersectObjects.length) { + pointer.addListeners(); + if (pointerConf.intersectMode === "frame") { + onBeforeRender(pointer.intersect); } } } - - /** - * add after init callback - */ - function onAfterInit(callback) { - afterInitCallbacks.push(callback); + function onBeforeRender(cb) { + beforeRenderCallbacks.push(cb); } - - /** - * add after resize callback - */ - function onAfterResize(callback) { - afterResizeCallbacks.push(callback); - } - - /** - * remove after resize callback - */ - function offAfterResize(callback) { - afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback); - } - - /** - * add before render callback - */ - function onBeforeRender(callback) { - beforeRenderCallbacks.push(callback); - } - - /** - * default render - */ function render() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.renderer.render(obj.scene, obj.camera); } - - /** - * composer render - */ function renderC() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.composer.render(); } - - /** - * add intersect object - */ function addIntersectObject(o) { if (intersectObjects.indexOf(o) === -1) { intersectObjects.push(o); } - // add listeners if needed if (obj.pointer && !obj.pointer.listeners) { obj.pointer.addListeners(); } } - - /** - * remove intersect object - */ function removeIntersectObject(o) { const i = intersectObjects.indexOf(o); if (i !== -1) { intersectObjects.splice(i, 1); } - // remove listeners if needed - if (obj.pointer && !conf.pointer && intersectObjects.length === 0) { + if (obj.pointer && !config.pointer && intersectObjects.length === 0) { obj.pointer.removeListeners(); } } - - /** - * remove listeners and dispose - */ function dispose() { - beforeRenderCallbacks = []; - window.removeEventListener('resize', onResize); - if (obj.pointer) obj.pointer.removeListeners(); - if (obj.orbitCtrl) obj.orbitCtrl.dispose(); - if (obj.renderer) obj.renderer.dispose(); + window.removeEventListener("resize", onResize); + if (obj.pointer) + obj.pointer.removeListeners(); + if (obj.cameraCtrl) + obj.cameraCtrl.dispose(); + if (obj.renderer) + obj.renderer.dispose(); } - - /** - * resize listener - */ function onResize() { - if (conf.resize === 'window') { + var _a; + if (config.resize === "window") { setSize(window.innerWidth, window.innerHeight); } else { const elt = obj.renderer.domElement.parentNode; - setSize(elt.clientWidth, elt.clientHeight); + if (elt) + setSize(elt.clientWidth, elt.clientHeight); } - afterResizeCallbacks.forEach(c => c()); + (_a = config.onResize) == null ? void 0 : _a.call(config, size); } - - /** - * update renderer size and camera - */ function setSize(width, height) { size.width = width; size.height = height; size.ratio = width / height; - obj.renderer.setSize(width, height, false); - obj.camera.aspect = size.ratio; - obj.camera.updateProjectionMatrix(); - - if (obj.composer) { - obj.composer.setSize(width, height); + const camera = obj.camera; + if (camera.type === "PerspectiveCamera") { + const pCamera = camera; + pCamera.aspect = size.ratio; + pCamera.updateProjectionMatrix(); } - - if (obj.camera.type === 'OrthographicCamera') { - size.wWidth = obj.camera.right - obj.camera.left; - size.wHeight = obj.camera.top - obj.camera.bottom; + if (camera.type === "OrthographicCamera") { + const oCamera = camera; + size.wWidth = oCamera.right - oCamera.left; + size.wHeight = oCamera.top - oCamera.bottom; } else { const wsize = getCameraSize(); - size.wWidth = wsize[0]; size.wHeight = wsize[1]; + size.wWidth = wsize[0]; + size.wHeight = wsize[1]; } } - - /** - * calculate camera visible area size - */ function getCameraSize() { - const vFOV = (obj.camera.fov * Math.PI) / 180; - const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z); - const w = h * obj.camera.aspect; + const camera = obj.camera; + const vFOV = camera.fov * Math.PI / 180; + const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z); + const w = h * camera.aspect; return [w, h]; } - - return obj; } +const RendererInjectionKey = Symbol("Renderer"); var Renderer = defineComponent({ - name: 'Renderer', + name: "Renderer", props: { antialias: Boolean, alpha: Boolean, - autoClear: { type: Boolean, default: true }, - orbitCtrl: { type: [Boolean, Object], default: false }, - pointer: { type: [Boolean, Object], default: false }, - resize: { type: [Boolean, String], default: false }, + autoClear: {type: Boolean, default: true}, + orbitCtrl: {type: [Boolean, Object], default: false}, + pointer: {type: [Boolean, Object], default: false}, + resize: {type: [Boolean, String], default: false}, shadow: Boolean, width: String, height: String, xr: Boolean, + onReady: Function, + onClick: Function }, - setup() { - return { - three: useThree(), - raf: true, - onMountedCallbacks: [], - beforeRenderCallbacks: [], - afterRenderCallbacks: [], + setup(props) { + const initCallbacks = []; + const mountedCallbacks = []; + const beforeRenderCallbacks = []; + const afterRenderCallbacks = []; + const resizeCallbacks = []; + const canvas = document.createElement("canvas"); + const config = { + canvas, + antialias: props.antialias, + alpha: props.alpha, + autoClear: props.autoClear, + orbitCtrl: props.orbitCtrl, + pointer: props.pointer, + resize: props.resize }; + if (props.width) + config.width = parseInt(props.width); + if (props.height) + config.height = parseInt(props.height); + const three = useThree(config); + const renderFn = () => { + }; + if (props.onClick) { + canvas.addEventListener("click", props.onClick); + } + return { + canvas, + three, + renderer: three.renderer, + size: three.size, + renderFn, + raf: true, + initCallbacks, + mountedCallbacks, + beforeRenderCallbacks, + afterRenderCallbacks, + resizeCallbacks + }; + }, + computed: { + camera: { + get: function() { + return this.three.camera; + }, + set: function(camera) { + this.three.camera = camera; + } + }, + scene: { + get: function() { + return this.three.scene; + }, + set: function(scene) { + this.three.scene = scene; + } + }, + composer: { + get: function() { + return this.three.composer; + }, + set: function(composer) { + this.three.composer = composer; + } + } }, provide() { return { - three: this.three, - // renderer: this.three.renderer, - rendererComponent: this, + [RendererInjectionKey]: this }; }, mounted() { - const params = { - canvas: this.$el, - antialias: this.antialias, - alpha: this.alpha, - autoClear: this.autoClear, - orbit_ctrl: this.orbitCtrl, - pointer: this.pointer, - resize: this.resize, - width: this.width, - height: this.height, - }; - - if (this.three.init(params)) { - this.renderer = this.three.renderer; + var _a; + this.$el.parentNode.insertBefore(this.canvas, this.$el); + if (this.three.init()) { + this.three.config.onResize = (size) => { + this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); + }; this.renderer.shadowMap.enabled = this.shadow; - - this._render = this.three.composer ? this.three.renderC : this.three.render; - + this.renderFn = this.three.composer ? this.three.renderC : this.three.render; + this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); + (_a = this.onReady) == null ? void 0 : _a.call(this, this); if (this.xr) { this.renderer.xr.enabled = true; this.renderer.setAnimationLoop(this.render); @@ -517,50 +480,78 @@ var Renderer = defineComponent({ requestAnimationFrame(this.renderLoop); } } - this.onMountedCallbacks.forEach(c => c()); + this.mountedCallbacks.forEach((e) => e({type: "mounted", renderer: this})); }, beforeUnmount() { + this.canvas.remove(); this.beforeRenderCallbacks = []; this.afterRenderCallbacks = []; this.raf = false; this.three.dispose(); }, methods: { + onInit(cb) { + this.addListener("init", cb); + }, onMounted(cb) { - this.onMountedCallbacks.push(cb); + this.addListener("mounted", cb); }, onBeforeRender(cb) { - this.beforeRenderCallbacks.push(cb); + this.addListener("beforerender", cb); }, offBeforeRender(cb) { - this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb); + this.removeListener("beforerender", cb); }, onAfterRender(cb) { - this.afterRenderCallbacks.push(cb); + this.addListener("afterrender", cb); }, offAfterRender(cb) { - this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb); + this.removeListener("afterrender", cb); }, - onAfterResize(cb) { - this.three.onAfterResize(cb); + onResize(cb) { + this.addListener("resize", cb); }, - offAfterResize(cb) { - this.three.offAfterResize(cb); + offResize(cb) { + this.removeListener("resize", cb); + }, + addListener(type, cb) { + const callbacks = this.getCallbacks(type); + callbacks.push(cb); + }, + removeListener(type, cb) { + const callbacks = this.getCallbacks(type); + const index = callbacks.indexOf(cb); + if (index) + callbacks.splice(index, 1); + }, + getCallbacks(type) { + if (type === "init") { + return this.initCallbacks; + } else if (type === "mounted") { + return this.mountedCallbacks; + } else if (type === "beforerender") { + return this.beforeRenderCallbacks; + } else if (type === "afterrender") { + return this.afterRenderCallbacks; + } else { + return this.resizeCallbacks; + } }, render(time) { - this.beforeRenderCallbacks.forEach(c => c({ time })); - this._render(); - this.afterRenderCallbacks.forEach(c => c({ time })); + this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); + this.renderFn(); + this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { - if (this.raf) requestAnimationFrame(this.renderLoop); + if (this.raf) + requestAnimationFrame(this.renderLoop); this.render(time); - }, + } }, render() { - return h('canvas', {}, this.$slots.default()); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Renderer', + __hmrId: "Renderer" }); function setFromProp(o, prop) { @@ -571,25 +562,30 @@ function setFromProp(o, prop) { } } function bindProps(src, props, dst) { - props.forEach(prop => { - bindProp(src, prop, dst); + props.forEach((prop) => { + bindProp(src, prop, dst, prop); }); } function bindProp(src, srcProp, dst, dstProp) { - if (!dstProp) dstProp = srcProp; + const _dstProp = dstProp || srcProp; const ref = toRef(src, srcProp); if (ref.value instanceof Object) { - setFromProp(dst[dstProp], ref.value); - watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true }); + setFromProp(dst[_dstProp], ref.value); + watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); } else { - if (ref.value) dst[dstProp] = src[srcProp]; - watch(ref, (value) => { dst[dstProp] = value; }); + if (ref.value) + dst[_dstProp] = src[srcProp]; + watch(ref, (value) => { + dst[_dstProp] = value; + }); } } -function propsValues(props, exclude) { +function propsValues(props, exclude = []) { const values = {}; Object.entries(props).forEach(([key, value]) => { - if (!exclude || (exclude && !exclude.includes(key))) { + if (!exclude || exclude && !exclude.includes(key)) { values[key] = value; } }); @@ -600,319 +596,510 @@ function lerp(value1, value2, amount) { amount = amount > 1 ? 1 : amount; return value1 + (value2 - value1) * amount; } -function lerpv2(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); -} -function lerpv3(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); - v1.z = lerp(v1.z, v2.z, amount); -} function limit(val, min, max) { - return val < min ? min : (val > max ? max : val); + return val < min ? min : val > max ? max : val; } -// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx -const MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'; - -function getMatcapUrl(hash, format = 1024) { +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { const fileName = `${hash}${getMatcapFormatString(format)}.png`; return `${MATCAP_ROOT}/${format}/${fileName}`; } function getMatcapFormatString(format) { switch (format) { case 64: - return '-64px'; + return "-64px"; case 128: - return '-128px'; + return "-128px"; case 256: - return '-256px'; + return "-256px"; case 512: - return '-512px'; + return "-512px"; default: - return ''; + return ""; } } -// import Object3D from '../core/Object3D.js'; - var Camera = defineComponent({ - // TODO: eventually extend Object3D, for now: error 'injection "scene" not found' - // because camera is a sibling of scene in Trois - // extends: Object3D, - inject: ['three'], render() { return this.$slots.default ? this.$slots.default() : []; - }, + } }); var OrthographicCamera = defineComponent({ extends: Camera, - name: 'OrthographicCamera', - inject: ['three'], + name: "OrthographicCamera", props: { - left: { type: Number, default: -1 }, - right: { type: Number, default: 1 }, - top: { type: Number, default: 1 }, - bottom: { type: Number, default: -1 }, - near: { type: Number, default: 0.1 }, - far: { type: Number, default: 2000 }, - zoom: { type: Number, default: 1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, + left: {type: Number, default: -1}, + right: {type: Number, default: 1}, + top: {type: Number, default: 1}, + bottom: {type: Number, default: -1}, + near: {type: Number, default: 0.1}, + far: {type: Number, default: 2e3}, + zoom: {type: Number, default: 1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, - created() { - this.camera = new OrthographicCamera$1(this.left, this.right, this.top, this.bottom, this.near, this.far); - bindProp(this, 'position', this.camera); - - ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => { - watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + const renderer = inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new OrthographicCamera$1(props.left, props.right, props.top, props.bottom, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + const watchProps = ["left", "right", "top", "bottom", "near", "far", "zoom"]; + watchProps.forEach((p) => { + watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'OrthographicCamera', + __hmrId: "OrthographicCamera" }); var PerspectiveCamera = defineComponent({ extends: Camera, - name: 'PerspectiveCamera', - inject: ['three'], + name: "PerspectiveCamera", props: { - aspect: { type: Number, default: 1 }, - far: { type: Number, default: 2000 }, - fov: { type: Number, default: 50 }, - near: { type: Number, default: 0.1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - lookAt: { type: Object, default: null }, + aspect: {type: Number, default: 1}, + far: {type: Number, default: 2e3}, + fov: {type: Number, default: 50}, + near: {type: Number, default: 0.1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + lookAt: {type: Object, default: null} }, - created() { - this.camera = new PerspectiveCamera$1(this.fov, this.aspect, this.near, this.far); - bindProp(this, 'position', this.camera); - - if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true }); - - ['aspect', 'far', 'fov', 'near'].forEach(p => { - watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + var _a; + const renderer = inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new PerspectiveCamera$1(props.fov, props.aspect, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + if (props.lookAt) + camera.lookAt((_a = props.lookAt.x) != null ? _a : 0, props.lookAt.y, props.lookAt.z); + watch(() => props.lookAt, (v) => { + var _a2; + camera.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + const watchProps = ["aspect", "far", "fov", "near"]; + watchProps.forEach((p) => { + watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'PerspectiveCamera', + __hmrId: "PerspectiveCamera" +}); + +const SceneInjectionKey = Symbol("Scene"); +var Scene = defineComponent({ + name: "Scene", + props: { + background: [String, Number, Object] + }, + setup(props) { + const renderer = inject(RendererInjectionKey); + const scene = new Scene$1(); + if (!renderer) { + console.error("Renderer not found"); + return; + } + renderer.scene = scene; + provide(SceneInjectionKey, scene); + const setBackground = (value) => { + if (!value) + return; + if (typeof value === "string" || typeof value === "number") { + if (scene.background instanceof Color) + scene.background.set(value); + else + scene.background = new Color(value); + } else if (value instanceof Texture$1) { + scene.background = value; + } + }; + setBackground(props.background); + watch(() => props.background, setBackground); + const add = (o) => { + scene.add(o); + }; + const remove = (o) => { + scene.remove(o); + }; + return {scene, add, remove}; + }, + render() { + return this.$slots.default ? this.$slots.default() : []; + }, + __hmrId: "Scene" }); var Object3D = defineComponent({ - name: 'Object3D', - inject: ['three', 'scene', 'rendererComponent'], - emits: ['created', 'ready'], - props: { - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - rotation: { type: Object, default: { x: 0, y: 0, z: 0 } }, - scale: { type: Object, default: { x: 1, y: 1, z: 1 } }, - lookAt: { type: Object, default: null }, - autoRemove: { type: Boolean, default: true }, - userData: { type: Object, default: () => ({}) }, + name: "Object3D", + inject: { + renderer: RendererInjectionKey, + scene: SceneInjectionKey + }, + emits: ["created", "ready"], + props: { + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + rotation: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + scale: {type: Object, default: () => ({x: 1, y: 1, z: 1, order: "XYZ"})}, + lookAt: {type: Object, default: null}, + autoRemove: {type: Boolean, default: true}, + userData: {type: Object, default: () => ({})} + }, + setup() { + return {}; + }, + created() { + if (!this.renderer) { + console.error("Missing parent Renderer"); + } + if (!this.scene) { + console.error("Missing parent Scene"); + } }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.autoRemove) this.removeFromParent(); + if (this.autoRemove) + this.removeFromParent(); }, methods: { initObject3D(o3d) { + var _a; this.o3d = o3d; - this.o3d.userData = this.userData; - this.$emit('created', this.o3d); - - bindProp(this, 'position', this.o3d); - bindProp(this, 'rotation', this.o3d); - bindProp(this, 'scale', this.o3d); - - // TODO : fix lookat.x - if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true }); - - this._parent = this.getParent(); - if (this.addToParent()) this.$emit('ready', this); - else console.error('Missing parent (Scene, Group...)'); + this.$emit("created", o3d); + bindProp(this, "position", o3d); + bindProp(this, "rotation", o3d); + bindProp(this, "scale", o3d); + bindProp(this, "userData", o3d.userData); + if (this.lookAt) + o3d.lookAt((_a = this.lookAt.x) != null ? _a : 0, this.lookAt.y, this.lookAt.z); + watch(() => this.lookAt, (v) => { + var _a2; + o3d.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + this.parent = this.getParent(); + if (this.addToParent()) + this.$emit("ready", this); + else + console.error("Missing parent (Scene, Group...)"); }, getParent() { let parent = this.$parent; while (parent) { - if (parent.add) return parent; + if (parent.add) + return parent; parent = parent.$parent; } - return false; + return void 0; }, addToParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.add(o3d); + if (this.parent) { + this.parent.add(o3d); return true; } return false; }, removeFromParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.remove(o3d); + if (this.parent) { + this.parent.remove(o3d); return true; } return false; }, - add(o) { this.o3d.add(o); }, - remove(o) { this.o3d.remove(o); }, + add(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.add(o); + }, + remove(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.remove(o); + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Object3D', + __hmrId: "Object3D" }); var Group = defineComponent({ - name: 'Group', + name: "Group", extends: Object3D, - created() { - this.group = new Group$1(); - this.initObject3D(this.group); - }, - __hmrId: 'Group', -}); - -var Scene = defineComponent({ - name: 'Scene', - inject: ['three'], - props: { - id: String, - background: [String, Number], - }, - setup(props) { - const scene = new Scene$1(); - if (props.background) scene.background = new Color(props.background); - watch(() => props.background, (value) => { scene.background.set(value); }); - return { scene }; - }, - provide() { + setup() { return { - scene: this.scene, + group: new Group$1() }; }, - mounted() { - if (!this.three.scene) { - this.three.scene = this.scene; - } + created() { + this.initObject3D(this.group); }, - methods: { - add(o) { this.scene.add(o); }, - remove(o) { this.scene.remove(o); }, - }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'Scene', + __hmrId: "Group" }); +const emptyCallBack = () => { +}; var Raycaster = defineComponent({ - name: 'Raycaster', - inject: ['three', 'rendererComponent'], + name: "Raycaster", props: { - onPointerEnter: { type: Function, default: () => {} }, - onPointerOver: { type: Function, default: () => {} }, - onPointerMove: { type: Function, default: () => {} }, - onPointerLeave: { type: Function, default: () => {} }, - onClick: { type: Function, default: () => {} }, - intersectMode: { type: String, default: 'move' }, + onPointerEnter: {type: Function, default: emptyCallBack}, + onPointerOver: {type: Function, default: emptyCallBack}, + onPointerMove: {type: Function, default: emptyCallBack}, + onPointerLeave: {type: Function, default: emptyCallBack}, + onClick: {type: Function, default: emptyCallBack}, + intersectMode: {type: String, default: "move"} + }, + setup() { + const renderer = inject(RendererInjectionKey); + return {renderer}; }, mounted() { - this.rendererComponent.onMounted(() => { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + this.renderer.onMounted(() => { + if (!renderer.camera) + return; this.pointer = usePointer({ - camera: this.three.camera, - domElement: this.three.renderer.domElement, + camera: renderer.camera, + domElement: renderer.canvas, intersectObjects: this.getIntersectObjects(), onIntersectEnter: this.onPointerEnter, onIntersectOver: this.onPointerOver, onIntersectMove: this.onPointerMove, onIntersectLeave: this.onPointerLeave, - onIntersectClick: this.onClick, + onIntersectClick: this.onClick }); this.pointer.addListeners(); - - if (this.intersectMode === 'frame') { - this.rendererComponent.onBeforeRender(this.pointer.intersect); + if (this.intersectMode === "frame") { + renderer.onBeforeRender(this.pointer.intersect); } }); }, unmounted() { + var _a; if (this.pointer) { this.pointer.removeListeners(); - this.rendererComponent.offBeforeRender(this.pointer.intersect); + (_a = this.renderer) == null ? void 0 : _a.offBeforeRender(this.pointer.intersect); } }, methods: { getIntersectObjects() { - return this.three.scene.children.filter(e => e.type === 'Mesh'); - }, + if (this.renderer && this.renderer.scene) { + const children = this.renderer.scene.children.filter((c) => ["Mesh", "InstancedMesh"].includes(c.type)); + return children; + } + return []; + } }, render() { return []; }, - __hmrId: 'Raycaster', + __hmrId: "Raycaster" }); -const Geometry = defineComponent({ - inject: ['mesh'], +var CubeCamera = defineComponent({ + extends: Object3D, props: { - rotateX: Number, - rotateY: Number, - rotateZ: Number, + cubeRTSize: {type: Number, default: 256}, + cubeCameraNear: {type: Number, default: 0.1}, + cubeCameraFar: {type: Number, default: 2e3}, + autoUpdate: Boolean }, - created() { - if (!this.mesh) { - console.error('Missing parent Mesh'); + setup(props) { + const rendererC = inject(RendererInjectionKey); + if (!rendererC || !rendererC.scene) { + console.error("Missing Renderer / Scene"); + return; } - - this.watchProps = []; - Object.entries(this.$props).forEach(e => this.watchProps.push(e[0])); - - this.createGeometry(); - this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - - this.addWatchers(); + const renderer = rendererC.renderer, scene = rendererC.scene; + const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, {format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter}); + const cubeCamera = new CubeCamera$1(props.cubeCameraNear, props.cubeCameraFar, cubeRT); + const updateRT = () => { + cubeCamera.update(renderer, scene); + }; + if (props.autoUpdate) { + rendererC.onBeforeRender(updateRT); + onUnmounted(() => { + rendererC.offBeforeRender(updateRT); + }); + } else { + rendererC.onMounted(updateRT); + } + return {cubeRT, cubeCamera}; }, - unmounted() { - this.geometry.dispose(); + render() { + return []; + }, + __hmrId: "CubeCamera" +}); + +const pointerProps = { + onPointerEnter: Function, + onPointerOver: Function, + onPointerMove: Function, + onPointerLeave: Function, + onPointerDown: Function, + onPointerUp: Function, + onClick: Function +}; +const MeshInjectionKey = Symbol("Mesh"); +const Mesh = defineComponent({ + name: "Mesh", + extends: Object3D, + props: { + castShadow: Boolean, + receiveShadow: Boolean, + ...pointerProps + }, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + if (!this.mesh && !this.loading) + this.initMesh(); }, methods: { - addWatchers() { - this.watchProps.forEach(prop => { + initMesh() { + const mesh = new Mesh$1(this.geometry, this.material); + mesh.userData.component = this; + bindProp(this, "castShadow", mesh); + bindProp(this, "receiveShadow", mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + if (this.renderer) + this.renderer.three.addIntersectObject(mesh); + } + this.mesh = mesh; + this.initObject3D(mesh); + }, + createGeometry() { + }, + addGeometryWatchers(props) { + Object.keys(props).forEach((prop) => { watch(() => this[prop], () => { this.refreshGeometry(); }); }); }, + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + }, + refreshGeometry() { + const oldGeo = this.geometry; + this.createGeometry(); + if (this.mesh && this.geometry) + this.mesh.geometry = this.geometry; + oldGeo == null ? void 0 : oldGeo.dispose(); + } + }, + unmounted() { + if (this.mesh) { + if (this.renderer) + this.renderer.three.removeIntersectObject(this.mesh); + } + if (this.geometry) + this.geometry.dispose(); + if (this.material) + this.material.dispose(); + }, + __hmrId: "Mesh" +}); +function meshComponent(name, props, createGeometry) { + return defineComponent({ + name, + extends: Mesh, + props, + created() { + this.createGeometry(); + this.addGeometryWatchers(props); + }, + methods: { + createGeometry() { + this.geometry = createGeometry(this); + } + } + }); +} + +const Geometry = defineComponent({ + props: { + rotateX: Number, + rotateY: Number, + rotateZ: Number + }, + inject: { + mesh: MeshInjectionKey + }, + setup() { + return {}; + }, + created() { + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + this.createGeometry(); + this.rotateGeometry(); + if (this.geometry) + this.mesh.setGeometry(this.geometry); + Object.keys(this.$props).forEach((prop) => { + watch(() => this[prop], this.refreshGeometry); + }); + }, + unmounted() { + var _a; + (_a = this.geometry) == null ? void 0 : _a.dispose(); + }, + methods: { + createGeometry() { + }, rotateGeometry() { - if (this.rotateX) this.geometry.rotateX(this.rotateX); - if (this.rotateY) this.geometry.rotateY(this.rotateY); - if (this.rotateZ) this.geometry.rotateZ(this.rotateZ); + if (!this.geometry) + return; + if (this.rotateX) + this.geometry.rotateX(this.rotateX); + if (this.rotateY) + this.geometry.rotateY(this.rotateY); + if (this.rotateZ) + this.geometry.rotateZ(this.rotateZ); }, refreshGeometry() { const oldGeo = this.geometry; this.createGeometry(); this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - oldGeo.dispose(); - }, + if (this.geometry && this.mesh) + this.mesh.setGeometry(this.geometry); + oldGeo == null ? void 0 : oldGeo.dispose(); + } }, - render() { return []; }, + render() { + return []; + } }); - function geometryComponent(name, props, createGeometry) { return defineComponent({ name, @@ -921,21 +1108,20 @@ function geometryComponent(name, props, createGeometry) { methods: { createGeometry() { this.geometry = createGeometry(this); - }, - }, + } + } }); } -const props$h = { +const props$n = { size: Number, - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - depth: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, - depthSegments: { type: Number, default: 1 }, + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + depth: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + depthSegments: {type: Number, default: 1} }; - function createGeometry$f(comp) { if (comp.size) { return new BoxGeometry$1(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments); @@ -943,188 +1129,173 @@ function createGeometry$f(comp) { return new BoxGeometry$1(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments); } } -var BoxGeometry = geometryComponent('BoxGeometry', props$h, createGeometry$f); +var BoxGeometry = geometryComponent("BoxGeometry", props$n, createGeometry$f); -const props$g = { - radius: { type: Number, default: 1 }, - segments: { type: Number, default: 8 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$m = { + radius: {type: Number, default: 1}, + segments: {type: Number, default: 8}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$e(comp) { return new CircleGeometry$1(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength); } -var CircleGeometry = geometryComponent('CircleGeometry', props$g, createGeometry$e); +var CircleGeometry = geometryComponent("CircleGeometry", props$m, createGeometry$e); -const props$f = { - radius: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$l = { + radius: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$d(comp) { return new ConeGeometry$1(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var ConeGeometry = geometryComponent('ConeGeometry', props$f, createGeometry$d); +var ConeGeometry = geometryComponent("ConeGeometry", props$l, createGeometry$d); -const props$e = { - radiusTop: { type: Number, default: 1 }, - radiusBottom: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$k = { + radiusTop: {type: Number, default: 1}, + radiusBottom: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$c(comp) { return new CylinderGeometry$1(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var CylinderGeometry = geometryComponent('CylinderGeometry', props$e, createGeometry$c); +var CylinderGeometry = geometryComponent("CylinderGeometry", props$k, createGeometry$c); -const props$d = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$j = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$b(comp) { return new DodecahedronGeometry$1(comp.radius, comp.detail); } -var DodecahedronGeometry = geometryComponent('DodecahedronGeometry', props$d, createGeometry$b); +var DodecahedronGeometry = geometryComponent("DodecahedronGeometry", props$j, createGeometry$b); -const props$c = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$i = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$a(comp) { return new IcosahedronGeometry$1(comp.radius, comp.detail); } -var IcosahedronGeometry = geometryComponent('IcosahedronGeometry', props$c, createGeometry$a); +var IcosahedronGeometry = geometryComponent("IcosahedronGeometry", props$i, createGeometry$a); -const props$b = { +const props$h = { points: Array, - segments: { type: Number, default: 12 }, - phiStart: { type: Number, default: 0 }, - phiLength: { type: Number, default: Math.PI * 2 }, + segments: {type: Number, default: 12}, + phiStart: {type: Number, default: 0}, + phiLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$9(comp) { return new LatheGeometry$1(comp.points, comp.segments, comp.phiStart, comp.phiLength); } -var LatheGeometry = geometryComponent('LatheGeometry', props$b, createGeometry$9); +var LatheGeometry = geometryComponent("LatheGeometry", props$h, createGeometry$9); -const props$a = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$g = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$8(comp) { return new OctahedronGeometry$1(comp.radius, comp.detail); } -var OctahedronGeometry = geometryComponent('OctahedronGeometry', props$a, createGeometry$8); +var OctahedronGeometry = geometryComponent("OctahedronGeometry", props$g, createGeometry$8); -const props$9 = { - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, +const props$f = { + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1} }; - function createGeometry$7(comp) { return new PlaneGeometry$1(comp.width, comp.height, comp.widthSegments, comp.heightSegments); } -var PlaneGeometry = geometryComponent('PlaneGeometry', props$9, createGeometry$7); +var PlaneGeometry = geometryComponent("PlaneGeometry", props$f, createGeometry$7); -const props$8 = { +const props$e = { vertices: Array, indices: Array, - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$6(comp) { return new PolyhedronGeometry$1(comp.vertices, comp.indices, comp.radius, comp.detail); } -var PolyhedronGeometry = geometryComponent('PolyhedronGeometry', props$8, createGeometry$6); +var PolyhedronGeometry = geometryComponent("PolyhedronGeometry", props$e, createGeometry$6); -const props$7 = { - innerRadius: { type: Number, default: 0.5 }, - outerRadius: { type: Number, default: 1 }, - thetaSegments: { type: Number, default: 8 }, - phiSegments: { type: Number, default: 1 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$d = { + innerRadius: {type: Number, default: 0.5}, + outerRadius: {type: Number, default: 1}, + thetaSegments: {type: Number, default: 8}, + phiSegments: {type: Number, default: 1}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$5(comp) { return new RingGeometry$1(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength); } -var RingGeometry = geometryComponent('RingGeometry', props$7, createGeometry$5); +var RingGeometry = geometryComponent("RingGeometry", props$d, createGeometry$5); -const props$6 = { - radius: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 12 }, - heightSegments: { type: Number, default: 12 }, +const props$c = { + radius: {type: Number, default: 1}, + widthSegments: {type: Number, default: 12}, + heightSegments: {type: Number, default: 12} }; - function createGeometry$4(comp) { return new SphereGeometry$1(comp.radius, comp.widthSegments, comp.heightSegments); } -var SphereGeometry = geometryComponent('SphereGeometry', props$6, createGeometry$4); +var SphereGeometry = geometryComponent("SphereGeometry", props$c, createGeometry$4); -const props$5 = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$b = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$3(comp) { return new TetrahedronGeometry$1(comp.radius, comp.detail); } -var TetrahedronGeometry = geometryComponent('TetrahedronGeometry', props$5, createGeometry$3); +var TetrahedronGeometry = geometryComponent("TetrahedronGeometry", props$b, createGeometry$3); -const props$4 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - radialSegments: { type: Number, default: 8 }, - tubularSegments: { type: Number, default: 6 }, - arc: { type: Number, default: Math.PI * 2 }, +const props$a = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + radialSegments: {type: Number, default: 8}, + tubularSegments: {type: Number, default: 6}, + arc: {type: Number, default: Math.PI * 2} }; - function createGeometry$2(comp) { return new TorusGeometry$1(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc); } -var TorusGeometry = geometryComponent('TorusGeometry', props$4, createGeometry$2); +var TorusGeometry = geometryComponent("TorusGeometry", props$a, createGeometry$2); -const props$3 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - tubularSegments: { type: Number, default: 64 }, - radialSegments: { type: Number, default: 8 }, - p: { type: Number, default: 2 }, - q: { type: Number, default: 3 }, +const props$9 = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + tubularSegments: {type: Number, default: 64}, + radialSegments: {type: Number, default: 8}, + p: {type: Number, default: 2}, + q: {type: Number, default: 3} }; - function createGeometry$1(comp) { return new TorusKnotGeometry$1(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q); } -var TorusKnotGeometry = geometryComponent('TorusKnotGeometry', props$3, createGeometry$1); +var TorusKnotGeometry = geometryComponent("TorusKnotGeometry", props$9, createGeometry$1); -const props$2 = { +const props$8 = { points: Array, path: Curve, - tubularSegments: { type: Number, default: 64 }, - radius: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - closed: { type: Boolean, default: false }, + tubularSegments: {type: Number, default: 64}, + radius: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + closed: {type: Boolean, default: false} }; - function createGeometry(comp) { let curve; if (comp.points) { @@ -1132,509 +1303,464 @@ function createGeometry(comp) { } else if (comp.path) { curve = comp.path; } else { - console.error('Missing path curve or points.'); + console.error("Missing path curve or points."); } return new TubeGeometry$1(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed); } var TubeGeometry = defineComponent({ extends: Geometry, - props: props$2, + props: props$8, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, - }, + } + } }); - function updateTubeGeometryPoints(tube, points) { const curve = new CatmullRomCurve3(points); - const { radialSegments, radius, tubularSegments, closed } = tube.parameters; + const {radialSegments, radius, tubularSegments, closed} = tube.parameters; const frames = curve.computeFrenetFrames(tubularSegments, closed); tube.tangents = frames.tangents; tube.normals = frames.normals; tube.binormals = frames.binormals; tube.parameters.path = curve; - - const pArray = tube.attributes.position.array; - const nArray = tube.attributes.normal.array; + const pAttribute = tube.getAttribute("position"); + const nAttribute = tube.getAttribute("normal"); const normal = new Vector3(); - let P; - + const P = new Vector3(); for (let i = 0; i < tubularSegments; i++) { updateSegment(i); } updateSegment(tubularSegments); - tube.attributes.position.needsUpdate = true; tube.attributes.normal.needsUpdate = true; - function updateSegment(i) { - P = curve.getPointAt(i / tubularSegments, P); + curve.getPointAt(i / tubularSegments, P); const N = frames.normals[i]; const B = frames.binormals[i]; for (let j = 0; j <= radialSegments; j++) { const v = j / radialSegments * Math.PI * 2; const sin = Math.sin(v); const cos = -Math.cos(v); - normal.x = (cos * N.x + sin * B.x); - normal.y = (cos * N.y + sin * B.y); - normal.z = (cos * N.z + sin * B.z); + normal.x = cos * N.x + sin * B.x; + normal.y = cos * N.y + sin * B.y; + normal.z = cos * N.z + sin * B.z; normal.normalize(); - const index = (i * (radialSegments + 1) + j) * 3; - nArray[index] = normal.x; - nArray[index + 1] = normal.y; - nArray[index + 2] = normal.z; - pArray[index] = P.x + radius * normal.x; - pArray[index + 1] = P.y + radius * normal.y; - pArray[index + 2] = P.z + radius * normal.z; + const index = i * (radialSegments + 1) + j; + nAttribute.setXYZ(index, normal.x, normal.y, normal.z); + pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z); } } } var Light = defineComponent({ extends: Object3D, - name: 'Light', + name: "Light", props: { - color: { type: String, default: '#ffffff' }, - intensity: { type: Number, default: 1 }, - castShadow: { type: Boolean, default: false }, - shadowMapSize: { type: Object, default: { x: 512, y: 512 } }, - shadowCamera: { type: Object, default: {} }, + color: {type: String, default: "#ffffff"}, + intensity: {type: Number, default: 1}, + castShadow: {type: Boolean, default: false}, + shadowMapSize: {type: Object, default: () => ({x: 512, y: 512})}, + shadowCamera: {type: Object, default: () => ({})} + }, + setup() { + return {}; }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.light.target) this.removeFromParent(this.light.target); + if (this.light instanceof SpotLight$1 || this.light instanceof DirectionalLight$1) { + this.removeFromParent(this.light.target); + } }, methods: { - initLight() { - if (this.light.target) { - bindProp(this, 'target', this.light.target, 'position'); + initLight(light) { + this.light = light; + if (light.shadow) { + light.castShadow = this.castShadow; + setFromProp(light.shadow.mapSize, this.shadowMapSize); + setFromProp(light.shadow.camera, this.shadowCamera); } - - if (this.light.shadow) { - this.light.castShadow = this.castShadow; - setFromProp(this.light.shadow.mapSize, this.shadowMapSize); - setFromProp(this.light.shadow.camera, this.shadowCamera); - } - - ['color', 'intensity', 'castShadow'].forEach(p => { - watch(() => this[p], () => { - if (p === 'color') { - this.light.color.set(this.color); + ["color", "intensity", "castShadow"].forEach((p) => { + watch(() => this[p], (value) => { + if (p === "color") { + light.color.set(value); } else { - this.light[p] = this[p]; + light[p] = value; } }); }); - - this.initObject3D(this.light); - if (this.light.target) this.addToParent(this.light.target); - }, + this.initObject3D(light); + if (light instanceof SpotLight$1 || light instanceof DirectionalLight$1) { + bindProp(this, "target", light.target, "position"); + this.addToParent(light.target); + } + } }, - __hmrId: 'Light', + __hmrId: "Light" }); var AmbientLight = defineComponent({ extends: Light, created() { - this.light = new AmbientLight$1(this.color, this.intensity); - this.initLight(); + this.initLight(new AmbientLight$1(this.color, this.intensity)); }, - __hmrId: 'AmbientLight', + __hmrId: "AmbientLight" }); var DirectionalLight = defineComponent({ extends: Light, props: { - target: Object, + target: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, created() { - this.light = new DirectionalLight$1(this.color, this.intensity); - this.initLight(); + this.initLight(new DirectionalLight$1(this.color, this.intensity)); }, - __hmrId: 'DirectionalLight', + __hmrId: "DirectionalLight" }); var HemisphereLight = defineComponent({ extends: Light, props: { - groundColor: { type: String, default: '#444444' }, + groundColor: {type: String, default: "#444444"} }, created() { - this.light = new HemisphereLight$1(this.color, this.groundColor, this.intensity); - watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); }); - this.initLight(); + const light = new HemisphereLight$1(this.color, this.groundColor, this.intensity); + watch(() => this.groundColor, (value) => { + light.groundColor.set(value); + }); + this.initLight(light); }, - __hmrId: 'HemisphereLight', + __hmrId: "HemisphereLight" }); var PointLight = defineComponent({ extends: Light, props: { - distance: { - type: Number, - default: 0, - }, - decay: { - type: Number, - default: 1, - }, + distance: {type: Number, default: 0}, + decay: {type: Number, default: 1} }, created() { - this.light = new PointLight$1(this.color, this.intensity, this.distance, this.decay); - this.initLight(); + this.initLight(new PointLight$1(this.color, this.intensity, this.distance, this.decay)); }, - __hmrId: 'PointLight', + __hmrId: "PointLight" }); var RectAreaLight = defineComponent({ extends: Light, props: { - width: { type: Number, default: 10 }, - height: { type: Number, default: 10 }, - helper: Boolean, + width: {type: Number, default: 10}, + height: {type: Number, default: 10}, + helper: Boolean }, created() { RectAreaLightUniformsLib.init(); - this.light = new RectAreaLight$1(this.color, this.intensity, this.width, this.height); - - ['width', 'height'].forEach(p => { - watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new RectAreaLight$1(this.color, this.intensity, this.width, this.height); + const watchProps = ["width", "height"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + light[p] = value; }); }); - if (this.helper) { - this.lightHelper = new RectAreaLightHelper(this.light); - this.light.add(this.lightHelper); + const lightHelper = new RectAreaLightHelper(light); + light.add(lightHelper); } - - this.initLight(); + this.initLight(light); }, - unmounted() { - if (this.lightHelper) this.removeFromParent(this.lightHelper); - }, - __hmrId: 'RectAreaLight', + __hmrId: "RectAreaLight" }); var SpotLight = defineComponent({ extends: Light, props: { - angle: { type: Number, default: Math.PI / 3 }, - decay: { type: Number, default: 1 }, - distance: { type: Number, default: 0 }, - penumbra: { type: Number, default: 0 }, - target: Object, + angle: {type: Number, default: Math.PI / 3}, + decay: {type: Number, default: 1}, + distance: {type: Number, default: 0}, + penumbra: {type: Number, default: 0}, + target: Object }, created() { - this.light = new SpotLight$1(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); - ['angle', 'decay', 'distance', 'penumbra'].forEach(p => { - watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new SpotLight$1(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); + const watchProps = ["angle", "decay", "distance", "penumbra"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + light[p] = value; }); }); - this.initLight(); + this.initLight(light); }, - __hmrId: 'SpotLight', + __hmrId: "SpotLight" }); +const MaterialInjectionKey = Symbol("Material"); var Material = defineComponent({ - inject: ['three', 'mesh'], + inject: { + mesh: MeshInjectionKey + }, props: { - color: { type: [String, Number], default: '#ffffff' }, - depthTest: { type: Boolean, default: true }, - depthWrite: { type: Boolean, default: true }, - fog: { type: Boolean, default: true }, - opacity: { type: Number, default: 1 }, - side: { type: Number, default: FrontSide }, + color: {type: [String, Number], default: "#ffffff"}, + depthTest: {type: Boolean, default: true}, + depthWrite: {type: Boolean, default: true}, + fog: {type: Boolean, default: true}, + opacity: {type: Number, default: 1}, + side: {type: Number, default: FrontSide}, transparent: Boolean, - vertexColors: Boolean, + vertexColors: Boolean + }, + setup() { + return {}; }, provide() { return { - material: this, + [MaterialInjectionKey]: this }; }, created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - - this._addWatchers(); - if (this.addWatchers) this.addWatchers(); + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + if (this.createMaterial) { + this.material = this.createMaterial(); + this.mesh.setMaterial(this.material); + this.addWatchers(); + } }, unmounted() { - this.material.dispose(); + var _a; + (_a = this.material) == null ? void 0 : _a.dispose(); }, methods: { setProp(key, value, needsUpdate = false) { - this.material[key] = value; - this.material.needsUpdate = needsUpdate; + if (this.material) { + this.material[key] = value; + this.material.needsUpdate = needsUpdate; + } }, - setTexture(texture, key = 'map') { + setTexture(texture, key = "map") { this.setProp(key, texture, true); }, - _addWatchers() { - ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => { - watch(() => this[p], () => { - if (p === 'color') { - this.material.color.set(this.color); + addWatchers() { + ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + watch(() => this[p], (value) => { + if (p === "color") { + this.material.color.set(value); } else { - this.material[p] = this[p]; + this.material[p] = value; } }); }); - }, + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Material', + __hmrId: "Material" }); - const wireframeProps = { - wireframe: { type: Boolean, default: false }, - // not needed for WebGL - // wireframeLinecap: { type: String, default: 'round' }, - // wireframeLinejoin: { type: String, default: 'round' }, - wireframeLinewidth: { type: Number, default: 1 }, // not really useful + wireframe: {type: Boolean, default: false}, + wireframeLinewidth: {type: Number, default: 1} }; var BasicMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshBasicMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshBasicMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'BasicMaterial', + __hmrId: "BasicMaterial" }); var LambertMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshLambertMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshLambertMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'LambertMaterial', + __hmrId: "LambertMaterial" }); var MatcapMaterial = defineComponent({ extends: Material, props: { src: String, - name: String, - flatShading: Boolean, + name: {type: String, default: "0404E8_0404B5_0404CB_3333FC"}, + flatShading: Boolean }, methods: { createMaterial() { - const src = this.name ? getMatcapUrl(this.name) : this.src; - const opts = propsValues(this.$props, ['src', 'name']); + const src = this.src ? this.src : getMatcapUrl(this.name); + const opts = propsValues(this.$props, ["src", "name"]); opts.matcap = new TextureLoader().load(src); - this.material = new MeshMatcapMaterial(opts); - }, - addWatchers() { - // TODO - }, + return new MeshMatcapMaterial(opts); + } }, - __hmrId: 'MatcapMaterial', + __hmrId: "MatcapMaterial" }); var PhongMaterial = defineComponent({ extends: Material, props: { - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - reflectivity: { type: Number, default: 1 }, - shininess: { type: Number, default: 30 }, - specular: { type: [String, Number], default: 0x111111 }, + emissive: {type: [Number, String], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + reflectivity: {type: Number, default: 1}, + shininess: {type: Number, default: 30}, + specular: {type: [String, Number], default: 1118481}, flatShading: Boolean, - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshPhongMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO : handle flatShading ? - ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => { + const material = new MeshPhongMaterial(propsValues(this.$props)); + const watchProps = ["emissive", "emissiveIntensity", "reflectivity", "shininess", "specular"]; + watchProps.forEach((p) => { watch(() => this[p], (value) => { - if (p === 'emissive' || p === 'specular') { - this.material[p].set(value); + if (p === "emissive" || p === "specular") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'PhongMaterial', + __hmrId: "PhongMaterial" }); -const props$1 = { - aoMapIntensity: { type: Number, default: 1 }, - bumpScale: { type: Number, default: 1 }, - displacementBias: { type: Number, default: 0 }, - displacementScale: { type: Number, default: 1 }, - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - envMapIntensity: { type: Number, default: 1 }, - lightMapIntensity: { type: Number, default: 1 }, - metalness: { type: Number, default: 0 }, - normalScale: { type: Object, default: { x: 1, y: 1 } }, - roughness: { type: Number, default: 1 }, - refractionRatio: { type: Number, default: 0.98 }, - flatShading: Boolean, +const props$7 = { + aoMapIntensity: {type: Number, default: 1}, + bumpScale: {type: Number, default: 1}, + displacementBias: {type: Number, default: 0}, + displacementScale: {type: Number, default: 1}, + emissive: {type: [String, Number], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + envMapIntensity: {type: Number, default: 1}, + lightMapIntensity: {type: Number, default: 1}, + metalness: {type: Number, default: 0}, + normalScale: {type: Object, default: () => ({x: 1, y: 1})}, + roughness: {type: Number, default: 1}, + refractionRatio: {type: Number, default: 0.98}, + flatShading: Boolean }; - var StandardMaterial = defineComponent({ extends: Material, props: { - ...props$1, - ...wireframeProps, + ...props$7, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale'])); - }, - addWatchers() { - // TODO : use setProp, handle flatShading ? - Object.keys(props$1).forEach(p => { - if (p === 'normalScale') return; + const material = new MeshStandardMaterial(propsValues(this.$props, ["normalScale"])); + Object.keys(props$7).forEach((p) => { + if (p === "normalScale") + return; watch(() => this[p], (value) => { - if (p === 'emissive') { - this.material[p].set(value); + if (p === "emissive") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProp(this, 'normalScale', this.material); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProp(this, "normalScale", material); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'StandardMaterial', + __hmrId: "StandardMaterial" }); var PhysicalMaterial = defineComponent({ extends: StandardMaterial, props: { - flatShading: Boolean, + flatShading: Boolean }, methods: { createMaterial() { - this.material = new MeshPhysicalMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO - }, + return new MeshPhysicalMaterial(propsValues(this.$props)); + } }, - __hmrId: 'PhysicalMaterial', + __hmrId: "PhysicalMaterial" }); const defaultVertexShader = ` -varying vec2 vUv; -void main(){ - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); -}`; - + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); + } +`; const defaultFragmentShader = ` -varying vec2 vUv; -void main() { - gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); -}`; - + varying vec2 vUv; + void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); + } +`; var ShaderMaterial = defineComponent({ - inject: ['three', 'mesh'], + extends: Material, props: { - uniforms: { type: Object, default: () => { return {}; } }, - vertexShader: { type: String, default: defaultVertexShader }, - fragmentShader: { type: String, default: defaultFragmentShader }, - }, - provide() { - return { - material: this, - }; - }, - created() { - this.createMaterial(); - ['vertexShader', 'fragmentShader'].forEach(p => { - watch(() => this[p], () => { - // recreate material if we change either shader - this.material.dispose(); - this.createMaterial(); - }); - }); - }, - unmounted() { - this.material.dispose(); + uniforms: {type: Object, default: () => ({})}, + vertexShader: {type: String, default: defaultVertexShader}, + fragmentShader: {type: String, default: defaultFragmentShader} }, methods: { createMaterial() { - this.material = new ShaderMaterial$1(propsValues(this.$props)); - this.mesh.setMaterial(this.material); + const material = new ShaderMaterial$1({ + uniforms: this.uniforms, + vertexShader: this.vertexShader, + fragmentShader: this.fragmentShader + }); + const watchProps = ["vertexShader", "fragmentShader"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + this.setProp(p, value, true); + }); + }); + return material; }, + addWatchers() { + } }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'ShaderMaterial', + __hmrId: "ShaderMaterial" }); -/** - * ------------------------------------------------------------------------------------------ - * Subsurface Scattering shader - * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js - * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look - * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/ - *------------------------------------------------------------------------------------------ - */ - function replaceAll(string, find, replace) { return string.split(find).join(replace); } - -const meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {')); -const meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {')); - +const meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf("void main() {")); +const meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf("void main() {")); const SubsurfaceScatteringShader = { - uniforms: UniformsUtils.merge([ ShaderLib.phong.uniforms, { - thicknessColor: { value: new Color(0xffffff) }, - thicknessDistortion: { value: 0.1 }, - thicknessAmbient: { value: 0.0 }, - thicknessAttenuation: { value: 0.1 }, - thicknessPower: { value: 2.0 }, - thicknessScale: { value: 10.0 }, - }, + thicknessColor: {value: new Color(16777215)}, + thicknessDistortion: {value: 0.1}, + thicknessAmbient: {value: 0}, + thicknessAttenuation: {value: 0.1}, + thicknessPower: {value: 2}, + thicknessScale: {value: 10} + } ]), - vertexShader: ` #define USE_UV ${ShaderChunk.meshphong_vert} `, - fragmentShader: ` #define USE_UV #define SUBSURFACE @@ -1659,357 +1785,222 @@ const SubsurfaceScatteringShader = { vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; } - ` + meshphongFragBody.replace( - '#include ', - replaceAll( - ShaderChunk.lights_fragment_begin, - 'RE_Direct( directLight, geometry, material, reflectedLight );', - ` + ` + meshphongFragBody.replace("#include ", replaceAll(ShaderChunk.lights_fragment_begin, "RE_Direct( directLight, geometry, material, reflectedLight );", ` RE_Direct( directLight, geometry, material, reflectedLight ); #if defined( SUBSURFACE ) && defined( USE_UV ) RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); #endif - ` - ) - ), + `)) }; +const props$6 = { + color: {type: [String, Number], default: "#ffffff"}, + thicknessColor: {type: [String, Number], default: "#ffffff"}, + thicknessDistortion: {type: Number, default: 0.4}, + thicknessAmbient: {type: Number, default: 0.01}, + thicknessAttenuation: {type: Number, default: 0.7}, + thicknessPower: {type: Number, default: 2}, + thicknessScale: {type: Number, default: 4} +}; var SubSurfaceMaterial = defineComponent({ - inject: ['three', 'mesh'], - props: { - color: { type: String, default: '#ffffff' }, - thicknessColor: { type: String, default: '#ffffff' }, - thicknessDistortion: { type: Number, default: 0.4 }, - thicknessAmbient: { type: Number, default: 0.01 }, - thicknessAttenuation: { type: Number, default: 0.7 }, - thicknessPower: { type: Number, default: 2 }, - thicknessScale: { type: Number, default: 4 }, - transparent: { type: Boolean, default: false }, - opacity: { type: Number, default: 1 }, - vertexColors: { type: Boolean, default: false }, - }, - created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - }, - unmounted() { - this.material.dispose(); - }, + extends: Material, + props: props$6, methods: { createMaterial() { const params = SubsurfaceScatteringShader; const uniforms = UniformsUtils.clone(params.uniforms); - - Object.entries(this.$props).forEach(([key, value]) => { + Object.keys(props$6).forEach((key) => { + const value = this[key]; let _key = key, _value = value; - if (['color', 'thicknessColor'].includes(key)) { - if (key === 'color') _key = 'diffuse'; + if (["color", "thicknessColor"].includes(key)) { + if (key === "color") + _key = "diffuse"; _value = new Color(value); } - if (!['transparent', 'vertexColors'].includes(key)) { - uniforms[_key].value = _value; - } + uniforms[_key].value = _value; }); - - this.material = new ShaderMaterial$1({ + const material = new ShaderMaterial$1({ ...params, uniforms, lights: true, transparent: this.transparent, - vertexColors: this.vertexColors, + vertexColors: this.vertexColors }); - }, + return material; + } }, - render() { - return []; - }, - __hmrId: 'SubSurfaceMaterial', + __hmrId: "SubSurfaceMaterial" }); var ToonMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshToonMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshToonMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'ToonMaterial', + __hmrId: "ToonMaterial" }); var Texture = defineComponent({ - inject: ['material'], - emits: ['loaded'], + inject: { + material: MaterialInjectionKey + }, props: { - name: { type: String, default: 'map' }, - uniform: { type: String, default: null }, + name: {type: String, default: "map"}, + uniform: String, src: String, onLoad: Function, onProgress: Function, onError: Function, - mapping: { type: Number, default: UVMapping }, - wrapS: { type: Number, default: ClampToEdgeWrapping }, - wrapT: { type: Number, default: ClampToEdgeWrapping }, - magFilter: { type: Number, default: LinearFilter }, - minFilter: { type: Number, default: LinearMipmapLinearFilter }, - repeat: { type: Object, default: { x: 1, y: 1 } }, - rotation: { type: Number, default: 0 }, - center: { type: Object, default: { x: 0, y: 0 } }, + mapping: {type: Number, default: UVMapping}, + wrapS: {type: Number, default: ClampToEdgeWrapping}, + wrapT: {type: Number, default: ClampToEdgeWrapping}, + magFilter: {type: Number, default: LinearFilter}, + minFilter: {type: Number, default: LinearMipmapLinearFilter}, + repeat: {type: Object, default: () => ({x: 1, y: 1})}, + rotation: {type: Number, default: 0}, + center: {type: Object, default: () => ({x: 0, y: 0})} + }, + setup() { + return {}; }, created() { this.refreshTexture(); watch(() => this.src, this.refreshTexture); }, unmounted() { - if (this.material && this.material.setTexture) this.material.setTexture(null, this.name); - this.texture.dispose(); + var _a, _b; + (_a = this.material) == null ? void 0 : _a.setTexture(null, this.name); + (_b = this.texture) == null ? void 0 : _b.dispose(); }, methods: { createTexture() { - this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center']; - wathProps.forEach(prop => { - bindProp(this, prop, this.texture); + if (!this.src) + return void 0; + const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); + const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + wathProps.forEach((prop) => { + bindProp(this, prop, texture); }); + return texture; }, refreshTexture() { - this.createTexture(); - // handle standard material - if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); } - // handle shader material - else if (this.material && this.material.material.type === "ShaderMaterial") { - // require a `uniform` prop so we know what to call the uniform - if (!this.uniform) { - console.warn('"uniform" prop required to use texture in a shader.'); - return + this.texture = this.createTexture(); + if (this.texture && this.material) { + this.material.setTexture(this.texture, this.name); + if (this.material.material instanceof ShaderMaterial$1 && this.uniform) { + this.material.uniforms[this.uniform] = {value: this.texture}; } - this.material.uniforms[this.uniform] = { value: this.texture }; } }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, - }, - render() { return []; }, -}); - -var CubeTexture = defineComponent({ - inject: ['material'], - emits: ['loaded'], - props: { - path: String, - urls: { - type: Array, - default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'], - }, - onLoad: Function, - onProgress: Function, - onError: Function, - name: { type: String, default: 'envMap' }, - refraction: Boolean, - // todo: remove ? - refractionRatio: { type: Number, default: 0.98 }, - }, - created() { - this.refreshTexture(); - watch(() => this.path, this.refreshTexture); - watch(() => this.urls, this.refreshTexture); - }, - unmounted() { - this.material.setTexture(null, this.name); - this.texture.dispose(); - }, - methods: { - createTexture() { - this.texture = new CubeTextureLoader() - .setPath(this.path) - .load(this.urls, this.onLoaded, this.onProgress, this.onError); - }, - refreshTexture() { - this.createTexture(); - this.material.setTexture(this.texture, this.name); - if (this.refraction) { - this.texture.mapping = CubeRefractionMapping; - this.material.setProp('refractionRatio', this.refractionRatio); - } - }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, + onLoaded(t) { + var _a; + (_a = this.onLoad) == null ? void 0 : _a.call(this, t); + } }, render() { return []; - }, + } }); -const pointerProps = { - onPointerEnter: Function, - onPointerOver: Function, - onPointerMove: Function, - onPointerLeave: Function, - onPointerDown: Function, - onPointerUp: Function, - onClick: Function, -}; - -const Mesh = defineComponent({ - name: 'Mesh', - extends: Object3D, +var CubeTexture = defineComponent({ + extends: Texture, props: { - castShadow: Boolean, - receiveShadow: Boolean, - ...pointerProps, - }, - // can't use setup because it will not be used in sub components - // setup() {}, - provide() { - return { - mesh: this, - }; - }, - mounted() { - if (!this.mesh && !this.loading) this.initMesh(); - }, - methods: { - initMesh() { - this.mesh = new Mesh$1(this.geometry, this.material); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); - } - - this.initObject3D(this.mesh); + path: {type: String, required: true}, + urls: { + type: Array, + default: () => ["px.jpg", "nx.jpg", "py.jpg", "ny.jpg", "pz.jpg", "nz.jpg"] }, - addGeometryWatchers(props) { - Object.keys(props).forEach(prop => { - watch(() => this[prop], () => { - this.refreshGeometry(); - }); - }); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - if (this.mesh) this.mesh.material = material; - }, - refreshGeometry() { - const oldGeo = this.geometry; - this.createGeometry(); - this.mesh.geometry = this.geometry; - oldGeo.dispose(); - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); - } - // for predefined mesh (geometry is not unmounted) - if (this.geometry) this.geometry.dispose(); - }, - __hmrId: 'Mesh', -}); - -function meshComponent(name, props, createGeometry) { - return defineComponent({ - name, - extends: Mesh, - props, - created() { - this.createGeometry(); - this.addGeometryWatchers(props); - }, - methods: { - createGeometry() { - this.geometry = createGeometry(this); - }, - }, - __hmrId: name, - }); -} - -var Box = meshComponent('Box', props$h, createGeometry$f); - -var Circle = meshComponent('Circle', props$g, createGeometry$e); - -var Cone = meshComponent('Cone', props$f, createGeometry$d); - -var Cylinder = meshComponent('Cylinder', props$e, createGeometry$c); - -var Dodecahedron = meshComponent('Dodecahedron', props$d, createGeometry$b); - -var Icosahedron = meshComponent('Icosahedron', props$c, createGeometry$a); - -var Lathe = meshComponent('Lathe', props$b, createGeometry$9); - -var Octahedron = meshComponent('Octahedron', props$a, createGeometry$8); - -var Plane = meshComponent('Plane', props$9, createGeometry$7); - -var Polyhedron = meshComponent('Polyhedron', props$8, createGeometry$6); - -var Ring = meshComponent('Ring', props$7, createGeometry$5); - -var Sphere = meshComponent('Sphere', props$6, createGeometry$4); - -var Tetrahedron = meshComponent('Tetrahedron', props$5, createGeometry$3); - -const props = { - text: String, - fontSrc: String, - size: { type: Number, default: 80 }, - height: { type: Number, default: 5 }, - depth: { type: Number, default: 1 }, - curveSegments: { type: Number, default: 12 }, - bevelEnabled: { type: Boolean, default: false }, - bevelThickness: { type: Number, default: 10 }, - bevelSize: { type: Number, default: 8 }, - bevelOffset: { type: Number, default: 0 }, - bevelSegments: { type: Number, default: 5 }, - align: { type: [Boolean, String], default: false }, -}; - -var Text = defineComponent({ - extends: Mesh, - props, - data() { - return { - loading: true, - }; + mapping: {type: Number, default: CubeReflectionMapping} }, created() { - // add watchers + watch(() => this.path, this.refreshTexture); + watch(() => this.urls, this.refreshTexture); + }, + methods: { + createTexture() { + return new CubeTextureLoader().setPath(this.path).load(this.urls, this.onLoaded, this.onProgress, this.onError); + } + } +}); + +var Box = meshComponent("Box", props$n, createGeometry$f); + +var Circle = meshComponent("Circle", props$m, createGeometry$e); + +var Cone = meshComponent("Cone", props$l, createGeometry$d); + +var Cylinder = meshComponent("Cylinder", props$k, createGeometry$c); + +var Dodecahedron = meshComponent("Dodecahedron", props$j, createGeometry$b); + +var Icosahedron = meshComponent("Icosahedron", props$i, createGeometry$a); + +var Lathe = meshComponent("Lathe", props$h, createGeometry$9); + +var Octahedron = meshComponent("Octahedron", props$g, createGeometry$8); + +var Plane = meshComponent("Plane", props$f, createGeometry$7); + +var Polyhedron = meshComponent("Polyhedron", props$e, createGeometry$6); + +var Ring = meshComponent("Ring", props$d, createGeometry$5); + +var Sphere = meshComponent("Sphere", props$c, createGeometry$4); + +var Tetrahedron = meshComponent("Tetrahedron", props$b, createGeometry$3); + +const props$5 = { + text: {type: String, required: true, default: "Text"}, + fontSrc: {type: String, required: true}, + size: {type: Number, default: 80}, + height: {type: Number, default: 5}, + depth: {type: Number, default: 1}, + curveSegments: {type: Number, default: 12}, + bevelEnabled: {type: Boolean, default: false}, + bevelThickness: {type: Number, default: 10}, + bevelSize: {type: Number, default: 8}, + bevelOffset: {type: Number, default: 0}, + bevelSegments: {type: Number, default: 5}, + align: {type: [Boolean, String], default: false} +}; +var Text = defineComponent({ + extends: Mesh, + props: props$5, + setup() { + return {}; + }, + created() { + if (!this.fontSrc) { + console.error('Missing required prop: "font-src"'); + return; + } const watchProps = [ - 'text', 'size', 'height', 'curveSegments', - 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments', - 'align', + "text", + "size", + "height", + "curveSegments", + "bevelEnabled", + "bevelThickness", + "bevelSize", + "bevelOffset", + "bevelSegments", + "align" ]; - watchProps.forEach(p => { + watchProps.forEach((p) => { watch(() => this[p], () => { - if (this.font) this.refreshGeometry(); + if (this.font) + this.refreshGeometry(); }); }); - const loader = new FontLoader(); + this.loading = true; loader.load(this.fontSrc, (font) => { this.loading = false; this.font = font; @@ -2029,88 +2020,93 @@ var Text = defineComponent({ bevelThickness: this.bevelThickness, bevelSize: this.bevelSize, bevelOffset: this.bevelOffset, - bevelSegments: this.bevelSegments, + bevelSegments: this.bevelSegments }); - - if (this.align === 'center') { + if (this.align === "center") { this.geometry.center(); } - }, - }, + } + } }); -var Torus = meshComponent('Torus', props$4, createGeometry$2); +var Torus = meshComponent("Torus", props$a, createGeometry$2); -var TorusKnot = meshComponent('TorusKnot', props$3, createGeometry$1); +var TorusKnot = meshComponent("TorusKnot", props$9, createGeometry$1); var Tube = defineComponent({ extends: Mesh, - props: props$2, + props: props$8, created() { this.createGeometry(); - this.addGeometryWatchers(props$2); + this.addGeometryWatchers(props$8); }, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update curve points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, + } }, - __hmrId: 'Tube', + __hmrId: "Tube" }); var Image = defineComponent({ - emits: ['loaded'], + emits: ["loaded"], extends: Mesh, props: { - src: String, + src: {type: String, required: true}, width: Number, height: Number, - keepSize: Boolean, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + keepSize: Boolean + }, + setup() { + return {}; }, created() { - this.createGeometry(); - this.createMaterial(); - this.initMesh(); - + if (!this.renderer) + return; + this.geometry = new PlaneGeometry$1(1, 1, this.widthSegments, this.heightSegments); + this.material = new MeshBasicMaterial({side: DoubleSide, map: this.loadTexture()}); watch(() => this.src, this.refreshTexture); - - ['width', 'height'].forEach(p => { + ["width", "height"].forEach((p) => { watch(() => this[p], this.resize); }); - - if (this.keepSize) this.three.onAfterResize(this.resize); + this.resize(); + if (this.keepSize) + this.renderer.onResize(this.resize); + }, + unmounted() { + var _a; + (_a = this.renderer) == null ? void 0 : _a.offResize(this.resize); }, methods: { - createGeometry() { - this.geometry = new PlaneGeometry$1(1, 1, 1, 1); - }, - createMaterial() { - this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() }); - }, loadTexture() { return new TextureLoader().load(this.src, this.onLoaded); }, refreshTexture() { - if (this.texture) this.texture.dispose(); - this.material.map = this.loadTexture(); - this.material.needsUpdate = true; + var _a; + (_a = this.texture) == null ? void 0 : _a.dispose(); + if (this.material) { + this.material.map = this.loadTexture(); + this.material.needsUpdate = true; + } }, onLoaded(texture) { this.texture = texture; this.resize(); - this.$emit('loaded'); + this.$emit("loaded", texture); }, resize() { - if (!this.texture) return; - const screen = this.three.size; + if (!this.renderer || !this.texture) + return; + const screen = this.renderer.size; const iW = this.texture.image.width; const iH = this.texture.image.height; const iRatio = iW / iH; - let w, h; + let w = 1, h = 1; if (this.width && this.height) { w = this.width * screen.wWidth / screen.width; h = this.height * screen.wHeight / screen.height; @@ -2120,395 +2116,398 @@ var Image = defineComponent({ } else if (this.height) { h = this.height * screen.wHeight / screen.height; w = h * iRatio; + } else { + if (iRatio > 1) + w = h * iRatio; + else + h = w / iRatio; } - this.mesh.scale.x = w; - this.mesh.scale.y = h; - }, + if (this.mesh) { + this.mesh.scale.x = w; + this.mesh.scale.y = h; + } + } }, - __hmrId: 'Image', + __hmrId: "Image" }); var InstancedMesh = defineComponent({ - extends: Object3D, + extends: Mesh, props: { - castShadow: Boolean, - receiveShadow: Boolean, - count: Number, - ...pointerProps, - }, - provide() { - return { - mesh: this, - }; - }, - beforeMount() { - if (!this.$slots.default) { - console.error('Missing Geometry'); - } - }, - mounted() { - this.initMesh(); + count: {type: Number, required: true} }, methods: { initMesh() { - this.mesh = new InstancedMesh$1(this.geometry, this.material, this.count); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); + if (!this.renderer) + return; + if (!this.geometry || !this.material) { + console.error("Missing geometry and/or material"); + return false; + } + this.mesh = new InstancedMesh$1(this.geometry, this.material, this.count); + this.mesh.userData.component = this; + bindProp(this, "castShadow", this.mesh); + bindProp(this, "receiveShadow", this.mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + this.renderer.three.addIntersectObject(this.mesh); } - this.initObject3D(this.mesh); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - this.material.instancingColor = true; - if (this.mesh) this.mesh.material = material; - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); } }, - __hmrId: 'InstancedMesh', + __hmrId: "InstancedMesh" }); var Sprite = defineComponent({ extends: Object3D, - emits: ['loaded'], + emits: ["loaded"], props: { - src: String, + src: {type: String, required: true} }, - data() { - return { - loading: true, - }; + setup() { + return {}; }, created() { this.texture = new TextureLoader().load(this.src, this.onLoaded); - this.material = new SpriteMaterial({ map: this.texture }); + this.material = new SpriteMaterial({map: this.texture}); this.sprite = new Sprite$1(this.material); - this.geometry = this.sprite.geometry; this.initObject3D(this.sprite); }, unmounted() { - this.texture.dispose(); - this.material.dispose(); + var _a, _b; + (_a = this.texture) == null ? void 0 : _a.dispose(); + (_b = this.material) == null ? void 0 : _b.dispose(); }, methods: { onLoaded() { - this.loading = false; this.updateUV(); - this.$emit('loaded'); + this.$emit("loaded"); }, updateUV() { - this.iWidth = this.texture.image.width; - this.iHeight = this.texture.image.height; - this.iRatio = this.iWidth / this.iHeight; - + if (!this.texture || !this.sprite) + return; + const iWidth = this.texture.image.width; + const iHeight = this.texture.image.height; + const iRatio = iWidth / iHeight; let x = 0.5, y = 0.5; - if (this.iRatio > 1) { - y = 0.5 / this.iRatio; + if (iRatio > 1) { + x = 0.5 * iRatio; } else { - x = 0.5 / this.iRatio; + y = 0.5 / iRatio; } - - const positions = this.geometry.attributes.position.array; - positions[0] = -x; positions[1] = -y; - positions[5] = x; positions[6] = -y; - positions[10] = x; positions[11] = y; - positions[15] = -x; positions[16] = y; - this.geometry.attributes.position.needsUpdate = true; - }, + const positions = this.sprite.geometry.attributes.position.array; + positions[0] = -x; + positions[1] = -y; + positions[5] = x; + positions[6] = -y; + positions[10] = x; + positions[11] = y; + positions[15] = -x; + positions[16] = y; + this.sprite.geometry.attributes.position.needsUpdate = true; + } }, - __hmrId: 'Sprite', + __hmrId: "Sprite" }); var Model = defineComponent({ extends: Object3D, - emits: ['load', 'progress', 'error'], + emits: ["load", "progress", "error"], + props: { + src: {type: String, required: true} + }, data() { return { - progress: 0, + progress: 0 }; }, methods: { onLoad(model) { - this.$emit('load', model); + this.$emit("load", model); this.initObject3D(model); }, onProgress(progress) { this.progress = progress.loaded / progress.total; - this.$emit('progress', progress); + this.$emit("progress", progress); }, onError(error) { - this.$emit('error', error); - }, - }, + this.$emit("error", error); + } + } }); var GLTF = defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new GLTFLoader(); loader.load(this.src, (gltf) => { this.onLoad(gltf.scene); }, this.onProgress, this.onError); - }, + } }); var FBX = defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new FBXLoader(); loader.load(this.src, (fbx) => { this.onLoad(fbx); }, this.onProgress, this.onError); - }, + } }); +const ComposerInjectionKey = Symbol("Composer"); var EffectComposer = defineComponent({ setup() { - return { - passes: [], - }; + const renderer = inject(RendererInjectionKey); + return {renderer}; }, - inject: ['three'], provide() { return { - passes: this.passes, + [ComposerInjectionKey]: this }; }, - mounted() { - this.three.onAfterInit(() => { - this.composer = new EffectComposer$1(this.three.renderer); - this.three.renderer.autoClear = false; - this.passes.forEach(pass => { - this.composer.addPass(pass); - }); - this.three.composer = this.composer; - + created() { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + const composer = new EffectComposer$1(this.renderer.renderer); + this.composer = composer; + this.renderer.composer = composer; + renderer.addListener("init", () => { + renderer.renderer.autoClear = false; this.resize(); - this.three.onAfterResize(this.resize); + renderer.addListener("resize", this.resize); }); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - this.composer.setSize(this.three.size.width, this.three.size.height); + addPass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.addPass(pass); }, + removePass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.removePass(pass); + }, + resize() { + if (this.composer && this.renderer) { + this.composer.setSize(this.renderer.size.width, this.renderer.size.height); + } + } }, render() { - return this.$slots.default(); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'EffectComposer', + __hmrId: "EffectComposer" }); var EffectPass = defineComponent({ - inject: ['three', 'passes'], - emits: ['ready'], - beforeMount() { - if (!this.passes) { - console.error('Missing parent EffectComposer'); + inject: { + renderer: RendererInjectionKey, + composer: ComposerInjectionKey + }, + emits: ["ready"], + setup() { + return {}; + }, + created() { + if (!this.composer) { + console.error("Missing parent EffectComposer"); + } + if (!this.renderer) { + console.error("Missing parent Renderer"); } }, unmounted() { - if (this.pass.dispose) this.pass.dispose(); + var _a, _b, _c; + if (this.pass) { + (_a = this.composer) == null ? void 0 : _a.removePass(this.pass); + (_c = (_b = this.pass).dispose) == null ? void 0 : _c.call(_b); + } }, methods: { - completePass(pass) { - this.passes.push(pass); + initEffectPass(pass) { + var _a; this.pass = pass; - this.$emit('ready', pass); - }, + (_a = this.composer) == null ? void 0 : _a.addPass(pass); + this.$emit("ready", pass); + } }, render() { return []; }, - __hmrId: 'EffectPass', + __hmrId: "EffectPass" }); var RenderPass = defineComponent({ extends: EffectPass, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } - const pass = new RenderPass$1(this.three.scene, this.three.camera); - this.completePass(pass); + const pass = new RenderPass$1(this.renderer.scene, this.renderer.camera); + this.initEffectPass(pass); }, - __hmrId: 'RenderPass', + __hmrId: "RenderPass" }); +const props$4 = { + focus: {type: Number, default: 1}, + aperture: {type: Number, default: 0.025}, + maxblur: {type: Number, default: 0.01} +}; var BokehPass = defineComponent({ extends: EffectPass, - props: { - focus: { - type: Number, - default: 1, - }, - aperture: { - type: Number, - default: 0.025, - }, - maxblur: { - type: Number, - default: 0.01, - }, - }, - watch: { - focus() { this.pass.uniforms.focus.value = this.focus; }, - aperture() { this.pass.uniforms.aperture.value = this.aperture; }, - maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; }, - }, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + props: props$4, + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } const params = { focus: this.focus, aperture: this.aperture, maxblur: this.maxblur, - width: this.three.size.width, - height: this.three.size.height, + width: this.renderer.size.width, + height: this.renderer.size.height }; - const pass = new BokehPass$1(this.three.scene, this.three.camera, params); - this.completePass(pass); + const pass = new BokehPass$1(this.renderer.scene, this.renderer.camera, params); + Object.keys(props$4).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'BokehPass', + __hmrId: "BokehPass" }); +const props$3 = { + noiseIntensity: {type: Number, default: 0.5}, + scanlinesIntensity: {type: Number, default: 0.05}, + scanlinesCount: {type: Number, default: 4096}, + grayscale: {type: Number, default: 0} +}; var FilmPass = defineComponent({ extends: EffectPass, - props: { - noiseIntensity: { type: Number, default: 0.5 }, - scanlinesIntensity: { type: Number, default: 0.05 }, - scanlinesCount: { type: Number, default: 4096 }, - grayscale: { type: Number, default: 0 }, - }, - watch: { - noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; }, - scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; }, - scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; }, - grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; }, - }, - mounted() { + props: props$3, + created() { const pass = new FilmPass$1(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale); - this.completePass(pass); + Object.keys(props$3).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'FilmPass', + __hmrId: "FilmPass" }); var FXAAPass = defineComponent({ extends: EffectPass, - mounted() { + created() { + var _a; const pass = new ShaderPass(FXAAShader); - this.completePass(pass); - - // resize will be called in three init - this.three.onAfterResize(this.resize); + (_a = this.renderer) == null ? void 0 : _a.addListener("resize", this.resize); + this.initEffectPass(pass); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - const { resolution } = this.pass.material.uniforms; - resolution.value.x = 1 / this.three.size.width; - resolution.value.y = 1 / this.three.size.height; - }, + resize({size}) { + if (this.pass) { + const {resolution} = this.pass.material.uniforms; + resolution.value.x = 1 / size.width; + resolution.value.y = 1 / size.height; + } + } }, - __hmrId: 'FXAAPass', + __hmrId: "FXAAPass" }); +const props$2 = { + shape: {type: Number, default: 1}, + radius: {type: Number, default: 4}, + rotateR: {type: Number, default: Math.PI / 12 * 1}, + rotateG: {type: Number, default: Math.PI / 12 * 2}, + rotateB: {type: Number, default: Math.PI / 12 * 3}, + scatter: {type: Number, default: 0} +}; var HalftonePass = defineComponent({ extends: EffectPass, - props: { - shape: { type: Number, default: 1 }, - radius: { type: Number, default: 4 }, - rotateR: { type: Number, default: Math.PI / 12 * 1 }, - rotateG: { type: Number, default: Math.PI / 12 * 2 }, - rotateB: { type: Number, default: Math.PI / 12 * 3 }, - scatter: { type: Number, default: 0 }, - }, - mounted() { - const pass = new HalftonePass$1(this.three.size.width, this.three.size.height, {}); - - ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => { + props: props$2, + created() { + if (!this.renderer) + return; + const pass = new HalftonePass$1(this.renderer.size.width, this.renderer.size.height, {}); + Object.keys(props$2).forEach((p) => { pass.uniforms[p].value = this[p]; - watch(() => this[p], () => { - pass.uniforms[p].value = this[p]; + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; }); }); - - this.completePass(pass); + this.initEffectPass(pass); }, - __hmrId: 'HalftonePass', + __hmrId: "HalftonePass" }); var SMAAPass = defineComponent({ extends: EffectPass, - mounted() { - // three size is not set yet, but this pass will be resized by effect composer - const pass = new SMAAPass$1(this.three.size.width, this.three.size.height); - this.completePass(pass); + created() { + if (!this.renderer) + return; + const pass = new SMAAPass$1(this.renderer.size.width, this.renderer.size.height); + this.initEffectPass(pass); }, - __hmrId: 'SMAAPass', + __hmrId: "SMAAPass" }); var SSAOPass = defineComponent({ extends: EffectPass, props: { - scene: null, - camera: null, options: { type: Object, - default: () => ({}), - }, - }, - mounted() { - const pass = new SSAOPass$1( - this.scene || this.three.scene, - this.camera || this.three.camera, - this.three.size.width, - this.three.size.height - ); - - for (const key of Object.keys(this.options)) { - pass[key] = this.options[key]; + default: () => ({}) } - - this.completePass(pass); }, - __hmrId: 'SSAOPass', + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; + } + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; + } + const pass = new SSAOPass$1(this.renderer.scene, this.renderer.camera, this.renderer.size.width, this.renderer.size.height); + Object.keys(this.options).forEach((key) => { + pass[key] = this.options[key]; + }); + this.initEffectPass(pass); + }, + __hmrId: "SSAOPass" }); var DefaultShader = { @@ -2525,20 +2524,18 @@ var DefaultShader = { void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } - `, + ` }; -// From https://github.com/evanw/glfx.js - var TiltShift = { uniforms: { - tDiffuse: { value: null }, - blurRadius: { value: 0 }, - gradientRadius: { value: 0 }, - start: { value: new Vector2() }, - end: { value: new Vector2() }, - delta: { value: new Vector2() }, - texSize: { value: new Vector2() }, + tDiffuse: {value: null}, + blurRadius: {value: 0}, + gradientRadius: {value: 0}, + start: {value: new Vector2()}, + end: {value: new Vector2()}, + delta: {value: new Vector2()}, + texSize: {value: new Vector2()} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2584,87 +2581,89 @@ var TiltShift = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; +const props$1 = { + blurRadius: {type: Number, default: 10}, + gradientRadius: {type: Number, default: 100}, + start: {type: Object, default: () => ({x: 0, y: 100})}, + end: {type: Object, default: () => ({x: 10, y: 100})} +}; var TiltShiftPass = defineComponent({ extends: EffectPass, - props: { - blurRadius: { type: Number, default: 10 }, - gradientRadius: { type: Number, default: 100 }, - start: { type: Object, default: { x: 0, y: 100 } }, - end: { type: Object, default: { x: 10, y: 100 } }, + props: props$1, + setup() { + return {uniforms1: {}, uniforms2: {}}; }, - mounted() { - this.pass = new ShaderPass(TiltShift); - this.passes.push(this.pass); - + created() { + if (!this.composer) + return; this.pass1 = new ShaderPass(TiltShift); - this.passes.push(this.pass1); - - const uniforms = this.uniforms = this.pass.uniforms; + this.pass2 = new ShaderPass(TiltShift); const uniforms1 = this.uniforms1 = this.pass1.uniforms; - uniforms1.blurRadius = uniforms.blurRadius; - uniforms1.gradientRadius = uniforms.gradientRadius; - uniforms1.start = uniforms.start; - uniforms1.end = uniforms.end; - uniforms1.texSize = uniforms.texSize; - - bindProp(this, 'blurRadius', uniforms.blurRadius, 'value'); - bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value'); - + const uniforms2 = this.uniforms2 = this.pass2.uniforms; + uniforms2.blurRadius = uniforms1.blurRadius; + uniforms2.gradientRadius = uniforms1.gradientRadius; + uniforms2.start = uniforms1.start; + uniforms2.end = uniforms1.end; + uniforms2.texSize = uniforms1.texSize; + bindProp(this, "blurRadius", uniforms1.blurRadius, "value"); + bindProp(this, "gradientRadius", uniforms1.gradientRadius, "value"); this.updateFocusLine(); - ['start', 'end'].forEach(p => { - watch(() => this[p], this.updateFocusLine, { deep: true }); + ["start", "end"].forEach((p) => { + watch(() => this[p], this.updateFocusLine, {deep: true}); }); - - this.pass.setSize = (width, height) => { - uniforms.texSize.value.set(width, height); + this.pass1.setSize = (width, height) => { + uniforms1.texSize.value.set(width, height); }; - - // emit ready event with two passes - do so manually in this file instead - // of calling `completePass` like in other effect types - this.$emit('ready', [this.pass, this.pass1]); + this.initEffectPass(this.pass1); + this.composer.addPass(this.pass2); + }, + unmounted() { + if (this.composer && this.pass2) + this.composer.removePass(this.pass2); }, methods: { updateFocusLine() { - this.uniforms.start.value.copy(this.start); - this.uniforms.end.value.copy(this.end); + this.uniforms1.start.value.copy(this.start); + this.uniforms1.end.value.copy(this.end); const dv = new Vector2().copy(this.end).sub(this.start).normalize(); - this.uniforms.delta.value.copy(dv); - this.uniforms1.delta.value.set(-dv.y, dv.x); - }, + this.uniforms1.delta.value.copy(dv); + this.uniforms2.delta.value.set(-dv.y, dv.x); + } }, - __hmrId: 'TiltShiftPass', + __hmrId: "TiltShiftPass" }); +const props = { + strength: {type: Number, default: 1.5}, + radius: {type: Number, default: 0}, + threshold: {type: Number, default: 0} +}; var UnrealBloomPass = defineComponent({ extends: EffectPass, - props: { - strength: { type: Number, default: 1.5 }, - radius: { type: Number, default: 0 }, - threshold: { type: Number, default: 0 }, - }, - watch: { - strength() { this.pass.strength = this.strength; }, - radius() { this.pass.radius = this.radius; }, - threshold() { this.pass.threshold = this.threshold; }, - }, - mounted() { - const size = new Vector2(this.three.size.width, this.three.size.height); + props, + created() { + if (!this.renderer) + return; + const size = new Vector2(this.renderer.size.width, this.renderer.size.height); const pass = new UnrealBloomPass$1(size, this.strength, this.radius, this.threshold); - this.completePass(pass); + Object.keys(props).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'UnrealBloomPass', + __hmrId: "UnrealBloomPass" }); -// From https://github.com/evanw/glfx.js - var ZoomBlur = { uniforms: { - tDiffuse: { value: null }, - center: { value: new Vector2(0.5, 0.5) }, - strength: { value: 0 }, + tDiffuse: {value: null}, + center: {value: new Vector2(0.5, 0.5)}, + strength: {value: 0} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2703,37 +2702,37 @@ var ZoomBlur = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; var ZoomBlurPass = defineComponent({ extends: EffectPass, props: { - center: { type: Object, default: { x: 0.5, y: 0.5 } }, - strength: { type: Number, default: 0.5 }, + center: {type: Object, default: () => ({x: 0.5, y: 0.5})}, + strength: {type: Number, default: 0.5} }, - mounted() { + created() { const pass = new ShaderPass(ZoomBlur); - - const uniforms = this.uniforms = pass.uniforms; - bindProp(this, 'center', uniforms.center, 'value'); - bindProp(this, 'strength', uniforms.strength, 'value'); - - this.completePass(pass); + bindProp(this, "center", pass.uniforms.center, "value"); + bindProp(this, "strength", pass.uniforms.strength, "value"); + this.initEffectPass(pass); }, - __hmrId: 'ZoomBlurPass', + __hmrId: "ZoomBlurPass" }); var TROIS = /*#__PURE__*/Object.freeze({ __proto__: null, Renderer: Renderer, + RendererInjectionKey: RendererInjectionKey, OrthographicCamera: OrthographicCamera, PerspectiveCamera: PerspectiveCamera, Camera: PerspectiveCamera, Group: Group, Scene: Scene, + SceneInjectionKey: SceneInjectionKey, Object3D: Object3D, Raycaster: Raycaster, + CubeCamera: CubeCamera, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2756,6 +2755,8 @@ var TROIS = /*#__PURE__*/Object.freeze({ PointLight: PointLight, RectAreaLight: RectAreaLight, SpotLight: SpotLight, + Material: Material, + MaterialInjectionKey: MaterialInjectionKey, BasicMaterial: BasicMaterial, LambertMaterial: LambertMaterial, MatcapMaterial: MatcapMaterial, @@ -2768,6 +2769,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Texture: Texture, CubeTexture: CubeTexture, Mesh: Mesh, + MeshInjectionKey: MeshInjectionKey, Box: Box, Circle: Circle, Cone: Cone, @@ -2791,6 +2793,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, + ComposerInjectionKey: ComposerInjectionKey, RenderPass: RenderPass, BokehPass: BokehPass, FilmPass: FilmPass, @@ -2806,95 +2809,128 @@ var TROIS = /*#__PURE__*/Object.freeze({ bindProp: bindProp, propsValues: propsValues, lerp: lerp, - lerpv2: lerpv2, - lerpv3: lerpv3, limit: limit, getMatcapUrl: getMatcapUrl }); const TroisJSVuePlugin = { - install: (app) => { + install(app) { const comps = [ - 'Camera', - 'OrthographicCamera', - 'PerspectiveCamera', - 'Raycaster', - 'Renderer', - 'Scene', - 'Group', - - 'AmbientLight', - 'DirectionalLight', - 'HemisphereLight', - 'PointLight', - 'RectAreaLight', - 'SpotLight', - - 'BasicMaterial', - 'LambertMaterial', - 'MatcapMaterial', - 'PhongMaterial', - 'PhysicalMaterial', - 'ShaderMaterial', - 'StandardMaterial', - 'SubSurfaceMaterial', - 'ToonMaterial', - - 'Texture', - 'CubeTexture', - - 'Mesh', - - 'Box', 'BoxGeometry', - 'Circle', 'CircleGeometry', - 'Cone', 'ConeGeometry', - 'Cylinder', 'CylinderGeometry', - 'Dodecahedron', 'DodecahedronGeometry', - 'Icosahedron', 'IcosahedronGeometry', - 'Lathe', 'LatheGeometry', - 'Octahedron', 'OctahedronGeometry', - 'Plane', 'PlaneGeometry', - 'Polyhedron', 'PolyhedronGeometry', - 'Ring', 'RingGeometry', - 'Sphere', 'SphereGeometry', - 'Tetrahedron', 'TetrahedronGeometry', - 'Text', - 'Torus', 'TorusGeometry', - 'TorusKnot', 'TorusKnotGeometry', - 'Tube', 'TubeGeometry', - - 'Image', - 'InstancedMesh', - 'Sprite', - - 'FBXModel', - 'GLTFModel', - - 'BokehPass', - 'EffectComposer', - 'FilmPass', - 'FXAAPass', - 'HalftonePass', - 'RenderPass', - 'SAOPass', - 'SMAAPass', - 'SSAOPass', - 'TiltShiftPass', - 'UnrealBloomPass', - 'ZoomBlurPass', - - 'GLTFViewer', + "Camera", + "OrthographicCamera", + "PerspectiveCamera", + "Raycaster", + "Renderer", + "Scene", + "Group", + "AmbientLight", + "DirectionalLight", + "HemisphereLight", + "PointLight", + "RectAreaLight", + "SpotLight", + "BasicMaterial", + "LambertMaterial", + "MatcapMaterial", + "PhongMaterial", + "PhysicalMaterial", + "ShaderMaterial", + "StandardMaterial", + "SubSurfaceMaterial", + "ToonMaterial", + "Texture", + "CubeTexture", + "Mesh", + "Box", + "BoxGeometry", + "Circle", + "CircleGeometry", + "Cone", + "ConeGeometry", + "Cylinder", + "CylinderGeometry", + "Dodecahedron", + "DodecahedronGeometry", + "Icosahedron", + "IcosahedronGeometry", + "Lathe", + "LatheGeometry", + "Octahedron", + "OctahedronGeometry", + "Plane", + "PlaneGeometry", + "Polyhedron", + "PolyhedronGeometry", + "Ring", + "RingGeometry", + "Sphere", + "SphereGeometry", + "Tetrahedron", + "TetrahedronGeometry", + "Text", + "Torus", + "TorusGeometry", + "TorusKnot", + "TorusKnotGeometry", + "Tube", + "TubeGeometry", + "Image", + "InstancedMesh", + "Sprite", + "FBXModel", + "GLTFModel", + "BokehPass", + "EffectComposer", + "FilmPass", + "FXAAPass", + "HalftonePass", + "RenderPass", + "SAOPass", + "SMAAPass", + "SSAOPass", + "TiltShiftPass", + "UnrealBloomPass", + "ZoomBlurPass", + "GLTFViewer" ]; - - comps.forEach(comp => { + comps.forEach((comp) => { app.component(comp, TROIS[comp]); }); - }, + } }; - function createApp(params) { return createApp$1(params).use(TroisJSVuePlugin); } -export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, Cone, ConeGeometry, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Mesh, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, lerpv2, lerpv3, limit, propsValues, setFromProp }; +function useTextures() { + const obj = { + loader: new TextureLoader(), + count: 0, + textures: [], + loadProgress: 0, + loadTextures, + dispose + }; + return obj; + function loadTextures(images, cb) { + obj.count = images.length; + obj.textures.splice(0); + obj.loadProgress = 0; + Promise.all(images.map(loadTexture)).then(cb); + } + function loadTexture(img, index) { + return new Promise((resolve) => { + obj.loader.load(img.src, (texture) => { + obj.loadProgress += 1 / obj.count; + obj.textures[index] = texture; + resolve(texture); + }); + }); + } + function dispose() { + obj.textures.forEach((t) => t.dispose()); + } +} + +export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; //# sourceMappingURL=trois.module.cdn.js.map diff --git a/build/trois.module.cdn.js.map b/build/trois.module.cdn.js.map index bf865df..3c44e45 100644 --- a/build/trois.module.cdn.js.map +++ b/build/trois.module.cdn.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.cdn.js","sources":["../src/core/useRaycaster.js","../src/core/usePointer.js","../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/Camera.js","../src/core/OrthographicCamera.js","../src/core/PerspectiveCamera.js","../src/core/Object3D.js","../src/core/Group.js","../src/core/Scene.js","../src/core/Raycaster.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/CircleGeometry.js","../src/geometries/ConeGeometry.js","../src/geometries/CylinderGeometry.js","../src/geometries/DodecahedronGeometry.js","../src/geometries/IcosahedronGeometry.js","../src/geometries/LatheGeometry.js","../src/geometries/OctahedronGeometry.js","../src/geometries/PlaneGeometry.js","../src/geometries/PolyhedronGeometry.js","../src/geometries/RingGeometry.js","../src/geometries/SphereGeometry.js","../src/geometries/TetrahedronGeometry.js","../src/geometries/TorusGeometry.js","../src/geometries/TorusKnotGeometry.js","../src/geometries/TubeGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/DirectionalLight.js","../src/lights/HemisphereLight.js","../src/lights/PointLight.js","../src/lights/RectAreaLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/MatcapMaterial.js","../src/materials/PhongMaterial.js","../src/materials/StandardMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/ShaderMaterial.js","../src/materials/SubsurfaceScatteringShader.js","../src/materials/SubSurfaceMaterial.js","../src/materials/ToonMaterial.js","../src/materials/Texture.js","../src/materials/CubeTexture.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Circle.js","../src/meshes/Cone.js","../src/meshes/Cylinder.js","../src/meshes/Dodecahedron.js","../src/meshes/Icosahedron.js","../src/meshes/Lathe.js","../src/meshes/Octahedron.js","../src/meshes/Plane.js","../src/meshes/Polyhedron.js","../src/meshes/Ring.js","../src/meshes/Sphere.js","../src/meshes/Tetrahedron.js","../src/meshes/Text.js","../src/meshes/Torus.js","../src/meshes/TorusKnot.js","../src/meshes/Tube.js","../src/meshes/Image.js","../src/meshes/InstancedMesh.js","../src/meshes/Sprite.js","../src/models/Model.js","../src/models/GLTF.js","../src/models/FBX.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/FilmPass.js","../src/effects/FXAAPass.js","../src/effects/HalftonePass.js","../src/effects/SMAAPass.js","../src/effects/SSAOPass.js","../src/shaders/default.js","../src/shaders/TiltShift.js","../src/effects/TiltShiftPass.js","../src/effects/UnrealBloomPass.js","../src/shaders/ZoomBlur.js","../src/effects/ZoomBlurPass.js","../src/plugin.js"],"sourcesContent":["import { Plane, Raycaster, Vector3 } from 'three';\r\n\r\nexport default function useRaycaster(options) {\r\n const {\r\n camera,\r\n resetPosition = new Vector3(0, 0, 0),\r\n } = options;\r\n\r\n const raycaster = new Raycaster();\r\n const position = resetPosition.clone();\r\n const plane = new Plane(new Vector3(0, 0, 1), 0);\r\n\r\n const updatePosition = (coords) => {\r\n raycaster.setFromCamera(coords, camera);\r\n camera.getWorldDirection(plane.normal);\r\n raycaster.ray.intersectPlane(plane, position);\r\n };\r\n\r\n const intersect = (coords, objects) => {\r\n raycaster.setFromCamera(coords, camera);\r\n return raycaster.intersectObjects(objects);\r\n };\r\n\r\n return {\r\n position,\r\n updatePosition,\r\n intersect,\r\n };\r\n};\r\n","import { InstancedMesh, Vector2, Vector3 } from 'three';\r\nimport useRaycaster from './useRaycaster';\r\n\r\nexport default function usePointer(options) {\r\n const {\r\n camera,\r\n domElement,\r\n intersectObjects,\r\n touch = true,\r\n resetOnEnd = false,\r\n resetPosition = new Vector2(0, 0),\r\n resetPositionV3 = new Vector3(0, 0, 0),\r\n onEnter = () => {},\r\n onMove = () => {},\r\n onLeave = () => {},\r\n onIntersectEnter = () => {},\r\n onIntersectOver = () => {},\r\n onIntersectMove = () => {},\r\n onIntersectLeave = () => {},\r\n onIntersectClick = () => {},\r\n } = options;\r\n\r\n const position = resetPosition.clone();\r\n const positionN = new Vector2(0, 0);\r\n\r\n const raycaster = useRaycaster({ camera });\r\n const positionV3 = raycaster.position;\r\n\r\n const obj = {\r\n position,\r\n positionN,\r\n positionV3,\r\n intersectObjects,\r\n listeners: false,\r\n addListeners,\r\n removeListeners,\r\n intersect,\r\n };\r\n\r\n return obj;\r\n\r\n function reset() {\r\n position.copy(resetPosition);\r\n positionV3.copy(resetPositionV3);\r\n };\r\n\r\n function updatePosition(event) {\r\n let x, y;\r\n if (event.touches && event.touches.length > 0) {\r\n x = event.touches[0].clientX;\r\n y = event.touches[0].clientY;\r\n } else {\r\n x = event.clientX;\r\n y = event.clientY;\r\n }\r\n\r\n const rect = domElement.getBoundingClientRect();\r\n position.x = x - rect.left;\r\n position.y = y - rect.top;\r\n positionN.x = (position.x / rect.width) * 2 - 1;\r\n positionN.y = -(position.y / rect.height) * 2 + 1;\r\n raycaster.updatePosition(positionN);\r\n };\r\n\r\n function intersect() {\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const offObjects = [...intersectObjects];\r\n const iMeshes = [];\r\n\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n if (!object.over) {\r\n object.over = true;\r\n const overEvent = { type: 'pointerover', over: true, component, intersect };\r\n const enterEvent = { ...overEvent, type: 'pointerenter' };\r\n onIntersectOver(overEvent);\r\n onIntersectEnter(enterEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerEnter?.(enterEvent);\r\n }\r\n\r\n const moveEvent = { type: 'pointermove', component, intersect };\r\n onIntersectMove(moveEvent);\r\n component.onPointerMove?.(moveEvent);\r\n\r\n offObjects.splice(offObjects.indexOf(object), 1);\r\n });\r\n\r\n offObjects.forEach(object => {\r\n const { component } = object;\r\n if (object.over) {\r\n object.over = false;\r\n const overEvent = { type: 'pointerover', over: false, component };\r\n const leaveEvent = { ...overEvent, type: 'pointerleave' };\r\n onIntersectOver(overEvent);\r\n onIntersectLeave(leaveEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerLeave?.(leaveEvent);\r\n }\r\n });\r\n }\r\n };\r\n\r\n function pointerEnter(event) {\r\n updatePosition(event);\r\n onEnter({ type: 'pointerenter', position, positionN, positionV3 });\r\n };\r\n\r\n function pointerMove(event) {\r\n updatePosition(event);\r\n onMove({ type: 'pointermove', position, positionN, positionV3 });\r\n intersect();\r\n };\r\n\r\n function pointerClick(event) {\r\n updatePosition(event);\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const iMeshes = [];\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n const event = { type: 'click', component, intersect };\r\n onIntersectClick(event);\r\n component.onClick?.(event);\r\n });\r\n }\r\n };\r\n\r\n function pointerLeave() {\r\n if (resetOnEnd) reset();\r\n onLeave({ type: 'pointerleave' });\r\n };\r\n\r\n function addListeners() {\r\n domElement.addEventListener('mouseenter', pointerEnter);\r\n domElement.addEventListener('mousemove', pointerMove);\r\n domElement.addEventListener('mouseleave', pointerLeave);\r\n domElement.addEventListener('click', pointerClick);\r\n if (touch) {\r\n domElement.addEventListener('touchstart', pointerEnter);\r\n domElement.addEventListener('touchmove', pointerMove);\r\n domElement.addEventListener('touchend', pointerLeave);\r\n }\r\n obj.listeners = true;\r\n };\r\n\r\n function removeListeners() {\r\n domElement.removeEventListener('mouseenter', pointerEnter);\r\n domElement.removeEventListener('mousemove', pointerMove);\r\n domElement.removeEventListener('mouseleave', pointerLeave);\r\n domElement.removeEventListener('click', pointerClick);\r\n\r\n domElement.removeEventListener('touchstart', pointerEnter);\r\n domElement.removeEventListener('touchmove', pointerMove);\r\n domElement.removeEventListener('touchend', pointerLeave);\r\n obj.listeners = false;\r\n };\r\n};\r\n","import { WebGLRenderer } from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport usePointer from './usePointer';\n\n/**\n * Three.js helper\n */\nexport default function useThree() {\n // default conf\n const conf = {\n canvas: null,\n antialias: true,\n alpha: false,\n autoClear: true,\n orbit_ctrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n };\n\n // size\n const size = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n };\n\n // handlers\n const afterInitCallbacks = [];\n let afterResizeCallbacks = [];\n let beforeRenderCallbacks = [];\n\n const intersectObjects = [];\n\n // returned object\n const obj = {\n conf,\n renderer: null,\n camera: null,\n cameraCtrl: null,\n scene: null,\n pointer: null,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n onAfterInit,\n onAfterResize, offAfterResize,\n // onBeforeRender, offBeforeRender,\n addIntersectObject, removeIntersectObject,\n };\n\n /**\n * init three\n */\n function init(params) {\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n conf[key] = value;\n });\n }\n\n if (!obj.scene) {\n console.error('Missing Scene');\n return;\n }\n\n if (!obj.camera) {\n console.error('Missing Camera');\n return;\n }\n\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\n obj.renderer.autoClear = conf.autoClear;\n\n if (conf.resize) {\n onResize();\n window.addEventListener('resize', onResize);\n } else {\n setSize(conf.width, conf.height);\n }\n\n initPointer();\n\n if (conf.orbit_ctrl) {\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\n if (conf.orbit_ctrl instanceof Object) {\n Object.entries(conf.orbit_ctrl).forEach(([key, value]) => {\n obj.orbitCtrl[key] = value;\n });\n }\n }\n\n afterInitCallbacks.forEach(c => c());\n\n return true;\n };\n\n function initPointer() {\n let pointerConf = {\n camera: obj.camera,\n domElement: obj.renderer.domElement,\n intersectObjects,\n };\n\n if (conf.pointer && conf.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...conf.pointer };\n }\n\n obj.pointer = usePointer(pointerConf);\n if (conf.pointer || intersectObjects.length) {\n obj.pointer.addListeners();\n if (conf.pointer.intersectMode === 'frame') {\n onBeforeRender(() => {\n obj.pointer.intersect();\n });\n }\n }\n }\n\n /**\n * add after init callback\n */\n function onAfterInit(callback) {\n afterInitCallbacks.push(callback);\n }\n\n /**\n * add after resize callback\n */\n function onAfterResize(callback) {\n afterResizeCallbacks.push(callback);\n }\n\n /**\n * remove after resize callback\n */\n function offAfterResize(callback) {\n afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback);\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(callback) {\n beforeRenderCallbacks.push(callback);\n }\n\n /**\n * remove before render callback\n */\n function offBeforeRender(callback) {\n beforeRenderCallbacks = beforeRenderCallbacks.filter(c => c !== callback);\n }\n\n /**\n * default render\n */\n function render() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.renderer.render(obj.scene, obj.camera);\n }\n\n /**\n * composer render\n */\n function renderC() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.composer.render();\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o);\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners();\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o) {\n const i = intersectObjects.indexOf(o);\n if (i !== -1) {\n intersectObjects.splice(i, 1);\n }\n // remove listeners if needed\n if (obj.pointer && !conf.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners();\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n beforeRenderCallbacks = [];\n window.removeEventListener('resize', onResize);\n if (obj.pointer) obj.pointer.removeListeners();\n if (obj.orbitCtrl) obj.orbitCtrl.dispose();\n if (obj.renderer) obj.renderer.dispose();\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (conf.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight);\n } else {\n const elt = obj.renderer.domElement.parentNode;\n setSize(elt.clientWidth, elt.clientHeight);\n }\n afterResizeCallbacks.forEach(c => c());\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width, height) {\n size.width = width;\n size.height = height;\n size.ratio = width / height;\n\n obj.renderer.setSize(width, height, false);\n obj.camera.aspect = size.ratio;\n obj.camera.updateProjectionMatrix();\n\n if (obj.composer) {\n obj.composer.setSize(width, height);\n }\n\n if (obj.camera.type === 'OrthographicCamera') {\n size.wWidth = obj.camera.right - obj.camera.left;\n size.wHeight = obj.camera.top - obj.camera.bottom;\n } else {\n const wsize = getCameraSize();\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }\n\n return obj;\n}\n","import { defineComponent, h } from 'vue';\nimport useThree from './useThree';\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object], default: false },\n pointer: { type: [Boolean, Object], default: false },\n resize: { type: [Boolean, String], default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n },\n setup() {\n return {\n three: useThree(),\n raf: true,\n onMountedCallbacks: [],\n beforeRenderCallbacks: [],\n afterRenderCallbacks: [],\n };\n },\n provide() {\n return {\n three: this.three,\n // renderer: this.three.renderer,\n rendererComponent: this,\n };\n },\n mounted() {\n const params = {\n canvas: this.$el,\n antialias: this.antialias,\n alpha: this.alpha,\n autoClear: this.autoClear,\n orbit_ctrl: this.orbitCtrl,\n pointer: this.pointer,\n resize: this.resize,\n width: this.width,\n height: this.height,\n };\n\n if (this.three.init(params)) {\n this.renderer = this.three.renderer;\n this.renderer.shadowMap.enabled = this.shadow;\n\n this._render = this.three.composer ? this.three.renderC : this.three.render;\n\n if (this.xr) {\n this.renderer.xr.enabled = true;\n this.renderer.setAnimationLoop(this.render);\n } else {\n requestAnimationFrame(this.renderLoop);\n }\n };\n\n this.onMountedCallbacks.forEach(c => c());\n },\n beforeUnmount() {\n this.beforeRenderCallbacks = [];\n this.afterRenderCallbacks = [];\n this.raf = false;\n this.three.dispose();\n },\n methods: {\n onMounted(cb) {\n this.onMountedCallbacks.push(cb);\n },\n onBeforeRender(cb) {\n this.beforeRenderCallbacks.push(cb);\n },\n offBeforeRender(cb) {\n this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb);\n },\n onAfterRender(cb) {\n this.afterRenderCallbacks.push(cb);\n },\n offAfterRender(cb) {\n this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb);\n },\n onAfterResize(cb) {\n this.three.onAfterResize(cb);\n },\n offAfterResize(cb) {\n this.three.offAfterResize(cb);\n },\n render(time) {\n this.beforeRenderCallbacks.forEach(c => c({ time }));\n this._render();\n this.afterRenderCallbacks.forEach(c => c({ time }));\n },\n renderLoop(time) {\n if (this.raf) requestAnimationFrame(this.renderLoop);\n this.render(time);\n },\n },\n render() {\n return h('canvas', {}, this.$slots.default());\n },\n __hmrId: 'Renderer',\n});\n","import { toRef, watch } from 'vue';\n\nexport function setFromProp(o, prop) {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value;\n });\n }\n};\n\nexport function bindProps(src, props, dst) {\n props.forEach(prop => {\n bindProp(src, prop, dst);\n });\n};\n\nexport function bindProp(src, srcProp, dst, dstProp) {\n if (!dstProp) dstProp = srcProp;\n const ref = toRef(src, srcProp);\n if (ref.value instanceof Object) {\n setFromProp(dst[dstProp], ref.value);\n watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true });\n } else {\n if (ref.value) dst[dstProp] = src[srcProp];\n watch(ref, (value) => { dst[dstProp] = value; });\n }\n};\n\nexport function propsValues(props, exclude) {\n const values = {};\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value;\n }\n });\n return values;\n};\n\nexport function lerp(value1, value2, amount) {\n amount = amount < 0 ? 0 : amount;\n amount = amount > 1 ? 1 : amount;\n return value1 + (value2 - value1) * amount;\n};\n\nexport function lerpv2(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n};\n\nexport function lerpv3(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n v1.z = lerp(v1.z, v2.z, amount);\n};\n\nexport function limit(val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\nexport function getMatcapUrl(hash, format = 1024) {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`;\n return `${MATCAP_ROOT}/${format}/${fileName}`;\n};\n\nfunction getMatcapFormatString(format) {\n switch (format) {\n case 64:\n return '-64px';\n case 128:\n return '-128px';\n case 256:\n return '-256px';\n case 512:\n return '-512px';\n default:\n return '';\n }\n}\n","import { defineComponent } from 'vue';\n// import Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n // TODO: eventually extend Object3D, for now: error 'injection \"scene\" not found'\n // because camera is a sibling of scene in Trois\n // extends: Object3D,\n inject: ['three'],\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { OrthographicCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n inject: ['three'],\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n },\n created() {\n this.camera = new OrthographicCamera(this.left, this.right, this.top, this.bottom, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'OrthographicCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { PerspectiveCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n inject: ['three'],\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n lookAt: { type: Object, default: null },\n },\n created() {\n this.camera = new PerspectiveCamera(this.fov, this.aspect, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n ['aspect', 'far', 'fov', 'near'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'PerspectiveCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n name: 'Object3D',\n inject: ['three', 'scene', 'rendererComponent'],\n emits: ['created', 'ready'],\n props: {\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n rotation: { type: Object, default: { x: 0, y: 0, z: 0 } },\n scale: { type: Object, default: { x: 1, y: 1, z: 1 } },\n lookAt: { type: Object, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.autoRemove) this.removeFromParent();\n },\n methods: {\n initObject3D(o3d) {\n this.o3d = o3d;\n this.o3d.userData = this.userData;\n this.$emit('created', this.o3d);\n\n bindProp(this, 'position', this.o3d);\n bindProp(this, 'rotation', this.o3d);\n bindProp(this, 'scale', this.o3d);\n\n // TODO : fix lookat.x\n if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n this._parent = this.getParent();\n if (this.addToParent()) this.$emit('ready', this);\n else console.error('Missing parent (Scene, Group...)');\n },\n getParent() {\n let parent = this.$parent;\n while (parent) {\n if (parent.add) return parent;\n parent = parent.$parent;\n }\n return false;\n },\n addToParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.add(o3d);\n return true;\n }\n return false;\n },\n removeFromParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.remove(o3d);\n return true;\n }\n return false;\n },\n add(o) { this.o3d.add(o); },\n remove(o) { this.o3d.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Object3D',\n});\n","import { defineComponent } from 'vue';\nimport { Group } from 'three';\nimport Object3D from './Object3D.js';\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n created() {\n this.group = new Group();\n this.initObject3D(this.group);\n },\n __hmrId: 'Group',\n});\n","import { defineComponent, watch } from 'vue';\nimport { Scene, Color } from 'three';\n\nexport default defineComponent({\n name: 'Scene',\n inject: ['three'],\n props: {\n id: String,\n background: [String, Number],\n },\n setup(props) {\n const scene = new Scene();\n if (props.background) scene.background = new Color(props.background);\n watch(() => props.background, (value) => { scene.background.set(value); });\n return { scene };\n },\n provide() {\n return {\n scene: this.scene,\n };\n },\n mounted() {\n if (!this.three.scene) {\n this.three.scene = this.scene;\n }\n },\n methods: {\n add(o) { this.scene.add(o); },\n remove(o) { this.scene.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Scene',\n});\n","import { defineComponent } from 'vue';\r\nimport usePointer from './usePointer';\r\n\r\nexport default defineComponent({\r\n name: 'Raycaster',\r\n inject: ['three', 'rendererComponent'],\r\n props: {\r\n onPointerEnter: { type: Function, default: () => {} },\r\n onPointerOver: { type: Function, default: () => {} },\r\n onPointerMove: { type: Function, default: () => {} },\r\n onPointerLeave: { type: Function, default: () => {} },\r\n onClick: { type: Function, default: () => {} },\r\n intersectMode: { type: String, default: 'move' },\r\n },\r\n mounted() {\r\n this.rendererComponent.onMounted(() => {\r\n this.pointer = usePointer({\r\n camera: this.three.camera,\r\n domElement: this.three.renderer.domElement,\r\n intersectObjects: this.getIntersectObjects(),\r\n onIntersectEnter: this.onPointerEnter,\r\n onIntersectOver: this.onPointerOver,\r\n onIntersectMove: this.onPointerMove,\r\n onIntersectLeave: this.onPointerLeave,\r\n onIntersectClick: this.onClick,\r\n });\r\n this.pointer.addListeners();\r\n\r\n if (this.intersectMode === 'frame') {\r\n this.rendererComponent.onBeforeRender(this.pointer.intersect);\r\n }\r\n });\r\n },\r\n unmounted() {\r\n if (this.pointer) {\r\n this.pointer.removeListeners();\r\n this.rendererComponent.offBeforeRender(this.pointer.intersect);\r\n }\r\n },\r\n methods: {\r\n getIntersectObjects() {\r\n return this.three.scene.children.filter(e => e.type === 'Mesh');\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n __hmrId: 'Raycaster',\r\n});\r\n","import { defineComponent, watch } from 'vue';\n\nconst Geometry = defineComponent({\n inject: ['mesh'],\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh');\n }\n\n this.watchProps = [];\n Object.entries(this.$props).forEach(e => this.watchProps.push(e[0]));\n\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n\n this.addWatchers();\n },\n unmounted() {\n this.geometry.dispose();\n },\n methods: {\n addWatchers() {\n this.watchProps.forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n rotateGeometry() {\n if (this.rotateX) this.geometry.rotateX(this.rotateX);\n if (this.rotateY) this.geometry.rotateY(this.rotateY);\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ);\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n oldGeo.dispose();\n },\n },\n render() { return []; },\n});\n\nexport default Geometry;\n\nexport function geometryComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n });\n};\n","import { geometryComponent } from './Geometry.js';\nimport { BoxGeometry } from 'three';\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n }\n};\n\nexport default geometryComponent('BoxGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CircleGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CircleGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { ConeGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('ConeGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CylinderGeometry } from 'three';\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { DodecahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new DodecahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { IcosahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new IcosahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { LatheGeometry } from 'three';\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength);\n};\n\nexport default geometryComponent('LatheGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { OctahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new OctahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PlaneGeometry } from 'three';\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PolyhedronGeometry } from 'three';\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail);\n};\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { RingGeometry } from 'three';\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('RingGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { SphereGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n};\n\nexport function createGeometry(comp) {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('SphereGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TetrahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new TetrahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc);\n};\n\nexport default geometryComponent('TorusGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusKnotGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n};\n\nexport function createGeometry(comp) {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q);\n};\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three';\nimport Geometry from './Geometry.js';\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n};\n\nexport function createGeometry(comp) {\n let curve;\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points);\n } else if (comp.path) {\n curve = comp.path;\n } else {\n console.error('Missing path curve or points.');\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed);\n};\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n});\n\nexport function updateTubeGeometryPoints(tube, points) {\n const curve = new CatmullRomCurve3(points);\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters;\n const frames = curve.computeFrenetFrames(tubularSegments, closed);\n tube.tangents = frames.tangents;\n tube.normals = frames.normals;\n tube.binormals = frames.binormals;\n tube.parameters.path = curve;\n\n const pArray = tube.attributes.position.array;\n const nArray = tube.attributes.normal.array;\n const normal = new Vector3();\n let P;\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i);\n }\n updateSegment(tubularSegments);\n\n tube.attributes.position.needsUpdate = true;\n tube.attributes.normal.needsUpdate = true;\n\n function updateSegment(i) {\n P = curve.getPointAt(i / tubularSegments, P);\n const N = frames.normals[i];\n const B = frames.binormals[i];\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n normal.x = (cos * N.x + sin * B.x);\n normal.y = (cos * N.y + sin * B.y);\n normal.z = (cos * N.z + sin * B.z);\n normal.normalize();\n const index = (i * (radialSegments + 1) + j) * 3;\n nArray[index] = normal.x;\n nArray[index + 1] = normal.y;\n nArray[index + 2] = normal.z;\n pArray[index] = P.x + radius * normal.x;\n pArray[index + 1] = P.y + radius * normal.y;\n pArray[index + 2] = P.z + radius * normal.z;\n }\n }\n}\n","import { defineComponent, watch } from 'vue';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp, setFromProp } from '../tools';\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object, default: { x: 512, y: 512 } },\n shadowCamera: { type: Object, default: {} },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.light.target) this.removeFromParent(this.light.target);\n },\n methods: {\n initLight() {\n if (this.light.target) {\n bindProp(this, 'target', this.light.target, 'position');\n }\n\n if (this.light.shadow) {\n this.light.castShadow = this.castShadow;\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\n setFromProp(this.light.shadow.camera, this.shadowCamera);\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.light.color.set(this.color);\n } else {\n this.light[p] = this[p];\n }\n });\n });\n\n this.initObject3D(this.light);\n if (this.light.target) this.addToParent(this.light.target);\n },\n },\n __hmrId: 'Light',\n});\n","import { defineComponent } from 'vue';\nimport { AmbientLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.light = new AmbientLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'AmbientLight',\n});\n","import { defineComponent } from 'vue';\nimport { DirectionalLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: Object,\n },\n created() {\n this.light = new DirectionalLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'DirectionalLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HemisphereLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);\n watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); });\n this.initLight();\n },\n __hmrId: 'HemisphereLight',\n});\n","import { defineComponent } from 'vue';\nimport { PointLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: {\n type: Number,\n default: 0,\n },\n decay: {\n type: Number,\n default: 1,\n },\n },\n created() {\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\n this.initLight();\n },\n __hmrId: 'PointLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { RectAreaLight } from 'three';\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js';\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init();\n this.light = new RectAreaLight(this.color, this.intensity, this.width, this.height);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n\n if (this.helper) {\n this.lightHelper = new RectAreaLightHelper(this.light);\n this.light.add(this.lightHelper);\n }\n\n this.initLight();\n },\n unmounted() {\n if (this.lightHelper) this.removeFromParent(this.lightHelper);\n },\n __hmrId: 'RectAreaLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { SpotLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\n ['angle', 'decay', 'distance', 'penumbra'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n this.initLight();\n },\n __hmrId: 'SpotLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { FrontSide } from 'three';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n\n this._addWatchers();\n if (this.addWatchers) this.addWatchers();\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n setProp(key, value, needsUpdate = false) {\n this.material[key] = value;\n this.material.needsUpdate = needsUpdate;\n },\n setTexture(texture, key = 'map') {\n this.setProp(key, texture, true);\n },\n _addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.material.color.set(this.color);\n } else {\n this.material[p] = this[p];\n }\n });\n });\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Material',\n});\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n};\n","import { defineComponent } from 'vue';\nimport { MeshBasicMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshBasicMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'BasicMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshLambertMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshLambertMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'LambertMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshMatcapMaterial, TextureLoader } from 'three';\nimport { propsValues, getMatcapUrl } from '../tools';\nimport Material from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: String,\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.name ? getMatcapUrl(this.name) : this.src;\n const opts = propsValues(this.$props, ['src', 'name']);\n opts.matcap = new TextureLoader().load(src);\n this.material = new MeshMatcapMaterial(opts);\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'MatcapMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshPhongMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhongMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO : handle flatShading ?\n ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => {\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'PhongMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshStandardMaterial } from 'three';\nimport { bindProp, bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object, default: { x: 1, y: 1 } },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n};\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']));\n },\n addWatchers() {\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return;\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProp(this, 'normalScale', this.material);\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'StandardMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshPhysicalMaterial } from 'three';\nimport { propsValues } from '../tools';\nimport StandardMaterial from './StandardMaterial';\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhysicalMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'PhysicalMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ShaderMaterial } from 'three';\nimport { propsValues } from '../tools';\n\nconst defaultVertexShader = `\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}`;\n\nconst defaultFragmentShader = `\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}`;\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n uniforms: { type: Object, default: () => { return {}; } },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n ['vertexShader', 'fragmentShader'].forEach(p => {\n watch(() => this[p], () => {\n // recreate material if we change either shader\n this.material.dispose();\n this.createMaterial();\n });\n });\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n this.material = new ShaderMaterial(propsValues(this.$props));\n this.mesh.setMaterial(this.material);\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'ShaderMaterial',\n});\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three';\n\nfunction replaceAll(string, find, replace) {\n return string.split(find).join(replace);\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'));\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'));\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n};\n\nexport default SubsurfaceScatteringShader;\n","import { defineComponent } from 'vue';\nimport { Color, ShaderMaterial as TShaderMaterial, UniformsUtils } from 'three';\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader.js';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: String, default: '#ffffff' },\n thicknessColor: { type: String, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n transparent: { type: Boolean, default: false },\n opacity: { type: Number, default: 1 },\n vertexColors: { type: Boolean, default: false },\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader;\n const uniforms = UniformsUtils.clone(params.uniforms);\n\n Object.entries(this.$props).forEach(([key, value]) => {\n let _key = key, _value = value;\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse';\n _value = new Color(value);\n }\n if (!['transparent', 'vertexColors'].includes(key)) {\n uniforms[_key].value = _value;\n }\n });\n\n this.material = new TShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n });\n },\n },\n render() {\n return [];\n },\n __hmrId: 'SubSurfaceMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshToonMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshToonMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'ToonMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, TextureLoader, UVMapping } from 'three';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n name: { type: String, default: 'map' },\n uniform: { type: String, default: null },\n src: String,\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object, default: { x: 1, y: 1 } },\n rotation: { type: Number, default: 0 },\n center: { type: Object, default: { x: 0, y: 0 } },\n },\n created() {\n this.refreshTexture();\n watch(() => this.src, this.refreshTexture);\n },\n unmounted() {\n if (this.material && this.material.setTexture) this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError);\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center'];\n wathProps.forEach(prop => {\n bindProp(this, prop, this.texture);\n });\n },\n refreshTexture() {\n this.createTexture();\n // handle standard material\n if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); }\n // handle shader material\n else if (this.material && this.material.material.type === \"ShaderMaterial\") {\n // require a `uniform` prop so we know what to call the uniform\n if (!this.uniform) {\n console.warn('\"uniform\" prop required to use texture in a shader.')\n return\n }\n this.material.uniforms[this.uniform] = { value: this.texture };\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() { return []; },\n});\n","import { defineComponent, watch } from 'vue';\nimport { CubeTextureLoader, CubeRefractionMapping } from 'three';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n path: String,\n urls: {\n type: Array,\n default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n name: { type: String, default: 'envMap' },\n refraction: Boolean,\n // todo: remove ?\n refractionRatio: { type: Number, default: 0.98 },\n },\n created() {\n this.refreshTexture();\n watch(() => this.path, this.refreshTexture);\n watch(() => this.urls, this.refreshTexture);\n },\n unmounted() {\n this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError);\n },\n refreshTexture() {\n this.createTexture();\n this.material.setTexture(this.texture, this.name);\n if (this.refraction) {\n this.texture.mapping = CubeRefractionMapping;\n this.material.setProp('refractionRatio', this.refractionRatio);\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() {\n return [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { Mesh as TMesh } from 'three';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp } from '../tools';\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n};\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n provide() {\n return {\n mesh: this,\n };\n },\n mounted() {\n if (!this.mesh && !this.loading) this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new TMesh(this.geometry, this.material);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n addGeometryWatchers(props) {\n Object.keys(props).forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n if (this.mesh) this.mesh.material = material;\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.mesh.geometry = this.geometry;\n oldGeo.dispose();\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n // for predefined mesh (geometry is not unmounted)\n if (this.geometry) this.geometry.dispose();\n },\n __hmrId: 'Mesh',\n});\n\nexport default Mesh;\n\nexport function meshComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n __hmrId: name,\n });\n};\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/BoxGeometry.js';\n\nexport default meshComponent('Box', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CircleGeometry.js';\n\nexport default meshComponent('Circle', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/ConeGeometry.js';\n\nexport default meshComponent('Cone', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CylinderGeometry.js';\n\nexport default meshComponent('Cylinder', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry.js';\n\nexport default meshComponent('Dodecahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry.js';\n\nexport default meshComponent('Icosahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/LatheGeometry.js';\n\nexport default meshComponent('Lathe', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/OctahedronGeometry.js';\n\nexport default meshComponent('Octahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PlaneGeometry.js';\n\nexport default meshComponent('Plane', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry.js';\n\nexport default meshComponent('Polyhedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/RingGeometry.js';\n\nexport default meshComponent('Ring', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/SphereGeometry.js';\n\nexport default meshComponent('Sphere', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry.js';\n\nexport default meshComponent('Tetrahedron', props, createGeometry);\n","import { defineComponent, watch } from 'vue';\nimport { FontLoader, TextGeometry } from 'three';\nimport Mesh from './Mesh.js';\n\nconst props = {\n text: String,\n fontSrc: String,\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String], default: false },\n};\n\nexport default defineComponent({\n extends: Mesh,\n props,\n data() {\n return {\n loading: true,\n };\n },\n created() {\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ];\n watchProps.forEach(p => {\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry();\n });\n });\n\n const loader = new FontLoader();\n loader.load(this.fontSrc, (font) => {\n this.loading = false;\n this.font = font;\n this.createGeometry();\n this.initMesh();\n });\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n });\n\n if (this.align === 'center') {\n this.geometry.center();\n }\n },\n },\n});\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusGeometry.js';\n\nexport default meshComponent('Torus', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry.js';\n\nexport default meshComponent('TorusKnot', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport Mesh from './Mesh.js';\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js';\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update curve points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n __hmrId: 'Tube',\n});\n","import { defineComponent, watch } from 'vue';\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, TextureLoader } from 'three';\nimport Mesh from './Mesh.js';\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: String,\n width: Number,\n height: Number,\n keepSize: Boolean,\n },\n created() {\n this.createGeometry();\n this.createMaterial();\n this.initMesh();\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], this.resize);\n });\n\n if (this.keepSize) this.three.onAfterResize(this.resize);\n },\n methods: {\n createGeometry() {\n this.geometry = new PlaneGeometry(1, 1, 1, 1);\n },\n createMaterial() {\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });\n },\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded);\n },\n refreshTexture() {\n if (this.texture) this.texture.dispose();\n this.material.map = this.loadTexture();\n this.material.needsUpdate = true;\n },\n onLoaded(texture) {\n this.texture = texture;\n this.resize();\n this.$emit('loaded');\n },\n resize() {\n if (!this.texture) return;\n const screen = this.three.size;\n const iW = this.texture.image.width;\n const iH = this.texture.image.height;\n const iRatio = iW / iH;\n let w, h;\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width;\n h = this.height * screen.wHeight / screen.height;\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width;\n h = w / iRatio;\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height;\n w = h * iRatio;\n }\n this.mesh.scale.x = w;\n this.mesh.scale.y = h;\n },\n },\n __hmrId: 'Image',\n});\n","import { defineComponent } from 'vue';\nimport { InstancedMesh } from 'three';\nimport Object3D from '../core/Object3D';\nimport { bindProp } from '../tools';\nimport { pointerProps } from './Mesh';\n\nexport default defineComponent({\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n count: Number,\n ...pointerProps,\n },\n provide() {\n return {\n mesh: this,\n };\n },\n beforeMount() {\n if (!this.$slots.default) {\n console.error('Missing Geometry');\n }\n },\n mounted() {\n this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n this.material.instancingColor = true;\n if (this.mesh) this.mesh.material = material;\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n },\n __hmrId: 'InstancedMesh',\n});\n","import { defineComponent } from 'vue';\nimport { Sprite, SpriteMaterial, TextureLoader } from 'three';\nimport Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: String,\n },\n data() {\n return {\n loading: true,\n };\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded);\n this.material = new SpriteMaterial({ map: this.texture });\n this.sprite = new Sprite(this.material);\n this.geometry = this.sprite.geometry;\n this.initObject3D(this.sprite);\n },\n unmounted() {\n this.texture.dispose();\n this.material.dispose();\n },\n methods: {\n onLoaded() {\n this.loading = false;\n this.updateUV();\n this.$emit('loaded');\n },\n updateUV() {\n this.iWidth = this.texture.image.width;\n this.iHeight = this.texture.image.height;\n this.iRatio = this.iWidth / this.iHeight;\n\n let x = 0.5, y = 0.5;\n if (this.iRatio > 1) {\n y = 0.5 / this.iRatio;\n } else {\n x = 0.5 / this.iRatio;\n }\n\n const positions = this.geometry.attributes.position.array;\n positions[0] = -x; positions[1] = -y;\n positions[5] = x; positions[6] = -y;\n positions[10] = x; positions[11] = y;\n positions[15] = -x; positions[16] = y;\n this.geometry.attributes.position.needsUpdate = true;\n },\n },\n __hmrId: 'Sprite',\n});\n","import { defineComponent } from 'vue';\r\nimport Object3D from '../core/Object3D.js';\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n emits: ['load', 'progress', 'error'],\r\n data() {\r\n return {\r\n progress: 0,\r\n };\r\n },\r\n methods: {\r\n onLoad(model) {\r\n this.$emit('load', model);\r\n this.initObject3D(model);\r\n },\r\n onProgress(progress) {\r\n this.progress = progress.loaded / progress.total;\r\n this.$emit('progress', progress);\r\n },\r\n onError(error) {\r\n this.$emit('error', error);\r\n },\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new GLTFLoader();\r\n loader.load(this.src, (gltf) => {\r\n this.onLoad(gltf.scene);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new FBXLoader();\r\n loader.load(this.src, (fbx) => {\r\n this.onLoad(fbx);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\n\nexport default defineComponent({\n setup() {\n return {\n passes: [],\n };\n },\n inject: ['three'],\n provide() {\n return {\n passes: this.passes,\n };\n },\n mounted() {\n this.three.onAfterInit(() => {\n this.composer = new EffectComposer(this.three.renderer);\n this.three.renderer.autoClear = false;\n this.passes.forEach(pass => {\n this.composer.addPass(pass);\n });\n this.three.composer = this.composer;\n\n this.resize();\n this.three.onAfterResize(this.resize);\n });\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n this.composer.setSize(this.three.size.width, this.three.size.height);\n },\n },\n render() {\n return this.$slots.default();\n },\n __hmrId: 'EffectComposer',\n});\n","import { defineComponent } from 'vue';\n\nexport default defineComponent({\n inject: ['three', 'passes'],\n emits: ['ready'],\n beforeMount() {\n if (!this.passes) {\n console.error('Missing parent EffectComposer');\n }\n },\n unmounted() {\n if (this.pass.dispose) this.pass.dispose();\n },\n methods: {\n completePass(pass) {\n this.passes.push(pass);\n this.pass = pass;\n this.$emit('ready', pass);\n },\n },\n render() {\n return [];\n },\n __hmrId: 'EffectPass',\n});\n","import { defineComponent } from 'vue';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const pass = new RenderPass(this.three.scene, this.three.camera);\n this.completePass(pass);\n },\n __hmrId: 'RenderPass',\n});\n","import { defineComponent } from 'vue';\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n focus: {\n type: Number,\n default: 1,\n },\n aperture: {\n type: Number,\n default: 0.025,\n },\n maxblur: {\n type: Number,\n default: 0.01,\n },\n },\n watch: {\n focus() { this.pass.uniforms.focus.value = this.focus; },\n aperture() { this.pass.uniforms.aperture.value = this.aperture; },\n maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; },\n },\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.three.size.width,\n height: this.three.size.height,\n };\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\n this.completePass(pass);\n },\n __hmrId: 'BokehPass',\n});\n","import { defineComponent } from 'vue';\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n },\n watch: {\n noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; },\n scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; },\n scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; },\n grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; },\n },\n mounted() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale);\n this.completePass(pass);\n },\n __hmrId: 'FilmPass',\n});\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n const pass = new ShaderPass(FXAAShader);\n this.completePass(pass);\n\n // resize will be called in three init\n this.three.onAfterResize(this.resize);\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n const { resolution } = this.pass.material.uniforms;\n resolution.value.x = 1 / this.three.size.width;\n resolution.value.y = 1 / this.three.size.height;\n },\n },\n __hmrId: 'FXAAPass',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n },\n mounted() {\n const pass = new HalftonePass(this.three.size.width, this.three.size.height, {});\n\n ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => {\n pass.uniforms[p].value = this[p];\n watch(() => this[p], () => {\n pass.uniforms[p].value = this[p];\n });\n });\n\n this.completePass(pass);\n },\n __hmrId: 'HalftonePass',\n});\n","import { defineComponent } from 'vue';\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n // three size is not set yet, but this pass will be resized by effect composer\n const pass = new SMAAPass(this.three.size.width, this.three.size.height);\n this.completePass(pass);\n },\n __hmrId: 'SMAAPass',\n});\n","import { defineComponent } from 'vue';\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n scene: null,\n camera: null,\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n mounted() {\n const pass = new SSAOPass(\n this.scene || this.three.scene,\n this.camera || this.three.camera,\n this.three.size.width,\n this.three.size.height\n );\n\n for (const key of Object.keys(this.options)) {\n pass[key] = this.options[key];\n }\n\n this.completePass(pass);\n },\n __hmrId: 'SSAOPass',\n});\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n};\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent, watch } from 'vue';\nimport { Vector2 } from 'three';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport TiltShift from '../shaders/TiltShift.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object, default: { x: 0, y: 100 } },\n end: { type: Object, default: { x: 10, y: 100 } },\n },\n mounted() {\n this.pass = new ShaderPass(TiltShift);\n this.passes.push(this.pass);\n\n this.pass1 = new ShaderPass(TiltShift);\n this.passes.push(this.pass1);\n\n const uniforms = this.uniforms = this.pass.uniforms;\n const uniforms1 = this.uniforms1 = this.pass1.uniforms;\n uniforms1.blurRadius = uniforms.blurRadius;\n uniforms1.gradientRadius = uniforms.gradientRadius;\n uniforms1.start = uniforms.start;\n uniforms1.end = uniforms.end;\n uniforms1.texSize = uniforms.texSize;\n\n bindProp(this, 'blurRadius', uniforms.blurRadius, 'value');\n bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value');\n\n this.updateFocusLine();\n ['start', 'end'].forEach(p => {\n watch(() => this[p], this.updateFocusLine, { deep: true });\n });\n\n this.pass.setSize = (width, height) => {\n uniforms.texSize.value.set(width, height);\n };\n\n // emit ready event with two passes - do so manually in this file instead\n // of calling `completePass` like in other effect types\n this.$emit('ready', [this.pass, this.pass1]);\n },\n methods: {\n updateFocusLine() {\n this.uniforms.start.value.copy(this.start);\n this.uniforms.end.value.copy(this.end);\n const dv = new Vector2().copy(this.end).sub(this.start).normalize();\n this.uniforms.delta.value.copy(dv);\n this.uniforms1.delta.value.set(-dv.y, dv.x);\n },\n },\n __hmrId: 'TiltShiftPass',\n});\n","import { defineComponent } from 'vue';\nimport { Vector2 } from 'three';\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n },\n watch: {\n strength() { this.pass.strength = this.strength; },\n radius() { this.pass.radius = this.radius; },\n threshold() { this.pass.threshold = this.threshold; },\n },\n mounted() {\n const size = new Vector2(this.three.size.width, this.three.size.height);\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\n this.completePass(pass);\n },\n __hmrId: 'UnrealBloomPass',\n});\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport ZoomBlur from '../shaders/ZoomBlur.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object, default: { x: 0.5, y: 0.5 } },\n strength: { type: Number, default: 0.5 },\n },\n mounted() {\n const pass = new ShaderPass(ZoomBlur);\n\n const uniforms = this.uniforms = pass.uniforms;\n bindProp(this, 'center', uniforms.center, 'value');\n bindProp(this, 'strength', uniforms.strength, 'value');\n\n this.completePass(pass);\n },\n __hmrId: 'ZoomBlurPass',\n});\n","import { createApp as _createApp } from 'vue';\nimport * as TROIS from './index.js';\n\nexport const TroisJSVuePlugin = {\n install: (app) => {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ];\n\n comps.forEach(comp => {\n app.component(comp, TROIS[comp]);\n });\n },\n};\n\nexport function createApp(params) {\n return _createApp(params).use(TroisJSVuePlugin);\n};\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Group","Scene","props","createGeometry","BoxGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","ShaderMaterial","TShaderMaterial","TMesh","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;AAEe,SAAS,YAAY,CAAC,OAAO,EAAE;AAC9C,EAAE,MAAM;AACR,IAAI,MAAM;AACV,IAAI,aAAa,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACxC,GAAG,GAAG,OAAO,CAAC;AACd;AACA,EAAE,MAAM,SAAS,GAAG,IAAIA,WAAS,EAAE,CAAC;AACpC,EAAE,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;AACzC,EAAE,MAAM,KAAK,GAAG,IAAIC,OAAK,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnD;AACA,EAAE,MAAM,cAA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gBAAgB;AACtB,MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,SAAS;AACf,MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB;AACA,MAAM,YAAY;AAClB,KAAK,CAAC;AACN;AACA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI;AAC1B,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACvC,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE;AACF;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,EAAE,OAAOC,WAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAClD;;;;"} \ No newline at end of file +{"version":3,"file":"trois.module.cdn.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { Camera, Intersection, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.copy(resetPosition)\n positionV3.copy(resetPositionV3)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: IntersectObject): void\n removeIntersectObject(o: IntersectObject): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: IntersectObject[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: IntersectObject) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: IntersectObject) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): void\n raf: boolean\n\n // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener(t: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n const config: ThreeConfigInterface = {\n canvas,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n // if (this.three.pointer) {\n // this.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\n // }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn()\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, PropType, watch } from 'vue'\nimport { bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (this.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: this.getIntersectObjects(),\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n },\r\n setup(props) {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => { cubeCamera.update(renderer, scene) }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera }\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport const MeshInjectionKey: InjectionKey = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {},\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { defineComponent, InjectionKey, watch } from 'vue'\nimport { FrontSide, Material, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material from './Material'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\n },\n __hmrId: 'ShaderMaterial',\n})\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, default: () => ({ x: 0, y: 0 }) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n path: { type: String, required: true },\n urls: {\n type: Array as PropType,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: CubeReflectionMapping },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Font, FontLoader, TextGeometry } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n this.initObject3D(model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Scene","Texture","Group","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","ShaderMaterial","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAI,QAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIA;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,QAAM,IAAI,QAAQ,GAAG,GAAG,IAAI;AAE9C,QAAM,iBAAiB,CAAC,WAAoB;AAC1C,cAAU,cAAc,QAAQ;AAChC,WAAO,kBAAkB,MAAM;AAC/B,cAAU,IAAI,eAAe,OAAO;AAAA;AAGtC,QAAM,YAAY,CAAC,QAAiB,YAA+B;AACjE,cAAU,cAAc,QAAQ;AAChC,WAAO,UAAU,iBAAiB;AAAA;AAGpC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;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ACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA;AAGF,UAAM,QAAQ,UAAQ;AAEpB,UAAI,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;mBAKN,QAAkB;AAC1C,SAAOC,YAAW,QAAQ,IAAI;AAAA;;uBCtEyB;AACvD,QAAM,MAAyB;AAAA,IAC7B,QAAQ,IAAI;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd;AAAA,IACA;AAAA;AAEF,SAAO;AAEP,wBAAsB,QAAkC,IAAiB;AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;"} \ No newline at end of file diff --git a/build/trois.module.cdn.min.js b/build/trois.module.cdn.min.js index 01c3d63..ce524d6 100644 --- a/build/trois.module.cdn.min.js +++ b/build/trois.module.cdn.min.js @@ -1,2 +1,135 @@ -import{defineComponent as e,h as t,toRef as r,watch as s,createApp as i}from"https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js";import{Vector3 as a,Raycaster as n,Plane as o,Vector2 as h,InstancedMesh as d,WebGLRenderer as l,OrthographicCamera as m,PerspectiveCamera as u,Group as c,Scene as p,Color as f,BoxGeometry as g,CircleGeometry as y,ConeGeometry as b,CylinderGeometry as v,DodecahedronGeometry as S,IcosahedronGeometry as x,LatheGeometry as w,OctahedronGeometry as P,PlaneGeometry as N,PolyhedronGeometry as M,RingGeometry as C,SphereGeometry as L,TetrahedronGeometry as _,TorusGeometry as j,TorusKnotGeometry as k,TubeGeometry as z,Curve as I,CatmullRomCurve3 as O,AmbientLight as G,DirectionalLight as E,HemisphereLight as R,PointLight as A,RectAreaLight as T,SpotLight as B,FrontSide as F,MeshBasicMaterial as D,MeshLambertMaterial as U,TextureLoader as $,MeshMatcapMaterial as W,MeshPhongMaterial as H,MeshStandardMaterial as X,MeshPhysicalMaterial as V,ShaderMaterial as K,ShaderChunk as Z,UniformsUtils as Y,ShaderLib as q,MeshToonMaterial as J,UVMapping as Q,ClampToEdgeWrapping as ee,LinearFilter as te,LinearMipmapLinearFilter as re,CubeTextureLoader as se,CubeRefractionMapping as ie,Mesh as ae,FontLoader as ne,TextGeometry as oe,DoubleSide as he,SpriteMaterial as de,Sprite as le}from"https://unpkg.com/three@0.127.0/build/three.module.js";import{OrbitControls as me}from"https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as ue}from"https://unpkg.com/three@0.127.0/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as ce}from"https://unpkg.com/three@0.127.0/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as pe}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as fe}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ge}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ye}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as be}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as ve}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as Se}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as xe}from"https://unpkg.com/three@0.127.0/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as we}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Pe}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ne}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Me}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/UnrealBloomPass.js";function Ce(e){const{camera:t,domElement:r,intersectObjects:s,touch:i=!0,resetOnEnd:l=!1,resetPosition:m=new h(0,0),resetPositionV3:u=new a(0,0,0),onEnter:c=(()=>{}),onMove:p=(()=>{}),onLeave:f=(()=>{}),onIntersectEnter:g=(()=>{}),onIntersectOver:y=(()=>{}),onIntersectMove:b=(()=>{}),onIntersectLeave:v=(()=>{}),onIntersectClick:S=(()=>{})}=e,x=m.clone(),w=new h(0,0),P=function(e){const{camera:t,resetPosition:r=new a(0,0,0)}=e,s=new n,i=r.clone(),h=new o(new a(0,0,1),0);return{position:i,updatePosition:e=>{s.setFromCamera(e,t),t.getWorldDirection(h.normal),s.ray.intersectPlane(h,i)},intersect:(e,r)=>(s.setFromCamera(e,t),s.intersectObjects(r))}}({camera:t}),N=P.position,M={position:x,positionN:w,positionV3:N,intersectObjects:s,listeners:!1,addListeners:function(){r.addEventListener("mouseenter",_),r.addEventListener("mousemove",j),r.addEventListener("mouseleave",z),r.addEventListener("click",k),i&&(r.addEventListener("touchstart",_),r.addEventListener("touchmove",j),r.addEventListener("touchend",z));M.listeners=!0},removeListeners:function(){r.removeEventListener("mouseenter",_),r.removeEventListener("mousemove",j),r.removeEventListener("mouseleave",z),r.removeEventListener("click",k),r.removeEventListener("touchstart",_),r.removeEventListener("touchmove",j),r.removeEventListener("touchend",z),M.listeners=!1},intersect:L};return M;function C(e){let t,s;e.touches&&e.touches.length>0?(t=e.touches[0].clientX,s=e.touches[0].clientY):(t=e.clientX,s=e.clientY);const i=r.getBoundingClientRect();x.x=t-i.left,x.y=s-i.top,w.x=x.x/i.width*2-1,w.y=-x.y/i.height*2+1,P.updatePosition(w)}function L(){if(s.length){const e=P.intersect(w,s),t=[...s],r=[];e.forEach((e=>{const{object:s}=e,{component:i}=s;if(s instanceof d){if(-1!==r.indexOf(s))return;r.push(s)}if(!s.over){s.over=!0;const t={type:"pointerover",over:!0,component:i,intersect:e},r={...t,type:"pointerenter"};y(t),g(r),i.onPointerOver?.(t),i.onPointerEnter?.(r)}const a={type:"pointermove",component:i,intersect:e};b(a),i.onPointerMove?.(a),t.splice(t.indexOf(s),1)})),t.forEach((e=>{const{component:t}=e;if(e.over){e.over=!1;const r={type:"pointerover",over:!1,component:t},s={...r,type:"pointerleave"};y(r),v(s),t.onPointerOver?.(r),t.onPointerLeave?.(s)}}))}}function _(e){C(e),c({type:"pointerenter",position:x,positionN:w,positionV3:N})}function j(e){C(e),p({type:"pointermove",position:x,positionN:w,positionV3:N}),L()}function k(e){if(C(e),s.length){const e=P.intersect(w,s),t=[];e.forEach((e=>{const{object:r}=e,{component:s}=r;if(r instanceof d){if(-1!==t.indexOf(r))return;t.push(r)}const i={type:"click",component:s,intersect:e};S(i),s.onClick?.(i)}))}}function z(){l&&(x.copy(m),N.copy(u)),f({type:"pointerleave"})}}function Le(){const e={canvas:null,antialias:!0,alpha:!1,autoClear:!0,orbit_ctrl:!1,pointer:!1,resize:!1,width:300,height:150},t={width:1,height:1,wWidth:1,wHeight:1,ratio:1},r=[];let s=[],i=[];const a=[],n={conf:e,renderer:null,camera:null,cameraCtrl:null,scene:null,pointer:null,size:t,init:function(t){t&&Object.entries(t).forEach((([t,r])=>{e[t]=r}));if(!n.scene)return void console.error("Missing Scene");if(!n.camera)return void console.error("Missing Camera");n.renderer=new l({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),n.renderer.autoClear=e.autoClear,e.resize?(h(),window.addEventListener("resize",h)):d(e.width,e.height);o(),e.orbit_ctrl&&(n.orbitCtrl=new me(n.camera,n.renderer.domElement),e.orbit_ctrl instanceof Object&&Object.entries(e.orbit_ctrl).forEach((([e,t])=>{n.orbitCtrl[e]=t})));return r.forEach((e=>e())),!0},dispose:function(){i=[],window.removeEventListener("resize",h),n.pointer&&n.pointer.removeListeners();n.orbitCtrl&&n.orbitCtrl.dispose();n.renderer&&n.renderer.dispose()},render:function(){n.orbitCtrl&&n.orbitCtrl.update();i.forEach((e=>e())),n.renderer.render(n.scene,n.camera)},renderC:function(){n.orbitCtrl&&n.orbitCtrl.update();i.forEach((e=>e())),n.composer.render()},setSize:d,onAfterInit:function(e){r.push(e)},onAfterResize:function(e){s.push(e)},offAfterResize:function(e){s=s.filter((t=>t!==e))},addIntersectObject:function(e){-1===a.indexOf(e)&&a.push(e);n.pointer&&!n.pointer.listeners&&n.pointer.addListeners()},removeIntersectObject:function(t){const r=a.indexOf(t);-1!==r&&a.splice(r,1);n.pointer&&!e.pointer&&0===a.length&&n.pointer.removeListeners()}};function o(){let t={camera:n.camera,domElement:n.renderer.domElement,intersectObjects:a};var r;e.pointer&&e.pointer instanceof Object&&(t={...t,...e.pointer}),n.pointer=Ce(t),(e.pointer||a.length)&&(n.pointer.addListeners(),"frame"===e.pointer.intersectMode&&(r=()=>{n.pointer.intersect()},i.push(r)))}function h(){if("window"===e.resize)d(window.innerWidth,window.innerHeight);else{const e=n.renderer.domElement.parentNode;d(e.clientWidth,e.clientHeight)}s.forEach((e=>e()))}function d(e,r){if(t.width=e,t.height=r,t.ratio=e/r,n.renderer.setSize(e,r,!1),n.camera.aspect=t.ratio,n.camera.updateProjectionMatrix(),n.composer&&n.composer.setSize(e,r),"OrthographicCamera"===n.camera.type)t.wWidth=n.camera.right-n.camera.left,t.wHeight=n.camera.top-n.camera.bottom;else{const e=function(){const e=n.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*Math.abs(n.camera.position.z);return[t*n.camera.aspect,t]}();t.wWidth=e[0],t.wHeight=e[1]}}return n}var _e=e({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean},setup:()=>({three:Le(),raf:!0,onMountedCallbacks:[],beforeRenderCallbacks:[],afterRenderCallbacks:[]}),provide(){return{three:this.three,rendererComponent:this}},mounted(){const e={canvas:this.$el,antialias:this.antialias,alpha:this.alpha,autoClear:this.autoClear,orbit_ctrl:this.orbitCtrl,pointer:this.pointer,resize:this.resize,width:this.width,height:this.height};this.three.init(e)&&(this.renderer=this.three.renderer,this.renderer.shadowMap.enabled=this.shadow,this._render=this.three.composer?this.three.renderC:this.three.render,this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.onMountedCallbacks.forEach((e=>e()))},beforeUnmount(){this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onMounted(e){this.onMountedCallbacks.push(e)},onBeforeRender(e){this.beforeRenderCallbacks.push(e)},offBeforeRender(e){this.beforeRenderCallbacks=this.beforeRenderCallbacks.filter((t=>t!==e))},onAfterRender(e){this.afterRenderCallbacks.push(e)},offAfterRender(e){this.afterRenderCallbacks=this.afterRenderCallbacks.filter((t=>t!==e))},onAfterResize(e){this.three.onAfterResize(e)},offAfterResize(e){this.three.offAfterResize(e)},render(e){this.beforeRenderCallbacks.forEach((t=>t({time:e}))),this._render(),this.afterRenderCallbacks.forEach((t=>t({time:e})))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return t("canvas",{},this.$slots.default())},__hmrId:"Renderer"});function je(e,t){t instanceof Object&&Object.entries(t).forEach((([t,r])=>{e[t]=r}))}function ke(e,t,r){t.forEach((t=>{ze(e,t,r)}))}function ze(e,t,i,a){a||(a=t);const n=r(e,t);n.value instanceof Object?(je(i[a],n.value),s(n,(e=>{je(i[a],e)}),{deep:!0})):(n.value&&(i[a]=e[t]),s(n,(e=>{i[a]=e})))}function Ie(e,t){const r={};return Object.entries(e).forEach((([e,s])=>{(!t||t&&!t.includes(e))&&(r[e]=s)})),r}function Oe(e,t,r){return e+(t-e)*(r=(r=r<0?0:r)>1?1:r)}function Ge(e,t,r){e.x=Oe(e.x,t.x,r),e.y=Oe(e.y,t.y,r)}function Ee(e,t,r){e.x=Oe(e.x,t.x,r),e.y=Oe(e.y,t.y,r),e.z=Oe(e.z,t.z,r)}function Re(e,t,r){return er?r:e}function Ae(e,t=1024){return`https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d/${t}/${`${e}${function(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}(t)}.png`}`}var Te=e({inject:["three"],render(){return this.$slots.default?this.$slots.default():[]}}),Be=e({extends:Te,name:"OrthographicCamera",inject:["three"],props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:{x:0,y:0,z:0}}},created(){this.camera=new m(this.left,this.right,this.top,this.bottom,this.near,this.far),ze(this,"position",this.camera),["left","right","top","bottom","near","far","zoom"].forEach((e=>{s((()=>this[e]),(()=>{this.camera[e]=this[e],this.camera.updateProjectionMatrix()}))})),this.three.camera=this.camera},__hmrId:"OrthographicCamera"}),Fe=e({extends:Te,name:"PerspectiveCamera",inject:["three"],props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:{x:0,y:0,z:0}},lookAt:{type:Object,default:null}},created(){this.camera=new u(this.fov,this.aspect,this.near,this.far),ze(this,"position",this.camera),this.lookAt&&this.camera.lookAt(this.lookAt.x,this.lookAt.y,this.lookAt.z),s((()=>this.lookAt),(e=>{this.camera.lookAt(e.x,e.y,e.z)}),{deep:!0}),["aspect","far","fov","near"].forEach((e=>{s((()=>this[e]),(()=>{this.camera[e]=this[e],this.camera.updateProjectionMatrix()}))})),this.three.camera=this.camera},__hmrId:"PerspectiveCamera"}),De=e({name:"Object3D",inject:["three","scene","rendererComponent"],emits:["created","ready"],props:{position:{type:Object,default:{x:0,y:0,z:0}},rotation:{type:Object,default:{x:0,y:0,z:0}},scale:{type:Object,default:{x:1,y:1,z:1}},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){this.o3d=e,this.o3d.userData=this.userData,this.$emit("created",this.o3d),ze(this,"position",this.o3d),ze(this,"rotation",this.o3d),ze(this,"scale",this.o3d),this.lookAt&&this.o3d.lookAt(this.lookAt.x,this.lookAt.y,this.lookAt.z),s((()=>this.lookAt),(e=>{this.o3d.lookAt(e.x,e.y,e.z)}),{deep:!0}),this._parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}return!1},addToParent(e){const t=e||this.o3d;return!!this._parent&&(this._parent.add(t),!0)},removeFromParent(e){const t=e||this.o3d;return!!this._parent&&(this._parent.remove(t),!0)},add(e){this.o3d.add(e)},remove(e){this.o3d.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),Ue=e({name:"Group",extends:De,created(){this.group=new c,this.initObject3D(this.group)},__hmrId:"Group"}),$e=e({name:"Scene",inject:["three"],props:{id:String,background:[String,Number]},setup(e){const t=new p;return e.background&&(t.background=new f(e.background)),s((()=>e.background),(e=>{t.background.set(e)})),{scene:t}},provide(){return{scene:this.scene}},mounted(){this.three.scene||(this.three.scene=this.scene)},methods:{add(e){this.scene.add(e)},remove(e){this.scene.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),We=e({name:"Raycaster",inject:["three","rendererComponent"],props:{onPointerEnter:{type:Function,default:()=>{}},onPointerOver:{type:Function,default:()=>{}},onPointerMove:{type:Function,default:()=>{}},onPointerLeave:{type:Function,default:()=>{}},onClick:{type:Function,default:()=>{}},intersectMode:{type:String,default:"move"}},mounted(){this.rendererComponent.onMounted((()=>{this.pointer=Ce({camera:this.three.camera,domElement:this.three.renderer.domElement,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),"frame"===this.intersectMode&&this.rendererComponent.onBeforeRender(this.pointer.intersect)}))},unmounted(){this.pointer&&(this.pointer.removeListeners(),this.rendererComponent.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.three.scene.children.filter((e=>"Mesh"===e.type))}},render:()=>[],__hmrId:"Raycaster"});const He=e({inject:["mesh"],props:{rotateX:Number,rotateY:Number,rotateZ:Number},created(){this.mesh||console.error("Missing parent Mesh"),this.watchProps=[],Object.entries(this.$props).forEach((e=>this.watchProps.push(e[0]))),this.createGeometry(),this.rotateGeometry(),this.mesh.setGeometry(this.geometry),this.addWatchers()},unmounted(){this.geometry.dispose()},methods:{addWatchers(){this.watchProps.forEach((e=>{s((()=>this[e]),(()=>{this.refreshGeometry()}))}))},rotateGeometry(){this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.mesh.setGeometry(this.geometry),e.dispose()}},render:()=>[]});function Xe(t,r,s){return e({name:t,extends:He,props:r,methods:{createGeometry(){this.geometry=s(this)}}})}const Ve={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function Ke(e){return e.size?new g(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new g(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ze=Xe("BoxGeometry",Ve,Ke);const Ye={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function qe(e){return new y(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Je=Xe("CircleGeometry",Ye,qe);const Qe={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function et(e){return new b(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var tt=Xe("ConeGeometry",Qe,et);const rt={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function st(e){return new v(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var it=Xe("CylinderGeometry",rt,st);const at={radius:{type:Number,default:1},detail:{type:Number,default:0}};function nt(e){return new S(e.radius,e.detail)}var ot=Xe("DodecahedronGeometry",at,nt);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new x(e.radius,e.detail)}var lt=Xe("IcosahedronGeometry",ht,dt);const mt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:2*Math.PI}};function ut(e){return new w(e.points,e.segments,e.phiStart,e.phiLength)}var ct=Xe("LatheGeometry",mt,ut);const pt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function ft(e){return new P(e.radius,e.detail)}var gt=Xe("OctahedronGeometry",pt,ft);const yt={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function bt(e){return new N(e.width,e.height,e.widthSegments,e.heightSegments)}var vt=Xe("PlaneGeometry",yt,bt);const St={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function xt(e){return new M(e.vertices,e.indices,e.radius,e.detail)}var wt=Xe("PolyhedronGeometry",St,xt);const Pt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function Nt(e){return new C(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var Mt=Xe("RingGeometry",Pt,Nt);const Ct={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Lt(e){return new L(e.radius,e.widthSegments,e.heightSegments)}var _t=Xe("SphereGeometry",Ct,Lt);const jt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function kt(e){return new _(e.radius,e.detail)}var zt=Xe("TetrahedronGeometry",jt,kt);const It={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:2*Math.PI}};function Ot(e){return new j(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=Xe("TorusGeometry",It,Ot);const Et={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function Rt(e){return new k(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var At=Xe("TorusKnotGeometry",Et,Rt);const Tt={points:Array,path:I,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function Bt(e){let t;return e.points?t=new O(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new z(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Ft=e({extends:He,props:Tt,methods:{createGeometry(){this.geometry=Bt(this)},updatePoints(e){Dt(this.geometry,e)}}});function Dt(e,t){const r=new O(t),{radialSegments:s,radius:i,tubularSegments:n,closed:o}=e.parameters,h=r.computeFrenetFrames(n,o);e.tangents=h.tangents,e.normals=h.normals,e.binormals=h.binormals,e.parameters.path=r;const d=e.attributes.position.array,l=e.attributes.normal.array,m=new a;let u;for(let e=0;e{s((()=>this[e]),(()=>{"color"===e?this.light.color.set(this.color):this.light[e]=this[e]}))})),this.initObject3D(this.light),this.light.target&&this.addToParent(this.light.target)}},__hmrId:"Light"}),$t=e({extends:Ut,created(){this.light=new G(this.color,this.intensity),this.initLight()},__hmrId:"AmbientLight"}),Wt=e({extends:Ut,props:{target:Object},created(){this.light=new E(this.color,this.intensity),this.initLight()},__hmrId:"DirectionalLight"}),Ht=e({extends:Ut,props:{groundColor:{type:String,default:"#444444"}},created(){this.light=new R(this.color,this.groundColor,this.intensity),s((()=>this.groundColor),(e=>{this.light.groundColor.set(e)})),this.initLight()},__hmrId:"HemisphereLight"}),Xt=e({extends:Ut,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.light=new A(this.color,this.intensity,this.distance,this.decay),this.initLight()},__hmrId:"PointLight"}),Vt=e({extends:Ut,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){ue.init(),this.light=new T(this.color,this.intensity,this.width,this.height),["width","height"].forEach((e=>{s((()=>this[e]),(()=>{this.light[e]=this[e]}))})),this.helper&&(this.lightHelper=new ce(this.light),this.light.add(this.lightHelper)),this.initLight()},unmounted(){this.lightHelper&&this.removeFromParent(this.lightHelper)},__hmrId:"RectAreaLight"}),Kt=e({extends:Ut,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){this.light=new B(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay),["angle","decay","distance","penumbra"].forEach((e=>{s((()=>this[e]),(()=>{this.light[e]=this[e]}))})),this.initLight()},__hmrId:"SpotLight"}),Zt=e({inject:["three","mesh"],props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:F},transparent:Boolean,vertexColors:Boolean},provide(){return{material:this}},created(){this.createMaterial(),this.mesh.setMaterial(this.material),this._addWatchers(),this.addWatchers&&this.addWatchers()},unmounted(){this.material.dispose()},methods:{setProp(e,t,r=!1){this.material[e]=t,this.material.needsUpdate=r},setTexture(e,t="map"){this.setProp(t,e,!0)},_addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach((e=>{s((()=>this[e]),(()=>{"color"===e?this.material.color.set(this.color):this.material[e]=this[e]}))}))}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const Yt={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var qt=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new D(Ie(this.$props))},addWatchers(){ke(this,Object.keys(Yt),this.material)}},__hmrId:"BasicMaterial"}),Jt=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new U(Ie(this.$props))},addWatchers(){ke(this,Object.keys(Yt),this.material)}},__hmrId:"LambertMaterial"}),Qt=e({extends:Zt,props:{src:String,name:String,flatShading:Boolean},methods:{createMaterial(){const e=this.name?Ae(this.name):this.src,t=Ie(this.$props,["src","name"]);t.matcap=(new $).load(e),this.material=new W(t)},addWatchers(){}},__hmrId:"MatcapMaterial"}),er=e({extends:Zt,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...Yt},methods:{createMaterial(){this.material=new H(Ie(this.$props))},addWatchers(){["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach((e=>{s((()=>this[e]),(t=>{"emissive"===e||"specular"===e?this.material[e].set(t):this.material[e]=t}))})),ke(this,Object.keys(Yt),this.material)}},__hmrId:"PhongMaterial"});const tr={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:{x:1,y:1}},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var rr=e({extends:Zt,props:{...tr,...Yt},methods:{createMaterial(){this.material=new X(Ie(this.$props,["normalScale"]))},addWatchers(){Object.keys(tr).forEach((e=>{"normalScale"!==e&&s((()=>this[e]),(t=>{"emissive"===e?this.material[e].set(t):this.material[e]=t}))})),ze(this,"normalScale",this.material),ke(this,Object.keys(Yt),this.material)}},__hmrId:"StandardMaterial"}),sr=e({extends:rr,props:{flatShading:Boolean},methods:{createMaterial(){this.material=new V(Ie(this.$props))},addWatchers(){}},__hmrId:"PhysicalMaterial"});var ir=e({inject:["three","mesh"],props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:"\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}"},fragmentShader:{type:String,default:"\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}"}},provide(){return{material:this}},created(){this.createMaterial(),["vertexShader","fragmentShader"].forEach((e=>{s((()=>this[e]),(()=>{this.material.dispose(),this.createMaterial()}))}))},unmounted(){this.material.dispose()},methods:{createMaterial(){this.material=new K(Ie(this.$props)),this.mesh.setMaterial(this.material)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"ShaderMaterial"});const ar=Z.meshphong_frag.slice(0,Z.meshphong_frag.indexOf("void main() {")),nr=Z.meshphong_frag.slice(Z.meshphong_frag.indexOf("void main() {")),or={uniforms:Y.merge([q.phong.uniforms,{thicknessColor:{value:new f(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:`\n #define USE_UV\n ${Z.meshphong_vert}\n `,fragmentShader:`\n #define USE_UV\n #define SUBSURFACE\n\n ${ar}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n `+nr.replace("#include ",(hr=Z.lights_fragment_begin,dr="RE_Direct( directLight, geometry, material, reflectedLight );",lr="\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n ",hr.split(dr).join(lr)))};var hr,dr,lr,mr=e({inject:["three","mesh"],props:{color:{type:String,default:"#ffffff"},thicknessColor:{type:String,default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4},transparent:{type:Boolean,default:!1},opacity:{type:Number,default:1},vertexColors:{type:Boolean,default:!1}},created(){this.createMaterial(),this.mesh.setMaterial(this.material)},unmounted(){this.material.dispose()},methods:{createMaterial(){const e=or,t=Y.clone(e.uniforms);Object.entries(this.$props).forEach((([e,r])=>{let s=e,i=r;["color","thicknessColor"].includes(e)&&("color"===e&&(s="diffuse"),i=new f(r)),["transparent","vertexColors"].includes(e)||(t[s].value=i)})),this.material=new K({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},render:()=>[],__hmrId:"SubSurfaceMaterial"}),ur=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new J(Ie(this.$props))},addWatchers(){ke(this,Object.keys(Yt),this.material)}},__hmrId:"ToonMaterial"}),cr=e({inject:["material"],emits:["loaded"],props:{name:{type:String,default:"map"},uniform:{type:String,default:null},src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:Q},wrapS:{type:Number,default:ee},wrapT:{type:Number,default:ee},magFilter:{type:Number,default:te},minFilter:{type:Number,default:re},repeat:{type:Object,default:{x:1,y:1}},rotation:{type:Number,default:0},center:{type:Object,default:{x:0,y:0}}},created(){this.refreshTexture(),s((()=>this.src),this.refreshTexture)},unmounted(){this.material&&this.material.setTexture&&this.material.setTexture(null,this.name),this.texture.dispose()},methods:{createTexture(){this.texture=(new $).load(this.src,this.onLoaded,this.onProgress,this.onError);["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","rotation","center"].forEach((e=>{ze(this,e,this.texture)}))},refreshTexture(){if(this.createTexture(),this.material&&this.material.setTexture)this.material.setTexture(this.texture,this.name);else if(this.material&&"ShaderMaterial"===this.material.material.type){if(!this.uniform)return void console.warn('"uniform" prop required to use texture in a shader.');this.material.uniforms[this.uniform]={value:this.texture}}},onLoaded(){this.onLoad&&this.onLoad(),this.$emit("loaded")}},render:()=>[]}),pr=e({inject:["material"],emits:["loaded"],props:{path:String,urls:{type:Array,default:["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},onLoad:Function,onProgress:Function,onError:Function,name:{type:String,default:"envMap"},refraction:Boolean,refractionRatio:{type:Number,default:.98}},created(){this.refreshTexture(),s((()=>this.path),this.refreshTexture),s((()=>this.urls),this.refreshTexture)},unmounted(){this.material.setTexture(null,this.name),this.texture.dispose()},methods:{createTexture(){this.texture=(new se).setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)},refreshTexture(){this.createTexture(),this.material.setTexture(this.texture,this.name),this.refraction&&(this.texture.mapping=ie,this.material.setProp("refractionRatio",this.refractionRatio))},onLoaded(){this.onLoad&&this.onLoad(),this.$emit("loaded")}},render:()=>[]});const fr={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},gr=e({name:"Mesh",extends:De,props:{castShadow:Boolean,receiveShadow:Boolean,...fr},provide(){return{mesh:this}},mounted(){this.mesh||this.loading||this.initMesh()},methods:{initMesh(){this.mesh=new ae(this.geometry,this.material),this.mesh.component=this,ze(this,"castShadow",this.mesh),ze(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)},addGeometryWatchers(e){Object.keys(e).forEach((e=>{s((()=>this[e]),(()=>{this.refreshGeometry()}))}))},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh.geometry=this.geometry,e.dispose()}},unmounted(){this.mesh&&this.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose()},__hmrId:"Mesh"});function yr(t,r,s){return e({name:t,extends:gr,props:r,created(){this.createGeometry(),this.addGeometryWatchers(r)},methods:{createGeometry(){this.geometry=s(this)}},__hmrId:t})}var br=yr("Box",Ve,Ke),vr=yr("Circle",Ye,qe),Sr=yr("Cone",Qe,et),xr=yr("Cylinder",rt,st),wr=yr("Dodecahedron",at,nt),Pr=yr("Icosahedron",ht,dt),Nr=yr("Lathe",mt,ut),Mr=yr("Octahedron",pt,ft),Cr=yr("Plane",yt,bt),Lr=yr("Polyhedron",St,xt),_r=yr("Ring",Pt,Nt),jr=yr("Sphere",Ct,Lt),kr=yr("Tetrahedron",jt,kt);const zr={text:String,fontSrc:String,size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var Ir=e({extends:gr,props:zr,data:()=>({loading:!0}),created(){["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach((e=>{s((()=>this[e]),(()=>{this.font&&this.refreshGeometry()}))}));(new ne).load(this.fontSrc,(e=>{this.loading=!1,this.font=e,this.createGeometry(),this.initMesh()}))},methods:{createGeometry(){this.geometry=new oe(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),"center"===this.align&&this.geometry.center()}}}),Or=yr("Torus",It,Ot),Gr=yr("TorusKnot",Et,Rt),Er=e({extends:gr,props:Tt,created(){this.createGeometry(),this.addGeometryWatchers(Tt)},methods:{createGeometry(){this.geometry=Bt(this)},updatePoints(e){Dt(this.geometry,e)}},__hmrId:"Tube"}),Rr=e({emits:["loaded"],extends:gr,props:{src:String,width:Number,height:Number,keepSize:Boolean},created(){this.createGeometry(),this.createMaterial(),this.initMesh(),s((()=>this.src),this.refreshTexture),["width","height"].forEach((e=>{s((()=>this[e]),this.resize)})),this.keepSize&&this.three.onAfterResize(this.resize)},methods:{createGeometry(){this.geometry=new N(1,1,1,1)},createMaterial(){this.material=new D({side:he,map:this.loadTexture()})},loadTexture(){return(new $).load(this.src,this.onLoaded)},refreshTexture(){this.texture&&this.texture.dispose(),this.material.map=this.loadTexture(),this.material.needsUpdate=!0},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded")},resize(){if(!this.texture)return;const e=this.three.size,t=this.texture.image.width/this.texture.image.height;let r,s;this.width&&this.height?(r=this.width*e.wWidth/e.width,s=this.height*e.wHeight/e.height):this.width?(r=this.width*e.wWidth/e.width,s=r/t):this.height&&(s=this.height*e.wHeight/e.height,r=s*t),this.mesh.scale.x=r,this.mesh.scale.y=s}},__hmrId:"Image"}),Ar=e({extends:De,props:{castShadow:Boolean,receiveShadow:Boolean,count:Number,...fr},provide(){return{mesh:this}},beforeMount(){this.$slots.default||console.error("Missing Geometry")},mounted(){this.initMesh()},methods:{initMesh(){this.mesh=new d(this.geometry,this.material,this.count),this.mesh.component=this,ze(this,"castShadow",this.mesh),ze(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.material.instancingColor=!0,this.mesh&&(this.mesh.material=e)}},unmounted(){this.mesh&&this.three.removeIntersectObject(this.mesh)},__hmrId:"InstancedMesh"}),Tr=e({extends:De,emits:["loaded"],props:{src:String},data:()=>({loading:!0}),created(){this.texture=(new $).load(this.src,this.onLoaded),this.material=new de({map:this.texture}),this.sprite=new le(this.material),this.geometry=this.sprite.geometry,this.initObject3D(this.sprite)},unmounted(){this.texture.dispose(),this.material.dispose()},methods:{onLoaded(){this.loading=!1,this.updateUV(),this.$emit("loaded")},updateUV(){this.iWidth=this.texture.image.width,this.iHeight=this.texture.image.height,this.iRatio=this.iWidth/this.iHeight;let e=.5,t=.5;this.iRatio>1?t=.5/this.iRatio:e=.5/this.iRatio;const r=this.geometry.attributes.position.array;r[0]=-e,r[1]=-t,r[5]=e,r[6]=-t,r[10]=e,r[11]=t,r[15]=-e,r[16]=t,this.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),Br=e({extends:De,emits:["load","progress","error"],data:()=>({progress:0}),methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),Fr=e({extends:Br,props:{src:String},created(){(new pe).load(this.src,(e=>{this.onLoad(e.scene)}),this.onProgress,this.onError)}}),Dr=e({extends:Br,props:{src:String},created(){(new fe).load(this.src,(e=>{this.onLoad(e)}),this.onProgress,this.onError)}}),Ur=e({setup:()=>({passes:[]}),inject:["three"],provide(){return{passes:this.passes}},mounted(){this.three.onAfterInit((()=>{this.composer=new ge(this.three.renderer),this.three.renderer.autoClear=!1,this.passes.forEach((e=>{this.composer.addPass(e)})),this.three.composer=this.composer,this.resize(),this.three.onAfterResize(this.resize)}))},unmounted(){this.three.offAfterResize(this.resize)},methods:{resize(){this.composer.setSize(this.three.size.width,this.three.size.height)}},render(){return this.$slots.default()},__hmrId:"EffectComposer"}),$r=e({inject:["three","passes"],emits:["ready"],beforeMount(){this.passes||console.error("Missing parent EffectComposer")},unmounted(){this.pass.dispose&&this.pass.dispose()},methods:{completePass(e){this.passes.push(e),this.pass=e,this.$emit("ready",e)}},render:()=>[],__hmrId:"EffectPass"}),Wr=e({extends:$r,mounted(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");const e=new ye(this.three.scene,this.three.camera);this.completePass(e)},__hmrId:"RenderPass"}),Hr=e({extends:$r,props:{focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}},watch:{focus(){this.pass.uniforms.focus.value=this.focus},aperture(){this.pass.uniforms.aperture.value=this.aperture},maxblur(){this.pass.uniforms.maxblur.value=this.maxblur}},mounted(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.three.size.width,height:this.three.size.height},t=new be(this.three.scene,this.three.camera,e);this.completePass(t)},__hmrId:"BokehPass"}),Xr=e({extends:$r,props:{noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}},watch:{noiseIntensity(){this.pass.uniforms.nIntensity.value=this.noiseIntensity},scanlinesIntensity(){this.pass.uniforms.sIntensity.value=this.scanlinesIntensity},scanlinesCount(){this.pass.uniforms.sCount.value=this.scanlinesCount},grayscale(){this.pass.uniforms.grayscale.value=this.grayscale}},mounted(){const e=new ve(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);this.completePass(e)},__hmrId:"FilmPass"}),Vr=e({extends:$r,mounted(){const e=new Se(xe);this.completePass(e),this.three.onAfterResize(this.resize)},unmounted(){this.three.offAfterResize(this.resize)},methods:{resize(){const{resolution:e}=this.pass.material.uniforms;e.value.x=1/this.three.size.width,e.value.y=1/this.three.size.height}},__hmrId:"FXAAPass"}),Kr=e({extends:$r,props:{shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}},mounted(){const e=new we(this.three.size.width,this.three.size.height,{});["shape","radius","rotateR","rotateG","rotateB","scatter"].forEach((t=>{e.uniforms[t].value=this[t],s((()=>this[t]),(()=>{e.uniforms[t].value=this[t]}))})),this.completePass(e)},__hmrId:"HalftonePass"}),Zr=e({extends:$r,mounted(){const e=new Pe(this.three.size.width,this.three.size.height);this.completePass(e)},__hmrId:"SMAAPass"}),Yr=e({extends:$r,props:{scene:null,camera:null,options:{type:Object,default:()=>({})}},mounted(){const e=new Ne(this.scene||this.three.scene,this.camera||this.three.camera,this.three.size.width,this.three.size.height);for(const t of Object.keys(this.options))e[t]=this.options[t];this.completePass(e)},__hmrId:"SSAOPass"}),qr={uniforms:{},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n "},Jr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new h},end:{value:new h},delta:{value:new h},texSize:{value:new h}},vertexShader:qr.vertexShader,fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n "},Qr=e({extends:$r,props:{blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:{x:0,y:100}},end:{type:Object,default:{x:10,y:100}}},mounted(){this.pass=new Se(Jr),this.passes.push(this.pass),this.pass1=new Se(Jr),this.passes.push(this.pass1);const e=this.uniforms=this.pass.uniforms,t=this.uniforms1=this.pass1.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,ze(this,"blurRadius",e.blurRadius,"value"),ze(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach((e=>{s((()=>this[e]),this.updateFocusLine,{deep:!0})})),this.pass.setSize=(t,r)=>{e.texSize.value.set(t,r)},this.$emit("ready",[this.pass,this.pass1])},methods:{updateFocusLine(){this.uniforms.start.value.copy(this.start),this.uniforms.end.value.copy(this.end);const e=(new h).copy(this.end).sub(this.start).normalize();this.uniforms.delta.value.copy(e),this.uniforms1.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"}),es=e({extends:$r,props:{strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}},watch:{strength(){this.pass.strength=this.strength},radius(){this.pass.radius=this.radius},threshold(){this.pass.threshold=this.threshold}},mounted(){const e=new h(this.three.size.width,this.three.size.height),t=new Me(e,this.strength,this.radius,this.threshold);this.completePass(t)},__hmrId:"UnrealBloomPass"}),ts={uniforms:{tDiffuse:{value:null},center:{value:new h(.5,.5)},strength:{value:0}},vertexShader:qr.vertexShader,fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n "},rs=e({extends:$r,props:{center:{type:Object,default:{x:.5,y:.5}},strength:{type:Number,default:.5}},mounted(){const e=new Se(ts),t=this.uniforms=e.uniforms;ze(this,"center",t.center,"value"),ze(this,"strength",t.strength,"value"),this.completePass(e)},__hmrId:"ZoomBlurPass"}),ss=Object.freeze({__proto__:null,Renderer:_e,OrthographicCamera:Be,PerspectiveCamera:Fe,Camera:Fe,Group:Ue,Scene:$e,Object3D:De,Raycaster:We,BoxGeometry:Ze,CircleGeometry:Je,ConeGeometry:tt,CylinderGeometry:it,DodecahedronGeometry:ot,IcosahedronGeometry:lt,LatheGeometry:ct,OctahedronGeometry:gt,PlaneGeometry:vt,PolyhedronGeometry:wt,RingGeometry:Mt,SphereGeometry:_t,TetrahedronGeometry:zt,TorusGeometry:Gt,TorusKnotGeometry:At,TubeGeometry:Ft,AmbientLight:$t,DirectionalLight:Wt,HemisphereLight:Ht,PointLight:Xt,RectAreaLight:Vt,SpotLight:Kt,BasicMaterial:qt,LambertMaterial:Jt,MatcapMaterial:Qt,PhongMaterial:er,PhysicalMaterial:sr,ShaderMaterial:ir,StandardMaterial:rr,SubSurfaceMaterial:mr,ToonMaterial:ur,Texture:cr,CubeTexture:pr,Mesh:gr,Box:br,Circle:vr,Cone:Sr,Cylinder:xr,Dodecahedron:wr,Icosahedron:Pr,Lathe:Nr,Octahedron:Mr,Plane:Cr,Polyhedron:Lr,Ring:_r,Sphere:jr,Tetrahedron:kr,Text:Ir,Torus:Or,TorusKnot:Gr,Tube:Er,Image:Rr,InstancedMesh:Ar,Sprite:Tr,GLTFModel:Fr,FBXModel:Dr,EffectComposer:Ur,RenderPass:Wr,BokehPass:Hr,FilmPass:Xr,FXAAPass:Vr,HalftonePass:Kr,SMAAPass:Zr,SSAOPass:Yr,TiltShiftPass:Qr,UnrealBloomPass:es,ZoomBlurPass:rs,setFromProp:je,bindProps:ke,bindProp:ze,propsValues:Ie,lerp:Oe,lerpv2:Ge,lerpv3:Ee,limit:Re,getMatcapUrl:Ae});const is={install:e=>{["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach((t=>{e.component(t,ss[t])}))}};function as(e){return i(e).use(is)}export{$t as AmbientLight,qt as BasicMaterial,Hr as BokehPass,br as Box,Ze as BoxGeometry,Fe as Camera,vr as Circle,Je as CircleGeometry,Sr as Cone,tt as ConeGeometry,pr as CubeTexture,xr as Cylinder,it as CylinderGeometry,Wt as DirectionalLight,wr as Dodecahedron,ot as DodecahedronGeometry,Ur as EffectComposer,Dr as FBXModel,Vr as FXAAPass,Xr as FilmPass,Fr as GLTFModel,Ue as Group,Kr as HalftonePass,Ht as HemisphereLight,Pr as Icosahedron,lt as IcosahedronGeometry,Rr as Image,Ar as InstancedMesh,Jt as LambertMaterial,Nr as Lathe,ct as LatheGeometry,Qt as MatcapMaterial,gr as Mesh,De as Object3D,Mr as Octahedron,gt as OctahedronGeometry,Be as OrthographicCamera,Fe as PerspectiveCamera,er as PhongMaterial,sr as PhysicalMaterial,Cr as Plane,vt as PlaneGeometry,Xt as PointLight,Lr as Polyhedron,wt as PolyhedronGeometry,We as Raycaster,Vt as RectAreaLight,Wr as RenderPass,_e as Renderer,_r as Ring,Mt as RingGeometry,Zr as SMAAPass,Yr as SSAOPass,$e as Scene,ir as ShaderMaterial,jr as Sphere,_t as SphereGeometry,Kt as SpotLight,Tr as Sprite,rr as StandardMaterial,mr as SubSurfaceMaterial,kr as Tetrahedron,zt as TetrahedronGeometry,Ir as Text,cr as Texture,Qr as TiltShiftPass,ur as ToonMaterial,Or as Torus,Gt as TorusGeometry,Gr as TorusKnot,At as TorusKnotGeometry,is as TroisJSVuePlugin,Er as Tube,Ft as TubeGeometry,es as UnrealBloomPass,rs as ZoomBlurPass,ze as bindProp,ke as bindProps,as as createApp,Ae as getMatcapUrl,Oe as lerp,Ge as lerpv2,Ee as lerpv3,Re as limit,Ie as propsValues,je as setFromProp}; +import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onUnmounted as Ur,createApp as Hr}from"vue";import{Vector3 as Z,Raycaster as Wr,Plane as Xr,Vector2 as I,InstancedMesh as ue,WebGLRenderer as Kr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as we,CubeCamera as ts,Mesh as rs,BoxGeometry as Ce,CircleGeometry as ss,ConeGeometry as is,CylinderGeometry as ns,DodecahedronGeometry as as,IcosahedronGeometry as os,LatheGeometry as hs,OctahedronGeometry as ds,PlaneGeometry as Me,PolyhedronGeometry as ls,RingGeometry as us,SphereGeometry as cs,TetrahedronGeometry as ms,TorusGeometry as fs,TorusKnotGeometry as ps,TubeGeometry as ys,Curve as gs,CatmullRomCurve3 as Le,SpotLight as ce,DirectionalLight as me,AmbientLight as vs,HemisphereLight as bs,PointLight as Ss,RectAreaLight as Ps,FrontSide as xs,MeshBasicMaterial as Ne,MeshLambertMaterial as ws,TextureLoader as Y,MeshMatcapMaterial as Cs,MeshPhongMaterial as Ms,MeshStandardMaterial as Ls,MeshPhysicalMaterial as Ns,ShaderMaterial as fe,ShaderChunk as K,UniformsUtils as Ge,ShaderLib as Gs,MeshToonMaterial as _s,UVMapping as js,ClampToEdgeWrapping as _e,LinearFilter as Es,CubeReflectionMapping as ks,CubeTextureLoader as Rs,FontLoader as Os,TextGeometry as $s,DoubleSide as Is,SpriteMaterial as zs,Sprite as Ts}from"three";import{OrbitControls as As}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Bs}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Fs}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Ds}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Us}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as Hs}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as Ws}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Xs}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ks}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Vs}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as qs}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Zs}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ys}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Js}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Qs(e){const{camera:t,resetPosition:r=new Z(0,0,0)}=e,s=new Wr,n=r.clone(),a=new Xr(new Z(0,0,1),0);return{position:n,updatePosition:P=>{s.setFromCamera(P,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(P,R)=>(s.setFromCamera(P,t),s.intersectObjects(R))}}function je(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new I(0,0),resetPositionV3:c=new Z(0,0,0),onEnter:P=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:T=()=>{},onIntersectEnter:W=()=>{},onIntersectOver:x=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:G=()=>{}}=e,m=i.clone(),p=new I(0,0),h=Qs({camera:t}),d=h.position,w={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Ar,removeListeners:Br,intersect:be};return w;function C(){m.copy(i),d.copy(c)}function de(y){let O,$;y instanceof TouchEvent&&y.touches&&y.touches.length>0?(O=y.touches[0].clientX,$=y.touches[0].clientY):(O=y.clientX,$=y.clientY);const g=r.getBoundingClientRect();m.x=O-g.left,m.y=$-g.top,p.x=m.x/g.width*2-1,p.y=-(m.y/g.height)*2+1,h.updatePosition(p)}function be(){if(s.length){const y=h.intersect(p,s),O=[...s],$=[];y.forEach(g=>{var A,_,M;const{object:S}=g,{component:L}=S.userData;if(S instanceof ue){if($.indexOf(S)!==-1)return;$.push(S)}if(!S.userData.over){S.userData.over=!0;const le={type:"pointerover",over:!0,component:L,intersect:g},xe={...le,type:"pointerenter"};x(le),W(xe),(A=L.onPointerOver)==null||A.call(L,le),(_=L.onPointerEnter)==null||_.call(L,xe)}const Pe={type:"pointermove",component:L,intersect:g};F(Pe),(M=L.onPointerMove)==null||M.call(L,Pe),O.splice(O.indexOf(S),1)}),O.forEach(g=>{var A,_;const{component:M}=g.userData;if(g.userData.over){g.userData.over=!1;const S={type:"pointerover",over:!1,component:M},L={...S,type:"pointerleave"};x(S),D(L),(A=M.onPointerOver)==null||A.call(M,S),(_=M.onPointerLeave)==null||_.call(M,L)}})}}function ee(y){de(y),P({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(y){de(y),R({type:"pointermove",position:m,positionN:p,positionV3:d}),be()}function Se(y){if(de(y),s.length){const O=h.intersect(p,s),$=[];O.forEach(g=>{var A;const{object:_}=g,{component:M}=_.userData;if(_ instanceof ue){if($.indexOf(_)!==-1)return;$.push(_)}const S={type:"click",component:M,intersect:g};G(S),(A=M.onClick)==null||A.call(M,S)})}T({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&C(),f({type:"pointerleave"})}function Ar(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Se),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),w.listeners=!0}function Br(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Se),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),w.listeners=!1}}function ei(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:P,dispose:D,render:T,renderC:W,setSize:m,addIntersectObject:x,removeIntersectObject:F};return i;function c(){const h=new Kr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function P(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(G(),window.addEventListener("resize",G)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new As(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,w])=>{h[d]=w}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=je(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function T(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function W(){s.forEach(h=>h()),i.composer.render()}function x(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",G),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function G(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const w=i.camera;if(w.type==="PerspectiveCamera"){const C=w;C.aspect=r.ratio,C.updateProjectionMatrix()}if(w.type==="OrthographicCamera"){const C=w;r.wWidth=C.right-C.left,r.wHeight=C.top-C.bottom}else{const C=p();r.wWidth=C[0],r.wHeight=C[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,w=2*Math.tan(d/2)*Math.abs(h.position.z);return[w*h.aspect,w]}}const N=Symbol("Renderer");var Ee=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const P=ei(c),R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:P,renderer:P.renderer,size:P.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[N]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.renderer.shadowMap.enabled=this.shadow,this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn(),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"});function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Fr(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function z(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function ke(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Re(e,t,r){return er?r:e}const ti="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",ri="0404E8_0404B5_0404CB_3333FC";function pe(e=ri,t=1024){const r=`${e}${si(t)}.png`;return`${ti}/${t}/${r}`}function si(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}var Oe=o({render(){return this.$slots.default?this.$slots.default():[]}}),$e=o({extends:Oe,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=X(N);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:Oe,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=X(N);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Ie=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=X(N),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Dr(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),B=o({name:"Object3D",inject:{renderer:N,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),ze=o({name:"Group",extends:B,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const J=()=>{};var Te=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:J},onPointerOver:{type:Function,default:J},onPointerMove:{type:Function,default:J},onPointerLeave:{type:Function,default:J},onClick:{type:Function,default:J},intersectMode:{type:String,default:"move"}},setup(){return{renderer:X(N)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=je({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Ae=o({extends:B,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=X(N);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:we}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ur(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const ii={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},Q=Symbol("Mesh"),H=o({name:"Mesh",extends:B,props:{castShadow:Boolean,receiveShadow:Boolean,...ii},setup(){return{}},provide(){return{[Q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function v(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const Be=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number},inject:{mesh:Q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function b(e,t,r){return o({name:e,extends:Be,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=b("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function We(e){return new ss(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Xe=b("CircleGeometry",He,We);const Ke={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new is(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=b("ConeGeometry",Ke,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new ns(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=b("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new as(e.radius,e.detail)}var tt=b("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new os(e.radius,e.detail)}var it=b("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new hs(e.points,e.segments,e.phiStart,e.phiLength)}var ot=b("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new ds(e.radius,e.detail)}var lt=b("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Me(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=b("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new ls(e.vertices,e.indices,e.radius,e.detail)}var yt=b("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new us(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=b("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new cs(e.radius,e.widthSegments,e.heightSegments)}var xt=b("SphereGeometry",St,Pt);const wt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Ct(e){return new ms(e.radius,e.detail)}var Mt=b("TetrahedronGeometry",wt,Ct);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new fs(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=b("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function jt(e){return new ps(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var Et=b("TorusKnotGeometry",_t,jt);const ye={points:Array,path:gs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function kt(e){let t;return e.points?t=new Le(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new ys(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Rt=o({extends:Be,props:ye,methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}}});function Ot(e,t){const r=new Le(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const P=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Z,T=new Z;for(let x=0;x({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof ce||this.light instanceof me)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof ce||e instanceof me)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:q,created(){this.initLight(new vs(this.color,this.intensity))},__hmrId:"AmbientLight"}),It=o({extends:q,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new me(this.color,this.intensity))},__hmrId:"DirectionalLight"}),zt=o({extends:q,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new bs(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),Tt=o({extends:q,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new Ss(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:q,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Bs.init();const e=new Ps(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Fs(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:q,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new ce(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const oe=Symbol("Material");var j=o({inject:{mesh:Q},props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:xs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[oe]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const E={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:j,props:{...E},methods:{createMaterial(){const e=new Ne(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new ws(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:j,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:pe(this.name),t=z(this.$props,["src","name"]);return t.matcap=new Y().load(e),new Cs(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:j,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...E},methods:{createMaterial(){const e=new Ms(z(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(E),e),e}},__hmrId:"PhongMaterial"});const Wt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ge=o({extends:j,props:{...Wt,...E},methods:{createMaterial(){const e=new Ls(z(this.$props,["normalScale"]));return Object.keys(Wt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(E),e),e}},__hmrId:"StandardMaterial"}),Xt=o({extends:ge,props:{flatShading:Boolean},methods:{createMaterial(){return new Ns(z(this.$props))}},__hmrId:"PhysicalMaterial"});const ni=` + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); + } +`,ai=` + varying vec2 vUv; + void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); + } +`;var Kt=o({extends:j,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:ni},fragmentShader:{type:String,default:ai}},methods:{createMaterial(){const e=new fe({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader});return["vertexShader","fragmentShader"].forEach(r=>{l(()=>this[r],s=>{this.setProp(r,s,!0)})}),e},addWatchers(){}},__hmrId:"ShaderMaterial"});function oi(e,t,r){return e.split(t).join(r)}const hi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),di=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),li={uniforms:Ge.merge([Gs.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` + #define USE_UV + ${K.meshphong_vert} + `,fragmentShader:` + #define USE_UV + #define SUBSURFACE + + ${hi} + + uniform float thicknessPower; + uniform float thicknessScale; + uniform float thicknessDistortion; + uniform float thicknessAmbient; + uniform float thicknessAttenuation; + uniform vec3 thicknessColor; + + void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) { + #ifdef USE_COLOR + vec3 thickness = vColor * thicknessColor; + #else + vec3 thickness = thicknessColor; + #endif + vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion)); + float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale; + vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; + reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; + } + `+di.replace("#include ",oi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` + RE_Direct( directLight, geometry, material, reflectedLight ); + #if defined( SUBSURFACE ) && defined( USE_UV ) + RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); + #endif + `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:j,props:Vt,methods:{createMaterial(){const e=li,t=Ge.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new fe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new _s(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"ToonMaterial"}),ve=o({inject:{material:oe},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:js},wrapS:{type:Number,default:_e},wrapT:{type:Number,default:_e},magFilter:{type:Number,default:Es},minFilter:{type:Number,default:we},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new Y().load(this.src,this.onLoaded,this.onProgress,this.onError);return["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof fe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:ve,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:ks}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Rs().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=v("Box",Fe,De),Qt=v("Circle",He,We),er=v("Cone",Ke,Ve),tr=v("Cylinder",Ze,Ye),rr=v("Dodecahedron",Qe,et),sr=v("Icosahedron",rt,st),ir=v("Lathe",nt,at),nr=v("Octahedron",ht,dt),ar=v("Plane",ut,ct),or=v("Polyhedron",ft,pt),hr=v("Ring",gt,vt),dr=v("Sphere",St,Pt),lr=v("Tetrahedron",wt,Ct);const ui={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var ur=o({extends:H,props:ui,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new Os;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new $s(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),cr=v("Torus",Lt,Nt),mr=v("TorusKnot",_t,jt),fr=o({extends:H,props:ye,created(){this.createGeometry(),this.addGeometryWatchers(ye)},methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}},__hmrId:"Tube"}),pr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Me(1,1,this.widthSegments,this.heightSegments),this.material=new Ne({side:Is,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new Y().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),yr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ue(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),gr=o({extends:B,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new Y().load(this.src,this.onLoaded),this.material=new zs({map:this.texture}),this.sprite=new Ts(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),vr=o({extends:B,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),br=o({extends:vr,created(){new Ds().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),Sr=o({extends:vr,created(){new Us().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const he=Symbol("Composer");var Pr=o({setup(){return{renderer:X(N)}},provide(){return{[he]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new Hs(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),k=o({inject:{renderer:N,composer:he},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),xr=o({extends:k,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ws(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const wr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Cr=o({extends:k,props:wr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new Xs(this.renderer.scene,this.renderer.camera,e);Object.keys(wr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Mr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Lr=o({extends:k,props:Mr,created(){const e=new Ks(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Mr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),Nr=o({extends:k,created(){var e;const t=new ie(Vs);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const Gr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var _r=o({extends:k,props:Gr,created(){if(!this.renderer)return;const e=new qs(this.renderer.size.width,this.renderer.size.height,{});Object.keys(Gr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),jr=o({extends:k,created(){if(!this.renderer)return;const e=new Zs(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Er=o({extends:k,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ys(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),kr={uniforms:{},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); + } + `,fragmentShader:` + varying vec2 vUv; + void main() { + gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); + } + `},Rr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new I},end:{value:new I},delta:{value:new I},texSize:{value:new I}},vertexShader:kr.vertexShader,fragmentShader:` + uniform sampler2D tDiffuse; + uniform float blurRadius; + uniform float gradientRadius; + uniform vec2 start; + uniform vec2 end; + uniform vec2 delta; + uniform vec2 texSize; + varying vec2 vUv; + + float random(vec3 scale, float seed) { + /* use the fragment position for a different seed per-pixel */ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); + } + + void main() { + vec4 color = vec4(0.0); + float total = 0.0; + + /* randomize the lookup values to hide the fixed number of samples */ + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + + vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); + float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius; + for (float t = -30.0; t <= 30.0; t++) { + float percent = (t + offset - 0.5) / 30.0; + float weight = 1.0 - abs(percent); + vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius); + // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius); + + /* switch to pre-multiplied alpha to correctly blur transparent images */ + texel.rgb *= texel.a; + // texel2.rgb *= texel2.a; + + color += texel * weight; + total += 2.0 * weight; + } + + gl_FragColor = color / total; + + /* switch back from pre-multiplied alpha */ + gl_FragColor.rgb /= gl_FragColor.a + 0.00001; + } + `};const ci={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var Or=o({extends:k,props:ci,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie(Rr),this.pass2=new ie(Rr);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new I().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const $r={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:k,props:$r,created(){if(!this.renderer)return;const e=new I(this.renderer.size.width,this.renderer.size.height),t=new Js(e,this.strength,this.radius,this.threshold);Object.keys($r).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),mi={uniforms:{tDiffuse:{value:null},center:{value:new I(.5,.5)},strength:{value:0}},vertexShader:kr.vertexShader,fragmentShader:` + uniform sampler2D tDiffuse; + uniform vec2 center; + uniform float strength; + varying vec2 vUv; + + float random(vec3 scale, float seed) { + /* use the fragment position for a different seed per-pixel */ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); + } + + void main() { + vec4 color = vec4(0.0); + float total = 0.0; + vec2 toCenter = center - vUv; + + /* randomize the lookup values to hide the fixed number of samples */ + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + + for (float t = 0.0; t <= 40.0; t++) { + float percent = (t + offset) / 40.0; + float weight = 4.0 * (percent - percent * percent); + vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength); + + /* switch to pre-multiplied alpha to correctly blur transparent images */ + texel.rgb *= texel.a; + + color += texel * weight; + total += weight; + } + + gl_FragColor = color / total; + + /* switch back from pre-multiplied alpha */ + gl_FragColor.rgb /= gl_FragColor.a + 0.00001; + } + `},zr=o({extends:k,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(mi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),fi=Object.freeze({__proto__:null,Renderer:Ee,RendererInjectionKey:N,OrthographicCamera:$e,PerspectiveCamera:ne,Camera:ne,Group:ze,Scene:Ie,SceneInjectionKey:ae,Object3D:B,Raycaster:Te,CubeCamera:Ae,BoxGeometry:Ue,CircleGeometry:Xe,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:xt,TetrahedronGeometry:Mt,TorusGeometry:Gt,TorusKnotGeometry:Et,TubeGeometry:Rt,AmbientLight:$t,DirectionalLight:It,HemisphereLight:zt,PointLight:Tt,RectAreaLight:At,SpotLight:Bt,Material:j,MaterialInjectionKey:oe,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Xt,ShaderMaterial:Kt,StandardMaterial:ge,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:ve,CubeTexture:Yt,Mesh:H,MeshInjectionKey:Q,Box:Jt,Circle:Qt,Cone:er,Cylinder:tr,Dodecahedron:rr,Icosahedron:sr,Lathe:ir,Octahedron:nr,Plane:ar,Polyhedron:or,Ring:hr,Sphere:dr,Tetrahedron:lr,Text:ur,Torus:cr,TorusKnot:mr,Tube:fr,Image:pr,InstancedMesh:yr,Sprite:gr,GLTFModel:br,FBXModel:Sr,EffectComposer:Pr,ComposerInjectionKey:he,RenderPass:xr,BokehPass:Cr,FilmPass:Lr,FXAAPass:Nr,HalftonePass:_r,SMAAPass:jr,SSAOPass:Er,TiltShiftPass:Or,UnrealBloomPass:Ir,ZoomBlurPass:zr,setFromProp:V,bindProps:U,bindProp:u,propsValues:z,lerp:ke,limit:Re,getMatcapUrl:pe});const Tr={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,fi[r])})}};function pi(e){return Hr(e).use(Tr)}function yi(){const e={loader:new Y,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Cr as BokehPass,Jt as Box,Ue as BoxGeometry,ne as Camera,Qt as Circle,Xe as CircleGeometry,he as ComposerInjectionKey,er as Cone,qe as ConeGeometry,Ae as CubeCamera,Yt as CubeTexture,tr as Cylinder,Je as CylinderGeometry,It as DirectionalLight,rr as Dodecahedron,tt as DodecahedronGeometry,Pr as EffectComposer,Sr as FBXModel,Nr as FXAAPass,Lr as FilmPass,br as GLTFModel,ze as Group,_r as HalftonePass,zt as HemisphereLight,sr as Icosahedron,it as IcosahedronGeometry,pr as Image,yr as InstancedMesh,Dt as LambertMaterial,ir as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,j as Material,oe as MaterialInjectionKey,H as Mesh,Q as MeshInjectionKey,B as Object3D,nr as Octahedron,lt as OctahedronGeometry,$e as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Xt as PhysicalMaterial,ar as Plane,mt as PlaneGeometry,Tt as PointLight,or as Polyhedron,yt as PolyhedronGeometry,Te as Raycaster,At as RectAreaLight,xr as RenderPass,Ee as Renderer,N as RendererInjectionKey,hr as Ring,bt as RingGeometry,jr as SMAAPass,Er as SSAOPass,Ie as Scene,ae as SceneInjectionKey,Kt as ShaderMaterial,dr as Sphere,xt as SphereGeometry,Bt as SpotLight,gr as Sprite,ge as StandardMaterial,qt as SubSurfaceMaterial,lr as Tetrahedron,Mt as TetrahedronGeometry,ur as Text,ve as Texture,Or as TiltShiftPass,Zt as ToonMaterial,cr as Torus,Gt as TorusGeometry,mr as TorusKnot,Et as TorusKnotGeometry,Tr as TroisJSVuePlugin,fr as Tube,Rt as TubeGeometry,Ir as UnrealBloomPass,zr as ZoomBlurPass,u as bindProp,U as bindProps,pi as createApp,pe as getMatcapUrl,ke as lerp,Re as limit,z as propsValues,V as setFromProp,yi as useTextures}; //# sourceMappingURL=trois.module.cdn.min.js.map diff --git a/build/trois.module.cdn.min.js.map b/build/trois.module.cdn.min.js.map index 1979ec4..1cfa166 100644 --- a/build/trois.module.cdn.min.js.map +++ b/build/trois.module.cdn.min.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.cdn.min.js","sources":["../src/core/usePointer.js","../src/core/useRaycaster.js","../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/Camera.js","../src/core/OrthographicCamera.js","../src/core/PerspectiveCamera.js","../src/core/Object3D.js","../src/core/Group.js","../src/core/Scene.js","../src/core/Raycaster.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/CircleGeometry.js","../src/geometries/ConeGeometry.js","../src/geometries/CylinderGeometry.js","../src/geometries/DodecahedronGeometry.js","../src/geometries/IcosahedronGeometry.js","../src/geometries/LatheGeometry.js","../src/geometries/OctahedronGeometry.js","../src/geometries/PlaneGeometry.js","../src/geometries/PolyhedronGeometry.js","../src/geometries/RingGeometry.js","../src/geometries/SphereGeometry.js","../src/geometries/TetrahedronGeometry.js","../src/geometries/TorusGeometry.js","../src/geometries/TorusKnotGeometry.js","../src/geometries/TubeGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/DirectionalLight.js","../src/lights/HemisphereLight.js","../src/lights/PointLight.js","../src/lights/RectAreaLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/MatcapMaterial.js","../src/materials/PhongMaterial.js","../src/materials/StandardMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/ShaderMaterial.js","../src/materials/SubsurfaceScatteringShader.js","../src/materials/SubSurfaceMaterial.js","../src/materials/ToonMaterial.js","../src/materials/Texture.js","../src/materials/CubeTexture.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Circle.js","../src/meshes/Cone.js","../src/meshes/Cylinder.js","../src/meshes/Dodecahedron.js","../src/meshes/Icosahedron.js","../src/meshes/Lathe.js","../src/meshes/Octahedron.js","../src/meshes/Plane.js","../src/meshes/Polyhedron.js","../src/meshes/Ring.js","../src/meshes/Sphere.js","../src/meshes/Tetrahedron.js","../src/meshes/Text.js","../src/meshes/Torus.js","../src/meshes/TorusKnot.js","../src/meshes/Tube.js","../src/meshes/Image.js","../src/meshes/InstancedMesh.js","../src/meshes/Sprite.js","../src/models/Model.js","../src/models/GLTF.js","../src/models/FBX.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/FilmPass.js","../src/effects/FXAAPass.js","../src/effects/HalftonePass.js","../src/effects/SMAAPass.js","../src/effects/SSAOPass.js","../src/shaders/default.js","../src/shaders/TiltShift.js","../src/effects/TiltShiftPass.js","../src/effects/UnrealBloomPass.js","../src/shaders/ZoomBlur.js","../src/effects/ZoomBlurPass.js","../src/plugin.js"],"sourcesContent":["import { InstancedMesh, Vector2, Vector3 } from 'three';\r\nimport useRaycaster from './useRaycaster';\r\n\r\nexport default function usePointer(options) {\r\n const {\r\n camera,\r\n domElement,\r\n intersectObjects,\r\n touch = true,\r\n resetOnEnd = false,\r\n resetPosition = new Vector2(0, 0),\r\n resetPositionV3 = new Vector3(0, 0, 0),\r\n onEnter = () => {},\r\n onMove = () => {},\r\n onLeave = () => {},\r\n onIntersectEnter = () => {},\r\n onIntersectOver = () => {},\r\n onIntersectMove = () => {},\r\n onIntersectLeave = () => {},\r\n onIntersectClick = () => {},\r\n } = options;\r\n\r\n const position = resetPosition.clone();\r\n const positionN = new Vector2(0, 0);\r\n\r\n const raycaster = useRaycaster({ camera });\r\n const positionV3 = raycaster.position;\r\n\r\n const obj = {\r\n position,\r\n positionN,\r\n positionV3,\r\n intersectObjects,\r\n listeners: false,\r\n addListeners,\r\n removeListeners,\r\n intersect,\r\n };\r\n\r\n return obj;\r\n\r\n function reset() {\r\n position.copy(resetPosition);\r\n positionV3.copy(resetPositionV3);\r\n };\r\n\r\n function updatePosition(event) {\r\n let x, y;\r\n if (event.touches && event.touches.length > 0) {\r\n x = event.touches[0].clientX;\r\n y = event.touches[0].clientY;\r\n } else {\r\n x = event.clientX;\r\n y = event.clientY;\r\n }\r\n\r\n const rect = domElement.getBoundingClientRect();\r\n position.x = x - rect.left;\r\n position.y = y - rect.top;\r\n positionN.x = (position.x / rect.width) * 2 - 1;\r\n positionN.y = -(position.y / rect.height) * 2 + 1;\r\n raycaster.updatePosition(positionN);\r\n };\r\n\r\n function intersect() {\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const offObjects = [...intersectObjects];\r\n const iMeshes = [];\r\n\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n if (!object.over) {\r\n object.over = true;\r\n const overEvent = { type: 'pointerover', over: true, component, intersect };\r\n const enterEvent = { ...overEvent, type: 'pointerenter' };\r\n onIntersectOver(overEvent);\r\n onIntersectEnter(enterEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerEnter?.(enterEvent);\r\n }\r\n\r\n const moveEvent = { type: 'pointermove', component, intersect };\r\n onIntersectMove(moveEvent);\r\n component.onPointerMove?.(moveEvent);\r\n\r\n offObjects.splice(offObjects.indexOf(object), 1);\r\n });\r\n\r\n offObjects.forEach(object => {\r\n const { component } = object;\r\n if (object.over) {\r\n object.over = false;\r\n const overEvent = { type: 'pointerover', over: false, component };\r\n const leaveEvent = { ...overEvent, type: 'pointerleave' };\r\n onIntersectOver(overEvent);\r\n onIntersectLeave(leaveEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerLeave?.(leaveEvent);\r\n }\r\n });\r\n }\r\n };\r\n\r\n function pointerEnter(event) {\r\n updatePosition(event);\r\n onEnter({ type: 'pointerenter', position, positionN, positionV3 });\r\n };\r\n\r\n function pointerMove(event) {\r\n updatePosition(event);\r\n onMove({ type: 'pointermove', position, positionN, positionV3 });\r\n intersect();\r\n };\r\n\r\n function pointerClick(event) {\r\n updatePosition(event);\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const iMeshes = [];\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n const event = { type: 'click', component, intersect };\r\n onIntersectClick(event);\r\n component.onClick?.(event);\r\n });\r\n }\r\n };\r\n\r\n function pointerLeave() {\r\n if (resetOnEnd) reset();\r\n onLeave({ type: 'pointerleave' });\r\n };\r\n\r\n function addListeners() {\r\n domElement.addEventListener('mouseenter', pointerEnter);\r\n domElement.addEventListener('mousemove', pointerMove);\r\n domElement.addEventListener('mouseleave', pointerLeave);\r\n domElement.addEventListener('click', pointerClick);\r\n if (touch) {\r\n domElement.addEventListener('touchstart', pointerEnter);\r\n domElement.addEventListener('touchmove', pointerMove);\r\n domElement.addEventListener('touchend', pointerLeave);\r\n }\r\n obj.listeners = true;\r\n };\r\n\r\n function removeListeners() {\r\n domElement.removeEventListener('mouseenter', pointerEnter);\r\n domElement.removeEventListener('mousemove', pointerMove);\r\n domElement.removeEventListener('mouseleave', pointerLeave);\r\n domElement.removeEventListener('click', pointerClick);\r\n\r\n domElement.removeEventListener('touchstart', pointerEnter);\r\n domElement.removeEventListener('touchmove', pointerMove);\r\n domElement.removeEventListener('touchend', pointerLeave);\r\n obj.listeners = false;\r\n };\r\n};\r\n","import { Plane, Raycaster, Vector3 } from 'three';\r\n\r\nexport default function useRaycaster(options) {\r\n const {\r\n camera,\r\n resetPosition = new Vector3(0, 0, 0),\r\n } = options;\r\n\r\n const raycaster = new Raycaster();\r\n const position = resetPosition.clone();\r\n const plane = new Plane(new Vector3(0, 0, 1), 0);\r\n\r\n const updatePosition = (coords) => {\r\n raycaster.setFromCamera(coords, camera);\r\n camera.getWorldDirection(plane.normal);\r\n raycaster.ray.intersectPlane(plane, position);\r\n };\r\n\r\n const intersect = (coords, objects) => {\r\n raycaster.setFromCamera(coords, camera);\r\n return raycaster.intersectObjects(objects);\r\n };\r\n\r\n return {\r\n position,\r\n updatePosition,\r\n intersect,\r\n };\r\n};\r\n","import { WebGLRenderer } from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport usePointer from './usePointer';\n\n/**\n * Three.js helper\n */\nexport default function useThree() {\n // default conf\n const conf = {\n canvas: null,\n antialias: true,\n alpha: false,\n autoClear: true,\n orbit_ctrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n };\n\n // size\n const size = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n };\n\n // handlers\n const afterInitCallbacks = [];\n let afterResizeCallbacks = [];\n let beforeRenderCallbacks = [];\n\n const intersectObjects = [];\n\n // returned object\n const obj = {\n conf,\n renderer: null,\n camera: null,\n cameraCtrl: null,\n scene: null,\n pointer: null,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n onAfterInit,\n onAfterResize, offAfterResize,\n // onBeforeRender, offBeforeRender,\n addIntersectObject, removeIntersectObject,\n };\n\n /**\n * init three\n */\n function init(params) {\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n conf[key] = value;\n });\n }\n\n if (!obj.scene) {\n console.error('Missing Scene');\n return;\n }\n\n if (!obj.camera) {\n console.error('Missing Camera');\n return;\n }\n\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\n obj.renderer.autoClear = conf.autoClear;\n\n if (conf.resize) {\n onResize();\n window.addEventListener('resize', onResize);\n } else {\n setSize(conf.width, conf.height);\n }\n\n initPointer();\n\n if (conf.orbit_ctrl) {\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\n if (conf.orbit_ctrl instanceof Object) {\n Object.entries(conf.orbit_ctrl).forEach(([key, value]) => {\n obj.orbitCtrl[key] = value;\n });\n }\n }\n\n afterInitCallbacks.forEach(c => c());\n\n return true;\n };\n\n function initPointer() {\n let pointerConf = {\n camera: obj.camera,\n domElement: obj.renderer.domElement,\n intersectObjects,\n };\n\n if (conf.pointer && conf.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...conf.pointer };\n }\n\n obj.pointer = usePointer(pointerConf);\n if (conf.pointer || intersectObjects.length) {\n obj.pointer.addListeners();\n if (conf.pointer.intersectMode === 'frame') {\n onBeforeRender(() => {\n obj.pointer.intersect();\n });\n }\n }\n }\n\n /**\n * add after init callback\n */\n function onAfterInit(callback) {\n afterInitCallbacks.push(callback);\n }\n\n /**\n * add after resize callback\n */\n function onAfterResize(callback) {\n afterResizeCallbacks.push(callback);\n }\n\n /**\n * remove after resize callback\n */\n function offAfterResize(callback) {\n afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback);\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(callback) {\n beforeRenderCallbacks.push(callback);\n }\n\n /**\n * remove before render callback\n */\n function offBeforeRender(callback) {\n beforeRenderCallbacks = beforeRenderCallbacks.filter(c => c !== callback);\n }\n\n /**\n * default render\n */\n function render() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.renderer.render(obj.scene, obj.camera);\n }\n\n /**\n * composer render\n */\n function renderC() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.composer.render();\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o);\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners();\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o) {\n const i = intersectObjects.indexOf(o);\n if (i !== -1) {\n intersectObjects.splice(i, 1);\n }\n // remove listeners if needed\n if (obj.pointer && !conf.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners();\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n beforeRenderCallbacks = [];\n window.removeEventListener('resize', onResize);\n if (obj.pointer) obj.pointer.removeListeners();\n if (obj.orbitCtrl) obj.orbitCtrl.dispose();\n if (obj.renderer) obj.renderer.dispose();\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (conf.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight);\n } else {\n const elt = obj.renderer.domElement.parentNode;\n setSize(elt.clientWidth, elt.clientHeight);\n }\n afterResizeCallbacks.forEach(c => c());\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width, height) {\n size.width = width;\n size.height = height;\n size.ratio = width / height;\n\n obj.renderer.setSize(width, height, false);\n obj.camera.aspect = size.ratio;\n obj.camera.updateProjectionMatrix();\n\n if (obj.composer) {\n obj.composer.setSize(width, height);\n }\n\n if (obj.camera.type === 'OrthographicCamera') {\n size.wWidth = obj.camera.right - obj.camera.left;\n size.wHeight = obj.camera.top - obj.camera.bottom;\n } else {\n const wsize = getCameraSize();\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }\n\n return obj;\n}\n","import { defineComponent, h } from 'vue';\nimport useThree from './useThree';\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object], default: false },\n pointer: { type: [Boolean, Object], default: false },\n resize: { type: [Boolean, String], default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n },\n setup() {\n return {\n three: useThree(),\n raf: true,\n onMountedCallbacks: [],\n beforeRenderCallbacks: [],\n afterRenderCallbacks: [],\n };\n },\n provide() {\n return {\n three: this.three,\n // renderer: this.three.renderer,\n rendererComponent: this,\n };\n },\n mounted() {\n const params = {\n canvas: this.$el,\n antialias: this.antialias,\n alpha: this.alpha,\n autoClear: this.autoClear,\n orbit_ctrl: this.orbitCtrl,\n pointer: this.pointer,\n resize: this.resize,\n width: this.width,\n height: this.height,\n };\n\n if (this.three.init(params)) {\n this.renderer = this.three.renderer;\n this.renderer.shadowMap.enabled = this.shadow;\n\n this._render = this.three.composer ? this.three.renderC : this.three.render;\n\n if (this.xr) {\n this.renderer.xr.enabled = true;\n this.renderer.setAnimationLoop(this.render);\n } else {\n requestAnimationFrame(this.renderLoop);\n }\n };\n\n this.onMountedCallbacks.forEach(c => c());\n },\n beforeUnmount() {\n this.beforeRenderCallbacks = [];\n this.afterRenderCallbacks = [];\n this.raf = false;\n this.three.dispose();\n },\n methods: {\n onMounted(cb) {\n this.onMountedCallbacks.push(cb);\n },\n onBeforeRender(cb) {\n this.beforeRenderCallbacks.push(cb);\n },\n offBeforeRender(cb) {\n this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb);\n },\n onAfterRender(cb) {\n this.afterRenderCallbacks.push(cb);\n },\n offAfterRender(cb) {\n this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb);\n },\n onAfterResize(cb) {\n this.three.onAfterResize(cb);\n },\n offAfterResize(cb) {\n this.three.offAfterResize(cb);\n },\n render(time) {\n this.beforeRenderCallbacks.forEach(c => c({ time }));\n this._render();\n this.afterRenderCallbacks.forEach(c => c({ time }));\n },\n renderLoop(time) {\n if (this.raf) requestAnimationFrame(this.renderLoop);\n this.render(time);\n },\n },\n render() {\n return h('canvas', {}, this.$slots.default());\n },\n __hmrId: 'Renderer',\n});\n","import { toRef, watch } from 'vue';\n\nexport function setFromProp(o, prop) {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value;\n });\n }\n};\n\nexport function bindProps(src, props, dst) {\n props.forEach(prop => {\n bindProp(src, prop, dst);\n });\n};\n\nexport function bindProp(src, srcProp, dst, dstProp) {\n if (!dstProp) dstProp = srcProp;\n const ref = toRef(src, srcProp);\n if (ref.value instanceof Object) {\n setFromProp(dst[dstProp], ref.value);\n watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true });\n } else {\n if (ref.value) dst[dstProp] = src[srcProp];\n watch(ref, (value) => { dst[dstProp] = value; });\n }\n};\n\nexport function propsValues(props, exclude) {\n const values = {};\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value;\n }\n });\n return values;\n};\n\nexport function lerp(value1, value2, amount) {\n amount = amount < 0 ? 0 : amount;\n amount = amount > 1 ? 1 : amount;\n return value1 + (value2 - value1) * amount;\n};\n\nexport function lerpv2(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n};\n\nexport function lerpv3(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n v1.z = lerp(v1.z, v2.z, amount);\n};\n\nexport function limit(val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\nexport function getMatcapUrl(hash, format = 1024) {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`;\n return `${MATCAP_ROOT}/${format}/${fileName}`;\n};\n\nfunction getMatcapFormatString(format) {\n switch (format) {\n case 64:\n return '-64px';\n case 128:\n return '-128px';\n case 256:\n return '-256px';\n case 512:\n return '-512px';\n default:\n return '';\n }\n}\n","import { defineComponent } from 'vue';\n// import Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n // TODO: eventually extend Object3D, for now: error 'injection \"scene\" not found'\n // because camera is a sibling of scene in Trois\n // extends: Object3D,\n inject: ['three'],\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { OrthographicCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n inject: ['three'],\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n },\n created() {\n this.camera = new OrthographicCamera(this.left, this.right, this.top, this.bottom, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'OrthographicCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { PerspectiveCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n inject: ['three'],\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n lookAt: { type: Object, default: null },\n },\n created() {\n this.camera = new PerspectiveCamera(this.fov, this.aspect, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n ['aspect', 'far', 'fov', 'near'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'PerspectiveCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n name: 'Object3D',\n inject: ['three', 'scene', 'rendererComponent'],\n emits: ['created', 'ready'],\n props: {\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n rotation: { type: Object, default: { x: 0, y: 0, z: 0 } },\n scale: { type: Object, default: { x: 1, y: 1, z: 1 } },\n lookAt: { type: Object, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.autoRemove) this.removeFromParent();\n },\n methods: {\n initObject3D(o3d) {\n this.o3d = o3d;\n this.o3d.userData = this.userData;\n this.$emit('created', this.o3d);\n\n bindProp(this, 'position', this.o3d);\n bindProp(this, 'rotation', this.o3d);\n bindProp(this, 'scale', this.o3d);\n\n // TODO : fix lookat.x\n if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n this._parent = this.getParent();\n if (this.addToParent()) this.$emit('ready', this);\n else console.error('Missing parent (Scene, Group...)');\n },\n getParent() {\n let parent = this.$parent;\n while (parent) {\n if (parent.add) return parent;\n parent = parent.$parent;\n }\n return false;\n },\n addToParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.add(o3d);\n return true;\n }\n return false;\n },\n removeFromParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.remove(o3d);\n return true;\n }\n return false;\n },\n add(o) { this.o3d.add(o); },\n remove(o) { this.o3d.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Object3D',\n});\n","import { defineComponent } from 'vue';\nimport { Group } from 'three';\nimport Object3D from './Object3D.js';\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n created() {\n this.group = new Group();\n this.initObject3D(this.group);\n },\n __hmrId: 'Group',\n});\n","import { defineComponent, watch } from 'vue';\nimport { Scene, Color } from 'three';\n\nexport default defineComponent({\n name: 'Scene',\n inject: ['three'],\n props: {\n id: String,\n background: [String, Number],\n },\n setup(props) {\n const scene = new Scene();\n if (props.background) scene.background = new Color(props.background);\n watch(() => props.background, (value) => { scene.background.set(value); });\n return { scene };\n },\n provide() {\n return {\n scene: this.scene,\n };\n },\n mounted() {\n if (!this.three.scene) {\n this.three.scene = this.scene;\n }\n },\n methods: {\n add(o) { this.scene.add(o); },\n remove(o) { this.scene.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Scene',\n});\n","import { defineComponent } from 'vue';\r\nimport usePointer from './usePointer';\r\n\r\nexport default defineComponent({\r\n name: 'Raycaster',\r\n inject: ['three', 'rendererComponent'],\r\n props: {\r\n onPointerEnter: { type: Function, default: () => {} },\r\n onPointerOver: { type: Function, default: () => {} },\r\n onPointerMove: { type: Function, default: () => {} },\r\n onPointerLeave: { type: Function, default: () => {} },\r\n onClick: { type: Function, default: () => {} },\r\n intersectMode: { type: String, default: 'move' },\r\n },\r\n mounted() {\r\n this.rendererComponent.onMounted(() => {\r\n this.pointer = usePointer({\r\n camera: this.three.camera,\r\n domElement: this.three.renderer.domElement,\r\n intersectObjects: this.getIntersectObjects(),\r\n onIntersectEnter: this.onPointerEnter,\r\n onIntersectOver: this.onPointerOver,\r\n onIntersectMove: this.onPointerMove,\r\n onIntersectLeave: this.onPointerLeave,\r\n onIntersectClick: this.onClick,\r\n });\r\n this.pointer.addListeners();\r\n\r\n if (this.intersectMode === 'frame') {\r\n this.rendererComponent.onBeforeRender(this.pointer.intersect);\r\n }\r\n });\r\n },\r\n unmounted() {\r\n if (this.pointer) {\r\n this.pointer.removeListeners();\r\n this.rendererComponent.offBeforeRender(this.pointer.intersect);\r\n }\r\n },\r\n methods: {\r\n getIntersectObjects() {\r\n return this.three.scene.children.filter(e => e.type === 'Mesh');\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n __hmrId: 'Raycaster',\r\n});\r\n","import { defineComponent, watch } from 'vue';\n\nconst Geometry = defineComponent({\n inject: ['mesh'],\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh');\n }\n\n this.watchProps = [];\n Object.entries(this.$props).forEach(e => this.watchProps.push(e[0]));\n\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n\n this.addWatchers();\n },\n unmounted() {\n this.geometry.dispose();\n },\n methods: {\n addWatchers() {\n this.watchProps.forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n rotateGeometry() {\n if (this.rotateX) this.geometry.rotateX(this.rotateX);\n if (this.rotateY) this.geometry.rotateY(this.rotateY);\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ);\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n oldGeo.dispose();\n },\n },\n render() { return []; },\n});\n\nexport default Geometry;\n\nexport function geometryComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n });\n};\n","import { geometryComponent } from './Geometry.js';\nimport { BoxGeometry } from 'three';\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n }\n};\n\nexport default geometryComponent('BoxGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CircleGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CircleGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { ConeGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('ConeGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CylinderGeometry } from 'three';\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { DodecahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new DodecahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { IcosahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new IcosahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { LatheGeometry } from 'three';\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength);\n};\n\nexport default geometryComponent('LatheGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { OctahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new OctahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PlaneGeometry } from 'three';\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PolyhedronGeometry } from 'three';\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail);\n};\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { RingGeometry } from 'three';\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('RingGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { SphereGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n};\n\nexport function createGeometry(comp) {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('SphereGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TetrahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new TetrahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc);\n};\n\nexport default geometryComponent('TorusGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusKnotGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n};\n\nexport function createGeometry(comp) {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q);\n};\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three';\nimport Geometry from './Geometry.js';\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n};\n\nexport function createGeometry(comp) {\n let curve;\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points);\n } else if (comp.path) {\n curve = comp.path;\n } else {\n console.error('Missing path curve or points.');\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed);\n};\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n});\n\nexport function updateTubeGeometryPoints(tube, points) {\n const curve = new CatmullRomCurve3(points);\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters;\n const frames = curve.computeFrenetFrames(tubularSegments, closed);\n tube.tangents = frames.tangents;\n tube.normals = frames.normals;\n tube.binormals = frames.binormals;\n tube.parameters.path = curve;\n\n const pArray = tube.attributes.position.array;\n const nArray = tube.attributes.normal.array;\n const normal = new Vector3();\n let P;\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i);\n }\n updateSegment(tubularSegments);\n\n tube.attributes.position.needsUpdate = true;\n tube.attributes.normal.needsUpdate = true;\n\n function updateSegment(i) {\n P = curve.getPointAt(i / tubularSegments, P);\n const N = frames.normals[i];\n const B = frames.binormals[i];\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n normal.x = (cos * N.x + sin * B.x);\n normal.y = (cos * N.y + sin * B.y);\n normal.z = (cos * N.z + sin * B.z);\n normal.normalize();\n const index = (i * (radialSegments + 1) + j) * 3;\n nArray[index] = normal.x;\n nArray[index + 1] = normal.y;\n nArray[index + 2] = normal.z;\n pArray[index] = P.x + radius * normal.x;\n pArray[index + 1] = P.y + radius * normal.y;\n pArray[index + 2] = P.z + radius * normal.z;\n }\n }\n}\n","import { defineComponent, watch } from 'vue';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp, setFromProp } from '../tools';\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object, default: { x: 512, y: 512 } },\n shadowCamera: { type: Object, default: {} },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.light.target) this.removeFromParent(this.light.target);\n },\n methods: {\n initLight() {\n if (this.light.target) {\n bindProp(this, 'target', this.light.target, 'position');\n }\n\n if (this.light.shadow) {\n this.light.castShadow = this.castShadow;\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\n setFromProp(this.light.shadow.camera, this.shadowCamera);\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.light.color.set(this.color);\n } else {\n this.light[p] = this[p];\n }\n });\n });\n\n this.initObject3D(this.light);\n if (this.light.target) this.addToParent(this.light.target);\n },\n },\n __hmrId: 'Light',\n});\n","import { defineComponent } from 'vue';\nimport { AmbientLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.light = new AmbientLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'AmbientLight',\n});\n","import { defineComponent } from 'vue';\nimport { DirectionalLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: Object,\n },\n created() {\n this.light = new DirectionalLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'DirectionalLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HemisphereLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);\n watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); });\n this.initLight();\n },\n __hmrId: 'HemisphereLight',\n});\n","import { defineComponent } from 'vue';\nimport { PointLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: {\n type: Number,\n default: 0,\n },\n decay: {\n type: Number,\n default: 1,\n },\n },\n created() {\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\n this.initLight();\n },\n __hmrId: 'PointLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { RectAreaLight } from 'three';\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js';\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init();\n this.light = new RectAreaLight(this.color, this.intensity, this.width, this.height);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n\n if (this.helper) {\n this.lightHelper = new RectAreaLightHelper(this.light);\n this.light.add(this.lightHelper);\n }\n\n this.initLight();\n },\n unmounted() {\n if (this.lightHelper) this.removeFromParent(this.lightHelper);\n },\n __hmrId: 'RectAreaLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { SpotLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\n ['angle', 'decay', 'distance', 'penumbra'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n this.initLight();\n },\n __hmrId: 'SpotLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { FrontSide } from 'three';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n\n this._addWatchers();\n if (this.addWatchers) this.addWatchers();\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n setProp(key, value, needsUpdate = false) {\n this.material[key] = value;\n this.material.needsUpdate = needsUpdate;\n },\n setTexture(texture, key = 'map') {\n this.setProp(key, texture, true);\n },\n _addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.material.color.set(this.color);\n } else {\n this.material[p] = this[p];\n }\n });\n });\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Material',\n});\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n};\n","import { defineComponent } from 'vue';\nimport { MeshBasicMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshBasicMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'BasicMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshLambertMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshLambertMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'LambertMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshMatcapMaterial, TextureLoader } from 'three';\nimport { propsValues, getMatcapUrl } from '../tools';\nimport Material from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: String,\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.name ? getMatcapUrl(this.name) : this.src;\n const opts = propsValues(this.$props, ['src', 'name']);\n opts.matcap = new TextureLoader().load(src);\n this.material = new MeshMatcapMaterial(opts);\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'MatcapMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshPhongMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhongMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO : handle flatShading ?\n ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => {\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'PhongMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshStandardMaterial } from 'three';\nimport { bindProp, bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object, default: { x: 1, y: 1 } },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n};\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']));\n },\n addWatchers() {\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return;\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProp(this, 'normalScale', this.material);\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'StandardMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshPhysicalMaterial } from 'three';\nimport { propsValues } from '../tools';\nimport StandardMaterial from './StandardMaterial';\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhysicalMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'PhysicalMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ShaderMaterial } from 'three';\nimport { propsValues } from '../tools';\n\nconst defaultVertexShader = `\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}`;\n\nconst defaultFragmentShader = `\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}`;\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n uniforms: { type: Object, default: () => { return {}; } },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n ['vertexShader', 'fragmentShader'].forEach(p => {\n watch(() => this[p], () => {\n // recreate material if we change either shader\n this.material.dispose();\n this.createMaterial();\n });\n });\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n this.material = new ShaderMaterial(propsValues(this.$props));\n this.mesh.setMaterial(this.material);\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'ShaderMaterial',\n});\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three';\n\nfunction replaceAll(string, find, replace) {\n return string.split(find).join(replace);\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'));\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'));\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n};\n\nexport default SubsurfaceScatteringShader;\n","import { defineComponent } from 'vue';\nimport { Color, ShaderMaterial as TShaderMaterial, UniformsUtils } from 'three';\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader.js';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: String, default: '#ffffff' },\n thicknessColor: { type: String, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n transparent: { type: Boolean, default: false },\n opacity: { type: Number, default: 1 },\n vertexColors: { type: Boolean, default: false },\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader;\n const uniforms = UniformsUtils.clone(params.uniforms);\n\n Object.entries(this.$props).forEach(([key, value]) => {\n let _key = key, _value = value;\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse';\n _value = new Color(value);\n }\n if (!['transparent', 'vertexColors'].includes(key)) {\n uniforms[_key].value = _value;\n }\n });\n\n this.material = new TShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n });\n },\n },\n render() {\n return [];\n },\n __hmrId: 'SubSurfaceMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshToonMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshToonMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'ToonMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, TextureLoader, UVMapping } from 'three';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n name: { type: String, default: 'map' },\n uniform: { type: String, default: null },\n src: String,\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object, default: { x: 1, y: 1 } },\n rotation: { type: Number, default: 0 },\n center: { type: Object, default: { x: 0, y: 0 } },\n },\n created() {\n this.refreshTexture();\n watch(() => this.src, this.refreshTexture);\n },\n unmounted() {\n if (this.material && this.material.setTexture) this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError);\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center'];\n wathProps.forEach(prop => {\n bindProp(this, prop, this.texture);\n });\n },\n refreshTexture() {\n this.createTexture();\n // handle standard material\n if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); }\n // handle shader material\n else if (this.material && this.material.material.type === \"ShaderMaterial\") {\n // require a `uniform` prop so we know what to call the uniform\n if (!this.uniform) {\n console.warn('\"uniform\" prop required to use texture in a shader.')\n return\n }\n this.material.uniforms[this.uniform] = { value: this.texture };\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() { return []; },\n});\n","import { defineComponent, watch } from 'vue';\nimport { CubeTextureLoader, CubeRefractionMapping } from 'three';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n path: String,\n urls: {\n type: Array,\n default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n name: { type: String, default: 'envMap' },\n refraction: Boolean,\n // todo: remove ?\n refractionRatio: { type: Number, default: 0.98 },\n },\n created() {\n this.refreshTexture();\n watch(() => this.path, this.refreshTexture);\n watch(() => this.urls, this.refreshTexture);\n },\n unmounted() {\n this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError);\n },\n refreshTexture() {\n this.createTexture();\n this.material.setTexture(this.texture, this.name);\n if (this.refraction) {\n this.texture.mapping = CubeRefractionMapping;\n this.material.setProp('refractionRatio', this.refractionRatio);\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() {\n return [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { Mesh as TMesh } from 'three';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp } from '../tools';\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n};\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n provide() {\n return {\n mesh: this,\n };\n },\n mounted() {\n if (!this.mesh && !this.loading) this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new TMesh(this.geometry, this.material);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n addGeometryWatchers(props) {\n Object.keys(props).forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n if (this.mesh) this.mesh.material = material;\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.mesh.geometry = this.geometry;\n oldGeo.dispose();\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n // for predefined mesh (geometry is not unmounted)\n if (this.geometry) this.geometry.dispose();\n },\n __hmrId: 'Mesh',\n});\n\nexport default Mesh;\n\nexport function meshComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n __hmrId: name,\n });\n};\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/BoxGeometry.js';\n\nexport default meshComponent('Box', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CircleGeometry.js';\n\nexport default meshComponent('Circle', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/ConeGeometry.js';\n\nexport default meshComponent('Cone', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CylinderGeometry.js';\n\nexport default meshComponent('Cylinder', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry.js';\n\nexport default meshComponent('Dodecahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry.js';\n\nexport default meshComponent('Icosahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/LatheGeometry.js';\n\nexport default meshComponent('Lathe', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/OctahedronGeometry.js';\n\nexport default meshComponent('Octahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PlaneGeometry.js';\n\nexport default meshComponent('Plane', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry.js';\n\nexport default meshComponent('Polyhedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/RingGeometry.js';\n\nexport default meshComponent('Ring', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/SphereGeometry.js';\n\nexport default meshComponent('Sphere', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry.js';\n\nexport default meshComponent('Tetrahedron', props, createGeometry);\n","import { defineComponent, watch } from 'vue';\nimport { FontLoader, TextGeometry } from 'three';\nimport Mesh from './Mesh.js';\n\nconst props = {\n text: String,\n fontSrc: String,\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String], default: false },\n};\n\nexport default defineComponent({\n extends: Mesh,\n props,\n data() {\n return {\n loading: true,\n };\n },\n created() {\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ];\n watchProps.forEach(p => {\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry();\n });\n });\n\n const loader = new FontLoader();\n loader.load(this.fontSrc, (font) => {\n this.loading = false;\n this.font = font;\n this.createGeometry();\n this.initMesh();\n });\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n });\n\n if (this.align === 'center') {\n this.geometry.center();\n }\n },\n },\n});\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusGeometry.js';\n\nexport default meshComponent('Torus', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry.js';\n\nexport default meshComponent('TorusKnot', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport Mesh from './Mesh.js';\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js';\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update curve points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n __hmrId: 'Tube',\n});\n","import { defineComponent, watch } from 'vue';\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, TextureLoader } from 'three';\nimport Mesh from './Mesh.js';\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: String,\n width: Number,\n height: Number,\n keepSize: Boolean,\n },\n created() {\n this.createGeometry();\n this.createMaterial();\n this.initMesh();\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], this.resize);\n });\n\n if (this.keepSize) this.three.onAfterResize(this.resize);\n },\n methods: {\n createGeometry() {\n this.geometry = new PlaneGeometry(1, 1, 1, 1);\n },\n createMaterial() {\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });\n },\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded);\n },\n refreshTexture() {\n if (this.texture) this.texture.dispose();\n this.material.map = this.loadTexture();\n this.material.needsUpdate = true;\n },\n onLoaded(texture) {\n this.texture = texture;\n this.resize();\n this.$emit('loaded');\n },\n resize() {\n if (!this.texture) return;\n const screen = this.three.size;\n const iW = this.texture.image.width;\n const iH = this.texture.image.height;\n const iRatio = iW / iH;\n let w, h;\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width;\n h = this.height * screen.wHeight / screen.height;\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width;\n h = w / iRatio;\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height;\n w = h * iRatio;\n }\n this.mesh.scale.x = w;\n this.mesh.scale.y = h;\n },\n },\n __hmrId: 'Image',\n});\n","import { defineComponent } from 'vue';\nimport { InstancedMesh } from 'three';\nimport Object3D from '../core/Object3D';\nimport { bindProp } from '../tools';\nimport { pointerProps } from './Mesh';\n\nexport default defineComponent({\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n count: Number,\n ...pointerProps,\n },\n provide() {\n return {\n mesh: this,\n };\n },\n beforeMount() {\n if (!this.$slots.default) {\n console.error('Missing Geometry');\n }\n },\n mounted() {\n this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n this.material.instancingColor = true;\n if (this.mesh) this.mesh.material = material;\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n },\n __hmrId: 'InstancedMesh',\n});\n","import { defineComponent } from 'vue';\nimport { Sprite, SpriteMaterial, TextureLoader } from 'three';\nimport Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: String,\n },\n data() {\n return {\n loading: true,\n };\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded);\n this.material = new SpriteMaterial({ map: this.texture });\n this.sprite = new Sprite(this.material);\n this.geometry = this.sprite.geometry;\n this.initObject3D(this.sprite);\n },\n unmounted() {\n this.texture.dispose();\n this.material.dispose();\n },\n methods: {\n onLoaded() {\n this.loading = false;\n this.updateUV();\n this.$emit('loaded');\n },\n updateUV() {\n this.iWidth = this.texture.image.width;\n this.iHeight = this.texture.image.height;\n this.iRatio = this.iWidth / this.iHeight;\n\n let x = 0.5, y = 0.5;\n if (this.iRatio > 1) {\n y = 0.5 / this.iRatio;\n } else {\n x = 0.5 / this.iRatio;\n }\n\n const positions = this.geometry.attributes.position.array;\n positions[0] = -x; positions[1] = -y;\n positions[5] = x; positions[6] = -y;\n positions[10] = x; positions[11] = y;\n positions[15] = -x; positions[16] = y;\n this.geometry.attributes.position.needsUpdate = true;\n },\n },\n __hmrId: 'Sprite',\n});\n","import { defineComponent } from 'vue';\r\nimport Object3D from '../core/Object3D.js';\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n emits: ['load', 'progress', 'error'],\r\n data() {\r\n return {\r\n progress: 0,\r\n };\r\n },\r\n methods: {\r\n onLoad(model) {\r\n this.$emit('load', model);\r\n this.initObject3D(model);\r\n },\r\n onProgress(progress) {\r\n this.progress = progress.loaded / progress.total;\r\n this.$emit('progress', progress);\r\n },\r\n onError(error) {\r\n this.$emit('error', error);\r\n },\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new GLTFLoader();\r\n loader.load(this.src, (gltf) => {\r\n this.onLoad(gltf.scene);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new FBXLoader();\r\n loader.load(this.src, (fbx) => {\r\n this.onLoad(fbx);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\n\nexport default defineComponent({\n setup() {\n return {\n passes: [],\n };\n },\n inject: ['three'],\n provide() {\n return {\n passes: this.passes,\n };\n },\n mounted() {\n this.three.onAfterInit(() => {\n this.composer = new EffectComposer(this.three.renderer);\n this.three.renderer.autoClear = false;\n this.passes.forEach(pass => {\n this.composer.addPass(pass);\n });\n this.three.composer = this.composer;\n\n this.resize();\n this.three.onAfterResize(this.resize);\n });\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n this.composer.setSize(this.three.size.width, this.three.size.height);\n },\n },\n render() {\n return this.$slots.default();\n },\n __hmrId: 'EffectComposer',\n});\n","import { defineComponent } from 'vue';\n\nexport default defineComponent({\n inject: ['three', 'passes'],\n emits: ['ready'],\n beforeMount() {\n if (!this.passes) {\n console.error('Missing parent EffectComposer');\n }\n },\n unmounted() {\n if (this.pass.dispose) this.pass.dispose();\n },\n methods: {\n completePass(pass) {\n this.passes.push(pass);\n this.pass = pass;\n this.$emit('ready', pass);\n },\n },\n render() {\n return [];\n },\n __hmrId: 'EffectPass',\n});\n","import { defineComponent } from 'vue';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const pass = new RenderPass(this.three.scene, this.three.camera);\n this.completePass(pass);\n },\n __hmrId: 'RenderPass',\n});\n","import { defineComponent } from 'vue';\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n focus: {\n type: Number,\n default: 1,\n },\n aperture: {\n type: Number,\n default: 0.025,\n },\n maxblur: {\n type: Number,\n default: 0.01,\n },\n },\n watch: {\n focus() { this.pass.uniforms.focus.value = this.focus; },\n aperture() { this.pass.uniforms.aperture.value = this.aperture; },\n maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; },\n },\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.three.size.width,\n height: this.three.size.height,\n };\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\n this.completePass(pass);\n },\n __hmrId: 'BokehPass',\n});\n","import { defineComponent } from 'vue';\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n },\n watch: {\n noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; },\n scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; },\n scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; },\n grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; },\n },\n mounted() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale);\n this.completePass(pass);\n },\n __hmrId: 'FilmPass',\n});\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n const pass = new ShaderPass(FXAAShader);\n this.completePass(pass);\n\n // resize will be called in three init\n this.three.onAfterResize(this.resize);\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n const { resolution } = this.pass.material.uniforms;\n resolution.value.x = 1 / this.three.size.width;\n resolution.value.y = 1 / this.three.size.height;\n },\n },\n __hmrId: 'FXAAPass',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n },\n mounted() {\n const pass = new HalftonePass(this.three.size.width, this.three.size.height, {});\n\n ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => {\n pass.uniforms[p].value = this[p];\n watch(() => this[p], () => {\n pass.uniforms[p].value = this[p];\n });\n });\n\n this.completePass(pass);\n },\n __hmrId: 'HalftonePass',\n});\n","import { defineComponent } from 'vue';\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n // three size is not set yet, but this pass will be resized by effect composer\n const pass = new SMAAPass(this.three.size.width, this.three.size.height);\n this.completePass(pass);\n },\n __hmrId: 'SMAAPass',\n});\n","import { defineComponent } from 'vue';\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n scene: null,\n camera: null,\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n mounted() {\n const pass = new SSAOPass(\n this.scene || this.three.scene,\n this.camera || this.three.camera,\n this.three.size.width,\n this.three.size.height\n );\n\n for (const key of Object.keys(this.options)) {\n pass[key] = this.options[key];\n }\n\n this.completePass(pass);\n },\n __hmrId: 'SSAOPass',\n});\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n};\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent, watch } from 'vue';\nimport { Vector2 } from 'three';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport TiltShift from '../shaders/TiltShift.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object, default: { x: 0, y: 100 } },\n end: { type: Object, default: { x: 10, y: 100 } },\n },\n mounted() {\n this.pass = new ShaderPass(TiltShift);\n this.passes.push(this.pass);\n\n this.pass1 = new ShaderPass(TiltShift);\n this.passes.push(this.pass1);\n\n const uniforms = this.uniforms = this.pass.uniforms;\n const uniforms1 = this.uniforms1 = this.pass1.uniforms;\n uniforms1.blurRadius = uniforms.blurRadius;\n uniforms1.gradientRadius = uniforms.gradientRadius;\n uniforms1.start = uniforms.start;\n uniforms1.end = uniforms.end;\n uniforms1.texSize = uniforms.texSize;\n\n bindProp(this, 'blurRadius', uniforms.blurRadius, 'value');\n bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value');\n\n this.updateFocusLine();\n ['start', 'end'].forEach(p => {\n watch(() => this[p], this.updateFocusLine, { deep: true });\n });\n\n this.pass.setSize = (width, height) => {\n uniforms.texSize.value.set(width, height);\n };\n\n // emit ready event with two passes - do so manually in this file instead\n // of calling `completePass` like in other effect types\n this.$emit('ready', [this.pass, this.pass1]);\n },\n methods: {\n updateFocusLine() {\n this.uniforms.start.value.copy(this.start);\n this.uniforms.end.value.copy(this.end);\n const dv = new Vector2().copy(this.end).sub(this.start).normalize();\n this.uniforms.delta.value.copy(dv);\n this.uniforms1.delta.value.set(-dv.y, dv.x);\n },\n },\n __hmrId: 'TiltShiftPass',\n});\n","import { defineComponent } from 'vue';\nimport { Vector2 } from 'three';\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n },\n watch: {\n strength() { this.pass.strength = this.strength; },\n radius() { this.pass.radius = this.radius; },\n threshold() { this.pass.threshold = this.threshold; },\n },\n mounted() {\n const size = new Vector2(this.three.size.width, this.three.size.height);\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\n this.completePass(pass);\n },\n __hmrId: 'UnrealBloomPass',\n});\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport ZoomBlur from '../shaders/ZoomBlur.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object, default: { x: 0.5, y: 0.5 } },\n strength: { type: Number, default: 0.5 },\n },\n mounted() {\n const pass = new ShaderPass(ZoomBlur);\n\n const uniforms = this.uniforms = pass.uniforms;\n bindProp(this, 'center', uniforms.center, 'value');\n bindProp(this, 'strength', uniforms.strength, 'value');\n\n this.completePass(pass);\n },\n __hmrId: 'ZoomBlurPass',\n});\n","import { createApp as _createApp } from 'vue';\nimport * as TROIS from './index.js';\n\nexport const TroisJSVuePlugin = {\n install: (app) => {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ];\n\n comps.forEach(comp => {\n app.component(comp, TROIS[comp]);\n });\n },\n};\n\nexport function createApp(params) {\n return _createApp(params).use(TroisJSVuePlugin);\n};\n"],"names":["usePointer","options","camera","domElement","intersectObjects","touch","resetOnEnd","resetPosition","Vector2","resetPositionV3","Vector3","onEnter","onMove","onLeave","onIntersectEnter","onIntersectOver","onIntersectMove","onIntersectLeave","onIntersectClick","position","clone","positionN","raycaster","Raycaster","plane","Plane","updatePosition","coords","setFromCamera","getWorldDirection","normal","ray","intersectPlane","intersect","objects","useRaycaster","positionV3","obj","listeners","addListeners","addEventListener","pointerEnter","pointerMove","pointerLeave","pointerClick","removeListeners","removeEventListener","event","x","y","touches","length","clientX","clientY","rect","getBoundingClientRect","left","top","width","height","intersects","offObjects","iMeshes","forEach","object","component","InstancedMesh","indexOf","push","over","overEvent","type","enterEvent","onPointerOver","onPointerEnter","moveEvent","onPointerMove","splice","leaveEvent","onPointerLeave","onClick","copy","useThree","conf","canvas","antialias","alpha","autoClear","orbit_ctrl","pointer","resize","size","wWidth","wHeight","ratio","afterInitCallbacks","afterResizeCallbacks","beforeRenderCallbacks","renderer","cameraCtrl","scene","init","params","Object","entries","key","value","console","error","WebGLRenderer","onResize","window","setSize","initPointer","orbitCtrl","OrbitControls","c","dispose","render","update","renderC","composer","onAfterInit","callback","onAfterResize","offAfterResize","filter","addIntersectObject","o","removeIntersectObject","i","pointerConf","intersectMode","innerWidth","innerHeight","elt","parentNode","clientWidth","clientHeight","aspect","updateProjectionMatrix","right","bottom","wsize","vFOV","fov","Math","PI","h","tan","abs","z","getCameraSize","defineComponent","name","props","Boolean","default","String","shadow","xr","setup","three","raf","onMountedCallbacks","afterRenderCallbacks","[object Object]","this","rendererComponent","$el","shadowMap","enabled","_render","setAnimationLoop","requestAnimationFrame","renderLoop","methods","cb","time","$slots","__hmrId","setFromProp","prop","bindProps","src","dst","bindProp","srcProp","dstProp","ref","toRef","watch","deep","propsValues","exclude","values","includes","lerp","value1","value2","amount","lerpv2","v1","v2","lerpv3","limit","val","min","max","getMatcapUrl","hash","format","getMatcapFormatString","inject","extends","Camera","Number","near","far","zoom","OrthographicCamera","p","lookAt","PerspectiveCamera","v","emits","rotation","scale","autoRemove","userData","removeFromParent","o3d","$emit","_parent","getParent","addToParent","parent","$parent","add","remove","Object3D","group","Group","initObject3D","id","background","Scene","Color","set","Function","onMounted","getIntersectObjects","onBeforeRender","offBeforeRender","children","e","Geometry","rotateX","rotateY","rotateZ","mesh","watchProps","$props","createGeometry","rotateGeometry","setGeometry","geometry","addWatchers","refreshGeometry","oldGeo","geometryComponent","depth","widthSegments","heightSegments","depthSegments","comp","BoxGeometry","radius","segments","thetaStart","thetaLength","CircleGeometry","radialSegments","openEnded","ConeGeometry","radiusTop","radiusBottom","CylinderGeometry","detail","DodecahedronGeometry","IcosahedronGeometry","points","Array","phiStart","phiLength","LatheGeometry","OctahedronGeometry","PlaneGeometry","vertices","indices","PolyhedronGeometry","innerRadius","outerRadius","thetaSegments","phiSegments","RingGeometry","SphereGeometry","TetrahedronGeometry","tube","tubularSegments","arc","TorusGeometry","q","TorusKnotGeometry","path","Curve","closed","curve","CatmullRomCurve3","TubeGeometry","radiusSegments","updateTubeGeometryPoints","parameters","frames","computeFrenetFrames","tangents","normals","binormals","pArray","attributes","array","nArray","P","updateSegment","getPointAt","N","B","j","sin","cos","normalize","index","needsUpdate","color","intensity","castShadow","shadowMapSize","shadowCamera","light","target","mapSize","Light","AmbientLight","initLight","DirectionalLight","groundColor","HemisphereLight","distance","decay","PointLight","helper","RectAreaLightUniformsLib","RectAreaLight","lightHelper","RectAreaLightHelper","angle","penumbra","SpotLight","depthTest","depthWrite","fog","opacity","side","FrontSide","transparent","vertexColors","material","createMaterial","setMaterial","_addWatchers","texture","setProp","wireframeProps","wireframe","wireframeLinewidth","Material","MeshBasicMaterial","keys","MeshLambertMaterial","flatShading","opts","matcap","TextureLoader","load","MeshMatcapMaterial","emissive","emissiveIntensity","reflectivity","shininess","specular","MeshPhongMaterial","aoMapIntensity","bumpScale","displacementBias","displacementScale","envMapIntensity","lightMapIntensity","metalness","normalScale","roughness","refractionRatio","MeshStandardMaterial","StandardMaterial","MeshPhysicalMaterial","uniforms","vertexShader","fragmentShader","ShaderMaterial","meshphongFragHead","ShaderChunk","meshphong_frag","slice","meshphongFragBody","SubsurfaceScatteringShader","UniformsUtils","merge","ShaderLib","phong","thicknessColor","thicknessDistortion","thicknessAmbient","thicknessAttenuation","thicknessPower","thicknessScale","meshphong_vert","replace","string","lights_fragment_begin","find","split","join","_key","_value","TShaderMaterial","lights","MeshToonMaterial","uniform","onLoad","onProgress","onError","mapping","UVMapping","wrapS","ClampToEdgeWrapping","wrapT","magFilter","LinearFilter","minFilter","LinearMipmapLinearFilter","repeat","center","refreshTexture","setTexture","onLoaded","createTexture","warn","urls","refraction","CubeTextureLoader","setPath","CubeRefractionMapping","pointerProps","onPointerDown","onPointerUp","Mesh","receiveShadow","loading","initMesh","TMesh","meshComponent","addGeometryWatchers","text","fontSrc","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align","data","font","FontLoader","TextGeometry","keepSize","DoubleSide","map","loadTexture","screen","iRatio","image","w","count","instancingColor","SpriteMaterial","sprite","Sprite","updateUV","iWidth","iHeight","positions","progress","model","loaded","total","Model","GLTFLoader","gltf","FBXLoader","fbx","passes","EffectComposer","pass","addPass","EffectPass","RenderPass","completePass","focus","aperture","maxblur","BokehPass","noiseIntensity","scanlinesIntensity","scanlinesCount","grayscale","nIntensity","sIntensity","sCount","FilmPass","ShaderPass","FXAAShader","resolution","shape","rotateR","rotateG","rotateB","scatter","HalftonePass","SMAAPass","SSAOPass","tDiffuse","blurRadius","gradientRadius","start","end","delta","texSize","DefaultShader","TiltShift","pass1","uniforms1","updateFocusLine","dv","sub","strength","threshold","UnrealBloomPass","ZoomBlur","TroisJSVuePlugin","install","app","TROIS","createApp","_createApp","use"],"mappings":"i4FAGe,SAASA,GAAWC,GACjC,MAAMC,OACJA,EAAMC,WACNA,EAAUC,iBACVA,EAAgBC,MAChBA,GAAQ,EAAIC,WACZA,GAAa,EAAKC,cAClBA,EAAgB,IAAIC,EAAQ,EAAG,GAAEC,gBACjCA,EAAkB,IAAIC,EAAQ,EAAG,EAAG,GAAEC,QACtCA,EAAU,SAAQC,OAClBA,EAAS,SAAQC,QACjBA,EAAU,SAAQC,iBAClBA,EAAmB,SAAQC,gBAC3BA,EAAkB,SAAQC,gBAC1BA,EAAkB,SAAQC,iBAC1BA,EAA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,KAAM,SAAUuP,EAAS8C,OAAQ,SAC1ClR,GAASnB,KAAM,WAAYuP,EAASsJ,SAAU,SAE9C7Y,KAAKuW,aAAaJ,IAEpBtV,QAAS,gwCClBC,MAACoY,GAAmB,CAC9BC,QAAUC,IACM,CACZ,SACA,qBACA,oBACA,YACA,WACA,QACA,QAEA,eACA,mBACA,kBACA,aACA,gBACA,YAEA,gBACA,kBACA,iBACA,gBACA,mBACA,iBACA,mBACA,qBACA,eAEA,UACA,cAEA,OAEA,MAAO,cACP,SAAU,iBACV,OAAQ,eACR,WAAY,mBACZ,eAAgB,uBAChB,cAAe,sBACf,QAAS,gBACT,aAAc,qBACd,QAAS,gBACT,aAAc,qBACd,OAAQ,eACR,SAAU,iBACV,cAAe,sBACf,OACA,QAAS,gBACT,YAAa,oBACb,OAAQ,eAER,QACA,gBACA,SAEA,WACA,YAEA,YACA,iBACA,WACA,WACA,eACA,aACA,UACA,WACA,WACA,gBACA,kBACA,eAEA,cAGI3f,SAAQoN,IACZuS,EAAIzf,UAAUkN,EAAMwS,GAAMxS,SAKzB,SAASyS,GAAUtd,GACxB,OAAOud,EAAWvd,GAAQwd,IAAIN"} \ No newline at end of file +{"version":3,"file":"trois.module.cdn.min.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { Camera, Intersection, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.copy(resetPosition)\n positionV3.copy(resetPositionV3)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: IntersectObject): void\n removeIntersectObject(o: IntersectObject): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: IntersectObject[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: IntersectObject) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: IntersectObject) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): void\n raf: boolean\n\n // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener(t: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n const config: ThreeConfigInterface = {\n canvas,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n // if (this.three.pointer) {\n // this.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\n // }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn()\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, PropType, watch } from 'vue'\nimport { bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (this.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: this.getIntersectObjects(),\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n },\r\n setup(props) {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => { cubeCamera.update(renderer, scene) }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera }\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport const MeshInjectionKey: InjectionKey = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {},\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { defineComponent, InjectionKey, watch } from 'vue'\nimport { FrontSide, Material, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material from './Material'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\n },\n __hmrId: 'ShaderMaterial',\n})\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, default: () => ({ x: 0, y: 0 }) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n path: { type: String, required: true },\n urls: {\n type: Array as PropType,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: CubeReflectionMapping },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Font, FontLoader, TextGeometry } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n this.initObject3D(model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Scene","Texture","Group","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","ShaderMaterial","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":"gkFAcqC,EAAuD,MACpF,CACJ,SACA,gBAAgB,GAAI,GAAQ,EAAG,EAAG,IAChC,EAEE,EAAY,GAAIA,IAChB,EAAW,EAAc,QACzB,EAAQ,GAAIC,IAAM,GAAI,GAAQ,EAAG,EAAG,GAAI,SAavC,CACL,WACA,eAbqB,AAAC,GAAoB,GAChC,cAAc,EAAQ,KACzB,kBAAkB,EAAM,UACrB,IAAI,eAAe,EAAO,IAWpC,UARgB,CAAC,EAAiB,OACxB,cAAc,EAAQ,GACzB,EAAU,iBAAiB,iBC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cAEe,EAAkC,EAAiB,GACnE,MAAQ,EAAO,SACf,SAAS,OAAO,KAChB,aAAe,UACX,IAAI,EAAO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file diff --git a/build/trois.module.js b/build/trois.module.js index 6321b37..6eb0b45 100644 --- a/build/trois.module.js +++ b/build/trois.module.js @@ -1,5 +1,5 @@ -import { defineComponent, h, toRef, watch, createApp as createApp$1 } from 'vue'; -import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Group as Group$1, Scene as Scene$1, Color, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, AmbientLight as AmbientLight$1, DirectionalLight as DirectionalLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, SpotLight as SpotLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, CubeTextureLoader, CubeRefractionMapping, Mesh as Mesh$1, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'three'; +import { defineComponent, toRef, watch, inject, provide, onUnmounted, createApp as createApp$1 } from 'vue'; +import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'three'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; import { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'; import { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'; @@ -19,28 +19,24 @@ import { UnrealBloomPass as UnrealBloomPass$1 } from 'three/examples/jsm/postpro function useRaycaster(options) { const { camera, - resetPosition = new Vector3(0, 0, 0), + resetPosition = new Vector3(0, 0, 0) } = options; - const raycaster = new Raycaster$1(); const position = resetPosition.clone(); const plane = new Plane$1(new Vector3(0, 0, 1), 0); - const updatePosition = (coords) => { raycaster.setFromCamera(coords, camera); camera.getWorldDirection(plane.normal); raycaster.ray.intersectPlane(plane, position); }; - const intersect = (coords, objects) => { raycaster.setFromCamera(coords, camera); return raycaster.intersectObjects(objects); }; - return { position, updatePosition, - intersect, + intersect }; } @@ -53,22 +49,29 @@ function usePointer(options) { resetOnEnd = false, resetPosition = new Vector2(0, 0), resetPositionV3 = new Vector3(0, 0, 0), - onEnter = () => {}, - onMove = () => {}, - onLeave = () => {}, - onIntersectEnter = () => {}, - onIntersectOver = () => {}, - onIntersectMove = () => {}, - onIntersectLeave = () => {}, - onIntersectClick = () => {}, + onEnter = () => { + }, + onMove = () => { + }, + onLeave = () => { + }, + onClick = () => { + }, + onIntersectEnter = () => { + }, + onIntersectOver = () => { + }, + onIntersectMove = () => { + }, + onIntersectLeave = () => { + }, + onIntersectClick = () => { + } } = options; - const position = resetPosition.clone(); const positionN = new Vector2(0, 0); - - const raycaster = useRaycaster({ camera }); + const raycaster = useRaycaster({camera}); const positionV3 = raycaster.position; - const obj = { position, positionN, @@ -77,29 +80,26 @@ function usePointer(options) { listeners: false, addListeners, removeListeners, - intersect, + intersect }; - return obj; - function reset() { position.copy(resetPosition); positionV3.copy(resetPositionV3); } function updatePosition(event) { let x, y; - if (event.touches && event.touches.length > 0) { + if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { x = event.clientX; y = event.clientY; } - const rect = domElement.getBoundingClientRect(); position.x = x - rect.left; position.y = y - rect.top; - positionN.x = (position.x / rect.width) * 2 - 1; + positionN.x = position.x / rect.width * 2 - 1; positionN.y = -(position.y / rect.height) * 2 + 1; raycaster.updatePosition(positionN); } @@ -108,55 +108,51 @@ function usePointer(options) { const intersects = raycaster.intersect(positionN, intersectObjects); const offObjects = [...intersectObjects]; const iMeshes = []; - - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a, _b, _c; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof InstancedMesh$1) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - if (!object.over) { - object.over = true; - const overEvent = { type: 'pointerover', over: true, component, intersect }; - const enterEvent = { ...overEvent, type: 'pointerenter' }; + if (!object.userData.over) { + object.userData.over = true; + const overEvent = {type: "pointerover", over: true, component, intersect: intersect2}; + const enterEvent = {...overEvent, type: "pointerenter"}; onIntersectOver(overEvent); onIntersectEnter(enterEvent); - component.onPointerOver?.(overEvent); - component.onPointerEnter?.(enterEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerEnter) == null ? void 0 : _b.call(component, enterEvent); } - - const moveEvent = { type: 'pointermove', component, intersect }; + const moveEvent = {type: "pointermove", component, intersect: intersect2}; onIntersectMove(moveEvent); - component.onPointerMove?.(moveEvent); - + (_c = component.onPointerMove) == null ? void 0 : _c.call(component, moveEvent); offObjects.splice(offObjects.indexOf(object), 1); }); - - offObjects.forEach(object => { - const { component } = object; - if (object.over) { - object.over = false; - const overEvent = { type: 'pointerover', over: false, component }; - const leaveEvent = { ...overEvent, type: 'pointerleave' }; + offObjects.forEach((object) => { + var _a, _b; + const {component} = object.userData; + if (object.userData.over) { + object.userData.over = false; + const overEvent = {type: "pointerover", over: false, component}; + const leaveEvent = {...overEvent, type: "pointerleave"}; onIntersectOver(overEvent); onIntersectLeave(leaveEvent); - component.onPointerOver?.(overEvent); - component.onPointerLeave?.(leaveEvent); + (_a = component.onPointerOver) == null ? void 0 : _a.call(component, overEvent); + (_b = component.onPointerLeave) == null ? void 0 : _b.call(component, leaveEvent); } }); } } function pointerEnter(event) { updatePosition(event); - onEnter({ type: 'pointerenter', position, positionN, positionV3 }); + onEnter({type: "pointerenter", position, positionN, positionV3}); } function pointerMove(event) { updatePosition(event); - onMove({ type: 'pointermove', position, positionN, positionV3 }); + onMove({type: "pointermove", position, positionN, positionV3}); intersect(); } function pointerClick(event) { @@ -164,352 +160,319 @@ function usePointer(options) { if (intersectObjects.length) { const intersects = raycaster.intersect(positionN, intersectObjects); const iMeshes = []; - intersects.forEach(intersect => { - const { object } = intersect; - const { component } = object; - - // only once for InstancedMesh + intersects.forEach((intersect2) => { + var _a; + const {object} = intersect2; + const {component} = object.userData; if (object instanceof InstancedMesh$1) { - if (iMeshes.indexOf(object) !== -1) return; + if (iMeshes.indexOf(object) !== -1) + return; iMeshes.push(object); } - - const event = { type: 'click', component, intersect }; - onIntersectClick(event); - component.onClick?.(event); + const event2 = {type: "click", component, intersect: intersect2}; + onIntersectClick(event2); + (_a = component.onClick) == null ? void 0 : _a.call(component, event2); }); } + onClick({type: "click", position, positionN, positionV3}); } function pointerLeave() { - if (resetOnEnd) reset(); - onLeave({ type: 'pointerleave' }); + if (resetOnEnd) + reset(); + onLeave({type: "pointerleave"}); } function addListeners() { - domElement.addEventListener('mouseenter', pointerEnter); - domElement.addEventListener('mousemove', pointerMove); - domElement.addEventListener('mouseleave', pointerLeave); - domElement.addEventListener('click', pointerClick); + domElement.addEventListener("mouseenter", pointerEnter); + domElement.addEventListener("mousemove", pointerMove); + domElement.addEventListener("mouseleave", pointerLeave); + domElement.addEventListener("click", pointerClick); if (touch) { - domElement.addEventListener('touchstart', pointerEnter); - domElement.addEventListener('touchmove', pointerMove); - domElement.addEventListener('touchend', pointerLeave); + domElement.addEventListener("touchstart", pointerEnter); + domElement.addEventListener("touchmove", pointerMove); + domElement.addEventListener("touchend", pointerLeave); } obj.listeners = true; } function removeListeners() { - domElement.removeEventListener('mouseenter', pointerEnter); - domElement.removeEventListener('mousemove', pointerMove); - domElement.removeEventListener('mouseleave', pointerLeave); - domElement.removeEventListener('click', pointerClick); - - domElement.removeEventListener('touchstart', pointerEnter); - domElement.removeEventListener('touchmove', pointerMove); - domElement.removeEventListener('touchend', pointerLeave); + domElement.removeEventListener("mouseenter", pointerEnter); + domElement.removeEventListener("mousemove", pointerMove); + domElement.removeEventListener("mouseleave", pointerLeave); + domElement.removeEventListener("click", pointerClick); + domElement.removeEventListener("touchstart", pointerEnter); + domElement.removeEventListener("touchmove", pointerMove); + domElement.removeEventListener("touchend", pointerLeave); obj.listeners = false; - }} + } +} -/** - * Three.js helper - */ -function useThree() { - // default conf - const conf = { - canvas: null, +function useThree(params) { + const config = { antialias: true, alpha: false, autoClear: true, - orbit_ctrl: false, + orbitCtrl: false, pointer: false, resize: false, width: 300, - height: 150, + height: 150 }; - - // size + if (params) { + Object.entries(params).forEach(([key, value]) => { + config[key] = value; + }); + } const size = { - width: 1, height: 1, - wWidth: 1, wHeight: 1, - ratio: 1, + width: 1, + height: 1, + wWidth: 1, + wHeight: 1, + ratio: 1 }; - - // handlers - const afterInitCallbacks = []; - let afterResizeCallbacks = []; - let beforeRenderCallbacks = []; - + const beforeRenderCallbacks = []; const intersectObjects = []; - - // returned object + const renderer = createRenderer(); const obj = { - conf, - renderer: null, - camera: null, - cameraCtrl: null, - scene: null, - pointer: null, + config, + renderer, size, init, dispose, render, renderC, setSize, - onAfterInit, - onAfterResize, offAfterResize, - // onBeforeRender, offBeforeRender, - addIntersectObject, removeIntersectObject, + addIntersectObject, + removeIntersectObject }; - - /** - * init three - */ - function init(params) { - if (params) { - Object.entries(params).forEach(([key, value]) => { - conf[key] = value; - }); - } - + return obj; + function createRenderer() { + const renderer2 = new WebGLRenderer({canvas: config.canvas, antialias: config.antialias, alpha: config.alpha}); + renderer2.autoClear = config.autoClear; + return renderer2; + } + function init() { if (!obj.scene) { - console.error('Missing Scene'); - return; + console.error("Missing Scene"); + return false; } - if (!obj.camera) { - console.error('Missing Camera'); - return; + console.error("Missing Camera"); + return false; } - - obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha }); - obj.renderer.autoClear = conf.autoClear; - - if (conf.resize) { + if (config.resize) { onResize(); - window.addEventListener('resize', onResize); - } else { - setSize(conf.width, conf.height); + window.addEventListener("resize", onResize); + } else if (config.width && config.height) { + setSize(config.width, config.height); } - initPointer(); - - if (conf.orbit_ctrl) { - obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); - if (conf.orbit_ctrl instanceof Object) { - Object.entries(conf.orbit_ctrl).forEach(([key, value]) => { - obj.orbitCtrl[key] = value; + if (config.orbitCtrl) { + const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); + if (config.orbitCtrl instanceof Object) { + Object.entries(config.orbitCtrl).forEach(([key, value]) => { + cameraCtrl[key] = value; }); } + onBeforeRender(() => { + cameraCtrl.update(); + }); + obj.cameraCtrl = cameraCtrl; } - - afterInitCallbacks.forEach(c => c()); - return true; } function initPointer() { let pointerConf = { camera: obj.camera, domElement: obj.renderer.domElement, - intersectObjects, + intersectObjects }; - - if (conf.pointer && conf.pointer instanceof Object) { - pointerConf = { ...pointerConf, ...conf.pointer }; + if (config.pointer && config.pointer instanceof Object) { + pointerConf = {...pointerConf, ...config.pointer}; } - - obj.pointer = usePointer(pointerConf); - if (conf.pointer || intersectObjects.length) { - obj.pointer.addListeners(); - if (conf.pointer.intersectMode === 'frame') { - onBeforeRender(() => { - obj.pointer.intersect(); - }); + const pointer = obj.pointer = usePointer(pointerConf); + if (config.pointer || intersectObjects.length) { + pointer.addListeners(); + if (pointerConf.intersectMode === "frame") { + onBeforeRender(pointer.intersect); } } } - - /** - * add after init callback - */ - function onAfterInit(callback) { - afterInitCallbacks.push(callback); + function onBeforeRender(cb) { + beforeRenderCallbacks.push(cb); } - - /** - * add after resize callback - */ - function onAfterResize(callback) { - afterResizeCallbacks.push(callback); - } - - /** - * remove after resize callback - */ - function offAfterResize(callback) { - afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback); - } - - /** - * add before render callback - */ - function onBeforeRender(callback) { - beforeRenderCallbacks.push(callback); - } - - /** - * default render - */ function render() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.renderer.render(obj.scene, obj.camera); } - - /** - * composer render - */ function renderC() { - if (obj.orbitCtrl) obj.orbitCtrl.update(); - beforeRenderCallbacks.forEach(c => c()); + beforeRenderCallbacks.forEach((c) => c()); obj.composer.render(); } - - /** - * add intersect object - */ function addIntersectObject(o) { if (intersectObjects.indexOf(o) === -1) { intersectObjects.push(o); } - // add listeners if needed if (obj.pointer && !obj.pointer.listeners) { obj.pointer.addListeners(); } } - - /** - * remove intersect object - */ function removeIntersectObject(o) { const i = intersectObjects.indexOf(o); if (i !== -1) { intersectObjects.splice(i, 1); } - // remove listeners if needed - if (obj.pointer && !conf.pointer && intersectObjects.length === 0) { + if (obj.pointer && !config.pointer && intersectObjects.length === 0) { obj.pointer.removeListeners(); } } - - /** - * remove listeners and dispose - */ function dispose() { - beforeRenderCallbacks = []; - window.removeEventListener('resize', onResize); - if (obj.pointer) obj.pointer.removeListeners(); - if (obj.orbitCtrl) obj.orbitCtrl.dispose(); - if (obj.renderer) obj.renderer.dispose(); + window.removeEventListener("resize", onResize); + if (obj.pointer) + obj.pointer.removeListeners(); + if (obj.cameraCtrl) + obj.cameraCtrl.dispose(); + if (obj.renderer) + obj.renderer.dispose(); } - - /** - * resize listener - */ function onResize() { - if (conf.resize === 'window') { + var _a; + if (config.resize === "window") { setSize(window.innerWidth, window.innerHeight); } else { const elt = obj.renderer.domElement.parentNode; - setSize(elt.clientWidth, elt.clientHeight); + if (elt) + setSize(elt.clientWidth, elt.clientHeight); } - afterResizeCallbacks.forEach(c => c()); + (_a = config.onResize) == null ? void 0 : _a.call(config, size); } - - /** - * update renderer size and camera - */ function setSize(width, height) { size.width = width; size.height = height; size.ratio = width / height; - obj.renderer.setSize(width, height, false); - obj.camera.aspect = size.ratio; - obj.camera.updateProjectionMatrix(); - - if (obj.composer) { - obj.composer.setSize(width, height); + const camera = obj.camera; + if (camera.type === "PerspectiveCamera") { + const pCamera = camera; + pCamera.aspect = size.ratio; + pCamera.updateProjectionMatrix(); } - - if (obj.camera.type === 'OrthographicCamera') { - size.wWidth = obj.camera.right - obj.camera.left; - size.wHeight = obj.camera.top - obj.camera.bottom; + if (camera.type === "OrthographicCamera") { + const oCamera = camera; + size.wWidth = oCamera.right - oCamera.left; + size.wHeight = oCamera.top - oCamera.bottom; } else { const wsize = getCameraSize(); - size.wWidth = wsize[0]; size.wHeight = wsize[1]; + size.wWidth = wsize[0]; + size.wHeight = wsize[1]; } } - - /** - * calculate camera visible area size - */ function getCameraSize() { - const vFOV = (obj.camera.fov * Math.PI) / 180; - const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z); - const w = h * obj.camera.aspect; + const camera = obj.camera; + const vFOV = camera.fov * Math.PI / 180; + const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z); + const w = h * camera.aspect; return [w, h]; } - - return obj; } +const RendererInjectionKey = Symbol("Renderer"); var Renderer = defineComponent({ - name: 'Renderer', + name: "Renderer", props: { antialias: Boolean, alpha: Boolean, - autoClear: { type: Boolean, default: true }, - orbitCtrl: { type: [Boolean, Object], default: false }, - pointer: { type: [Boolean, Object], default: false }, - resize: { type: [Boolean, String], default: false }, + autoClear: {type: Boolean, default: true}, + orbitCtrl: {type: [Boolean, Object], default: false}, + pointer: {type: [Boolean, Object], default: false}, + resize: {type: [Boolean, String], default: false}, shadow: Boolean, width: String, height: String, xr: Boolean, + onReady: Function, + onClick: Function }, - setup() { - return { - three: useThree(), - raf: true, - onMountedCallbacks: [], - beforeRenderCallbacks: [], - afterRenderCallbacks: [], + setup(props) { + const initCallbacks = []; + const mountedCallbacks = []; + const beforeRenderCallbacks = []; + const afterRenderCallbacks = []; + const resizeCallbacks = []; + const canvas = document.createElement("canvas"); + const config = { + canvas, + antialias: props.antialias, + alpha: props.alpha, + autoClear: props.autoClear, + orbitCtrl: props.orbitCtrl, + pointer: props.pointer, + resize: props.resize }; + if (props.width) + config.width = parseInt(props.width); + if (props.height) + config.height = parseInt(props.height); + const three = useThree(config); + const renderFn = () => { + }; + if (props.onClick) { + canvas.addEventListener("click", props.onClick); + } + return { + canvas, + three, + renderer: three.renderer, + size: three.size, + renderFn, + raf: true, + initCallbacks, + mountedCallbacks, + beforeRenderCallbacks, + afterRenderCallbacks, + resizeCallbacks + }; + }, + computed: { + camera: { + get: function() { + return this.three.camera; + }, + set: function(camera) { + this.three.camera = camera; + } + }, + scene: { + get: function() { + return this.three.scene; + }, + set: function(scene) { + this.three.scene = scene; + } + }, + composer: { + get: function() { + return this.three.composer; + }, + set: function(composer) { + this.three.composer = composer; + } + } }, provide() { return { - three: this.three, - // renderer: this.three.renderer, - rendererComponent: this, + [RendererInjectionKey]: this }; }, mounted() { - const params = { - canvas: this.$el, - antialias: this.antialias, - alpha: this.alpha, - autoClear: this.autoClear, - orbit_ctrl: this.orbitCtrl, - pointer: this.pointer, - resize: this.resize, - width: this.width, - height: this.height, - }; - - if (this.three.init(params)) { - this.renderer = this.three.renderer; + var _a; + this.$el.parentNode.insertBefore(this.canvas, this.$el); + if (this.three.init()) { + this.three.config.onResize = (size) => { + this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); + }; this.renderer.shadowMap.enabled = this.shadow; - - this._render = this.three.composer ? this.three.renderC : this.three.render; - + this.renderFn = this.three.composer ? this.three.renderC : this.three.render; + this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); + (_a = this.onReady) == null ? void 0 : _a.call(this, this); if (this.xr) { this.renderer.xr.enabled = true; this.renderer.setAnimationLoop(this.render); @@ -517,50 +480,78 @@ var Renderer = defineComponent({ requestAnimationFrame(this.renderLoop); } } - this.onMountedCallbacks.forEach(c => c()); + this.mountedCallbacks.forEach((e) => e({type: "mounted", renderer: this})); }, beforeUnmount() { + this.canvas.remove(); this.beforeRenderCallbacks = []; this.afterRenderCallbacks = []; this.raf = false; this.three.dispose(); }, methods: { + onInit(cb) { + this.addListener("init", cb); + }, onMounted(cb) { - this.onMountedCallbacks.push(cb); + this.addListener("mounted", cb); }, onBeforeRender(cb) { - this.beforeRenderCallbacks.push(cb); + this.addListener("beforerender", cb); }, offBeforeRender(cb) { - this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb); + this.removeListener("beforerender", cb); }, onAfterRender(cb) { - this.afterRenderCallbacks.push(cb); + this.addListener("afterrender", cb); }, offAfterRender(cb) { - this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb); + this.removeListener("afterrender", cb); }, - onAfterResize(cb) { - this.three.onAfterResize(cb); + onResize(cb) { + this.addListener("resize", cb); }, - offAfterResize(cb) { - this.three.offAfterResize(cb); + offResize(cb) { + this.removeListener("resize", cb); + }, + addListener(type, cb) { + const callbacks = this.getCallbacks(type); + callbacks.push(cb); + }, + removeListener(type, cb) { + const callbacks = this.getCallbacks(type); + const index = callbacks.indexOf(cb); + if (index) + callbacks.splice(index, 1); + }, + getCallbacks(type) { + if (type === "init") { + return this.initCallbacks; + } else if (type === "mounted") { + return this.mountedCallbacks; + } else if (type === "beforerender") { + return this.beforeRenderCallbacks; + } else if (type === "afterrender") { + return this.afterRenderCallbacks; + } else { + return this.resizeCallbacks; + } }, render(time) { - this.beforeRenderCallbacks.forEach(c => c({ time })); - this._render(); - this.afterRenderCallbacks.forEach(c => c({ time })); + this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); + this.renderFn(); + this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { - if (this.raf) requestAnimationFrame(this.renderLoop); + if (this.raf) + requestAnimationFrame(this.renderLoop); this.render(time); - }, + } }, render() { - return h('canvas', {}, this.$slots.default()); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Renderer', + __hmrId: "Renderer" }); function setFromProp(o, prop) { @@ -571,25 +562,30 @@ function setFromProp(o, prop) { } } function bindProps(src, props, dst) { - props.forEach(prop => { - bindProp(src, prop, dst); + props.forEach((prop) => { + bindProp(src, prop, dst, prop); }); } function bindProp(src, srcProp, dst, dstProp) { - if (!dstProp) dstProp = srcProp; + const _dstProp = dstProp || srcProp; const ref = toRef(src, srcProp); if (ref.value instanceof Object) { - setFromProp(dst[dstProp], ref.value); - watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true }); + setFromProp(dst[_dstProp], ref.value); + watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); } else { - if (ref.value) dst[dstProp] = src[srcProp]; - watch(ref, (value) => { dst[dstProp] = value; }); + if (ref.value) + dst[_dstProp] = src[srcProp]; + watch(ref, (value) => { + dst[_dstProp] = value; + }); } } -function propsValues(props, exclude) { +function propsValues(props, exclude = []) { const values = {}; Object.entries(props).forEach(([key, value]) => { - if (!exclude || (exclude && !exclude.includes(key))) { + if (!exclude || exclude && !exclude.includes(key)) { values[key] = value; } }); @@ -600,319 +596,510 @@ function lerp(value1, value2, amount) { amount = amount > 1 ? 1 : amount; return value1 + (value2 - value1) * amount; } -function lerpv2(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); -} -function lerpv3(v1, v2, amount) { - v1.x = lerp(v1.x, v2.x, amount); - v1.y = lerp(v1.y, v2.y, amount); - v1.z = lerp(v1.z, v2.z, amount); -} function limit(val, min, max) { - return val < min ? min : (val > max ? max : val); + return val < min ? min : val > max ? max : val; } -// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx -const MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'; - -function getMatcapUrl(hash, format = 1024) { +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { const fileName = `${hash}${getMatcapFormatString(format)}.png`; return `${MATCAP_ROOT}/${format}/${fileName}`; } function getMatcapFormatString(format) { switch (format) { case 64: - return '-64px'; + return "-64px"; case 128: - return '-128px'; + return "-128px"; case 256: - return '-256px'; + return "-256px"; case 512: - return '-512px'; + return "-512px"; default: - return ''; + return ""; } } -// import Object3D from '../core/Object3D.js'; - var Camera = defineComponent({ - // TODO: eventually extend Object3D, for now: error 'injection "scene" not found' - // because camera is a sibling of scene in Trois - // extends: Object3D, - inject: ['three'], render() { return this.$slots.default ? this.$slots.default() : []; - }, + } }); var OrthographicCamera = defineComponent({ extends: Camera, - name: 'OrthographicCamera', - inject: ['three'], + name: "OrthographicCamera", props: { - left: { type: Number, default: -1 }, - right: { type: Number, default: 1 }, - top: { type: Number, default: 1 }, - bottom: { type: Number, default: -1 }, - near: { type: Number, default: 0.1 }, - far: { type: Number, default: 2000 }, - zoom: { type: Number, default: 1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, + left: {type: Number, default: -1}, + right: {type: Number, default: 1}, + top: {type: Number, default: 1}, + bottom: {type: Number, default: -1}, + near: {type: Number, default: 0.1}, + far: {type: Number, default: 2e3}, + zoom: {type: Number, default: 1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, - created() { - this.camera = new OrthographicCamera$1(this.left, this.right, this.top, this.bottom, this.near, this.far); - bindProp(this, 'position', this.camera); - - ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => { - watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + const renderer = inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new OrthographicCamera$1(props.left, props.right, props.top, props.bottom, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + const watchProps = ["left", "right", "top", "bottom", "near", "far", "zoom"]; + watchProps.forEach((p) => { + watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'OrthographicCamera', + __hmrId: "OrthographicCamera" }); var PerspectiveCamera = defineComponent({ extends: Camera, - name: 'PerspectiveCamera', - inject: ['three'], + name: "PerspectiveCamera", props: { - aspect: { type: Number, default: 1 }, - far: { type: Number, default: 2000 }, - fov: { type: Number, default: 50 }, - near: { type: Number, default: 0.1 }, - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - lookAt: { type: Object, default: null }, + aspect: {type: Number, default: 1}, + far: {type: Number, default: 2e3}, + fov: {type: Number, default: 50}, + near: {type: Number, default: 0.1}, + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + lookAt: {type: Object, default: null} }, - created() { - this.camera = new PerspectiveCamera$1(this.fov, this.aspect, this.near, this.far); - bindProp(this, 'position', this.camera); - - if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true }); - - ['aspect', 'far', 'fov', 'near'].forEach(p => { - watch(() => this[p], () => { - this.camera[p] = this[p]; - this.camera.updateProjectionMatrix(); + setup(props) { + var _a; + const renderer = inject(RendererInjectionKey); + if (!renderer) { + console.error("Renderer not found"); + return; + } + const camera = new PerspectiveCamera$1(props.fov, props.aspect, props.near, props.far); + renderer.camera = camera; + bindProp(props, "position", camera); + if (props.lookAt) + camera.lookAt((_a = props.lookAt.x) != null ? _a : 0, props.lookAt.y, props.lookAt.z); + watch(() => props.lookAt, (v) => { + var _a2; + camera.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + const watchProps = ["aspect", "far", "fov", "near"]; + watchProps.forEach((p) => { + watch(() => props[p], (value) => { + camera[p] = value; + camera.updateProjectionMatrix(); }); }); - - this.three.camera = this.camera; + return {renderer, camera}; }, - __hmrId: 'PerspectiveCamera', + __hmrId: "PerspectiveCamera" +}); + +const SceneInjectionKey = Symbol("Scene"); +var Scene = defineComponent({ + name: "Scene", + props: { + background: [String, Number, Object] + }, + setup(props) { + const renderer = inject(RendererInjectionKey); + const scene = new Scene$1(); + if (!renderer) { + console.error("Renderer not found"); + return; + } + renderer.scene = scene; + provide(SceneInjectionKey, scene); + const setBackground = (value) => { + if (!value) + return; + if (typeof value === "string" || typeof value === "number") { + if (scene.background instanceof Color) + scene.background.set(value); + else + scene.background = new Color(value); + } else if (value instanceof Texture$1) { + scene.background = value; + } + }; + setBackground(props.background); + watch(() => props.background, setBackground); + const add = (o) => { + scene.add(o); + }; + const remove = (o) => { + scene.remove(o); + }; + return {scene, add, remove}; + }, + render() { + return this.$slots.default ? this.$slots.default() : []; + }, + __hmrId: "Scene" }); var Object3D = defineComponent({ - name: 'Object3D', - inject: ['three', 'scene', 'rendererComponent'], - emits: ['created', 'ready'], - props: { - position: { type: Object, default: { x: 0, y: 0, z: 0 } }, - rotation: { type: Object, default: { x: 0, y: 0, z: 0 } }, - scale: { type: Object, default: { x: 1, y: 1, z: 1 } }, - lookAt: { type: Object, default: null }, - autoRemove: { type: Boolean, default: true }, - userData: { type: Object, default: () => ({}) }, + name: "Object3D", + inject: { + renderer: RendererInjectionKey, + scene: SceneInjectionKey + }, + emits: ["created", "ready"], + props: { + position: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + rotation: {type: Object, default: () => ({x: 0, y: 0, z: 0})}, + scale: {type: Object, default: () => ({x: 1, y: 1, z: 1, order: "XYZ"})}, + lookAt: {type: Object, default: null}, + autoRemove: {type: Boolean, default: true}, + userData: {type: Object, default: () => ({})} + }, + setup() { + return {}; + }, + created() { + if (!this.renderer) { + console.error("Missing parent Renderer"); + } + if (!this.scene) { + console.error("Missing parent Scene"); + } }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.autoRemove) this.removeFromParent(); + if (this.autoRemove) + this.removeFromParent(); }, methods: { initObject3D(o3d) { + var _a; this.o3d = o3d; - this.o3d.userData = this.userData; - this.$emit('created', this.o3d); - - bindProp(this, 'position', this.o3d); - bindProp(this, 'rotation', this.o3d); - bindProp(this, 'scale', this.o3d); - - // TODO : fix lookat.x - if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z); - watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true }); - - this._parent = this.getParent(); - if (this.addToParent()) this.$emit('ready', this); - else console.error('Missing parent (Scene, Group...)'); + this.$emit("created", o3d); + bindProp(this, "position", o3d); + bindProp(this, "rotation", o3d); + bindProp(this, "scale", o3d); + bindProp(this, "userData", o3d.userData); + if (this.lookAt) + o3d.lookAt((_a = this.lookAt.x) != null ? _a : 0, this.lookAt.y, this.lookAt.z); + watch(() => this.lookAt, (v) => { + var _a2; + o3d.lookAt((_a2 = v.x) != null ? _a2 : 0, v.y, v.z); + }, {deep: true}); + this.parent = this.getParent(); + if (this.addToParent()) + this.$emit("ready", this); + else + console.error("Missing parent (Scene, Group...)"); }, getParent() { let parent = this.$parent; while (parent) { - if (parent.add) return parent; + if (parent.add) + return parent; parent = parent.$parent; } - return false; + return void 0; }, addToParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.add(o3d); + if (this.parent) { + this.parent.add(o3d); return true; } return false; }, removeFromParent(o) { const o3d = o || this.o3d; - if (this._parent) { - this._parent.remove(o3d); + if (this.parent) { + this.parent.remove(o3d); return true; } return false; }, - add(o) { this.o3d.add(o); }, - remove(o) { this.o3d.remove(o); }, + add(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.add(o); + }, + remove(o) { + var _a; + (_a = this.o3d) == null ? void 0 : _a.remove(o); + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Object3D', + __hmrId: "Object3D" }); var Group = defineComponent({ - name: 'Group', + name: "Group", extends: Object3D, - created() { - this.group = new Group$1(); - this.initObject3D(this.group); - }, - __hmrId: 'Group', -}); - -var Scene = defineComponent({ - name: 'Scene', - inject: ['three'], - props: { - id: String, - background: [String, Number], - }, - setup(props) { - const scene = new Scene$1(); - if (props.background) scene.background = new Color(props.background); - watch(() => props.background, (value) => { scene.background.set(value); }); - return { scene }; - }, - provide() { + setup() { return { - scene: this.scene, + group: new Group$1() }; }, - mounted() { - if (!this.three.scene) { - this.three.scene = this.scene; - } + created() { + this.initObject3D(this.group); }, - methods: { - add(o) { this.scene.add(o); }, - remove(o) { this.scene.remove(o); }, - }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'Scene', + __hmrId: "Group" }); +const emptyCallBack = () => { +}; var Raycaster = defineComponent({ - name: 'Raycaster', - inject: ['three', 'rendererComponent'], + name: "Raycaster", props: { - onPointerEnter: { type: Function, default: () => {} }, - onPointerOver: { type: Function, default: () => {} }, - onPointerMove: { type: Function, default: () => {} }, - onPointerLeave: { type: Function, default: () => {} }, - onClick: { type: Function, default: () => {} }, - intersectMode: { type: String, default: 'move' }, + onPointerEnter: {type: Function, default: emptyCallBack}, + onPointerOver: {type: Function, default: emptyCallBack}, + onPointerMove: {type: Function, default: emptyCallBack}, + onPointerLeave: {type: Function, default: emptyCallBack}, + onClick: {type: Function, default: emptyCallBack}, + intersectMode: {type: String, default: "move"} + }, + setup() { + const renderer = inject(RendererInjectionKey); + return {renderer}; }, mounted() { - this.rendererComponent.onMounted(() => { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + this.renderer.onMounted(() => { + if (!renderer.camera) + return; this.pointer = usePointer({ - camera: this.three.camera, - domElement: this.three.renderer.domElement, + camera: renderer.camera, + domElement: renderer.canvas, intersectObjects: this.getIntersectObjects(), onIntersectEnter: this.onPointerEnter, onIntersectOver: this.onPointerOver, onIntersectMove: this.onPointerMove, onIntersectLeave: this.onPointerLeave, - onIntersectClick: this.onClick, + onIntersectClick: this.onClick }); this.pointer.addListeners(); - - if (this.intersectMode === 'frame') { - this.rendererComponent.onBeforeRender(this.pointer.intersect); + if (this.intersectMode === "frame") { + renderer.onBeforeRender(this.pointer.intersect); } }); }, unmounted() { + var _a; if (this.pointer) { this.pointer.removeListeners(); - this.rendererComponent.offBeforeRender(this.pointer.intersect); + (_a = this.renderer) == null ? void 0 : _a.offBeforeRender(this.pointer.intersect); } }, methods: { getIntersectObjects() { - return this.three.scene.children.filter(e => e.type === 'Mesh'); - }, + if (this.renderer && this.renderer.scene) { + const children = this.renderer.scene.children.filter((c) => ["Mesh", "InstancedMesh"].includes(c.type)); + return children; + } + return []; + } }, render() { return []; }, - __hmrId: 'Raycaster', + __hmrId: "Raycaster" }); -const Geometry = defineComponent({ - inject: ['mesh'], +var CubeCamera = defineComponent({ + extends: Object3D, props: { - rotateX: Number, - rotateY: Number, - rotateZ: Number, + cubeRTSize: {type: Number, default: 256}, + cubeCameraNear: {type: Number, default: 0.1}, + cubeCameraFar: {type: Number, default: 2e3}, + autoUpdate: Boolean }, - created() { - if (!this.mesh) { - console.error('Missing parent Mesh'); + setup(props) { + const rendererC = inject(RendererInjectionKey); + if (!rendererC || !rendererC.scene) { + console.error("Missing Renderer / Scene"); + return; } - - this.watchProps = []; - Object.entries(this.$props).forEach(e => this.watchProps.push(e[0])); - - this.createGeometry(); - this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - - this.addWatchers(); + const renderer = rendererC.renderer, scene = rendererC.scene; + const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, {format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter}); + const cubeCamera = new CubeCamera$1(props.cubeCameraNear, props.cubeCameraFar, cubeRT); + const updateRT = () => { + cubeCamera.update(renderer, scene); + }; + if (props.autoUpdate) { + rendererC.onBeforeRender(updateRT); + onUnmounted(() => { + rendererC.offBeforeRender(updateRT); + }); + } else { + rendererC.onMounted(updateRT); + } + return {cubeRT, cubeCamera}; }, - unmounted() { - this.geometry.dispose(); + render() { + return []; + }, + __hmrId: "CubeCamera" +}); + +const pointerProps = { + onPointerEnter: Function, + onPointerOver: Function, + onPointerMove: Function, + onPointerLeave: Function, + onPointerDown: Function, + onPointerUp: Function, + onClick: Function +}; +const MeshInjectionKey = Symbol("Mesh"); +const Mesh = defineComponent({ + name: "Mesh", + extends: Object3D, + props: { + castShadow: Boolean, + receiveShadow: Boolean, + ...pointerProps + }, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + if (!this.mesh && !this.loading) + this.initMesh(); }, methods: { - addWatchers() { - this.watchProps.forEach(prop => { + initMesh() { + const mesh = new Mesh$1(this.geometry, this.material); + mesh.userData.component = this; + bindProp(this, "castShadow", mesh); + bindProp(this, "receiveShadow", mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + if (this.renderer) + this.renderer.three.addIntersectObject(mesh); + } + this.mesh = mesh; + this.initObject3D(mesh); + }, + createGeometry() { + }, + addGeometryWatchers(props) { + Object.keys(props).forEach((prop) => { watch(() => this[prop], () => { this.refreshGeometry(); }); }); }, + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + }, + refreshGeometry() { + const oldGeo = this.geometry; + this.createGeometry(); + if (this.mesh && this.geometry) + this.mesh.geometry = this.geometry; + oldGeo == null ? void 0 : oldGeo.dispose(); + } + }, + unmounted() { + if (this.mesh) { + if (this.renderer) + this.renderer.three.removeIntersectObject(this.mesh); + } + if (this.geometry) + this.geometry.dispose(); + if (this.material) + this.material.dispose(); + }, + __hmrId: "Mesh" +}); +function meshComponent(name, props, createGeometry) { + return defineComponent({ + name, + extends: Mesh, + props, + created() { + this.createGeometry(); + this.addGeometryWatchers(props); + }, + methods: { + createGeometry() { + this.geometry = createGeometry(this); + } + } + }); +} + +const Geometry = defineComponent({ + props: { + rotateX: Number, + rotateY: Number, + rotateZ: Number + }, + inject: { + mesh: MeshInjectionKey + }, + setup() { + return {}; + }, + created() { + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + this.createGeometry(); + this.rotateGeometry(); + if (this.geometry) + this.mesh.setGeometry(this.geometry); + Object.keys(this.$props).forEach((prop) => { + watch(() => this[prop], this.refreshGeometry); + }); + }, + unmounted() { + var _a; + (_a = this.geometry) == null ? void 0 : _a.dispose(); + }, + methods: { + createGeometry() { + }, rotateGeometry() { - if (this.rotateX) this.geometry.rotateX(this.rotateX); - if (this.rotateY) this.geometry.rotateY(this.rotateY); - if (this.rotateZ) this.geometry.rotateZ(this.rotateZ); + if (!this.geometry) + return; + if (this.rotateX) + this.geometry.rotateX(this.rotateX); + if (this.rotateY) + this.geometry.rotateY(this.rotateY); + if (this.rotateZ) + this.geometry.rotateZ(this.rotateZ); }, refreshGeometry() { const oldGeo = this.geometry; this.createGeometry(); this.rotateGeometry(); - this.mesh.setGeometry(this.geometry); - oldGeo.dispose(); - }, + if (this.geometry && this.mesh) + this.mesh.setGeometry(this.geometry); + oldGeo == null ? void 0 : oldGeo.dispose(); + } }, - render() { return []; }, + render() { + return []; + } }); - function geometryComponent(name, props, createGeometry) { return defineComponent({ name, @@ -921,21 +1108,20 @@ function geometryComponent(name, props, createGeometry) { methods: { createGeometry() { this.geometry = createGeometry(this); - }, - }, + } + } }); } -const props$h = { +const props$n = { size: Number, - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - depth: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, - depthSegments: { type: Number, default: 1 }, + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + depth: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + depthSegments: {type: Number, default: 1} }; - function createGeometry$f(comp) { if (comp.size) { return new BoxGeometry$1(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments); @@ -943,188 +1129,173 @@ function createGeometry$f(comp) { return new BoxGeometry$1(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments); } } -var BoxGeometry = geometryComponent('BoxGeometry', props$h, createGeometry$f); +var BoxGeometry = geometryComponent("BoxGeometry", props$n, createGeometry$f); -const props$g = { - radius: { type: Number, default: 1 }, - segments: { type: Number, default: 8 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$m = { + radius: {type: Number, default: 1}, + segments: {type: Number, default: 8}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$e(comp) { return new CircleGeometry$1(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength); } -var CircleGeometry = geometryComponent('CircleGeometry', props$g, createGeometry$e); +var CircleGeometry = geometryComponent("CircleGeometry", props$m, createGeometry$e); -const props$f = { - radius: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$l = { + radius: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$d(comp) { return new ConeGeometry$1(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var ConeGeometry = geometryComponent('ConeGeometry', props$f, createGeometry$d); +var ConeGeometry = geometryComponent("ConeGeometry", props$l, createGeometry$d); -const props$e = { - radiusTop: { type: Number, default: 1 }, - radiusBottom: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - heightSegments: { type: Number, default: 1 }, - openEnded: { type: Boolean, default: false }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$k = { + radiusTop: {type: Number, default: 1}, + radiusBottom: {type: Number, default: 1}, + height: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + heightSegments: {type: Number, default: 1}, + openEnded: {type: Boolean, default: false}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$c(comp) { return new CylinderGeometry$1(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength); } -var CylinderGeometry = geometryComponent('CylinderGeometry', props$e, createGeometry$c); +var CylinderGeometry = geometryComponent("CylinderGeometry", props$k, createGeometry$c); -const props$d = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$j = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$b(comp) { return new DodecahedronGeometry$1(comp.radius, comp.detail); } -var DodecahedronGeometry = geometryComponent('DodecahedronGeometry', props$d, createGeometry$b); +var DodecahedronGeometry = geometryComponent("DodecahedronGeometry", props$j, createGeometry$b); -const props$c = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$i = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$a(comp) { return new IcosahedronGeometry$1(comp.radius, comp.detail); } -var IcosahedronGeometry = geometryComponent('IcosahedronGeometry', props$c, createGeometry$a); +var IcosahedronGeometry = geometryComponent("IcosahedronGeometry", props$i, createGeometry$a); -const props$b = { +const props$h = { points: Array, - segments: { type: Number, default: 12 }, - phiStart: { type: Number, default: 0 }, - phiLength: { type: Number, default: Math.PI * 2 }, + segments: {type: Number, default: 12}, + phiStart: {type: Number, default: 0}, + phiLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$9(comp) { return new LatheGeometry$1(comp.points, comp.segments, comp.phiStart, comp.phiLength); } -var LatheGeometry = geometryComponent('LatheGeometry', props$b, createGeometry$9); +var LatheGeometry = geometryComponent("LatheGeometry", props$h, createGeometry$9); -const props$a = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$g = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$8(comp) { return new OctahedronGeometry$1(comp.radius, comp.detail); } -var OctahedronGeometry = geometryComponent('OctahedronGeometry', props$a, createGeometry$8); +var OctahedronGeometry = geometryComponent("OctahedronGeometry", props$g, createGeometry$8); -const props$9 = { - width: { type: Number, default: 1 }, - height: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 1 }, - heightSegments: { type: Number, default: 1 }, +const props$f = { + width: {type: Number, default: 1}, + height: {type: Number, default: 1}, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1} }; - function createGeometry$7(comp) { return new PlaneGeometry$1(comp.width, comp.height, comp.widthSegments, comp.heightSegments); } -var PlaneGeometry = geometryComponent('PlaneGeometry', props$9, createGeometry$7); +var PlaneGeometry = geometryComponent("PlaneGeometry", props$f, createGeometry$7); -const props$8 = { +const props$e = { vertices: Array, indices: Array, - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$6(comp) { return new PolyhedronGeometry$1(comp.vertices, comp.indices, comp.radius, comp.detail); } -var PolyhedronGeometry = geometryComponent('PolyhedronGeometry', props$8, createGeometry$6); +var PolyhedronGeometry = geometryComponent("PolyhedronGeometry", props$e, createGeometry$6); -const props$7 = { - innerRadius: { type: Number, default: 0.5 }, - outerRadius: { type: Number, default: 1 }, - thetaSegments: { type: Number, default: 8 }, - phiSegments: { type: Number, default: 1 }, - thetaStart: { type: Number, default: 0 }, - thetaLength: { type: Number, default: Math.PI * 2 }, +const props$d = { + innerRadius: {type: Number, default: 0.5}, + outerRadius: {type: Number, default: 1}, + thetaSegments: {type: Number, default: 8}, + phiSegments: {type: Number, default: 1}, + thetaStart: {type: Number, default: 0}, + thetaLength: {type: Number, default: Math.PI * 2} }; - function createGeometry$5(comp) { return new RingGeometry$1(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength); } -var RingGeometry = geometryComponent('RingGeometry', props$7, createGeometry$5); +var RingGeometry = geometryComponent("RingGeometry", props$d, createGeometry$5); -const props$6 = { - radius: { type: Number, default: 1 }, - widthSegments: { type: Number, default: 12 }, - heightSegments: { type: Number, default: 12 }, +const props$c = { + radius: {type: Number, default: 1}, + widthSegments: {type: Number, default: 12}, + heightSegments: {type: Number, default: 12} }; - function createGeometry$4(comp) { return new SphereGeometry$1(comp.radius, comp.widthSegments, comp.heightSegments); } -var SphereGeometry = geometryComponent('SphereGeometry', props$6, createGeometry$4); +var SphereGeometry = geometryComponent("SphereGeometry", props$c, createGeometry$4); -const props$5 = { - radius: { type: Number, default: 1 }, - detail: { type: Number, default: 0 }, +const props$b = { + radius: {type: Number, default: 1}, + detail: {type: Number, default: 0} }; - function createGeometry$3(comp) { return new TetrahedronGeometry$1(comp.radius, comp.detail); } -var TetrahedronGeometry = geometryComponent('TetrahedronGeometry', props$5, createGeometry$3); +var TetrahedronGeometry = geometryComponent("TetrahedronGeometry", props$b, createGeometry$3); -const props$4 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - radialSegments: { type: Number, default: 8 }, - tubularSegments: { type: Number, default: 6 }, - arc: { type: Number, default: Math.PI * 2 }, +const props$a = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + radialSegments: {type: Number, default: 8}, + tubularSegments: {type: Number, default: 6}, + arc: {type: Number, default: Math.PI * 2} }; - function createGeometry$2(comp) { return new TorusGeometry$1(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc); } -var TorusGeometry = geometryComponent('TorusGeometry', props$4, createGeometry$2); +var TorusGeometry = geometryComponent("TorusGeometry", props$a, createGeometry$2); -const props$3 = { - radius: { type: Number, default: 1 }, - tube: { type: Number, default: 0.4 }, - tubularSegments: { type: Number, default: 64 }, - radialSegments: { type: Number, default: 8 }, - p: { type: Number, default: 2 }, - q: { type: Number, default: 3 }, +const props$9 = { + radius: {type: Number, default: 1}, + tube: {type: Number, default: 0.4}, + tubularSegments: {type: Number, default: 64}, + radialSegments: {type: Number, default: 8}, + p: {type: Number, default: 2}, + q: {type: Number, default: 3} }; - function createGeometry$1(comp) { return new TorusKnotGeometry$1(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q); } -var TorusKnotGeometry = geometryComponent('TorusKnotGeometry', props$3, createGeometry$1); +var TorusKnotGeometry = geometryComponent("TorusKnotGeometry", props$9, createGeometry$1); -const props$2 = { +const props$8 = { points: Array, path: Curve, - tubularSegments: { type: Number, default: 64 }, - radius: { type: Number, default: 1 }, - radialSegments: { type: Number, default: 8 }, - closed: { type: Boolean, default: false }, + tubularSegments: {type: Number, default: 64}, + radius: {type: Number, default: 1}, + radialSegments: {type: Number, default: 8}, + closed: {type: Boolean, default: false} }; - function createGeometry(comp) { let curve; if (comp.points) { @@ -1132,509 +1303,464 @@ function createGeometry(comp) { } else if (comp.path) { curve = comp.path; } else { - console.error('Missing path curve or points.'); + console.error("Missing path curve or points."); } return new TubeGeometry$1(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed); } var TubeGeometry = defineComponent({ extends: Geometry, - props: props$2, + props: props$8, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, - }, + } + } }); - function updateTubeGeometryPoints(tube, points) { const curve = new CatmullRomCurve3(points); - const { radialSegments, radius, tubularSegments, closed } = tube.parameters; + const {radialSegments, radius, tubularSegments, closed} = tube.parameters; const frames = curve.computeFrenetFrames(tubularSegments, closed); tube.tangents = frames.tangents; tube.normals = frames.normals; tube.binormals = frames.binormals; tube.parameters.path = curve; - - const pArray = tube.attributes.position.array; - const nArray = tube.attributes.normal.array; + const pAttribute = tube.getAttribute("position"); + const nAttribute = tube.getAttribute("normal"); const normal = new Vector3(); - let P; - + const P = new Vector3(); for (let i = 0; i < tubularSegments; i++) { updateSegment(i); } updateSegment(tubularSegments); - tube.attributes.position.needsUpdate = true; tube.attributes.normal.needsUpdate = true; - function updateSegment(i) { - P = curve.getPointAt(i / tubularSegments, P); + curve.getPointAt(i / tubularSegments, P); const N = frames.normals[i]; const B = frames.binormals[i]; for (let j = 0; j <= radialSegments; j++) { const v = j / radialSegments * Math.PI * 2; const sin = Math.sin(v); const cos = -Math.cos(v); - normal.x = (cos * N.x + sin * B.x); - normal.y = (cos * N.y + sin * B.y); - normal.z = (cos * N.z + sin * B.z); + normal.x = cos * N.x + sin * B.x; + normal.y = cos * N.y + sin * B.y; + normal.z = cos * N.z + sin * B.z; normal.normalize(); - const index = (i * (radialSegments + 1) + j) * 3; - nArray[index] = normal.x; - nArray[index + 1] = normal.y; - nArray[index + 2] = normal.z; - pArray[index] = P.x + radius * normal.x; - pArray[index + 1] = P.y + radius * normal.y; - pArray[index + 2] = P.z + radius * normal.z; + const index = i * (radialSegments + 1) + j; + nAttribute.setXYZ(index, normal.x, normal.y, normal.z); + pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z); } } } var Light = defineComponent({ extends: Object3D, - name: 'Light', + name: "Light", props: { - color: { type: String, default: '#ffffff' }, - intensity: { type: Number, default: 1 }, - castShadow: { type: Boolean, default: false }, - shadowMapSize: { type: Object, default: { x: 512, y: 512 } }, - shadowCamera: { type: Object, default: {} }, + color: {type: String, default: "#ffffff"}, + intensity: {type: Number, default: 1}, + castShadow: {type: Boolean, default: false}, + shadowMapSize: {type: Object, default: () => ({x: 512, y: 512})}, + shadowCamera: {type: Object, default: () => ({})} + }, + setup() { + return {}; }, - // can't use setup because it will not be used in sub components - // setup() {}, unmounted() { - if (this.light.target) this.removeFromParent(this.light.target); + if (this.light instanceof SpotLight$1 || this.light instanceof DirectionalLight$1) { + this.removeFromParent(this.light.target); + } }, methods: { - initLight() { - if (this.light.target) { - bindProp(this, 'target', this.light.target, 'position'); + initLight(light) { + this.light = light; + if (light.shadow) { + light.castShadow = this.castShadow; + setFromProp(light.shadow.mapSize, this.shadowMapSize); + setFromProp(light.shadow.camera, this.shadowCamera); } - - if (this.light.shadow) { - this.light.castShadow = this.castShadow; - setFromProp(this.light.shadow.mapSize, this.shadowMapSize); - setFromProp(this.light.shadow.camera, this.shadowCamera); - } - - ['color', 'intensity', 'castShadow'].forEach(p => { - watch(() => this[p], () => { - if (p === 'color') { - this.light.color.set(this.color); + ["color", "intensity", "castShadow"].forEach((p) => { + watch(() => this[p], (value) => { + if (p === "color") { + light.color.set(value); } else { - this.light[p] = this[p]; + light[p] = value; } }); }); - - this.initObject3D(this.light); - if (this.light.target) this.addToParent(this.light.target); - }, + this.initObject3D(light); + if (light instanceof SpotLight$1 || light instanceof DirectionalLight$1) { + bindProp(this, "target", light.target, "position"); + this.addToParent(light.target); + } + } }, - __hmrId: 'Light', + __hmrId: "Light" }); var AmbientLight = defineComponent({ extends: Light, created() { - this.light = new AmbientLight$1(this.color, this.intensity); - this.initLight(); + this.initLight(new AmbientLight$1(this.color, this.intensity)); }, - __hmrId: 'AmbientLight', + __hmrId: "AmbientLight" }); var DirectionalLight = defineComponent({ extends: Light, props: { - target: Object, + target: {type: Object, default: () => ({x: 0, y: 0, z: 0})} }, created() { - this.light = new DirectionalLight$1(this.color, this.intensity); - this.initLight(); + this.initLight(new DirectionalLight$1(this.color, this.intensity)); }, - __hmrId: 'DirectionalLight', + __hmrId: "DirectionalLight" }); var HemisphereLight = defineComponent({ extends: Light, props: { - groundColor: { type: String, default: '#444444' }, + groundColor: {type: String, default: "#444444"} }, created() { - this.light = new HemisphereLight$1(this.color, this.groundColor, this.intensity); - watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); }); - this.initLight(); + const light = new HemisphereLight$1(this.color, this.groundColor, this.intensity); + watch(() => this.groundColor, (value) => { + light.groundColor.set(value); + }); + this.initLight(light); }, - __hmrId: 'HemisphereLight', + __hmrId: "HemisphereLight" }); var PointLight = defineComponent({ extends: Light, props: { - distance: { - type: Number, - default: 0, - }, - decay: { - type: Number, - default: 1, - }, + distance: {type: Number, default: 0}, + decay: {type: Number, default: 1} }, created() { - this.light = new PointLight$1(this.color, this.intensity, this.distance, this.decay); - this.initLight(); + this.initLight(new PointLight$1(this.color, this.intensity, this.distance, this.decay)); }, - __hmrId: 'PointLight', + __hmrId: "PointLight" }); var RectAreaLight = defineComponent({ extends: Light, props: { - width: { type: Number, default: 10 }, - height: { type: Number, default: 10 }, - helper: Boolean, + width: {type: Number, default: 10}, + height: {type: Number, default: 10}, + helper: Boolean }, created() { RectAreaLightUniformsLib.init(); - this.light = new RectAreaLight$1(this.color, this.intensity, this.width, this.height); - - ['width', 'height'].forEach(p => { - watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new RectAreaLight$1(this.color, this.intensity, this.width, this.height); + const watchProps = ["width", "height"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + light[p] = value; }); }); - if (this.helper) { - this.lightHelper = new RectAreaLightHelper(this.light); - this.light.add(this.lightHelper); + const lightHelper = new RectAreaLightHelper(light); + light.add(lightHelper); } - - this.initLight(); + this.initLight(light); }, - unmounted() { - if (this.lightHelper) this.removeFromParent(this.lightHelper); - }, - __hmrId: 'RectAreaLight', + __hmrId: "RectAreaLight" }); var SpotLight = defineComponent({ extends: Light, props: { - angle: { type: Number, default: Math.PI / 3 }, - decay: { type: Number, default: 1 }, - distance: { type: Number, default: 0 }, - penumbra: { type: Number, default: 0 }, - target: Object, + angle: {type: Number, default: Math.PI / 3}, + decay: {type: Number, default: 1}, + distance: {type: Number, default: 0}, + penumbra: {type: Number, default: 0}, + target: Object }, created() { - this.light = new SpotLight$1(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); - ['angle', 'decay', 'distance', 'penumbra'].forEach(p => { - watch(() => this[p], () => { - this.light[p] = this[p]; + const light = new SpotLight$1(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); + const watchProps = ["angle", "decay", "distance", "penumbra"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + light[p] = value; }); }); - this.initLight(); + this.initLight(light); }, - __hmrId: 'SpotLight', + __hmrId: "SpotLight" }); +const MaterialInjectionKey = Symbol("Material"); var Material = defineComponent({ - inject: ['three', 'mesh'], + inject: { + mesh: MeshInjectionKey + }, props: { - color: { type: [String, Number], default: '#ffffff' }, - depthTest: { type: Boolean, default: true }, - depthWrite: { type: Boolean, default: true }, - fog: { type: Boolean, default: true }, - opacity: { type: Number, default: 1 }, - side: { type: Number, default: FrontSide }, + color: {type: [String, Number], default: "#ffffff"}, + depthTest: {type: Boolean, default: true}, + depthWrite: {type: Boolean, default: true}, + fog: {type: Boolean, default: true}, + opacity: {type: Number, default: 1}, + side: {type: Number, default: FrontSide}, transparent: Boolean, - vertexColors: Boolean, + vertexColors: Boolean + }, + setup() { + return {}; }, provide() { return { - material: this, + [MaterialInjectionKey]: this }; }, created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - - this._addWatchers(); - if (this.addWatchers) this.addWatchers(); + if (!this.mesh) { + console.error("Missing parent Mesh"); + return; + } + if (this.createMaterial) { + this.material = this.createMaterial(); + this.mesh.setMaterial(this.material); + this.addWatchers(); + } }, unmounted() { - this.material.dispose(); + var _a; + (_a = this.material) == null ? void 0 : _a.dispose(); }, methods: { setProp(key, value, needsUpdate = false) { - this.material[key] = value; - this.material.needsUpdate = needsUpdate; + if (this.material) { + this.material[key] = value; + this.material.needsUpdate = needsUpdate; + } }, - setTexture(texture, key = 'map') { + setTexture(texture, key = "map") { this.setProp(key, texture, true); }, - _addWatchers() { - ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => { - watch(() => this[p], () => { - if (p === 'color') { - this.material.color.set(this.color); + addWatchers() { + ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + watch(() => this[p], (value) => { + if (p === "color") { + this.material.color.set(value); } else { - this.material[p] = this[p]; + this.material[p] = value; } }); }); - }, + } }, render() { return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'Material', + __hmrId: "Material" }); - const wireframeProps = { - wireframe: { type: Boolean, default: false }, - // not needed for WebGL - // wireframeLinecap: { type: String, default: 'round' }, - // wireframeLinejoin: { type: String, default: 'round' }, - wireframeLinewidth: { type: Number, default: 1 }, // not really useful + wireframe: {type: Boolean, default: false}, + wireframeLinewidth: {type: Number, default: 1} }; var BasicMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshBasicMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshBasicMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'BasicMaterial', + __hmrId: "BasicMaterial" }); var LambertMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshLambertMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshLambertMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'LambertMaterial', + __hmrId: "LambertMaterial" }); var MatcapMaterial = defineComponent({ extends: Material, props: { src: String, - name: String, - flatShading: Boolean, + name: {type: String, default: "0404E8_0404B5_0404CB_3333FC"}, + flatShading: Boolean }, methods: { createMaterial() { - const src = this.name ? getMatcapUrl(this.name) : this.src; - const opts = propsValues(this.$props, ['src', 'name']); + const src = this.src ? this.src : getMatcapUrl(this.name); + const opts = propsValues(this.$props, ["src", "name"]); opts.matcap = new TextureLoader().load(src); - this.material = new MeshMatcapMaterial(opts); - }, - addWatchers() { - // TODO - }, + return new MeshMatcapMaterial(opts); + } }, - __hmrId: 'MatcapMaterial', + __hmrId: "MatcapMaterial" }); var PhongMaterial = defineComponent({ extends: Material, props: { - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - reflectivity: { type: Number, default: 1 }, - shininess: { type: Number, default: 30 }, - specular: { type: [String, Number], default: 0x111111 }, + emissive: {type: [Number, String], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + reflectivity: {type: Number, default: 1}, + shininess: {type: Number, default: 30}, + specular: {type: [String, Number], default: 1118481}, flatShading: Boolean, - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshPhongMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO : handle flatShading ? - ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => { + const material = new MeshPhongMaterial(propsValues(this.$props)); + const watchProps = ["emissive", "emissiveIntensity", "reflectivity", "shininess", "specular"]; + watchProps.forEach((p) => { watch(() => this[p], (value) => { - if (p === 'emissive' || p === 'specular') { - this.material[p].set(value); + if (p === "emissive" || p === "specular") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'PhongMaterial', + __hmrId: "PhongMaterial" }); -const props$1 = { - aoMapIntensity: { type: Number, default: 1 }, - bumpScale: { type: Number, default: 1 }, - displacementBias: { type: Number, default: 0 }, - displacementScale: { type: Number, default: 1 }, - emissive: { type: [Number, String], default: 0 }, - emissiveIntensity: { type: Number, default: 1 }, - envMapIntensity: { type: Number, default: 1 }, - lightMapIntensity: { type: Number, default: 1 }, - metalness: { type: Number, default: 0 }, - normalScale: { type: Object, default: { x: 1, y: 1 } }, - roughness: { type: Number, default: 1 }, - refractionRatio: { type: Number, default: 0.98 }, - flatShading: Boolean, +const props$7 = { + aoMapIntensity: {type: Number, default: 1}, + bumpScale: {type: Number, default: 1}, + displacementBias: {type: Number, default: 0}, + displacementScale: {type: Number, default: 1}, + emissive: {type: [String, Number], default: 0}, + emissiveIntensity: {type: Number, default: 1}, + envMapIntensity: {type: Number, default: 1}, + lightMapIntensity: {type: Number, default: 1}, + metalness: {type: Number, default: 0}, + normalScale: {type: Object, default: () => ({x: 1, y: 1})}, + roughness: {type: Number, default: 1}, + refractionRatio: {type: Number, default: 0.98}, + flatShading: Boolean }; - var StandardMaterial = defineComponent({ extends: Material, props: { - ...props$1, - ...wireframeProps, + ...props$7, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale'])); - }, - addWatchers() { - // TODO : use setProp, handle flatShading ? - Object.keys(props$1).forEach(p => { - if (p === 'normalScale') return; + const material = new MeshStandardMaterial(propsValues(this.$props, ["normalScale"])); + Object.keys(props$7).forEach((p) => { + if (p === "normalScale") + return; watch(() => this[p], (value) => { - if (p === 'emissive') { - this.material[p].set(value); + if (p === "emissive") { + material[p].set(value); } else { - this.material[p] = value; + material[p] = value; } }); }); - bindProp(this, 'normalScale', this.material); - bindProps(this, Object.keys(wireframeProps), this.material); - }, + bindProp(this, "normalScale", material); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'StandardMaterial', + __hmrId: "StandardMaterial" }); var PhysicalMaterial = defineComponent({ extends: StandardMaterial, props: { - flatShading: Boolean, + flatShading: Boolean }, methods: { createMaterial() { - this.material = new MeshPhysicalMaterial(propsValues(this.$props)); - }, - addWatchers() { - // TODO - }, + return new MeshPhysicalMaterial(propsValues(this.$props)); + } }, - __hmrId: 'PhysicalMaterial', + __hmrId: "PhysicalMaterial" }); const defaultVertexShader = ` -varying vec2 vUv; -void main(){ - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); -}`; - + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); + } +`; const defaultFragmentShader = ` -varying vec2 vUv; -void main() { - gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); -}`; - + varying vec2 vUv; + void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); + } +`; var ShaderMaterial = defineComponent({ - inject: ['three', 'mesh'], + extends: Material, props: { - uniforms: { type: Object, default: () => { return {}; } }, - vertexShader: { type: String, default: defaultVertexShader }, - fragmentShader: { type: String, default: defaultFragmentShader }, - }, - provide() { - return { - material: this, - }; - }, - created() { - this.createMaterial(); - ['vertexShader', 'fragmentShader'].forEach(p => { - watch(() => this[p], () => { - // recreate material if we change either shader - this.material.dispose(); - this.createMaterial(); - }); - }); - }, - unmounted() { - this.material.dispose(); + uniforms: {type: Object, default: () => ({})}, + vertexShader: {type: String, default: defaultVertexShader}, + fragmentShader: {type: String, default: defaultFragmentShader} }, methods: { createMaterial() { - this.material = new ShaderMaterial$1(propsValues(this.$props)); - this.mesh.setMaterial(this.material); + const material = new ShaderMaterial$1({ + uniforms: this.uniforms, + vertexShader: this.vertexShader, + fragmentShader: this.fragmentShader + }); + const watchProps = ["vertexShader", "fragmentShader"]; + watchProps.forEach((p) => { + watch(() => this[p], (value) => { + this.setProp(p, value, true); + }); + }); + return material; }, + addWatchers() { + } }, - render() { - return this.$slots.default ? this.$slots.default() : []; - }, - __hmrId: 'ShaderMaterial', + __hmrId: "ShaderMaterial" }); -/** - * ------------------------------------------------------------------------------------------ - * Subsurface Scattering shader - * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js - * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look - * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/ - *------------------------------------------------------------------------------------------ - */ - function replaceAll(string, find, replace) { return string.split(find).join(replace); } - -const meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {')); -const meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {')); - +const meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf("void main() {")); +const meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf("void main() {")); const SubsurfaceScatteringShader = { - uniforms: UniformsUtils.merge([ ShaderLib.phong.uniforms, { - thicknessColor: { value: new Color(0xffffff) }, - thicknessDistortion: { value: 0.1 }, - thicknessAmbient: { value: 0.0 }, - thicknessAttenuation: { value: 0.1 }, - thicknessPower: { value: 2.0 }, - thicknessScale: { value: 10.0 }, - }, + thicknessColor: {value: new Color(16777215)}, + thicknessDistortion: {value: 0.1}, + thicknessAmbient: {value: 0}, + thicknessAttenuation: {value: 0.1}, + thicknessPower: {value: 2}, + thicknessScale: {value: 10} + } ]), - vertexShader: ` #define USE_UV ${ShaderChunk.meshphong_vert} `, - fragmentShader: ` #define USE_UV #define SUBSURFACE @@ -1659,357 +1785,222 @@ const SubsurfaceScatteringShader = { vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; } - ` + meshphongFragBody.replace( - '#include ', - replaceAll( - ShaderChunk.lights_fragment_begin, - 'RE_Direct( directLight, geometry, material, reflectedLight );', - ` + ` + meshphongFragBody.replace("#include ", replaceAll(ShaderChunk.lights_fragment_begin, "RE_Direct( directLight, geometry, material, reflectedLight );", ` RE_Direct( directLight, geometry, material, reflectedLight ); #if defined( SUBSURFACE ) && defined( USE_UV ) RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); #endif - ` - ) - ), + `)) }; +const props$6 = { + color: {type: [String, Number], default: "#ffffff"}, + thicknessColor: {type: [String, Number], default: "#ffffff"}, + thicknessDistortion: {type: Number, default: 0.4}, + thicknessAmbient: {type: Number, default: 0.01}, + thicknessAttenuation: {type: Number, default: 0.7}, + thicknessPower: {type: Number, default: 2}, + thicknessScale: {type: Number, default: 4} +}; var SubSurfaceMaterial = defineComponent({ - inject: ['three', 'mesh'], - props: { - color: { type: String, default: '#ffffff' }, - thicknessColor: { type: String, default: '#ffffff' }, - thicknessDistortion: { type: Number, default: 0.4 }, - thicknessAmbient: { type: Number, default: 0.01 }, - thicknessAttenuation: { type: Number, default: 0.7 }, - thicknessPower: { type: Number, default: 2 }, - thicknessScale: { type: Number, default: 4 }, - transparent: { type: Boolean, default: false }, - opacity: { type: Number, default: 1 }, - vertexColors: { type: Boolean, default: false }, - }, - created() { - this.createMaterial(); - this.mesh.setMaterial(this.material); - }, - unmounted() { - this.material.dispose(); - }, + extends: Material, + props: props$6, methods: { createMaterial() { const params = SubsurfaceScatteringShader; const uniforms = UniformsUtils.clone(params.uniforms); - - Object.entries(this.$props).forEach(([key, value]) => { + Object.keys(props$6).forEach((key) => { + const value = this[key]; let _key = key, _value = value; - if (['color', 'thicknessColor'].includes(key)) { - if (key === 'color') _key = 'diffuse'; + if (["color", "thicknessColor"].includes(key)) { + if (key === "color") + _key = "diffuse"; _value = new Color(value); } - if (!['transparent', 'vertexColors'].includes(key)) { - uniforms[_key].value = _value; - } + uniforms[_key].value = _value; }); - - this.material = new ShaderMaterial$1({ + const material = new ShaderMaterial$1({ ...params, uniforms, lights: true, transparent: this.transparent, - vertexColors: this.vertexColors, + vertexColors: this.vertexColors }); - }, + return material; + } }, - render() { - return []; - }, - __hmrId: 'SubSurfaceMaterial', + __hmrId: "SubSurfaceMaterial" }); var ToonMaterial = defineComponent({ extends: Material, props: { - ...wireframeProps, + ...wireframeProps }, methods: { createMaterial() { - this.material = new MeshToonMaterial(propsValues(this.$props)); - }, - addWatchers() { - bindProps(this, Object.keys(wireframeProps), this.material); - }, + const material = new MeshToonMaterial(propsValues(this.$props)); + bindProps(this, Object.keys(wireframeProps), material); + return material; + } }, - __hmrId: 'ToonMaterial', + __hmrId: "ToonMaterial" }); var Texture = defineComponent({ - inject: ['material'], - emits: ['loaded'], + inject: { + material: MaterialInjectionKey + }, props: { - name: { type: String, default: 'map' }, - uniform: { type: String, default: null }, + name: {type: String, default: "map"}, + uniform: String, src: String, onLoad: Function, onProgress: Function, onError: Function, - mapping: { type: Number, default: UVMapping }, - wrapS: { type: Number, default: ClampToEdgeWrapping }, - wrapT: { type: Number, default: ClampToEdgeWrapping }, - magFilter: { type: Number, default: LinearFilter }, - minFilter: { type: Number, default: LinearMipmapLinearFilter }, - repeat: { type: Object, default: { x: 1, y: 1 } }, - rotation: { type: Number, default: 0 }, - center: { type: Object, default: { x: 0, y: 0 } }, + mapping: {type: Number, default: UVMapping}, + wrapS: {type: Number, default: ClampToEdgeWrapping}, + wrapT: {type: Number, default: ClampToEdgeWrapping}, + magFilter: {type: Number, default: LinearFilter}, + minFilter: {type: Number, default: LinearMipmapLinearFilter}, + repeat: {type: Object, default: () => ({x: 1, y: 1})}, + rotation: {type: Number, default: 0}, + center: {type: Object, default: () => ({x: 0, y: 0})} + }, + setup() { + return {}; }, created() { this.refreshTexture(); watch(() => this.src, this.refreshTexture); }, unmounted() { - if (this.material && this.material.setTexture) this.material.setTexture(null, this.name); - this.texture.dispose(); + var _a, _b; + (_a = this.material) == null ? void 0 : _a.setTexture(null, this.name); + (_b = this.texture) == null ? void 0 : _b.dispose(); }, methods: { createTexture() { - this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center']; - wathProps.forEach(prop => { - bindProp(this, prop, this.texture); + if (!this.src) + return void 0; + const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); + const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + wathProps.forEach((prop) => { + bindProp(this, prop, texture); }); + return texture; }, refreshTexture() { - this.createTexture(); - // handle standard material - if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); } - // handle shader material - else if (this.material && this.material.material.type === "ShaderMaterial") { - // require a `uniform` prop so we know what to call the uniform - if (!this.uniform) { - console.warn('"uniform" prop required to use texture in a shader.'); - return + this.texture = this.createTexture(); + if (this.texture && this.material) { + this.material.setTexture(this.texture, this.name); + if (this.material.material instanceof ShaderMaterial$1 && this.uniform) { + this.material.uniforms[this.uniform] = {value: this.texture}; } - this.material.uniforms[this.uniform] = { value: this.texture }; } }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, - }, - render() { return []; }, -}); - -var CubeTexture = defineComponent({ - inject: ['material'], - emits: ['loaded'], - props: { - path: String, - urls: { - type: Array, - default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'], - }, - onLoad: Function, - onProgress: Function, - onError: Function, - name: { type: String, default: 'envMap' }, - refraction: Boolean, - // todo: remove ? - refractionRatio: { type: Number, default: 0.98 }, - }, - created() { - this.refreshTexture(); - watch(() => this.path, this.refreshTexture); - watch(() => this.urls, this.refreshTexture); - }, - unmounted() { - this.material.setTexture(null, this.name); - this.texture.dispose(); - }, - methods: { - createTexture() { - this.texture = new CubeTextureLoader() - .setPath(this.path) - .load(this.urls, this.onLoaded, this.onProgress, this.onError); - }, - refreshTexture() { - this.createTexture(); - this.material.setTexture(this.texture, this.name); - if (this.refraction) { - this.texture.mapping = CubeRefractionMapping; - this.material.setProp('refractionRatio', this.refractionRatio); - } - }, - onLoaded() { - if (this.onLoad) this.onLoad(); - this.$emit('loaded'); - }, + onLoaded(t) { + var _a; + (_a = this.onLoad) == null ? void 0 : _a.call(this, t); + } }, render() { return []; - }, + } }); -const pointerProps = { - onPointerEnter: Function, - onPointerOver: Function, - onPointerMove: Function, - onPointerLeave: Function, - onPointerDown: Function, - onPointerUp: Function, - onClick: Function, -}; - -const Mesh = defineComponent({ - name: 'Mesh', - extends: Object3D, +var CubeTexture = defineComponent({ + extends: Texture, props: { - castShadow: Boolean, - receiveShadow: Boolean, - ...pointerProps, - }, - // can't use setup because it will not be used in sub components - // setup() {}, - provide() { - return { - mesh: this, - }; - }, - mounted() { - if (!this.mesh && !this.loading) this.initMesh(); - }, - methods: { - initMesh() { - this.mesh = new Mesh$1(this.geometry, this.material); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); - } - - this.initObject3D(this.mesh); + path: {type: String, required: true}, + urls: { + type: Array, + default: () => ["px.jpg", "nx.jpg", "py.jpg", "ny.jpg", "pz.jpg", "nz.jpg"] }, - addGeometryWatchers(props) { - Object.keys(props).forEach(prop => { - watch(() => this[prop], () => { - this.refreshGeometry(); - }); - }); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - if (this.mesh) this.mesh.material = material; - }, - refreshGeometry() { - const oldGeo = this.geometry; - this.createGeometry(); - this.mesh.geometry = this.geometry; - oldGeo.dispose(); - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); - } - // for predefined mesh (geometry is not unmounted) - if (this.geometry) this.geometry.dispose(); - }, - __hmrId: 'Mesh', -}); - -function meshComponent(name, props, createGeometry) { - return defineComponent({ - name, - extends: Mesh, - props, - created() { - this.createGeometry(); - this.addGeometryWatchers(props); - }, - methods: { - createGeometry() { - this.geometry = createGeometry(this); - }, - }, - __hmrId: name, - }); -} - -var Box = meshComponent('Box', props$h, createGeometry$f); - -var Circle = meshComponent('Circle', props$g, createGeometry$e); - -var Cone = meshComponent('Cone', props$f, createGeometry$d); - -var Cylinder = meshComponent('Cylinder', props$e, createGeometry$c); - -var Dodecahedron = meshComponent('Dodecahedron', props$d, createGeometry$b); - -var Icosahedron = meshComponent('Icosahedron', props$c, createGeometry$a); - -var Lathe = meshComponent('Lathe', props$b, createGeometry$9); - -var Octahedron = meshComponent('Octahedron', props$a, createGeometry$8); - -var Plane = meshComponent('Plane', props$9, createGeometry$7); - -var Polyhedron = meshComponent('Polyhedron', props$8, createGeometry$6); - -var Ring = meshComponent('Ring', props$7, createGeometry$5); - -var Sphere = meshComponent('Sphere', props$6, createGeometry$4); - -var Tetrahedron = meshComponent('Tetrahedron', props$5, createGeometry$3); - -const props = { - text: String, - fontSrc: String, - size: { type: Number, default: 80 }, - height: { type: Number, default: 5 }, - depth: { type: Number, default: 1 }, - curveSegments: { type: Number, default: 12 }, - bevelEnabled: { type: Boolean, default: false }, - bevelThickness: { type: Number, default: 10 }, - bevelSize: { type: Number, default: 8 }, - bevelOffset: { type: Number, default: 0 }, - bevelSegments: { type: Number, default: 5 }, - align: { type: [Boolean, String], default: false }, -}; - -var Text = defineComponent({ - extends: Mesh, - props, - data() { - return { - loading: true, - }; + mapping: {type: Number, default: CubeReflectionMapping} }, created() { - // add watchers + watch(() => this.path, this.refreshTexture); + watch(() => this.urls, this.refreshTexture); + }, + methods: { + createTexture() { + return new CubeTextureLoader().setPath(this.path).load(this.urls, this.onLoaded, this.onProgress, this.onError); + } + } +}); + +var Box = meshComponent("Box", props$n, createGeometry$f); + +var Circle = meshComponent("Circle", props$m, createGeometry$e); + +var Cone = meshComponent("Cone", props$l, createGeometry$d); + +var Cylinder = meshComponent("Cylinder", props$k, createGeometry$c); + +var Dodecahedron = meshComponent("Dodecahedron", props$j, createGeometry$b); + +var Icosahedron = meshComponent("Icosahedron", props$i, createGeometry$a); + +var Lathe = meshComponent("Lathe", props$h, createGeometry$9); + +var Octahedron = meshComponent("Octahedron", props$g, createGeometry$8); + +var Plane = meshComponent("Plane", props$f, createGeometry$7); + +var Polyhedron = meshComponent("Polyhedron", props$e, createGeometry$6); + +var Ring = meshComponent("Ring", props$d, createGeometry$5); + +var Sphere = meshComponent("Sphere", props$c, createGeometry$4); + +var Tetrahedron = meshComponent("Tetrahedron", props$b, createGeometry$3); + +const props$5 = { + text: {type: String, required: true, default: "Text"}, + fontSrc: {type: String, required: true}, + size: {type: Number, default: 80}, + height: {type: Number, default: 5}, + depth: {type: Number, default: 1}, + curveSegments: {type: Number, default: 12}, + bevelEnabled: {type: Boolean, default: false}, + bevelThickness: {type: Number, default: 10}, + bevelSize: {type: Number, default: 8}, + bevelOffset: {type: Number, default: 0}, + bevelSegments: {type: Number, default: 5}, + align: {type: [Boolean, String], default: false} +}; +var Text = defineComponent({ + extends: Mesh, + props: props$5, + setup() { + return {}; + }, + created() { + if (!this.fontSrc) { + console.error('Missing required prop: "font-src"'); + return; + } const watchProps = [ - 'text', 'size', 'height', 'curveSegments', - 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments', - 'align', + "text", + "size", + "height", + "curveSegments", + "bevelEnabled", + "bevelThickness", + "bevelSize", + "bevelOffset", + "bevelSegments", + "align" ]; - watchProps.forEach(p => { + watchProps.forEach((p) => { watch(() => this[p], () => { - if (this.font) this.refreshGeometry(); + if (this.font) + this.refreshGeometry(); }); }); - const loader = new FontLoader(); + this.loading = true; loader.load(this.fontSrc, (font) => { this.loading = false; this.font = font; @@ -2029,88 +2020,93 @@ var Text = defineComponent({ bevelThickness: this.bevelThickness, bevelSize: this.bevelSize, bevelOffset: this.bevelOffset, - bevelSegments: this.bevelSegments, + bevelSegments: this.bevelSegments }); - - if (this.align === 'center') { + if (this.align === "center") { this.geometry.center(); } - }, - }, + } + } }); -var Torus = meshComponent('Torus', props$4, createGeometry$2); +var Torus = meshComponent("Torus", props$a, createGeometry$2); -var TorusKnot = meshComponent('TorusKnot', props$3, createGeometry$1); +var TorusKnot = meshComponent("TorusKnot", props$9, createGeometry$1); var Tube = defineComponent({ extends: Mesh, - props: props$2, + props: props$8, created() { this.createGeometry(); - this.addGeometryWatchers(props$2); + this.addGeometryWatchers(props$8); }, methods: { createGeometry() { this.geometry = createGeometry(this); }, - // update curve points (without using prop, faster) updatePoints(points) { updateTubeGeometryPoints(this.geometry, points); - }, + } }, - __hmrId: 'Tube', + __hmrId: "Tube" }); var Image = defineComponent({ - emits: ['loaded'], + emits: ["loaded"], extends: Mesh, props: { - src: String, + src: {type: String, required: true}, width: Number, height: Number, - keepSize: Boolean, + widthSegments: {type: Number, default: 1}, + heightSegments: {type: Number, default: 1}, + keepSize: Boolean + }, + setup() { + return {}; }, created() { - this.createGeometry(); - this.createMaterial(); - this.initMesh(); - + if (!this.renderer) + return; + this.geometry = new PlaneGeometry$1(1, 1, this.widthSegments, this.heightSegments); + this.material = new MeshBasicMaterial({side: DoubleSide, map: this.loadTexture()}); watch(() => this.src, this.refreshTexture); - - ['width', 'height'].forEach(p => { + ["width", "height"].forEach((p) => { watch(() => this[p], this.resize); }); - - if (this.keepSize) this.three.onAfterResize(this.resize); + this.resize(); + if (this.keepSize) + this.renderer.onResize(this.resize); + }, + unmounted() { + var _a; + (_a = this.renderer) == null ? void 0 : _a.offResize(this.resize); }, methods: { - createGeometry() { - this.geometry = new PlaneGeometry$1(1, 1, 1, 1); - }, - createMaterial() { - this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() }); - }, loadTexture() { return new TextureLoader().load(this.src, this.onLoaded); }, refreshTexture() { - if (this.texture) this.texture.dispose(); - this.material.map = this.loadTexture(); - this.material.needsUpdate = true; + var _a; + (_a = this.texture) == null ? void 0 : _a.dispose(); + if (this.material) { + this.material.map = this.loadTexture(); + this.material.needsUpdate = true; + } }, onLoaded(texture) { this.texture = texture; this.resize(); - this.$emit('loaded'); + this.$emit("loaded", texture); }, resize() { - if (!this.texture) return; - const screen = this.three.size; + if (!this.renderer || !this.texture) + return; + const screen = this.renderer.size; const iW = this.texture.image.width; const iH = this.texture.image.height; const iRatio = iW / iH; - let w, h; + let w = 1, h = 1; if (this.width && this.height) { w = this.width * screen.wWidth / screen.width; h = this.height * screen.wHeight / screen.height; @@ -2120,395 +2116,398 @@ var Image = defineComponent({ } else if (this.height) { h = this.height * screen.wHeight / screen.height; w = h * iRatio; + } else { + if (iRatio > 1) + w = h * iRatio; + else + h = w / iRatio; } - this.mesh.scale.x = w; - this.mesh.scale.y = h; - }, + if (this.mesh) { + this.mesh.scale.x = w; + this.mesh.scale.y = h; + } + } }, - __hmrId: 'Image', + __hmrId: "Image" }); var InstancedMesh = defineComponent({ - extends: Object3D, + extends: Mesh, props: { - castShadow: Boolean, - receiveShadow: Boolean, - count: Number, - ...pointerProps, - }, - provide() { - return { - mesh: this, - }; - }, - beforeMount() { - if (!this.$slots.default) { - console.error('Missing Geometry'); - } - }, - mounted() { - this.initMesh(); + count: {type: Number, required: true} }, methods: { initMesh() { - this.mesh = new InstancedMesh$1(this.geometry, this.material, this.count); - this.mesh.component = this; - - bindProp(this, 'castShadow', this.mesh); - bindProp(this, 'receiveShadow', this.mesh); - - if (this.onPointerEnter || - this.onPointerOver || - this.onPointerMove || - this.onPointerLeave || - this.onPointerDown || - this.onPointerUp || - this.onClick) { - this.three.addIntersectObject(this.mesh); + if (!this.renderer) + return; + if (!this.geometry || !this.material) { + console.error("Missing geometry and/or material"); + return false; + } + this.mesh = new InstancedMesh$1(this.geometry, this.material, this.count); + this.mesh.userData.component = this; + bindProp(this, "castShadow", this.mesh); + bindProp(this, "receiveShadow", this.mesh); + if (this.onPointerEnter || this.onPointerOver || this.onPointerMove || this.onPointerLeave || this.onPointerDown || this.onPointerUp || this.onClick) { + this.renderer.three.addIntersectObject(this.mesh); } - this.initObject3D(this.mesh); - }, - setGeometry(geometry) { - this.geometry = geometry; - if (this.mesh) this.mesh.geometry = geometry; - }, - setMaterial(material) { - this.material = material; - this.material.instancingColor = true; - if (this.mesh) this.mesh.material = material; - }, - }, - unmounted() { - if (this.mesh) { - this.three.removeIntersectObject(this.mesh); } }, - __hmrId: 'InstancedMesh', + __hmrId: "InstancedMesh" }); var Sprite = defineComponent({ extends: Object3D, - emits: ['loaded'], + emits: ["loaded"], props: { - src: String, + src: {type: String, required: true} }, - data() { - return { - loading: true, - }; + setup() { + return {}; }, created() { this.texture = new TextureLoader().load(this.src, this.onLoaded); - this.material = new SpriteMaterial({ map: this.texture }); + this.material = new SpriteMaterial({map: this.texture}); this.sprite = new Sprite$1(this.material); - this.geometry = this.sprite.geometry; this.initObject3D(this.sprite); }, unmounted() { - this.texture.dispose(); - this.material.dispose(); + var _a, _b; + (_a = this.texture) == null ? void 0 : _a.dispose(); + (_b = this.material) == null ? void 0 : _b.dispose(); }, methods: { onLoaded() { - this.loading = false; this.updateUV(); - this.$emit('loaded'); + this.$emit("loaded"); }, updateUV() { - this.iWidth = this.texture.image.width; - this.iHeight = this.texture.image.height; - this.iRatio = this.iWidth / this.iHeight; - + if (!this.texture || !this.sprite) + return; + const iWidth = this.texture.image.width; + const iHeight = this.texture.image.height; + const iRatio = iWidth / iHeight; let x = 0.5, y = 0.5; - if (this.iRatio > 1) { - y = 0.5 / this.iRatio; + if (iRatio > 1) { + x = 0.5 * iRatio; } else { - x = 0.5 / this.iRatio; + y = 0.5 / iRatio; } - - const positions = this.geometry.attributes.position.array; - positions[0] = -x; positions[1] = -y; - positions[5] = x; positions[6] = -y; - positions[10] = x; positions[11] = y; - positions[15] = -x; positions[16] = y; - this.geometry.attributes.position.needsUpdate = true; - }, + const positions = this.sprite.geometry.attributes.position.array; + positions[0] = -x; + positions[1] = -y; + positions[5] = x; + positions[6] = -y; + positions[10] = x; + positions[11] = y; + positions[15] = -x; + positions[16] = y; + this.sprite.geometry.attributes.position.needsUpdate = true; + } }, - __hmrId: 'Sprite', + __hmrId: "Sprite" }); var Model = defineComponent({ extends: Object3D, - emits: ['load', 'progress', 'error'], + emits: ["load", "progress", "error"], + props: { + src: {type: String, required: true} + }, data() { return { - progress: 0, + progress: 0 }; }, methods: { onLoad(model) { - this.$emit('load', model); + this.$emit("load", model); this.initObject3D(model); }, onProgress(progress) { this.progress = progress.loaded / progress.total; - this.$emit('progress', progress); + this.$emit("progress", progress); }, onError(error) { - this.$emit('error', error); - }, - }, + this.$emit("error", error); + } + } }); var GLTF = defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new GLTFLoader(); loader.load(this.src, (gltf) => { this.onLoad(gltf.scene); }, this.onProgress, this.onError); - }, + } }); var FBX = defineComponent({ extends: Model, - props: { - src: String, - }, created() { const loader = new FBXLoader(); loader.load(this.src, (fbx) => { this.onLoad(fbx); }, this.onProgress, this.onError); - }, + } }); +const ComposerInjectionKey = Symbol("Composer"); var EffectComposer = defineComponent({ setup() { - return { - passes: [], - }; + const renderer = inject(RendererInjectionKey); + return {renderer}; }, - inject: ['three'], provide() { return { - passes: this.passes, + [ComposerInjectionKey]: this }; }, - mounted() { - this.three.onAfterInit(() => { - this.composer = new EffectComposer$1(this.three.renderer); - this.three.renderer.autoClear = false; - this.passes.forEach(pass => { - this.composer.addPass(pass); - }); - this.three.composer = this.composer; - + created() { + if (!this.renderer) { + console.error("Renderer not found"); + return; + } + const renderer = this.renderer; + const composer = new EffectComposer$1(this.renderer.renderer); + this.composer = composer; + this.renderer.composer = composer; + renderer.addListener("init", () => { + renderer.renderer.autoClear = false; this.resize(); - this.three.onAfterResize(this.resize); + renderer.addListener("resize", this.resize); }); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - this.composer.setSize(this.three.size.width, this.three.size.height); + addPass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.addPass(pass); }, + removePass(pass) { + var _a; + (_a = this.composer) == null ? void 0 : _a.removePass(pass); + }, + resize() { + if (this.composer && this.renderer) { + this.composer.setSize(this.renderer.size.width, this.renderer.size.height); + } + } }, render() { - return this.$slots.default(); + return this.$slots.default ? this.$slots.default() : []; }, - __hmrId: 'EffectComposer', + __hmrId: "EffectComposer" }); var EffectPass = defineComponent({ - inject: ['three', 'passes'], - emits: ['ready'], - beforeMount() { - if (!this.passes) { - console.error('Missing parent EffectComposer'); + inject: { + renderer: RendererInjectionKey, + composer: ComposerInjectionKey + }, + emits: ["ready"], + setup() { + return {}; + }, + created() { + if (!this.composer) { + console.error("Missing parent EffectComposer"); + } + if (!this.renderer) { + console.error("Missing parent Renderer"); } }, unmounted() { - if (this.pass.dispose) this.pass.dispose(); + var _a, _b, _c; + if (this.pass) { + (_a = this.composer) == null ? void 0 : _a.removePass(this.pass); + (_c = (_b = this.pass).dispose) == null ? void 0 : _c.call(_b); + } }, methods: { - completePass(pass) { - this.passes.push(pass); + initEffectPass(pass) { + var _a; this.pass = pass; - this.$emit('ready', pass); - }, + (_a = this.composer) == null ? void 0 : _a.addPass(pass); + this.$emit("ready", pass); + } }, render() { return []; }, - __hmrId: 'EffectPass', + __hmrId: "EffectPass" }); var RenderPass = defineComponent({ extends: EffectPass, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } - const pass = new RenderPass$1(this.three.scene, this.three.camera); - this.completePass(pass); + const pass = new RenderPass$1(this.renderer.scene, this.renderer.camera); + this.initEffectPass(pass); }, - __hmrId: 'RenderPass', + __hmrId: "RenderPass" }); +const props$4 = { + focus: {type: Number, default: 1}, + aperture: {type: Number, default: 0.025}, + maxblur: {type: Number, default: 0.01} +}; var BokehPass = defineComponent({ extends: EffectPass, - props: { - focus: { - type: Number, - default: 1, - }, - aperture: { - type: Number, - default: 0.025, - }, - maxblur: { - type: Number, - default: 0.01, - }, - }, - watch: { - focus() { this.pass.uniforms.focus.value = this.focus; }, - aperture() { this.pass.uniforms.aperture.value = this.aperture; }, - maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; }, - }, - mounted() { - if (!this.three.scene) { - console.error('Missing Scene'); + props: props$4, + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; } - if (!this.three.camera) { - console.error('Missing Camera'); + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; } const params = { focus: this.focus, aperture: this.aperture, maxblur: this.maxblur, - width: this.three.size.width, - height: this.three.size.height, + width: this.renderer.size.width, + height: this.renderer.size.height }; - const pass = new BokehPass$1(this.three.scene, this.three.camera, params); - this.completePass(pass); + const pass = new BokehPass$1(this.renderer.scene, this.renderer.camera, params); + Object.keys(props$4).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'BokehPass', + __hmrId: "BokehPass" }); +const props$3 = { + noiseIntensity: {type: Number, default: 0.5}, + scanlinesIntensity: {type: Number, default: 0.05}, + scanlinesCount: {type: Number, default: 4096}, + grayscale: {type: Number, default: 0} +}; var FilmPass = defineComponent({ extends: EffectPass, - props: { - noiseIntensity: { type: Number, default: 0.5 }, - scanlinesIntensity: { type: Number, default: 0.05 }, - scanlinesCount: { type: Number, default: 4096 }, - grayscale: { type: Number, default: 0 }, - }, - watch: { - noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; }, - scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; }, - scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; }, - grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; }, - }, - mounted() { + props: props$3, + created() { const pass = new FilmPass$1(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale); - this.completePass(pass); + Object.keys(props$3).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'FilmPass', + __hmrId: "FilmPass" }); var FXAAPass = defineComponent({ extends: EffectPass, - mounted() { + created() { + var _a; const pass = new ShaderPass(FXAAShader); - this.completePass(pass); - - // resize will be called in three init - this.three.onAfterResize(this.resize); + (_a = this.renderer) == null ? void 0 : _a.addListener("resize", this.resize); + this.initEffectPass(pass); }, unmounted() { - this.three.offAfterResize(this.resize); + var _a; + (_a = this.renderer) == null ? void 0 : _a.removeListener("resize", this.resize); }, methods: { - resize() { - const { resolution } = this.pass.material.uniforms; - resolution.value.x = 1 / this.three.size.width; - resolution.value.y = 1 / this.three.size.height; - }, + resize({size}) { + if (this.pass) { + const {resolution} = this.pass.material.uniforms; + resolution.value.x = 1 / size.width; + resolution.value.y = 1 / size.height; + } + } }, - __hmrId: 'FXAAPass', + __hmrId: "FXAAPass" }); +const props$2 = { + shape: {type: Number, default: 1}, + radius: {type: Number, default: 4}, + rotateR: {type: Number, default: Math.PI / 12 * 1}, + rotateG: {type: Number, default: Math.PI / 12 * 2}, + rotateB: {type: Number, default: Math.PI / 12 * 3}, + scatter: {type: Number, default: 0} +}; var HalftonePass = defineComponent({ extends: EffectPass, - props: { - shape: { type: Number, default: 1 }, - radius: { type: Number, default: 4 }, - rotateR: { type: Number, default: Math.PI / 12 * 1 }, - rotateG: { type: Number, default: Math.PI / 12 * 2 }, - rotateB: { type: Number, default: Math.PI / 12 * 3 }, - scatter: { type: Number, default: 0 }, - }, - mounted() { - const pass = new HalftonePass$1(this.three.size.width, this.three.size.height, {}); - - ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => { + props: props$2, + created() { + if (!this.renderer) + return; + const pass = new HalftonePass$1(this.renderer.size.width, this.renderer.size.height, {}); + Object.keys(props$2).forEach((p) => { pass.uniforms[p].value = this[p]; - watch(() => this[p], () => { - pass.uniforms[p].value = this[p]; + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; }); }); - - this.completePass(pass); + this.initEffectPass(pass); }, - __hmrId: 'HalftonePass', + __hmrId: "HalftonePass" }); var SMAAPass = defineComponent({ extends: EffectPass, - mounted() { - // three size is not set yet, but this pass will be resized by effect composer - const pass = new SMAAPass$1(this.three.size.width, this.three.size.height); - this.completePass(pass); + created() { + if (!this.renderer) + return; + const pass = new SMAAPass$1(this.renderer.size.width, this.renderer.size.height); + this.initEffectPass(pass); }, - __hmrId: 'SMAAPass', + __hmrId: "SMAAPass" }); var SSAOPass = defineComponent({ extends: EffectPass, props: { - scene: null, - camera: null, options: { type: Object, - default: () => ({}), - }, - }, - mounted() { - const pass = new SSAOPass$1( - this.scene || this.three.scene, - this.camera || this.three.camera, - this.three.size.width, - this.three.size.height - ); - - for (const key of Object.keys(this.options)) { - pass[key] = this.options[key]; + default: () => ({}) } - - this.completePass(pass); }, - __hmrId: 'SSAOPass', + created() { + if (!this.renderer) + return; + if (!this.renderer.scene) { + console.error("Missing Scene"); + return; + } + if (!this.renderer.camera) { + console.error("Missing Camera"); + return; + } + const pass = new SSAOPass$1(this.renderer.scene, this.renderer.camera, this.renderer.size.width, this.renderer.size.height); + Object.keys(this.options).forEach((key) => { + pass[key] = this.options[key]; + }); + this.initEffectPass(pass); + }, + __hmrId: "SSAOPass" }); var DefaultShader = { @@ -2525,20 +2524,18 @@ var DefaultShader = { void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } - `, + ` }; -// From https://github.com/evanw/glfx.js - var TiltShift = { uniforms: { - tDiffuse: { value: null }, - blurRadius: { value: 0 }, - gradientRadius: { value: 0 }, - start: { value: new Vector2() }, - end: { value: new Vector2() }, - delta: { value: new Vector2() }, - texSize: { value: new Vector2() }, + tDiffuse: {value: null}, + blurRadius: {value: 0}, + gradientRadius: {value: 0}, + start: {value: new Vector2()}, + end: {value: new Vector2()}, + delta: {value: new Vector2()}, + texSize: {value: new Vector2()} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2584,87 +2581,89 @@ var TiltShift = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; +const props$1 = { + blurRadius: {type: Number, default: 10}, + gradientRadius: {type: Number, default: 100}, + start: {type: Object, default: () => ({x: 0, y: 100})}, + end: {type: Object, default: () => ({x: 10, y: 100})} +}; var TiltShiftPass = defineComponent({ extends: EffectPass, - props: { - blurRadius: { type: Number, default: 10 }, - gradientRadius: { type: Number, default: 100 }, - start: { type: Object, default: { x: 0, y: 100 } }, - end: { type: Object, default: { x: 10, y: 100 } }, + props: props$1, + setup() { + return {uniforms1: {}, uniforms2: {}}; }, - mounted() { - this.pass = new ShaderPass(TiltShift); - this.passes.push(this.pass); - + created() { + if (!this.composer) + return; this.pass1 = new ShaderPass(TiltShift); - this.passes.push(this.pass1); - - const uniforms = this.uniforms = this.pass.uniforms; + this.pass2 = new ShaderPass(TiltShift); const uniforms1 = this.uniforms1 = this.pass1.uniforms; - uniforms1.blurRadius = uniforms.blurRadius; - uniforms1.gradientRadius = uniforms.gradientRadius; - uniforms1.start = uniforms.start; - uniforms1.end = uniforms.end; - uniforms1.texSize = uniforms.texSize; - - bindProp(this, 'blurRadius', uniforms.blurRadius, 'value'); - bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value'); - + const uniforms2 = this.uniforms2 = this.pass2.uniforms; + uniforms2.blurRadius = uniforms1.blurRadius; + uniforms2.gradientRadius = uniforms1.gradientRadius; + uniforms2.start = uniforms1.start; + uniforms2.end = uniforms1.end; + uniforms2.texSize = uniforms1.texSize; + bindProp(this, "blurRadius", uniforms1.blurRadius, "value"); + bindProp(this, "gradientRadius", uniforms1.gradientRadius, "value"); this.updateFocusLine(); - ['start', 'end'].forEach(p => { - watch(() => this[p], this.updateFocusLine, { deep: true }); + ["start", "end"].forEach((p) => { + watch(() => this[p], this.updateFocusLine, {deep: true}); }); - - this.pass.setSize = (width, height) => { - uniforms.texSize.value.set(width, height); + this.pass1.setSize = (width, height) => { + uniforms1.texSize.value.set(width, height); }; - - // emit ready event with two passes - do so manually in this file instead - // of calling `completePass` like in other effect types - this.$emit('ready', [this.pass, this.pass1]); + this.initEffectPass(this.pass1); + this.composer.addPass(this.pass2); + }, + unmounted() { + if (this.composer && this.pass2) + this.composer.removePass(this.pass2); }, methods: { updateFocusLine() { - this.uniforms.start.value.copy(this.start); - this.uniforms.end.value.copy(this.end); + this.uniforms1.start.value.copy(this.start); + this.uniforms1.end.value.copy(this.end); const dv = new Vector2().copy(this.end).sub(this.start).normalize(); - this.uniforms.delta.value.copy(dv); - this.uniforms1.delta.value.set(-dv.y, dv.x); - }, + this.uniforms1.delta.value.copy(dv); + this.uniforms2.delta.value.set(-dv.y, dv.x); + } }, - __hmrId: 'TiltShiftPass', + __hmrId: "TiltShiftPass" }); +const props = { + strength: {type: Number, default: 1.5}, + radius: {type: Number, default: 0}, + threshold: {type: Number, default: 0} +}; var UnrealBloomPass = defineComponent({ extends: EffectPass, - props: { - strength: { type: Number, default: 1.5 }, - radius: { type: Number, default: 0 }, - threshold: { type: Number, default: 0 }, - }, - watch: { - strength() { this.pass.strength = this.strength; }, - radius() { this.pass.radius = this.radius; }, - threshold() { this.pass.threshold = this.threshold; }, - }, - mounted() { - const size = new Vector2(this.three.size.width, this.three.size.height); + props, + created() { + if (!this.renderer) + return; + const size = new Vector2(this.renderer.size.width, this.renderer.size.height); const pass = new UnrealBloomPass$1(size, this.strength, this.radius, this.threshold); - this.completePass(pass); + Object.keys(props).forEach((p) => { + watch(() => this[p], (value) => { + pass.uniforms[p].value = value; + }); + }); + this.initEffectPass(pass); }, - __hmrId: 'UnrealBloomPass', + __hmrId: "UnrealBloomPass" }); -// From https://github.com/evanw/glfx.js - var ZoomBlur = { uniforms: { - tDiffuse: { value: null }, - center: { value: new Vector2(0.5, 0.5) }, - strength: { value: 0 }, + tDiffuse: {value: null}, + center: {value: new Vector2(0.5, 0.5)}, + strength: {value: 0} }, vertexShader: DefaultShader.vertexShader, fragmentShader: ` @@ -2703,37 +2702,37 @@ var ZoomBlur = { /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `, + ` }; var ZoomBlurPass = defineComponent({ extends: EffectPass, props: { - center: { type: Object, default: { x: 0.5, y: 0.5 } }, - strength: { type: Number, default: 0.5 }, + center: {type: Object, default: () => ({x: 0.5, y: 0.5})}, + strength: {type: Number, default: 0.5} }, - mounted() { + created() { const pass = new ShaderPass(ZoomBlur); - - const uniforms = this.uniforms = pass.uniforms; - bindProp(this, 'center', uniforms.center, 'value'); - bindProp(this, 'strength', uniforms.strength, 'value'); - - this.completePass(pass); + bindProp(this, "center", pass.uniforms.center, "value"); + bindProp(this, "strength", pass.uniforms.strength, "value"); + this.initEffectPass(pass); }, - __hmrId: 'ZoomBlurPass', + __hmrId: "ZoomBlurPass" }); var TROIS = /*#__PURE__*/Object.freeze({ __proto__: null, Renderer: Renderer, + RendererInjectionKey: RendererInjectionKey, OrthographicCamera: OrthographicCamera, PerspectiveCamera: PerspectiveCamera, Camera: PerspectiveCamera, Group: Group, Scene: Scene, + SceneInjectionKey: SceneInjectionKey, Object3D: Object3D, Raycaster: Raycaster, + CubeCamera: CubeCamera, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2756,6 +2755,8 @@ var TROIS = /*#__PURE__*/Object.freeze({ PointLight: PointLight, RectAreaLight: RectAreaLight, SpotLight: SpotLight, + Material: Material, + MaterialInjectionKey: MaterialInjectionKey, BasicMaterial: BasicMaterial, LambertMaterial: LambertMaterial, MatcapMaterial: MatcapMaterial, @@ -2768,6 +2769,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Texture: Texture, CubeTexture: CubeTexture, Mesh: Mesh, + MeshInjectionKey: MeshInjectionKey, Box: Box, Circle: Circle, Cone: Cone, @@ -2791,6 +2793,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, + ComposerInjectionKey: ComposerInjectionKey, RenderPass: RenderPass, BokehPass: BokehPass, FilmPass: FilmPass, @@ -2806,95 +2809,128 @@ var TROIS = /*#__PURE__*/Object.freeze({ bindProp: bindProp, propsValues: propsValues, lerp: lerp, - lerpv2: lerpv2, - lerpv3: lerpv3, limit: limit, getMatcapUrl: getMatcapUrl }); const TroisJSVuePlugin = { - install: (app) => { + install(app) { const comps = [ - 'Camera', - 'OrthographicCamera', - 'PerspectiveCamera', - 'Raycaster', - 'Renderer', - 'Scene', - 'Group', - - 'AmbientLight', - 'DirectionalLight', - 'HemisphereLight', - 'PointLight', - 'RectAreaLight', - 'SpotLight', - - 'BasicMaterial', - 'LambertMaterial', - 'MatcapMaterial', - 'PhongMaterial', - 'PhysicalMaterial', - 'ShaderMaterial', - 'StandardMaterial', - 'SubSurfaceMaterial', - 'ToonMaterial', - - 'Texture', - 'CubeTexture', - - 'Mesh', - - 'Box', 'BoxGeometry', - 'Circle', 'CircleGeometry', - 'Cone', 'ConeGeometry', - 'Cylinder', 'CylinderGeometry', - 'Dodecahedron', 'DodecahedronGeometry', - 'Icosahedron', 'IcosahedronGeometry', - 'Lathe', 'LatheGeometry', - 'Octahedron', 'OctahedronGeometry', - 'Plane', 'PlaneGeometry', - 'Polyhedron', 'PolyhedronGeometry', - 'Ring', 'RingGeometry', - 'Sphere', 'SphereGeometry', - 'Tetrahedron', 'TetrahedronGeometry', - 'Text', - 'Torus', 'TorusGeometry', - 'TorusKnot', 'TorusKnotGeometry', - 'Tube', 'TubeGeometry', - - 'Image', - 'InstancedMesh', - 'Sprite', - - 'FBXModel', - 'GLTFModel', - - 'BokehPass', - 'EffectComposer', - 'FilmPass', - 'FXAAPass', - 'HalftonePass', - 'RenderPass', - 'SAOPass', - 'SMAAPass', - 'SSAOPass', - 'TiltShiftPass', - 'UnrealBloomPass', - 'ZoomBlurPass', - - 'GLTFViewer', + "Camera", + "OrthographicCamera", + "PerspectiveCamera", + "Raycaster", + "Renderer", + "Scene", + "Group", + "AmbientLight", + "DirectionalLight", + "HemisphereLight", + "PointLight", + "RectAreaLight", + "SpotLight", + "BasicMaterial", + "LambertMaterial", + "MatcapMaterial", + "PhongMaterial", + "PhysicalMaterial", + "ShaderMaterial", + "StandardMaterial", + "SubSurfaceMaterial", + "ToonMaterial", + "Texture", + "CubeTexture", + "Mesh", + "Box", + "BoxGeometry", + "Circle", + "CircleGeometry", + "Cone", + "ConeGeometry", + "Cylinder", + "CylinderGeometry", + "Dodecahedron", + "DodecahedronGeometry", + "Icosahedron", + "IcosahedronGeometry", + "Lathe", + "LatheGeometry", + "Octahedron", + "OctahedronGeometry", + "Plane", + "PlaneGeometry", + "Polyhedron", + "PolyhedronGeometry", + "Ring", + "RingGeometry", + "Sphere", + "SphereGeometry", + "Tetrahedron", + "TetrahedronGeometry", + "Text", + "Torus", + "TorusGeometry", + "TorusKnot", + "TorusKnotGeometry", + "Tube", + "TubeGeometry", + "Image", + "InstancedMesh", + "Sprite", + "FBXModel", + "GLTFModel", + "BokehPass", + "EffectComposer", + "FilmPass", + "FXAAPass", + "HalftonePass", + "RenderPass", + "SAOPass", + "SMAAPass", + "SSAOPass", + "TiltShiftPass", + "UnrealBloomPass", + "ZoomBlurPass", + "GLTFViewer" ]; - - comps.forEach(comp => { + comps.forEach((comp) => { app.component(comp, TROIS[comp]); }); - }, + } }; - function createApp(params) { return createApp$1(params).use(TroisJSVuePlugin); } -export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, Cone, ConeGeometry, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Mesh, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, lerpv2, lerpv3, limit, propsValues, setFromProp }; +function useTextures() { + const obj = { + loader: new TextureLoader(), + count: 0, + textures: [], + loadProgress: 0, + loadTextures, + dispose + }; + return obj; + function loadTextures(images, cb) { + obj.count = images.length; + obj.textures.splice(0); + obj.loadProgress = 0; + Promise.all(images.map(loadTexture)).then(cb); + } + function loadTexture(img, index) { + return new Promise((resolve) => { + obj.loader.load(img.src, (texture) => { + obj.loadProgress += 1 / obj.count; + obj.textures[index] = texture; + resolve(texture); + }); + }); + } + function dispose() { + obj.textures.forEach((t) => t.dispose()); + } +} + +export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; //# sourceMappingURL=trois.module.js.map diff --git a/build/trois.module.js.map b/build/trois.module.js.map index 404b786..7db2bb3 100644 --- a/build/trois.module.js.map +++ b/build/trois.module.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.js","sources":["../src/core/useRaycaster.js","../src/core/usePointer.js","../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/Camera.js","../src/core/OrthographicCamera.js","../src/core/PerspectiveCamera.js","../src/core/Object3D.js","../src/core/Group.js","../src/core/Scene.js","../src/core/Raycaster.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/CircleGeometry.js","../src/geometries/ConeGeometry.js","../src/geometries/CylinderGeometry.js","../src/geometries/DodecahedronGeometry.js","../src/geometries/IcosahedronGeometry.js","../src/geometries/LatheGeometry.js","../src/geometries/OctahedronGeometry.js","../src/geometries/PlaneGeometry.js","../src/geometries/PolyhedronGeometry.js","../src/geometries/RingGeometry.js","../src/geometries/SphereGeometry.js","../src/geometries/TetrahedronGeometry.js","../src/geometries/TorusGeometry.js","../src/geometries/TorusKnotGeometry.js","../src/geometries/TubeGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/DirectionalLight.js","../src/lights/HemisphereLight.js","../src/lights/PointLight.js","../src/lights/RectAreaLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/MatcapMaterial.js","../src/materials/PhongMaterial.js","../src/materials/StandardMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/ShaderMaterial.js","../src/materials/SubsurfaceScatteringShader.js","../src/materials/SubSurfaceMaterial.js","../src/materials/ToonMaterial.js","../src/materials/Texture.js","../src/materials/CubeTexture.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Circle.js","../src/meshes/Cone.js","../src/meshes/Cylinder.js","../src/meshes/Dodecahedron.js","../src/meshes/Icosahedron.js","../src/meshes/Lathe.js","../src/meshes/Octahedron.js","../src/meshes/Plane.js","../src/meshes/Polyhedron.js","../src/meshes/Ring.js","../src/meshes/Sphere.js","../src/meshes/Tetrahedron.js","../src/meshes/Text.js","../src/meshes/Torus.js","../src/meshes/TorusKnot.js","../src/meshes/Tube.js","../src/meshes/Image.js","../src/meshes/InstancedMesh.js","../src/meshes/Sprite.js","../src/models/Model.js","../src/models/GLTF.js","../src/models/FBX.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/FilmPass.js","../src/effects/FXAAPass.js","../src/effects/HalftonePass.js","../src/effects/SMAAPass.js","../src/effects/SSAOPass.js","../src/shaders/default.js","../src/shaders/TiltShift.js","../src/effects/TiltShiftPass.js","../src/effects/UnrealBloomPass.js","../src/shaders/ZoomBlur.js","../src/effects/ZoomBlurPass.js","../src/plugin.js"],"sourcesContent":["import { Plane, Raycaster, Vector3 } from 'three';\r\n\r\nexport default function useRaycaster(options) {\r\n const {\r\n camera,\r\n resetPosition = new Vector3(0, 0, 0),\r\n } = options;\r\n\r\n const raycaster = new Raycaster();\r\n const position = resetPosition.clone();\r\n const plane = new Plane(new Vector3(0, 0, 1), 0);\r\n\r\n const updatePosition = (coords) => {\r\n raycaster.setFromCamera(coords, camera);\r\n camera.getWorldDirection(plane.normal);\r\n raycaster.ray.intersectPlane(plane, position);\r\n };\r\n\r\n const intersect = (coords, objects) => {\r\n raycaster.setFromCamera(coords, camera);\r\n return raycaster.intersectObjects(objects);\r\n };\r\n\r\n return {\r\n position,\r\n updatePosition,\r\n intersect,\r\n };\r\n};\r\n","import { InstancedMesh, Vector2, Vector3 } from 'three';\r\nimport useRaycaster from './useRaycaster';\r\n\r\nexport default function usePointer(options) {\r\n const {\r\n camera,\r\n domElement,\r\n intersectObjects,\r\n touch = true,\r\n resetOnEnd = false,\r\n resetPosition = new Vector2(0, 0),\r\n resetPositionV3 = new Vector3(0, 0, 0),\r\n onEnter = () => {},\r\n onMove = () => {},\r\n onLeave = () => {},\r\n onIntersectEnter = () => {},\r\n onIntersectOver = () => {},\r\n onIntersectMove = () => {},\r\n onIntersectLeave = () => {},\r\n onIntersectClick = () => {},\r\n } = options;\r\n\r\n const position = resetPosition.clone();\r\n const positionN = new Vector2(0, 0);\r\n\r\n const raycaster = useRaycaster({ camera });\r\n const positionV3 = raycaster.position;\r\n\r\n const obj = {\r\n position,\r\n positionN,\r\n positionV3,\r\n intersectObjects,\r\n listeners: false,\r\n addListeners,\r\n removeListeners,\r\n intersect,\r\n };\r\n\r\n return obj;\r\n\r\n function reset() {\r\n position.copy(resetPosition);\r\n positionV3.copy(resetPositionV3);\r\n };\r\n\r\n function updatePosition(event) {\r\n let x, y;\r\n if (event.touches && event.touches.length > 0) {\r\n x = event.touches[0].clientX;\r\n y = event.touches[0].clientY;\r\n } else {\r\n x = event.clientX;\r\n y = event.clientY;\r\n }\r\n\r\n const rect = domElement.getBoundingClientRect();\r\n position.x = x - rect.left;\r\n position.y = y - rect.top;\r\n positionN.x = (position.x / rect.width) * 2 - 1;\r\n positionN.y = -(position.y / rect.height) * 2 + 1;\r\n raycaster.updatePosition(positionN);\r\n };\r\n\r\n function intersect() {\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const offObjects = [...intersectObjects];\r\n const iMeshes = [];\r\n\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n if (!object.over) {\r\n object.over = true;\r\n const overEvent = { type: 'pointerover', over: true, component, intersect };\r\n const enterEvent = { ...overEvent, type: 'pointerenter' };\r\n onIntersectOver(overEvent);\r\n onIntersectEnter(enterEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerEnter?.(enterEvent);\r\n }\r\n\r\n const moveEvent = { type: 'pointermove', component, intersect };\r\n onIntersectMove(moveEvent);\r\n component.onPointerMove?.(moveEvent);\r\n\r\n offObjects.splice(offObjects.indexOf(object), 1);\r\n });\r\n\r\n offObjects.forEach(object => {\r\n const { component } = object;\r\n if (object.over) {\r\n object.over = false;\r\n const overEvent = { type: 'pointerover', over: false, component };\r\n const leaveEvent = { ...overEvent, type: 'pointerleave' };\r\n onIntersectOver(overEvent);\r\n onIntersectLeave(leaveEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerLeave?.(leaveEvent);\r\n }\r\n });\r\n }\r\n };\r\n\r\n function pointerEnter(event) {\r\n updatePosition(event);\r\n onEnter({ type: 'pointerenter', position, positionN, positionV3 });\r\n };\r\n\r\n function pointerMove(event) {\r\n updatePosition(event);\r\n onMove({ type: 'pointermove', position, positionN, positionV3 });\r\n intersect();\r\n };\r\n\r\n function pointerClick(event) {\r\n updatePosition(event);\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const iMeshes = [];\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n const event = { type: 'click', component, intersect };\r\n onIntersectClick(event);\r\n component.onClick?.(event);\r\n });\r\n }\r\n };\r\n\r\n function pointerLeave() {\r\n if (resetOnEnd) reset();\r\n onLeave({ type: 'pointerleave' });\r\n };\r\n\r\n function addListeners() {\r\n domElement.addEventListener('mouseenter', pointerEnter);\r\n domElement.addEventListener('mousemove', pointerMove);\r\n domElement.addEventListener('mouseleave', pointerLeave);\r\n domElement.addEventListener('click', pointerClick);\r\n if (touch) {\r\n domElement.addEventListener('touchstart', pointerEnter);\r\n domElement.addEventListener('touchmove', pointerMove);\r\n domElement.addEventListener('touchend', pointerLeave);\r\n }\r\n obj.listeners = true;\r\n };\r\n\r\n function removeListeners() {\r\n domElement.removeEventListener('mouseenter', pointerEnter);\r\n domElement.removeEventListener('mousemove', pointerMove);\r\n domElement.removeEventListener('mouseleave', pointerLeave);\r\n domElement.removeEventListener('click', pointerClick);\r\n\r\n domElement.removeEventListener('touchstart', pointerEnter);\r\n domElement.removeEventListener('touchmove', pointerMove);\r\n domElement.removeEventListener('touchend', pointerLeave);\r\n obj.listeners = false;\r\n };\r\n};\r\n","import { WebGLRenderer } from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport usePointer from './usePointer';\n\n/**\n * Three.js helper\n */\nexport default function useThree() {\n // default conf\n const conf = {\n canvas: null,\n antialias: true,\n alpha: false,\n autoClear: true,\n orbit_ctrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n };\n\n // size\n const size = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n };\n\n // handlers\n const afterInitCallbacks = [];\n let afterResizeCallbacks = [];\n let beforeRenderCallbacks = [];\n\n const intersectObjects = [];\n\n // returned object\n const obj = {\n conf,\n renderer: null,\n camera: null,\n cameraCtrl: null,\n scene: null,\n pointer: null,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n onAfterInit,\n onAfterResize, offAfterResize,\n // onBeforeRender, offBeforeRender,\n addIntersectObject, removeIntersectObject,\n };\n\n /**\n * init three\n */\n function init(params) {\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n conf[key] = value;\n });\n }\n\n if (!obj.scene) {\n console.error('Missing Scene');\n return;\n }\n\n if (!obj.camera) {\n console.error('Missing Camera');\n return;\n }\n\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\n obj.renderer.autoClear = conf.autoClear;\n\n if (conf.resize) {\n onResize();\n window.addEventListener('resize', onResize);\n } else {\n setSize(conf.width, conf.height);\n }\n\n initPointer();\n\n if (conf.orbit_ctrl) {\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\n if (conf.orbit_ctrl instanceof Object) {\n Object.entries(conf.orbit_ctrl).forEach(([key, value]) => {\n obj.orbitCtrl[key] = value;\n });\n }\n }\n\n afterInitCallbacks.forEach(c => c());\n\n return true;\n };\n\n function initPointer() {\n let pointerConf = {\n camera: obj.camera,\n domElement: obj.renderer.domElement,\n intersectObjects,\n };\n\n if (conf.pointer && conf.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...conf.pointer };\n }\n\n obj.pointer = usePointer(pointerConf);\n if (conf.pointer || intersectObjects.length) {\n obj.pointer.addListeners();\n if (conf.pointer.intersectMode === 'frame') {\n onBeforeRender(() => {\n obj.pointer.intersect();\n });\n }\n }\n }\n\n /**\n * add after init callback\n */\n function onAfterInit(callback) {\n afterInitCallbacks.push(callback);\n }\n\n /**\n * add after resize callback\n */\n function onAfterResize(callback) {\n afterResizeCallbacks.push(callback);\n }\n\n /**\n * remove after resize callback\n */\n function offAfterResize(callback) {\n afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback);\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(callback) {\n beforeRenderCallbacks.push(callback);\n }\n\n /**\n * remove before render callback\n */\n function offBeforeRender(callback) {\n beforeRenderCallbacks = beforeRenderCallbacks.filter(c => c !== callback);\n }\n\n /**\n * default render\n */\n function render() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.renderer.render(obj.scene, obj.camera);\n }\n\n /**\n * composer render\n */\n function renderC() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.composer.render();\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o);\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners();\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o) {\n const i = intersectObjects.indexOf(o);\n if (i !== -1) {\n intersectObjects.splice(i, 1);\n }\n // remove listeners if needed\n if (obj.pointer && !conf.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners();\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n beforeRenderCallbacks = [];\n window.removeEventListener('resize', onResize);\n if (obj.pointer) obj.pointer.removeListeners();\n if (obj.orbitCtrl) obj.orbitCtrl.dispose();\n if (obj.renderer) obj.renderer.dispose();\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (conf.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight);\n } else {\n const elt = obj.renderer.domElement.parentNode;\n setSize(elt.clientWidth, elt.clientHeight);\n }\n afterResizeCallbacks.forEach(c => c());\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width, height) {\n size.width = width;\n size.height = height;\n size.ratio = width / height;\n\n obj.renderer.setSize(width, height, false);\n obj.camera.aspect = size.ratio;\n obj.camera.updateProjectionMatrix();\n\n if (obj.composer) {\n obj.composer.setSize(width, height);\n }\n\n if (obj.camera.type === 'OrthographicCamera') {\n size.wWidth = obj.camera.right - obj.camera.left;\n size.wHeight = obj.camera.top - obj.camera.bottom;\n } else {\n const wsize = getCameraSize();\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }\n\n return obj;\n}\n","import { defineComponent, h } from 'vue';\nimport useThree from './useThree';\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object], default: false },\n pointer: { type: [Boolean, Object], default: false },\n resize: { type: [Boolean, String], default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n },\n setup() {\n return {\n three: useThree(),\n raf: true,\n onMountedCallbacks: [],\n beforeRenderCallbacks: [],\n afterRenderCallbacks: [],\n };\n },\n provide() {\n return {\n three: this.three,\n // renderer: this.three.renderer,\n rendererComponent: this,\n };\n },\n mounted() {\n const params = {\n canvas: this.$el,\n antialias: this.antialias,\n alpha: this.alpha,\n autoClear: this.autoClear,\n orbit_ctrl: this.orbitCtrl,\n pointer: this.pointer,\n resize: this.resize,\n width: this.width,\n height: this.height,\n };\n\n if (this.three.init(params)) {\n this.renderer = this.three.renderer;\n this.renderer.shadowMap.enabled = this.shadow;\n\n this._render = this.three.composer ? this.three.renderC : this.three.render;\n\n if (this.xr) {\n this.renderer.xr.enabled = true;\n this.renderer.setAnimationLoop(this.render);\n } else {\n requestAnimationFrame(this.renderLoop);\n }\n };\n\n this.onMountedCallbacks.forEach(c => c());\n },\n beforeUnmount() {\n this.beforeRenderCallbacks = [];\n this.afterRenderCallbacks = [];\n this.raf = false;\n this.three.dispose();\n },\n methods: {\n onMounted(cb) {\n this.onMountedCallbacks.push(cb);\n },\n onBeforeRender(cb) {\n this.beforeRenderCallbacks.push(cb);\n },\n offBeforeRender(cb) {\n this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb);\n },\n onAfterRender(cb) {\n this.afterRenderCallbacks.push(cb);\n },\n offAfterRender(cb) {\n this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb);\n },\n onAfterResize(cb) {\n this.three.onAfterResize(cb);\n },\n offAfterResize(cb) {\n this.three.offAfterResize(cb);\n },\n render(time) {\n this.beforeRenderCallbacks.forEach(c => c({ time }));\n this._render();\n this.afterRenderCallbacks.forEach(c => c({ time }));\n },\n renderLoop(time) {\n if (this.raf) requestAnimationFrame(this.renderLoop);\n this.render(time);\n },\n },\n render() {\n return h('canvas', {}, this.$slots.default());\n },\n __hmrId: 'Renderer',\n});\n","import { toRef, watch } from 'vue';\n\nexport function setFromProp(o, prop) {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value;\n });\n }\n};\n\nexport function bindProps(src, props, dst) {\n props.forEach(prop => {\n bindProp(src, prop, dst);\n });\n};\n\nexport function bindProp(src, srcProp, dst, dstProp) {\n if (!dstProp) dstProp = srcProp;\n const ref = toRef(src, srcProp);\n if (ref.value instanceof Object) {\n setFromProp(dst[dstProp], ref.value);\n watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true });\n } else {\n if (ref.value) dst[dstProp] = src[srcProp];\n watch(ref, (value) => { dst[dstProp] = value; });\n }\n};\n\nexport function propsValues(props, exclude) {\n const values = {};\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value;\n }\n });\n return values;\n};\n\nexport function lerp(value1, value2, amount) {\n amount = amount < 0 ? 0 : amount;\n amount = amount > 1 ? 1 : amount;\n return value1 + (value2 - value1) * amount;\n};\n\nexport function lerpv2(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n};\n\nexport function lerpv3(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n v1.z = lerp(v1.z, v2.z, amount);\n};\n\nexport function limit(val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\nexport function getMatcapUrl(hash, format = 1024) {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`;\n return `${MATCAP_ROOT}/${format}/${fileName}`;\n};\n\nfunction getMatcapFormatString(format) {\n switch (format) {\n case 64:\n return '-64px';\n case 128:\n return '-128px';\n case 256:\n return '-256px';\n case 512:\n return '-512px';\n default:\n return '';\n }\n}\n","import { defineComponent } from 'vue';\n// import Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n // TODO: eventually extend Object3D, for now: error 'injection \"scene\" not found'\n // because camera is a sibling of scene in Trois\n // extends: Object3D,\n inject: ['three'],\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { OrthographicCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n inject: ['three'],\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n },\n created() {\n this.camera = new OrthographicCamera(this.left, this.right, this.top, this.bottom, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'OrthographicCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { PerspectiveCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n inject: ['three'],\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n lookAt: { type: Object, default: null },\n },\n created() {\n this.camera = new PerspectiveCamera(this.fov, this.aspect, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n ['aspect', 'far', 'fov', 'near'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'PerspectiveCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n name: 'Object3D',\n inject: ['three', 'scene', 'rendererComponent'],\n emits: ['created', 'ready'],\n props: {\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n rotation: { type: Object, default: { x: 0, y: 0, z: 0 } },\n scale: { type: Object, default: { x: 1, y: 1, z: 1 } },\n lookAt: { type: Object, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.autoRemove) this.removeFromParent();\n },\n methods: {\n initObject3D(o3d) {\n this.o3d = o3d;\n this.o3d.userData = this.userData;\n this.$emit('created', this.o3d);\n\n bindProp(this, 'position', this.o3d);\n bindProp(this, 'rotation', this.o3d);\n bindProp(this, 'scale', this.o3d);\n\n // TODO : fix lookat.x\n if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n this._parent = this.getParent();\n if (this.addToParent()) this.$emit('ready', this);\n else console.error('Missing parent (Scene, Group...)');\n },\n getParent() {\n let parent = this.$parent;\n while (parent) {\n if (parent.add) return parent;\n parent = parent.$parent;\n }\n return false;\n },\n addToParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.add(o3d);\n return true;\n }\n return false;\n },\n removeFromParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.remove(o3d);\n return true;\n }\n return false;\n },\n add(o) { this.o3d.add(o); },\n remove(o) { this.o3d.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Object3D',\n});\n","import { defineComponent } from 'vue';\nimport { Group } from 'three';\nimport Object3D from './Object3D.js';\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n created() {\n this.group = new Group();\n this.initObject3D(this.group);\n },\n __hmrId: 'Group',\n});\n","import { defineComponent, watch } from 'vue';\nimport { Scene, Color } from 'three';\n\nexport default defineComponent({\n name: 'Scene',\n inject: ['three'],\n props: {\n id: String,\n background: [String, Number],\n },\n setup(props) {\n const scene = new Scene();\n if (props.background) scene.background = new Color(props.background);\n watch(() => props.background, (value) => { scene.background.set(value); });\n return { scene };\n },\n provide() {\n return {\n scene: this.scene,\n };\n },\n mounted() {\n if (!this.three.scene) {\n this.three.scene = this.scene;\n }\n },\n methods: {\n add(o) { this.scene.add(o); },\n remove(o) { this.scene.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Scene',\n});\n","import { defineComponent } from 'vue';\r\nimport usePointer from './usePointer';\r\n\r\nexport default defineComponent({\r\n name: 'Raycaster',\r\n inject: ['three', 'rendererComponent'],\r\n props: {\r\n onPointerEnter: { type: Function, default: () => {} },\r\n onPointerOver: { type: Function, default: () => {} },\r\n onPointerMove: { type: Function, default: () => {} },\r\n onPointerLeave: { type: Function, default: () => {} },\r\n onClick: { type: Function, default: () => {} },\r\n intersectMode: { type: String, default: 'move' },\r\n },\r\n mounted() {\r\n this.rendererComponent.onMounted(() => {\r\n this.pointer = usePointer({\r\n camera: this.three.camera,\r\n domElement: this.three.renderer.domElement,\r\n intersectObjects: this.getIntersectObjects(),\r\n onIntersectEnter: this.onPointerEnter,\r\n onIntersectOver: this.onPointerOver,\r\n onIntersectMove: this.onPointerMove,\r\n onIntersectLeave: this.onPointerLeave,\r\n onIntersectClick: this.onClick,\r\n });\r\n this.pointer.addListeners();\r\n\r\n if (this.intersectMode === 'frame') {\r\n this.rendererComponent.onBeforeRender(this.pointer.intersect);\r\n }\r\n });\r\n },\r\n unmounted() {\r\n if (this.pointer) {\r\n this.pointer.removeListeners();\r\n this.rendererComponent.offBeforeRender(this.pointer.intersect);\r\n }\r\n },\r\n methods: {\r\n getIntersectObjects() {\r\n return this.three.scene.children.filter(e => e.type === 'Mesh');\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n __hmrId: 'Raycaster',\r\n});\r\n","import { defineComponent, watch } from 'vue';\n\nconst Geometry = defineComponent({\n inject: ['mesh'],\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh');\n }\n\n this.watchProps = [];\n Object.entries(this.$props).forEach(e => this.watchProps.push(e[0]));\n\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n\n this.addWatchers();\n },\n unmounted() {\n this.geometry.dispose();\n },\n methods: {\n addWatchers() {\n this.watchProps.forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n rotateGeometry() {\n if (this.rotateX) this.geometry.rotateX(this.rotateX);\n if (this.rotateY) this.geometry.rotateY(this.rotateY);\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ);\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n oldGeo.dispose();\n },\n },\n render() { return []; },\n});\n\nexport default Geometry;\n\nexport function geometryComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n });\n};\n","import { geometryComponent } from './Geometry.js';\nimport { BoxGeometry } from 'three';\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n }\n};\n\nexport default geometryComponent('BoxGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CircleGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CircleGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { ConeGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('ConeGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CylinderGeometry } from 'three';\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { DodecahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new DodecahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { IcosahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new IcosahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { LatheGeometry } from 'three';\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength);\n};\n\nexport default geometryComponent('LatheGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { OctahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new OctahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PlaneGeometry } from 'three';\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PolyhedronGeometry } from 'three';\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail);\n};\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { RingGeometry } from 'three';\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('RingGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { SphereGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n};\n\nexport function createGeometry(comp) {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('SphereGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TetrahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new TetrahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc);\n};\n\nexport default geometryComponent('TorusGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusKnotGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n};\n\nexport function createGeometry(comp) {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q);\n};\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three';\nimport Geometry from './Geometry.js';\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n};\n\nexport function createGeometry(comp) {\n let curve;\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points);\n } else if (comp.path) {\n curve = comp.path;\n } else {\n console.error('Missing path curve or points.');\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed);\n};\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n});\n\nexport function updateTubeGeometryPoints(tube, points) {\n const curve = new CatmullRomCurve3(points);\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters;\n const frames = curve.computeFrenetFrames(tubularSegments, closed);\n tube.tangents = frames.tangents;\n tube.normals = frames.normals;\n tube.binormals = frames.binormals;\n tube.parameters.path = curve;\n\n const pArray = tube.attributes.position.array;\n const nArray = tube.attributes.normal.array;\n const normal = new Vector3();\n let P;\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i);\n }\n updateSegment(tubularSegments);\n\n tube.attributes.position.needsUpdate = true;\n tube.attributes.normal.needsUpdate = true;\n\n function updateSegment(i) {\n P = curve.getPointAt(i / tubularSegments, P);\n const N = frames.normals[i];\n const B = frames.binormals[i];\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n normal.x = (cos * N.x + sin * B.x);\n normal.y = (cos * N.y + sin * B.y);\n normal.z = (cos * N.z + sin * B.z);\n normal.normalize();\n const index = (i * (radialSegments + 1) + j) * 3;\n nArray[index] = normal.x;\n nArray[index + 1] = normal.y;\n nArray[index + 2] = normal.z;\n pArray[index] = P.x + radius * normal.x;\n pArray[index + 1] = P.y + radius * normal.y;\n pArray[index + 2] = P.z + radius * normal.z;\n }\n }\n}\n","import { defineComponent, watch } from 'vue';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp, setFromProp } from '../tools';\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object, default: { x: 512, y: 512 } },\n shadowCamera: { type: Object, default: {} },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.light.target) this.removeFromParent(this.light.target);\n },\n methods: {\n initLight() {\n if (this.light.target) {\n bindProp(this, 'target', this.light.target, 'position');\n }\n\n if (this.light.shadow) {\n this.light.castShadow = this.castShadow;\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\n setFromProp(this.light.shadow.camera, this.shadowCamera);\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.light.color.set(this.color);\n } else {\n this.light[p] = this[p];\n }\n });\n });\n\n this.initObject3D(this.light);\n if (this.light.target) this.addToParent(this.light.target);\n },\n },\n __hmrId: 'Light',\n});\n","import { defineComponent } from 'vue';\nimport { AmbientLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.light = new AmbientLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'AmbientLight',\n});\n","import { defineComponent } from 'vue';\nimport { DirectionalLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: Object,\n },\n created() {\n this.light = new DirectionalLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'DirectionalLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HemisphereLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);\n watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); });\n this.initLight();\n },\n __hmrId: 'HemisphereLight',\n});\n","import { defineComponent } from 'vue';\nimport { PointLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: {\n type: Number,\n default: 0,\n },\n decay: {\n type: Number,\n default: 1,\n },\n },\n created() {\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\n this.initLight();\n },\n __hmrId: 'PointLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { RectAreaLight } from 'three';\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js';\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init();\n this.light = new RectAreaLight(this.color, this.intensity, this.width, this.height);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n\n if (this.helper) {\n this.lightHelper = new RectAreaLightHelper(this.light);\n this.light.add(this.lightHelper);\n }\n\n this.initLight();\n },\n unmounted() {\n if (this.lightHelper) this.removeFromParent(this.lightHelper);\n },\n __hmrId: 'RectAreaLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { SpotLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\n ['angle', 'decay', 'distance', 'penumbra'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n this.initLight();\n },\n __hmrId: 'SpotLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { FrontSide } from 'three';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n\n this._addWatchers();\n if (this.addWatchers) this.addWatchers();\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n setProp(key, value, needsUpdate = false) {\n this.material[key] = value;\n this.material.needsUpdate = needsUpdate;\n },\n setTexture(texture, key = 'map') {\n this.setProp(key, texture, true);\n },\n _addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.material.color.set(this.color);\n } else {\n this.material[p] = this[p];\n }\n });\n });\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Material',\n});\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n};\n","import { defineComponent } from 'vue';\nimport { MeshBasicMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshBasicMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'BasicMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshLambertMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshLambertMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'LambertMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshMatcapMaterial, TextureLoader } from 'three';\nimport { propsValues, getMatcapUrl } from '../tools';\nimport Material from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: String,\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.name ? getMatcapUrl(this.name) : this.src;\n const opts = propsValues(this.$props, ['src', 'name']);\n opts.matcap = new TextureLoader().load(src);\n this.material = new MeshMatcapMaterial(opts);\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'MatcapMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshPhongMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhongMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO : handle flatShading ?\n ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => {\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'PhongMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshStandardMaterial } from 'three';\nimport { bindProp, bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object, default: { x: 1, y: 1 } },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n};\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']));\n },\n addWatchers() {\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return;\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProp(this, 'normalScale', this.material);\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'StandardMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshPhysicalMaterial } from 'three';\nimport { propsValues } from '../tools';\nimport StandardMaterial from './StandardMaterial';\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhysicalMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'PhysicalMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ShaderMaterial } from 'three';\nimport { propsValues } from '../tools';\n\nconst defaultVertexShader = `\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}`;\n\nconst defaultFragmentShader = `\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}`;\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n uniforms: { type: Object, default: () => { return {}; } },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n ['vertexShader', 'fragmentShader'].forEach(p => {\n watch(() => this[p], () => {\n // recreate material if we change either shader\n this.material.dispose();\n this.createMaterial();\n });\n });\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n this.material = new ShaderMaterial(propsValues(this.$props));\n this.mesh.setMaterial(this.material);\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'ShaderMaterial',\n});\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three';\n\nfunction replaceAll(string, find, replace) {\n return string.split(find).join(replace);\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'));\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'));\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n};\n\nexport default SubsurfaceScatteringShader;\n","import { defineComponent } from 'vue';\nimport { Color, ShaderMaterial as TShaderMaterial, UniformsUtils } from 'three';\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader.js';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: String, default: '#ffffff' },\n thicknessColor: { type: String, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n transparent: { type: Boolean, default: false },\n opacity: { type: Number, default: 1 },\n vertexColors: { type: Boolean, default: false },\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader;\n const uniforms = UniformsUtils.clone(params.uniforms);\n\n Object.entries(this.$props).forEach(([key, value]) => {\n let _key = key, _value = value;\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse';\n _value = new Color(value);\n }\n if (!['transparent', 'vertexColors'].includes(key)) {\n uniforms[_key].value = _value;\n }\n });\n\n this.material = new TShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n });\n },\n },\n render() {\n return [];\n },\n __hmrId: 'SubSurfaceMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshToonMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshToonMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'ToonMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, TextureLoader, UVMapping } from 'three';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n name: { type: String, default: 'map' },\n uniform: { type: String, default: null },\n src: String,\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object, default: { x: 1, y: 1 } },\n rotation: { type: Number, default: 0 },\n center: { type: Object, default: { x: 0, y: 0 } },\n },\n created() {\n this.refreshTexture();\n watch(() => this.src, this.refreshTexture);\n },\n unmounted() {\n if (this.material && this.material.setTexture) this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError);\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center'];\n wathProps.forEach(prop => {\n bindProp(this, prop, this.texture);\n });\n },\n refreshTexture() {\n this.createTexture();\n // handle standard material\n if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); }\n // handle shader material\n else if (this.material && this.material.material.type === \"ShaderMaterial\") {\n // require a `uniform` prop so we know what to call the uniform\n if (!this.uniform) {\n console.warn('\"uniform\" prop required to use texture in a shader.')\n return\n }\n this.material.uniforms[this.uniform] = { value: this.texture };\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() { return []; },\n});\n","import { defineComponent, watch } from 'vue';\nimport { CubeTextureLoader, CubeRefractionMapping } from 'three';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n path: String,\n urls: {\n type: Array,\n default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n name: { type: String, default: 'envMap' },\n refraction: Boolean,\n // todo: remove ?\n refractionRatio: { type: Number, default: 0.98 },\n },\n created() {\n this.refreshTexture();\n watch(() => this.path, this.refreshTexture);\n watch(() => this.urls, this.refreshTexture);\n },\n unmounted() {\n this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError);\n },\n refreshTexture() {\n this.createTexture();\n this.material.setTexture(this.texture, this.name);\n if (this.refraction) {\n this.texture.mapping = CubeRefractionMapping;\n this.material.setProp('refractionRatio', this.refractionRatio);\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() {\n return [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { Mesh as TMesh } from 'three';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp } from '../tools';\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n};\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n provide() {\n return {\n mesh: this,\n };\n },\n mounted() {\n if (!this.mesh && !this.loading) this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new TMesh(this.geometry, this.material);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n addGeometryWatchers(props) {\n Object.keys(props).forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n if (this.mesh) this.mesh.material = material;\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.mesh.geometry = this.geometry;\n oldGeo.dispose();\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n // for predefined mesh (geometry is not unmounted)\n if (this.geometry) this.geometry.dispose();\n },\n __hmrId: 'Mesh',\n});\n\nexport default Mesh;\n\nexport function meshComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n __hmrId: name,\n });\n};\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/BoxGeometry.js';\n\nexport default meshComponent('Box', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CircleGeometry.js';\n\nexport default meshComponent('Circle', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/ConeGeometry.js';\n\nexport default meshComponent('Cone', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CylinderGeometry.js';\n\nexport default meshComponent('Cylinder', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry.js';\n\nexport default meshComponent('Dodecahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry.js';\n\nexport default meshComponent('Icosahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/LatheGeometry.js';\n\nexport default meshComponent('Lathe', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/OctahedronGeometry.js';\n\nexport default meshComponent('Octahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PlaneGeometry.js';\n\nexport default meshComponent('Plane', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry.js';\n\nexport default meshComponent('Polyhedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/RingGeometry.js';\n\nexport default meshComponent('Ring', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/SphereGeometry.js';\n\nexport default meshComponent('Sphere', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry.js';\n\nexport default meshComponent('Tetrahedron', props, createGeometry);\n","import { defineComponent, watch } from 'vue';\nimport { FontLoader, TextGeometry } from 'three';\nimport Mesh from './Mesh.js';\n\nconst props = {\n text: String,\n fontSrc: String,\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String], default: false },\n};\n\nexport default defineComponent({\n extends: Mesh,\n props,\n data() {\n return {\n loading: true,\n };\n },\n created() {\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ];\n watchProps.forEach(p => {\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry();\n });\n });\n\n const loader = new FontLoader();\n loader.load(this.fontSrc, (font) => {\n this.loading = false;\n this.font = font;\n this.createGeometry();\n this.initMesh();\n });\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n });\n\n if (this.align === 'center') {\n this.geometry.center();\n }\n },\n },\n});\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusGeometry.js';\n\nexport default meshComponent('Torus', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry.js';\n\nexport default meshComponent('TorusKnot', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport Mesh from './Mesh.js';\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js';\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update curve points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n __hmrId: 'Tube',\n});\n","import { defineComponent, watch } from 'vue';\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, TextureLoader } from 'three';\nimport Mesh from './Mesh.js';\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: String,\n width: Number,\n height: Number,\n keepSize: Boolean,\n },\n created() {\n this.createGeometry();\n this.createMaterial();\n this.initMesh();\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], this.resize);\n });\n\n if (this.keepSize) this.three.onAfterResize(this.resize);\n },\n methods: {\n createGeometry() {\n this.geometry = new PlaneGeometry(1, 1, 1, 1);\n },\n createMaterial() {\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });\n },\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded);\n },\n refreshTexture() {\n if (this.texture) this.texture.dispose();\n this.material.map = this.loadTexture();\n this.material.needsUpdate = true;\n },\n onLoaded(texture) {\n this.texture = texture;\n this.resize();\n this.$emit('loaded');\n },\n resize() {\n if (!this.texture) return;\n const screen = this.three.size;\n const iW = this.texture.image.width;\n const iH = this.texture.image.height;\n const iRatio = iW / iH;\n let w, h;\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width;\n h = this.height * screen.wHeight / screen.height;\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width;\n h = w / iRatio;\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height;\n w = h * iRatio;\n }\n this.mesh.scale.x = w;\n this.mesh.scale.y = h;\n },\n },\n __hmrId: 'Image',\n});\n","import { defineComponent } from 'vue';\nimport { InstancedMesh } from 'three';\nimport Object3D from '../core/Object3D';\nimport { bindProp } from '../tools';\nimport { pointerProps } from './Mesh';\n\nexport default defineComponent({\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n count: Number,\n ...pointerProps,\n },\n provide() {\n return {\n mesh: this,\n };\n },\n beforeMount() {\n if (!this.$slots.default) {\n console.error('Missing Geometry');\n }\n },\n mounted() {\n this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n this.material.instancingColor = true;\n if (this.mesh) this.mesh.material = material;\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n },\n __hmrId: 'InstancedMesh',\n});\n","import { defineComponent } from 'vue';\nimport { Sprite, SpriteMaterial, TextureLoader } from 'three';\nimport Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: String,\n },\n data() {\n return {\n loading: true,\n };\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded);\n this.material = new SpriteMaterial({ map: this.texture });\n this.sprite = new Sprite(this.material);\n this.geometry = this.sprite.geometry;\n this.initObject3D(this.sprite);\n },\n unmounted() {\n this.texture.dispose();\n this.material.dispose();\n },\n methods: {\n onLoaded() {\n this.loading = false;\n this.updateUV();\n this.$emit('loaded');\n },\n updateUV() {\n this.iWidth = this.texture.image.width;\n this.iHeight = this.texture.image.height;\n this.iRatio = this.iWidth / this.iHeight;\n\n let x = 0.5, y = 0.5;\n if (this.iRatio > 1) {\n y = 0.5 / this.iRatio;\n } else {\n x = 0.5 / this.iRatio;\n }\n\n const positions = this.geometry.attributes.position.array;\n positions[0] = -x; positions[1] = -y;\n positions[5] = x; positions[6] = -y;\n positions[10] = x; positions[11] = y;\n positions[15] = -x; positions[16] = y;\n this.geometry.attributes.position.needsUpdate = true;\n },\n },\n __hmrId: 'Sprite',\n});\n","import { defineComponent } from 'vue';\r\nimport Object3D from '../core/Object3D.js';\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n emits: ['load', 'progress', 'error'],\r\n data() {\r\n return {\r\n progress: 0,\r\n };\r\n },\r\n methods: {\r\n onLoad(model) {\r\n this.$emit('load', model);\r\n this.initObject3D(model);\r\n },\r\n onProgress(progress) {\r\n this.progress = progress.loaded / progress.total;\r\n this.$emit('progress', progress);\r\n },\r\n onError(error) {\r\n this.$emit('error', error);\r\n },\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new GLTFLoader();\r\n loader.load(this.src, (gltf) => {\r\n this.onLoad(gltf.scene);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new FBXLoader();\r\n loader.load(this.src, (fbx) => {\r\n this.onLoad(fbx);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\n\nexport default defineComponent({\n setup() {\n return {\n passes: [],\n };\n },\n inject: ['three'],\n provide() {\n return {\n passes: this.passes,\n };\n },\n mounted() {\n this.three.onAfterInit(() => {\n this.composer = new EffectComposer(this.three.renderer);\n this.three.renderer.autoClear = false;\n this.passes.forEach(pass => {\n this.composer.addPass(pass);\n });\n this.three.composer = this.composer;\n\n this.resize();\n this.three.onAfterResize(this.resize);\n });\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n this.composer.setSize(this.three.size.width, this.three.size.height);\n },\n },\n render() {\n return this.$slots.default();\n },\n __hmrId: 'EffectComposer',\n});\n","import { defineComponent } from 'vue';\n\nexport default defineComponent({\n inject: ['three', 'passes'],\n emits: ['ready'],\n beforeMount() {\n if (!this.passes) {\n console.error('Missing parent EffectComposer');\n }\n },\n unmounted() {\n if (this.pass.dispose) this.pass.dispose();\n },\n methods: {\n completePass(pass) {\n this.passes.push(pass);\n this.pass = pass;\n this.$emit('ready', pass);\n },\n },\n render() {\n return [];\n },\n __hmrId: 'EffectPass',\n});\n","import { defineComponent } from 'vue';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const pass = new RenderPass(this.three.scene, this.three.camera);\n this.completePass(pass);\n },\n __hmrId: 'RenderPass',\n});\n","import { defineComponent } from 'vue';\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n focus: {\n type: Number,\n default: 1,\n },\n aperture: {\n type: Number,\n default: 0.025,\n },\n maxblur: {\n type: Number,\n default: 0.01,\n },\n },\n watch: {\n focus() { this.pass.uniforms.focus.value = this.focus; },\n aperture() { this.pass.uniforms.aperture.value = this.aperture; },\n maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; },\n },\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.three.size.width,\n height: this.three.size.height,\n };\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\n this.completePass(pass);\n },\n __hmrId: 'BokehPass',\n});\n","import { defineComponent } from 'vue';\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n },\n watch: {\n noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; },\n scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; },\n scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; },\n grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; },\n },\n mounted() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale);\n this.completePass(pass);\n },\n __hmrId: 'FilmPass',\n});\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n const pass = new ShaderPass(FXAAShader);\n this.completePass(pass);\n\n // resize will be called in three init\n this.three.onAfterResize(this.resize);\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n const { resolution } = this.pass.material.uniforms;\n resolution.value.x = 1 / this.three.size.width;\n resolution.value.y = 1 / this.three.size.height;\n },\n },\n __hmrId: 'FXAAPass',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n },\n mounted() {\n const pass = new HalftonePass(this.three.size.width, this.three.size.height, {});\n\n ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => {\n pass.uniforms[p].value = this[p];\n watch(() => this[p], () => {\n pass.uniforms[p].value = this[p];\n });\n });\n\n this.completePass(pass);\n },\n __hmrId: 'HalftonePass',\n});\n","import { defineComponent } from 'vue';\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n // three size is not set yet, but this pass will be resized by effect composer\n const pass = new SMAAPass(this.three.size.width, this.three.size.height);\n this.completePass(pass);\n },\n __hmrId: 'SMAAPass',\n});\n","import { defineComponent } from 'vue';\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n scene: null,\n camera: null,\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n mounted() {\n const pass = new SSAOPass(\n this.scene || this.three.scene,\n this.camera || this.three.camera,\n this.three.size.width,\n this.three.size.height\n );\n\n for (const key of Object.keys(this.options)) {\n pass[key] = this.options[key];\n }\n\n this.completePass(pass);\n },\n __hmrId: 'SSAOPass',\n});\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n};\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent, watch } from 'vue';\nimport { Vector2 } from 'three';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport TiltShift from '../shaders/TiltShift.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object, default: { x: 0, y: 100 } },\n end: { type: Object, default: { x: 10, y: 100 } },\n },\n mounted() {\n this.pass = new ShaderPass(TiltShift);\n this.passes.push(this.pass);\n\n this.pass1 = new ShaderPass(TiltShift);\n this.passes.push(this.pass1);\n\n const uniforms = this.uniforms = this.pass.uniforms;\n const uniforms1 = this.uniforms1 = this.pass1.uniforms;\n uniforms1.blurRadius = uniforms.blurRadius;\n uniforms1.gradientRadius = uniforms.gradientRadius;\n uniforms1.start = uniforms.start;\n uniforms1.end = uniforms.end;\n uniforms1.texSize = uniforms.texSize;\n\n bindProp(this, 'blurRadius', uniforms.blurRadius, 'value');\n bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value');\n\n this.updateFocusLine();\n ['start', 'end'].forEach(p => {\n watch(() => this[p], this.updateFocusLine, { deep: true });\n });\n\n this.pass.setSize = (width, height) => {\n uniforms.texSize.value.set(width, height);\n };\n\n // emit ready event with two passes - do so manually in this file instead\n // of calling `completePass` like in other effect types\n this.$emit('ready', [this.pass, this.pass1]);\n },\n methods: {\n updateFocusLine() {\n this.uniforms.start.value.copy(this.start);\n this.uniforms.end.value.copy(this.end);\n const dv = new Vector2().copy(this.end).sub(this.start).normalize();\n this.uniforms.delta.value.copy(dv);\n this.uniforms1.delta.value.set(-dv.y, dv.x);\n },\n },\n __hmrId: 'TiltShiftPass',\n});\n","import { defineComponent } from 'vue';\nimport { Vector2 } from 'three';\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n },\n watch: {\n strength() { this.pass.strength = this.strength; },\n radius() { this.pass.radius = this.radius; },\n threshold() { this.pass.threshold = this.threshold; },\n },\n mounted() {\n const size = new Vector2(this.three.size.width, this.three.size.height);\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\n this.completePass(pass);\n },\n __hmrId: 'UnrealBloomPass',\n});\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport ZoomBlur from '../shaders/ZoomBlur.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object, default: { x: 0.5, y: 0.5 } },\n strength: { type: Number, default: 0.5 },\n },\n mounted() {\n const pass = new ShaderPass(ZoomBlur);\n\n const uniforms = this.uniforms = pass.uniforms;\n bindProp(this, 'center', uniforms.center, 'value');\n bindProp(this, 'strength', uniforms.strength, 'value');\n\n this.completePass(pass);\n },\n __hmrId: 'ZoomBlurPass',\n});\n","import { createApp as _createApp } from 'vue';\nimport * as TROIS from './index.js';\n\nexport const TroisJSVuePlugin = {\n install: (app) => {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ];\n\n comps.forEach(comp => {\n app.component(comp, TROIS[comp]);\n });\n },\n};\n\nexport function createApp(params) {\n return _createApp(params).use(TroisJSVuePlugin);\n};\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Group","Scene","props","createGeometry","BoxGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","ShaderMaterial","TShaderMaterial","TMesh","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;AAEe,SAAS,YAAY,CAAC,OAAO,EAAE;AAC9C,EAAE,MAAM;AACR,IAAI,MAAM;AACV,IAAI,aAAa,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACxC,GAAG,GAAG,OAAO,CAAC;AACd;AACA,EAAE,MAAM,SAAS,GAAG,IAAIA,WAAS,EAAE,CAAC;AACpC,EAAE,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;AACzC,EAAE,MAAM,KAAK,GAAG,IAAIC,OAAK,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnD;AACA,EAAE,MAAM,cAAc,GAAG,CAAC,MAAM,KAAK;AACrC,IAAI,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5C,IAA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MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB;AACA,MAAM,YAAY;AAClB,KAAK,CAAC;AACN;AACA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI;AAC1B,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACvC,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE;AACF;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,EAAE,OAAOC,WAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAClD;;;;"} \ No newline at end of file +{"version":3,"file":"trois.module.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { Camera, Intersection, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.copy(resetPosition)\n positionV3.copy(resetPositionV3)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: IntersectObject): void\n removeIntersectObject(o: IntersectObject): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: IntersectObject[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: IntersectObject) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: IntersectObject) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): void\n raf: boolean\n\n // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener(t: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n const config: ThreeConfigInterface = {\n canvas,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n // if (this.three.pointer) {\n // this.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\n // }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn()\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, PropType, watch } from 'vue'\nimport { bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (this.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: this.getIntersectObjects(),\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n },\r\n setup(props) {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => { cubeCamera.update(renderer, scene) }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera }\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport const MeshInjectionKey: InjectionKey = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {},\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { defineComponent, InjectionKey, watch } from 'vue'\nimport { FrontSide, Material, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material from './Material'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\n },\n __hmrId: 'ShaderMaterial',\n})\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, default: () => ({ x: 0, y: 0 }) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n path: { type: String, required: true },\n urls: {\n type: Array as PropType,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: CubeReflectionMapping },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Font, FontLoader, TextGeometry } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n this.initObject3D(model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Scene","Texture","Group","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","ShaderMaterial","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAI,QAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIA;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,QAAM,IAAI,QAAQ,GAAG,GAAG,IAAI;AAE9C,QAAM,iBAAiB,CAAC,WAAoB;AAC1C,cAAU,cAAc,QAAQ;AAChC,WAAO,kBAAkB,MAAM;AAC/B,cAAU,IAAI,eAAe,OAAO;AAAA;AAGtC,QAAM,YAAY,CAAC,QAAiB,YAA+B;AACjE,cAAU,cAAc,QAAQ;AAChC,WAAO,UAAU,iBAAiB;AAAA;AAGpC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;;oBCkB+B,SAAmD;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,aAAa;AAAA,IACb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AAA;AAAA;mBAKN,QAAkB;AAC1C,SAAOC,YAAW,QAAQ,IAAI;AAAA;;uBCtEyB;AACvD,QAAM,MAAyB;AAAA,IAC7B,QAAQ,IAAI;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd;AAAA,IACA;AAAA;AAEF,SAAO;AAEP,wBAAsB,QAAkC,IAAiB;AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;;;"} \ No newline at end of file diff --git a/build/trois.module.min.js b/build/trois.module.min.js index 3c92d7d..fc8e253 100644 --- a/build/trois.module.min.js +++ b/build/trois.module.min.js @@ -1,2 +1,135 @@ -import{defineComponent as e,h as t,toRef as r,watch as s,createApp as i}from"vue";import{Vector3 as a,Raycaster as n,Plane as o,Vector2 as h,InstancedMesh as d,WebGLRenderer as l,OrthographicCamera as m,PerspectiveCamera as u,Group as c,Scene as p,Color as f,BoxGeometry as g,CircleGeometry as y,ConeGeometry as b,CylinderGeometry as v,DodecahedronGeometry as S,IcosahedronGeometry as x,LatheGeometry as w,OctahedronGeometry as P,PlaneGeometry as N,PolyhedronGeometry as M,RingGeometry as C,SphereGeometry as L,TetrahedronGeometry as _,TorusGeometry as j,TorusKnotGeometry as z,TubeGeometry as I,Curve as O,CatmullRomCurve3 as G,AmbientLight as k,DirectionalLight as E,HemisphereLight as R,PointLight as A,RectAreaLight as T,SpotLight as B,FrontSide as F,MeshBasicMaterial as D,MeshLambertMaterial as U,TextureLoader as $,MeshMatcapMaterial as W,MeshPhongMaterial as H,MeshStandardMaterial as X,MeshPhysicalMaterial as V,ShaderMaterial as K,ShaderChunk as Z,UniformsUtils as Y,ShaderLib as q,MeshToonMaterial as J,UVMapping as Q,ClampToEdgeWrapping as ee,LinearFilter as te,LinearMipmapLinearFilter as re,CubeTextureLoader as se,CubeRefractionMapping as ie,Mesh as ae,FontLoader as ne,TextGeometry as oe,DoubleSide as he,SpriteMaterial as de,Sprite as le}from"three";import{OrbitControls as me}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as ue}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as ce}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as pe}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as fe}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ge}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ye}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as be}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as ve}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as Se}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as xe}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as we}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Pe}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ne}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Me}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Ce(e){const{camera:t,domElement:r,intersectObjects:s,touch:i=!0,resetOnEnd:l=!1,resetPosition:m=new h(0,0),resetPositionV3:u=new a(0,0,0),onEnter:c=(()=>{}),onMove:p=(()=>{}),onLeave:f=(()=>{}),onIntersectEnter:g=(()=>{}),onIntersectOver:y=(()=>{}),onIntersectMove:b=(()=>{}),onIntersectLeave:v=(()=>{}),onIntersectClick:S=(()=>{})}=e,x=m.clone(),w=new h(0,0),P=function(e){const{camera:t,resetPosition:r=new a(0,0,0)}=e,s=new n,i=r.clone(),h=new o(new a(0,0,1),0);return{position:i,updatePosition:e=>{s.setFromCamera(e,t),t.getWorldDirection(h.normal),s.ray.intersectPlane(h,i)},intersect:(e,r)=>(s.setFromCamera(e,t),s.intersectObjects(r))}}({camera:t}),N=P.position,M={position:x,positionN:w,positionV3:N,intersectObjects:s,listeners:!1,addListeners:function(){r.addEventListener("mouseenter",_),r.addEventListener("mousemove",j),r.addEventListener("mouseleave",I),r.addEventListener("click",z),i&&(r.addEventListener("touchstart",_),r.addEventListener("touchmove",j),r.addEventListener("touchend",I));M.listeners=!0},removeListeners:function(){r.removeEventListener("mouseenter",_),r.removeEventListener("mousemove",j),r.removeEventListener("mouseleave",I),r.removeEventListener("click",z),r.removeEventListener("touchstart",_),r.removeEventListener("touchmove",j),r.removeEventListener("touchend",I),M.listeners=!1},intersect:L};return M;function C(e){let t,s;e.touches&&e.touches.length>0?(t=e.touches[0].clientX,s=e.touches[0].clientY):(t=e.clientX,s=e.clientY);const i=r.getBoundingClientRect();x.x=t-i.left,x.y=s-i.top,w.x=x.x/i.width*2-1,w.y=-x.y/i.height*2+1,P.updatePosition(w)}function L(){if(s.length){const e=P.intersect(w,s),t=[...s],r=[];e.forEach((e=>{const{object:s}=e,{component:i}=s;if(s instanceof d){if(-1!==r.indexOf(s))return;r.push(s)}if(!s.over){s.over=!0;const t={type:"pointerover",over:!0,component:i,intersect:e},r={...t,type:"pointerenter"};y(t),g(r),i.onPointerOver?.(t),i.onPointerEnter?.(r)}const a={type:"pointermove",component:i,intersect:e};b(a),i.onPointerMove?.(a),t.splice(t.indexOf(s),1)})),t.forEach((e=>{const{component:t}=e;if(e.over){e.over=!1;const r={type:"pointerover",over:!1,component:t},s={...r,type:"pointerleave"};y(r),v(s),t.onPointerOver?.(r),t.onPointerLeave?.(s)}}))}}function _(e){C(e),c({type:"pointerenter",position:x,positionN:w,positionV3:N})}function j(e){C(e),p({type:"pointermove",position:x,positionN:w,positionV3:N}),L()}function z(e){if(C(e),s.length){const e=P.intersect(w,s),t=[];e.forEach((e=>{const{object:r}=e,{component:s}=r;if(r instanceof d){if(-1!==t.indexOf(r))return;t.push(r)}const i={type:"click",component:s,intersect:e};S(i),s.onClick?.(i)}))}}function I(){l&&(x.copy(m),N.copy(u)),f({type:"pointerleave"})}}function Le(){const e={canvas:null,antialias:!0,alpha:!1,autoClear:!0,orbit_ctrl:!1,pointer:!1,resize:!1,width:300,height:150},t={width:1,height:1,wWidth:1,wHeight:1,ratio:1},r=[];let s=[],i=[];const a=[],n={conf:e,renderer:null,camera:null,cameraCtrl:null,scene:null,pointer:null,size:t,init:function(t){t&&Object.entries(t).forEach((([t,r])=>{e[t]=r}));if(!n.scene)return void console.error("Missing Scene");if(!n.camera)return void console.error("Missing Camera");n.renderer=new l({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),n.renderer.autoClear=e.autoClear,e.resize?(h(),window.addEventListener("resize",h)):d(e.width,e.height);o(),e.orbit_ctrl&&(n.orbitCtrl=new me(n.camera,n.renderer.domElement),e.orbit_ctrl instanceof Object&&Object.entries(e.orbit_ctrl).forEach((([e,t])=>{n.orbitCtrl[e]=t})));return r.forEach((e=>e())),!0},dispose:function(){i=[],window.removeEventListener("resize",h),n.pointer&&n.pointer.removeListeners();n.orbitCtrl&&n.orbitCtrl.dispose();n.renderer&&n.renderer.dispose()},render:function(){n.orbitCtrl&&n.orbitCtrl.update();i.forEach((e=>e())),n.renderer.render(n.scene,n.camera)},renderC:function(){n.orbitCtrl&&n.orbitCtrl.update();i.forEach((e=>e())),n.composer.render()},setSize:d,onAfterInit:function(e){r.push(e)},onAfterResize:function(e){s.push(e)},offAfterResize:function(e){s=s.filter((t=>t!==e))},addIntersectObject:function(e){-1===a.indexOf(e)&&a.push(e);n.pointer&&!n.pointer.listeners&&n.pointer.addListeners()},removeIntersectObject:function(t){const r=a.indexOf(t);-1!==r&&a.splice(r,1);n.pointer&&!e.pointer&&0===a.length&&n.pointer.removeListeners()}};function o(){let t={camera:n.camera,domElement:n.renderer.domElement,intersectObjects:a};var r;e.pointer&&e.pointer instanceof Object&&(t={...t,...e.pointer}),n.pointer=Ce(t),(e.pointer||a.length)&&(n.pointer.addListeners(),"frame"===e.pointer.intersectMode&&(r=()=>{n.pointer.intersect()},i.push(r)))}function h(){if("window"===e.resize)d(window.innerWidth,window.innerHeight);else{const e=n.renderer.domElement.parentNode;d(e.clientWidth,e.clientHeight)}s.forEach((e=>e()))}function d(e,r){if(t.width=e,t.height=r,t.ratio=e/r,n.renderer.setSize(e,r,!1),n.camera.aspect=t.ratio,n.camera.updateProjectionMatrix(),n.composer&&n.composer.setSize(e,r),"OrthographicCamera"===n.camera.type)t.wWidth=n.camera.right-n.camera.left,t.wHeight=n.camera.top-n.camera.bottom;else{const e=function(){const e=n.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*Math.abs(n.camera.position.z);return[t*n.camera.aspect,t]}();t.wWidth=e[0],t.wHeight=e[1]}}return n}var _e=e({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean},setup:()=>({three:Le(),raf:!0,onMountedCallbacks:[],beforeRenderCallbacks:[],afterRenderCallbacks:[]}),provide(){return{three:this.three,rendererComponent:this}},mounted(){const e={canvas:this.$el,antialias:this.antialias,alpha:this.alpha,autoClear:this.autoClear,orbit_ctrl:this.orbitCtrl,pointer:this.pointer,resize:this.resize,width:this.width,height:this.height};this.three.init(e)&&(this.renderer=this.three.renderer,this.renderer.shadowMap.enabled=this.shadow,this._render=this.three.composer?this.three.renderC:this.three.render,this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.onMountedCallbacks.forEach((e=>e()))},beforeUnmount(){this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onMounted(e){this.onMountedCallbacks.push(e)},onBeforeRender(e){this.beforeRenderCallbacks.push(e)},offBeforeRender(e){this.beforeRenderCallbacks=this.beforeRenderCallbacks.filter((t=>t!==e))},onAfterRender(e){this.afterRenderCallbacks.push(e)},offAfterRender(e){this.afterRenderCallbacks=this.afterRenderCallbacks.filter((t=>t!==e))},onAfterResize(e){this.three.onAfterResize(e)},offAfterResize(e){this.three.offAfterResize(e)},render(e){this.beforeRenderCallbacks.forEach((t=>t({time:e}))),this._render(),this.afterRenderCallbacks.forEach((t=>t({time:e})))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return t("canvas",{},this.$slots.default())},__hmrId:"Renderer"});function je(e,t){t instanceof Object&&Object.entries(t).forEach((([t,r])=>{e[t]=r}))}function ze(e,t,r){t.forEach((t=>{Ie(e,t,r)}))}function Ie(e,t,i,a){a||(a=t);const n=r(e,t);n.value instanceof Object?(je(i[a],n.value),s(n,(e=>{je(i[a],e)}),{deep:!0})):(n.value&&(i[a]=e[t]),s(n,(e=>{i[a]=e})))}function Oe(e,t){const r={};return Object.entries(e).forEach((([e,s])=>{(!t||t&&!t.includes(e))&&(r[e]=s)})),r}function Ge(e,t,r){return e+(t-e)*(r=(r=r<0?0:r)>1?1:r)}function ke(e,t,r){e.x=Ge(e.x,t.x,r),e.y=Ge(e.y,t.y,r)}function Ee(e,t,r){e.x=Ge(e.x,t.x,r),e.y=Ge(e.y,t.y,r),e.z=Ge(e.z,t.z,r)}function Re(e,t,r){return er?r:e}function Ae(e,t=1024){return`https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d/${t}/${`${e}${function(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}(t)}.png`}`}var Te=e({inject:["three"],render(){return this.$slots.default?this.$slots.default():[]}}),Be=e({extends:Te,name:"OrthographicCamera",inject:["three"],props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:{x:0,y:0,z:0}}},created(){this.camera=new m(this.left,this.right,this.top,this.bottom,this.near,this.far),Ie(this,"position",this.camera),["left","right","top","bottom","near","far","zoom"].forEach((e=>{s((()=>this[e]),(()=>{this.camera[e]=this[e],this.camera.updateProjectionMatrix()}))})),this.three.camera=this.camera},__hmrId:"OrthographicCamera"}),Fe=e({extends:Te,name:"PerspectiveCamera",inject:["three"],props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:{x:0,y:0,z:0}},lookAt:{type:Object,default:null}},created(){this.camera=new u(this.fov,this.aspect,this.near,this.far),Ie(this,"position",this.camera),this.lookAt&&this.camera.lookAt(this.lookAt.x,this.lookAt.y,this.lookAt.z),s((()=>this.lookAt),(e=>{this.camera.lookAt(e.x,e.y,e.z)}),{deep:!0}),["aspect","far","fov","near"].forEach((e=>{s((()=>this[e]),(()=>{this.camera[e]=this[e],this.camera.updateProjectionMatrix()}))})),this.three.camera=this.camera},__hmrId:"PerspectiveCamera"}),De=e({name:"Object3D",inject:["three","scene","rendererComponent"],emits:["created","ready"],props:{position:{type:Object,default:{x:0,y:0,z:0}},rotation:{type:Object,default:{x:0,y:0,z:0}},scale:{type:Object,default:{x:1,y:1,z:1}},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){this.o3d=e,this.o3d.userData=this.userData,this.$emit("created",this.o3d),Ie(this,"position",this.o3d),Ie(this,"rotation",this.o3d),Ie(this,"scale",this.o3d),this.lookAt&&this.o3d.lookAt(this.lookAt.x,this.lookAt.y,this.lookAt.z),s((()=>this.lookAt),(e=>{this.o3d.lookAt(e.x,e.y,e.z)}),{deep:!0}),this._parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}return!1},addToParent(e){const t=e||this.o3d;return!!this._parent&&(this._parent.add(t),!0)},removeFromParent(e){const t=e||this.o3d;return!!this._parent&&(this._parent.remove(t),!0)},add(e){this.o3d.add(e)},remove(e){this.o3d.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),Ue=e({name:"Group",extends:De,created(){this.group=new c,this.initObject3D(this.group)},__hmrId:"Group"}),$e=e({name:"Scene",inject:["three"],props:{id:String,background:[String,Number]},setup(e){const t=new p;return e.background&&(t.background=new f(e.background)),s((()=>e.background),(e=>{t.background.set(e)})),{scene:t}},provide(){return{scene:this.scene}},mounted(){this.three.scene||(this.three.scene=this.scene)},methods:{add(e){this.scene.add(e)},remove(e){this.scene.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),We=e({name:"Raycaster",inject:["three","rendererComponent"],props:{onPointerEnter:{type:Function,default:()=>{}},onPointerOver:{type:Function,default:()=>{}},onPointerMove:{type:Function,default:()=>{}},onPointerLeave:{type:Function,default:()=>{}},onClick:{type:Function,default:()=>{}},intersectMode:{type:String,default:"move"}},mounted(){this.rendererComponent.onMounted((()=>{this.pointer=Ce({camera:this.three.camera,domElement:this.three.renderer.domElement,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),"frame"===this.intersectMode&&this.rendererComponent.onBeforeRender(this.pointer.intersect)}))},unmounted(){this.pointer&&(this.pointer.removeListeners(),this.rendererComponent.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.three.scene.children.filter((e=>"Mesh"===e.type))}},render:()=>[],__hmrId:"Raycaster"});const He=e({inject:["mesh"],props:{rotateX:Number,rotateY:Number,rotateZ:Number},created(){this.mesh||console.error("Missing parent Mesh"),this.watchProps=[],Object.entries(this.$props).forEach((e=>this.watchProps.push(e[0]))),this.createGeometry(),this.rotateGeometry(),this.mesh.setGeometry(this.geometry),this.addWatchers()},unmounted(){this.geometry.dispose()},methods:{addWatchers(){this.watchProps.forEach((e=>{s((()=>this[e]),(()=>{this.refreshGeometry()}))}))},rotateGeometry(){this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.mesh.setGeometry(this.geometry),e.dispose()}},render:()=>[]});function Xe(t,r,s){return e({name:t,extends:He,props:r,methods:{createGeometry(){this.geometry=s(this)}}})}const Ve={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function Ke(e){return e.size?new g(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new g(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ze=Xe("BoxGeometry",Ve,Ke);const Ye={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function qe(e){return new y(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Je=Xe("CircleGeometry",Ye,qe);const Qe={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function et(e){return new b(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var tt=Xe("ConeGeometry",Qe,et);const rt={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function st(e){return new v(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var it=Xe("CylinderGeometry",rt,st);const at={radius:{type:Number,default:1},detail:{type:Number,default:0}};function nt(e){return new S(e.radius,e.detail)}var ot=Xe("DodecahedronGeometry",at,nt);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new x(e.radius,e.detail)}var lt=Xe("IcosahedronGeometry",ht,dt);const mt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:2*Math.PI}};function ut(e){return new w(e.points,e.segments,e.phiStart,e.phiLength)}var ct=Xe("LatheGeometry",mt,ut);const pt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function ft(e){return new P(e.radius,e.detail)}var gt=Xe("OctahedronGeometry",pt,ft);const yt={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function bt(e){return new N(e.width,e.height,e.widthSegments,e.heightSegments)}var vt=Xe("PlaneGeometry",yt,bt);const St={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function xt(e){return new M(e.vertices,e.indices,e.radius,e.detail)}var wt=Xe("PolyhedronGeometry",St,xt);const Pt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:2*Math.PI}};function Nt(e){return new C(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var Mt=Xe("RingGeometry",Pt,Nt);const Ct={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Lt(e){return new L(e.radius,e.widthSegments,e.heightSegments)}var _t=Xe("SphereGeometry",Ct,Lt);const jt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function zt(e){return new _(e.radius,e.detail)}var It=Xe("TetrahedronGeometry",jt,zt);const Ot={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:2*Math.PI}};function Gt(e){return new j(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var kt=Xe("TorusGeometry",Ot,Gt);const Et={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function Rt(e){return new z(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var At=Xe("TorusKnotGeometry",Et,Rt);const Tt={points:Array,path:O,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function Bt(e){let t;return e.points?t=new G(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new I(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Ft=e({extends:He,props:Tt,methods:{createGeometry(){this.geometry=Bt(this)},updatePoints(e){Dt(this.geometry,e)}}});function Dt(e,t){const r=new G(t),{radialSegments:s,radius:i,tubularSegments:n,closed:o}=e.parameters,h=r.computeFrenetFrames(n,o);e.tangents=h.tangents,e.normals=h.normals,e.binormals=h.binormals,e.parameters.path=r;const d=e.attributes.position.array,l=e.attributes.normal.array,m=new a;let u;for(let e=0;e{s((()=>this[e]),(()=>{"color"===e?this.light.color.set(this.color):this.light[e]=this[e]}))})),this.initObject3D(this.light),this.light.target&&this.addToParent(this.light.target)}},__hmrId:"Light"}),$t=e({extends:Ut,created(){this.light=new k(this.color,this.intensity),this.initLight()},__hmrId:"AmbientLight"}),Wt=e({extends:Ut,props:{target:Object},created(){this.light=new E(this.color,this.intensity),this.initLight()},__hmrId:"DirectionalLight"}),Ht=e({extends:Ut,props:{groundColor:{type:String,default:"#444444"}},created(){this.light=new R(this.color,this.groundColor,this.intensity),s((()=>this.groundColor),(e=>{this.light.groundColor.set(e)})),this.initLight()},__hmrId:"HemisphereLight"}),Xt=e({extends:Ut,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.light=new A(this.color,this.intensity,this.distance,this.decay),this.initLight()},__hmrId:"PointLight"}),Vt=e({extends:Ut,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){ue.init(),this.light=new T(this.color,this.intensity,this.width,this.height),["width","height"].forEach((e=>{s((()=>this[e]),(()=>{this.light[e]=this[e]}))})),this.helper&&(this.lightHelper=new ce(this.light),this.light.add(this.lightHelper)),this.initLight()},unmounted(){this.lightHelper&&this.removeFromParent(this.lightHelper)},__hmrId:"RectAreaLight"}),Kt=e({extends:Ut,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){this.light=new B(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay),["angle","decay","distance","penumbra"].forEach((e=>{s((()=>this[e]),(()=>{this.light[e]=this[e]}))})),this.initLight()},__hmrId:"SpotLight"}),Zt=e({inject:["three","mesh"],props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:F},transparent:Boolean,vertexColors:Boolean},provide(){return{material:this}},created(){this.createMaterial(),this.mesh.setMaterial(this.material),this._addWatchers(),this.addWatchers&&this.addWatchers()},unmounted(){this.material.dispose()},methods:{setProp(e,t,r=!1){this.material[e]=t,this.material.needsUpdate=r},setTexture(e,t="map"){this.setProp(t,e,!0)},_addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach((e=>{s((()=>this[e]),(()=>{"color"===e?this.material.color.set(this.color):this.material[e]=this[e]}))}))}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const Yt={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var qt=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new D(Oe(this.$props))},addWatchers(){ze(this,Object.keys(Yt),this.material)}},__hmrId:"BasicMaterial"}),Jt=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new U(Oe(this.$props))},addWatchers(){ze(this,Object.keys(Yt),this.material)}},__hmrId:"LambertMaterial"}),Qt=e({extends:Zt,props:{src:String,name:String,flatShading:Boolean},methods:{createMaterial(){const e=this.name?Ae(this.name):this.src,t=Oe(this.$props,["src","name"]);t.matcap=(new $).load(e),this.material=new W(t)},addWatchers(){}},__hmrId:"MatcapMaterial"}),er=e({extends:Zt,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...Yt},methods:{createMaterial(){this.material=new H(Oe(this.$props))},addWatchers(){["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach((e=>{s((()=>this[e]),(t=>{"emissive"===e||"specular"===e?this.material[e].set(t):this.material[e]=t}))})),ze(this,Object.keys(Yt),this.material)}},__hmrId:"PhongMaterial"});const tr={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:{x:1,y:1}},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var rr=e({extends:Zt,props:{...tr,...Yt},methods:{createMaterial(){this.material=new X(Oe(this.$props,["normalScale"]))},addWatchers(){Object.keys(tr).forEach((e=>{"normalScale"!==e&&s((()=>this[e]),(t=>{"emissive"===e?this.material[e].set(t):this.material[e]=t}))})),Ie(this,"normalScale",this.material),ze(this,Object.keys(Yt),this.material)}},__hmrId:"StandardMaterial"}),sr=e({extends:rr,props:{flatShading:Boolean},methods:{createMaterial(){this.material=new V(Oe(this.$props))},addWatchers(){}},__hmrId:"PhysicalMaterial"});var ir=e({inject:["three","mesh"],props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:"\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}"},fragmentShader:{type:String,default:"\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}"}},provide(){return{material:this}},created(){this.createMaterial(),["vertexShader","fragmentShader"].forEach((e=>{s((()=>this[e]),(()=>{this.material.dispose(),this.createMaterial()}))}))},unmounted(){this.material.dispose()},methods:{createMaterial(){this.material=new K(Oe(this.$props)),this.mesh.setMaterial(this.material)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"ShaderMaterial"});const ar=Z.meshphong_frag.slice(0,Z.meshphong_frag.indexOf("void main() {")),nr=Z.meshphong_frag.slice(Z.meshphong_frag.indexOf("void main() {")),or={uniforms:Y.merge([q.phong.uniforms,{thicknessColor:{value:new f(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:`\n #define USE_UV\n ${Z.meshphong_vert}\n `,fragmentShader:`\n #define USE_UV\n #define SUBSURFACE\n\n ${ar}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n `+nr.replace("#include ",(hr=Z.lights_fragment_begin,dr="RE_Direct( directLight, geometry, material, reflectedLight );",lr="\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n ",hr.split(dr).join(lr)))};var hr,dr,lr,mr=e({inject:["three","mesh"],props:{color:{type:String,default:"#ffffff"},thicknessColor:{type:String,default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4},transparent:{type:Boolean,default:!1},opacity:{type:Number,default:1},vertexColors:{type:Boolean,default:!1}},created(){this.createMaterial(),this.mesh.setMaterial(this.material)},unmounted(){this.material.dispose()},methods:{createMaterial(){const e=or,t=Y.clone(e.uniforms);Object.entries(this.$props).forEach((([e,r])=>{let s=e,i=r;["color","thicknessColor"].includes(e)&&("color"===e&&(s="diffuse"),i=new f(r)),["transparent","vertexColors"].includes(e)||(t[s].value=i)})),this.material=new K({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},render:()=>[],__hmrId:"SubSurfaceMaterial"}),ur=e({extends:Zt,props:{...Yt},methods:{createMaterial(){this.material=new J(Oe(this.$props))},addWatchers(){ze(this,Object.keys(Yt),this.material)}},__hmrId:"ToonMaterial"}),cr=e({inject:["material"],emits:["loaded"],props:{name:{type:String,default:"map"},uniform:{type:String,default:null},src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:Q},wrapS:{type:Number,default:ee},wrapT:{type:Number,default:ee},magFilter:{type:Number,default:te},minFilter:{type:Number,default:re},repeat:{type:Object,default:{x:1,y:1}},rotation:{type:Number,default:0},center:{type:Object,default:{x:0,y:0}}},created(){this.refreshTexture(),s((()=>this.src),this.refreshTexture)},unmounted(){this.material&&this.material.setTexture&&this.material.setTexture(null,this.name),this.texture.dispose()},methods:{createTexture(){this.texture=(new $).load(this.src,this.onLoaded,this.onProgress,this.onError);["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","rotation","center"].forEach((e=>{Ie(this,e,this.texture)}))},refreshTexture(){if(this.createTexture(),this.material&&this.material.setTexture)this.material.setTexture(this.texture,this.name);else if(this.material&&"ShaderMaterial"===this.material.material.type){if(!this.uniform)return void console.warn('"uniform" prop required to use texture in a shader.');this.material.uniforms[this.uniform]={value:this.texture}}},onLoaded(){this.onLoad&&this.onLoad(),this.$emit("loaded")}},render:()=>[]}),pr=e({inject:["material"],emits:["loaded"],props:{path:String,urls:{type:Array,default:["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},onLoad:Function,onProgress:Function,onError:Function,name:{type:String,default:"envMap"},refraction:Boolean,refractionRatio:{type:Number,default:.98}},created(){this.refreshTexture(),s((()=>this.path),this.refreshTexture),s((()=>this.urls),this.refreshTexture)},unmounted(){this.material.setTexture(null,this.name),this.texture.dispose()},methods:{createTexture(){this.texture=(new se).setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)},refreshTexture(){this.createTexture(),this.material.setTexture(this.texture,this.name),this.refraction&&(this.texture.mapping=ie,this.material.setProp("refractionRatio",this.refractionRatio))},onLoaded(){this.onLoad&&this.onLoad(),this.$emit("loaded")}},render:()=>[]});const fr={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},gr=e({name:"Mesh",extends:De,props:{castShadow:Boolean,receiveShadow:Boolean,...fr},provide(){return{mesh:this}},mounted(){this.mesh||this.loading||this.initMesh()},methods:{initMesh(){this.mesh=new ae(this.geometry,this.material),this.mesh.component=this,Ie(this,"castShadow",this.mesh),Ie(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)},addGeometryWatchers(e){Object.keys(e).forEach((e=>{s((()=>this[e]),(()=>{this.refreshGeometry()}))}))},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh.geometry=this.geometry,e.dispose()}},unmounted(){this.mesh&&this.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose()},__hmrId:"Mesh"});function yr(t,r,s){return e({name:t,extends:gr,props:r,created(){this.createGeometry(),this.addGeometryWatchers(r)},methods:{createGeometry(){this.geometry=s(this)}},__hmrId:t})}var br=yr("Box",Ve,Ke),vr=yr("Circle",Ye,qe),Sr=yr("Cone",Qe,et),xr=yr("Cylinder",rt,st),wr=yr("Dodecahedron",at,nt),Pr=yr("Icosahedron",ht,dt),Nr=yr("Lathe",mt,ut),Mr=yr("Octahedron",pt,ft),Cr=yr("Plane",yt,bt),Lr=yr("Polyhedron",St,xt),_r=yr("Ring",Pt,Nt),jr=yr("Sphere",Ct,Lt),zr=yr("Tetrahedron",jt,zt);const Ir={text:String,fontSrc:String,size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var Or=e({extends:gr,props:Ir,data:()=>({loading:!0}),created(){["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach((e=>{s((()=>this[e]),(()=>{this.font&&this.refreshGeometry()}))}));(new ne).load(this.fontSrc,(e=>{this.loading=!1,this.font=e,this.createGeometry(),this.initMesh()}))},methods:{createGeometry(){this.geometry=new oe(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),"center"===this.align&&this.geometry.center()}}}),Gr=yr("Torus",Ot,Gt),kr=yr("TorusKnot",Et,Rt),Er=e({extends:gr,props:Tt,created(){this.createGeometry(),this.addGeometryWatchers(Tt)},methods:{createGeometry(){this.geometry=Bt(this)},updatePoints(e){Dt(this.geometry,e)}},__hmrId:"Tube"}),Rr=e({emits:["loaded"],extends:gr,props:{src:String,width:Number,height:Number,keepSize:Boolean},created(){this.createGeometry(),this.createMaterial(),this.initMesh(),s((()=>this.src),this.refreshTexture),["width","height"].forEach((e=>{s((()=>this[e]),this.resize)})),this.keepSize&&this.three.onAfterResize(this.resize)},methods:{createGeometry(){this.geometry=new N(1,1,1,1)},createMaterial(){this.material=new D({side:he,map:this.loadTexture()})},loadTexture(){return(new $).load(this.src,this.onLoaded)},refreshTexture(){this.texture&&this.texture.dispose(),this.material.map=this.loadTexture(),this.material.needsUpdate=!0},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded")},resize(){if(!this.texture)return;const e=this.three.size,t=this.texture.image.width/this.texture.image.height;let r,s;this.width&&this.height?(r=this.width*e.wWidth/e.width,s=this.height*e.wHeight/e.height):this.width?(r=this.width*e.wWidth/e.width,s=r/t):this.height&&(s=this.height*e.wHeight/e.height,r=s*t),this.mesh.scale.x=r,this.mesh.scale.y=s}},__hmrId:"Image"}),Ar=e({extends:De,props:{castShadow:Boolean,receiveShadow:Boolean,count:Number,...fr},provide(){return{mesh:this}},beforeMount(){this.$slots.default||console.error("Missing Geometry")},mounted(){this.initMesh()},methods:{initMesh(){this.mesh=new d(this.geometry,this.material,this.count),this.mesh.component=this,Ie(this,"castShadow",this.mesh),Ie(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.material.instancingColor=!0,this.mesh&&(this.mesh.material=e)}},unmounted(){this.mesh&&this.three.removeIntersectObject(this.mesh)},__hmrId:"InstancedMesh"}),Tr=e({extends:De,emits:["loaded"],props:{src:String},data:()=>({loading:!0}),created(){this.texture=(new $).load(this.src,this.onLoaded),this.material=new de({map:this.texture}),this.sprite=new le(this.material),this.geometry=this.sprite.geometry,this.initObject3D(this.sprite)},unmounted(){this.texture.dispose(),this.material.dispose()},methods:{onLoaded(){this.loading=!1,this.updateUV(),this.$emit("loaded")},updateUV(){this.iWidth=this.texture.image.width,this.iHeight=this.texture.image.height,this.iRatio=this.iWidth/this.iHeight;let e=.5,t=.5;this.iRatio>1?t=.5/this.iRatio:e=.5/this.iRatio;const r=this.geometry.attributes.position.array;r[0]=-e,r[1]=-t,r[5]=e,r[6]=-t,r[10]=e,r[11]=t,r[15]=-e,r[16]=t,this.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),Br=e({extends:De,emits:["load","progress","error"],data:()=>({progress:0}),methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),Fr=e({extends:Br,props:{src:String},created(){(new pe).load(this.src,(e=>{this.onLoad(e.scene)}),this.onProgress,this.onError)}}),Dr=e({extends:Br,props:{src:String},created(){(new fe).load(this.src,(e=>{this.onLoad(e)}),this.onProgress,this.onError)}}),Ur=e({setup:()=>({passes:[]}),inject:["three"],provide(){return{passes:this.passes}},mounted(){this.three.onAfterInit((()=>{this.composer=new ge(this.three.renderer),this.three.renderer.autoClear=!1,this.passes.forEach((e=>{this.composer.addPass(e)})),this.three.composer=this.composer,this.resize(),this.three.onAfterResize(this.resize)}))},unmounted(){this.three.offAfterResize(this.resize)},methods:{resize(){this.composer.setSize(this.three.size.width,this.three.size.height)}},render(){return this.$slots.default()},__hmrId:"EffectComposer"}),$r=e({inject:["three","passes"],emits:["ready"],beforeMount(){this.passes||console.error("Missing parent EffectComposer")},unmounted(){this.pass.dispose&&this.pass.dispose()},methods:{completePass(e){this.passes.push(e),this.pass=e,this.$emit("ready",e)}},render:()=>[],__hmrId:"EffectPass"}),Wr=e({extends:$r,mounted(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");const e=new ye(this.three.scene,this.three.camera);this.completePass(e)},__hmrId:"RenderPass"}),Hr=e({extends:$r,props:{focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}},watch:{focus(){this.pass.uniforms.focus.value=this.focus},aperture(){this.pass.uniforms.aperture.value=this.aperture},maxblur(){this.pass.uniforms.maxblur.value=this.maxblur}},mounted(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.three.size.width,height:this.three.size.height},t=new be(this.three.scene,this.three.camera,e);this.completePass(t)},__hmrId:"BokehPass"}),Xr=e({extends:$r,props:{noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}},watch:{noiseIntensity(){this.pass.uniforms.nIntensity.value=this.noiseIntensity},scanlinesIntensity(){this.pass.uniforms.sIntensity.value=this.scanlinesIntensity},scanlinesCount(){this.pass.uniforms.sCount.value=this.scanlinesCount},grayscale(){this.pass.uniforms.grayscale.value=this.grayscale}},mounted(){const e=new ve(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);this.completePass(e)},__hmrId:"FilmPass"}),Vr=e({extends:$r,mounted(){const e=new Se(xe);this.completePass(e),this.three.onAfterResize(this.resize)},unmounted(){this.three.offAfterResize(this.resize)},methods:{resize(){const{resolution:e}=this.pass.material.uniforms;e.value.x=1/this.three.size.width,e.value.y=1/this.three.size.height}},__hmrId:"FXAAPass"}),Kr=e({extends:$r,props:{shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}},mounted(){const e=new we(this.three.size.width,this.three.size.height,{});["shape","radius","rotateR","rotateG","rotateB","scatter"].forEach((t=>{e.uniforms[t].value=this[t],s((()=>this[t]),(()=>{e.uniforms[t].value=this[t]}))})),this.completePass(e)},__hmrId:"HalftonePass"}),Zr=e({extends:$r,mounted(){const e=new Pe(this.three.size.width,this.three.size.height);this.completePass(e)},__hmrId:"SMAAPass"}),Yr=e({extends:$r,props:{scene:null,camera:null,options:{type:Object,default:()=>({})}},mounted(){const e=new Ne(this.scene||this.three.scene,this.camera||this.three.camera,this.three.size.width,this.three.size.height);for(const t of Object.keys(this.options))e[t]=this.options[t];this.completePass(e)},__hmrId:"SSAOPass"}),qr={uniforms:{},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n "},Jr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new h},end:{value:new h},delta:{value:new h},texSize:{value:new h}},vertexShader:qr.vertexShader,fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n "},Qr=e({extends:$r,props:{blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:{x:0,y:100}},end:{type:Object,default:{x:10,y:100}}},mounted(){this.pass=new Se(Jr),this.passes.push(this.pass),this.pass1=new Se(Jr),this.passes.push(this.pass1);const e=this.uniforms=this.pass.uniforms,t=this.uniforms1=this.pass1.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,Ie(this,"blurRadius",e.blurRadius,"value"),Ie(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach((e=>{s((()=>this[e]),this.updateFocusLine,{deep:!0})})),this.pass.setSize=(t,r)=>{e.texSize.value.set(t,r)},this.$emit("ready",[this.pass,this.pass1])},methods:{updateFocusLine(){this.uniforms.start.value.copy(this.start),this.uniforms.end.value.copy(this.end);const e=(new h).copy(this.end).sub(this.start).normalize();this.uniforms.delta.value.copy(e),this.uniforms1.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"}),es=e({extends:$r,props:{strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}},watch:{strength(){this.pass.strength=this.strength},radius(){this.pass.radius=this.radius},threshold(){this.pass.threshold=this.threshold}},mounted(){const e=new h(this.three.size.width,this.three.size.height),t=new Me(e,this.strength,this.radius,this.threshold);this.completePass(t)},__hmrId:"UnrealBloomPass"}),ts={uniforms:{tDiffuse:{value:null},center:{value:new h(.5,.5)},strength:{value:0}},vertexShader:qr.vertexShader,fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n "},rs=e({extends:$r,props:{center:{type:Object,default:{x:.5,y:.5}},strength:{type:Number,default:.5}},mounted(){const e=new Se(ts),t=this.uniforms=e.uniforms;Ie(this,"center",t.center,"value"),Ie(this,"strength",t.strength,"value"),this.completePass(e)},__hmrId:"ZoomBlurPass"}),ss=Object.freeze({__proto__:null,Renderer:_e,OrthographicCamera:Be,PerspectiveCamera:Fe,Camera:Fe,Group:Ue,Scene:$e,Object3D:De,Raycaster:We,BoxGeometry:Ze,CircleGeometry:Je,ConeGeometry:tt,CylinderGeometry:it,DodecahedronGeometry:ot,IcosahedronGeometry:lt,LatheGeometry:ct,OctahedronGeometry:gt,PlaneGeometry:vt,PolyhedronGeometry:wt,RingGeometry:Mt,SphereGeometry:_t,TetrahedronGeometry:It,TorusGeometry:kt,TorusKnotGeometry:At,TubeGeometry:Ft,AmbientLight:$t,DirectionalLight:Wt,HemisphereLight:Ht,PointLight:Xt,RectAreaLight:Vt,SpotLight:Kt,BasicMaterial:qt,LambertMaterial:Jt,MatcapMaterial:Qt,PhongMaterial:er,PhysicalMaterial:sr,ShaderMaterial:ir,StandardMaterial:rr,SubSurfaceMaterial:mr,ToonMaterial:ur,Texture:cr,CubeTexture:pr,Mesh:gr,Box:br,Circle:vr,Cone:Sr,Cylinder:xr,Dodecahedron:wr,Icosahedron:Pr,Lathe:Nr,Octahedron:Mr,Plane:Cr,Polyhedron:Lr,Ring:_r,Sphere:jr,Tetrahedron:zr,Text:Or,Torus:Gr,TorusKnot:kr,Tube:Er,Image:Rr,InstancedMesh:Ar,Sprite:Tr,GLTFModel:Fr,FBXModel:Dr,EffectComposer:Ur,RenderPass:Wr,BokehPass:Hr,FilmPass:Xr,FXAAPass:Vr,HalftonePass:Kr,SMAAPass:Zr,SSAOPass:Yr,TiltShiftPass:Qr,UnrealBloomPass:es,ZoomBlurPass:rs,setFromProp:je,bindProps:ze,bindProp:Ie,propsValues:Oe,lerp:Ge,lerpv2:ke,lerpv3:Ee,limit:Re,getMatcapUrl:Ae});const is={install:e=>{["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach((t=>{e.component(t,ss[t])}))}};function as(e){return i(e).use(is)}export{$t as AmbientLight,qt as BasicMaterial,Hr as BokehPass,br as Box,Ze as BoxGeometry,Fe as Camera,vr as Circle,Je as CircleGeometry,Sr as Cone,tt as ConeGeometry,pr as CubeTexture,xr as Cylinder,it as CylinderGeometry,Wt as DirectionalLight,wr as Dodecahedron,ot as DodecahedronGeometry,Ur as EffectComposer,Dr as FBXModel,Vr as FXAAPass,Xr as FilmPass,Fr as GLTFModel,Ue as Group,Kr as HalftonePass,Ht as HemisphereLight,Pr as Icosahedron,lt as IcosahedronGeometry,Rr as Image,Ar as InstancedMesh,Jt as LambertMaterial,Nr as Lathe,ct as LatheGeometry,Qt as MatcapMaterial,gr as Mesh,De as Object3D,Mr as Octahedron,gt as OctahedronGeometry,Be as OrthographicCamera,Fe as PerspectiveCamera,er as PhongMaterial,sr as PhysicalMaterial,Cr as Plane,vt as PlaneGeometry,Xt as PointLight,Lr as Polyhedron,wt as PolyhedronGeometry,We as Raycaster,Vt as RectAreaLight,Wr as RenderPass,_e as Renderer,_r as Ring,Mt as RingGeometry,Zr as SMAAPass,Yr as SSAOPass,$e as Scene,ir as ShaderMaterial,jr as Sphere,_t as SphereGeometry,Kt as SpotLight,Tr as Sprite,rr as StandardMaterial,mr as SubSurfaceMaterial,zr as Tetrahedron,It as TetrahedronGeometry,Or as Text,cr as Texture,Qr as TiltShiftPass,ur as ToonMaterial,Gr as Torus,kt as TorusGeometry,kr as TorusKnot,At as TorusKnotGeometry,is as TroisJSVuePlugin,Er as Tube,Ft as TubeGeometry,es as UnrealBloomPass,rs as ZoomBlurPass,Ie as bindProp,ze as bindProps,as as createApp,Ae as getMatcapUrl,Ge as lerp,ke as lerpv2,Ee as lerpv3,Re as limit,Oe as propsValues,je as setFromProp}; +import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onUnmounted as Ur,createApp as Hr}from"vue";import{Vector3 as Z,Raycaster as Wr,Plane as Xr,Vector2 as I,InstancedMesh as ue,WebGLRenderer as Kr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as we,CubeCamera as ts,Mesh as rs,BoxGeometry as Ce,CircleGeometry as ss,ConeGeometry as is,CylinderGeometry as ns,DodecahedronGeometry as as,IcosahedronGeometry as os,LatheGeometry as hs,OctahedronGeometry as ds,PlaneGeometry as Me,PolyhedronGeometry as ls,RingGeometry as us,SphereGeometry as cs,TetrahedronGeometry as ms,TorusGeometry as fs,TorusKnotGeometry as ps,TubeGeometry as ys,Curve as gs,CatmullRomCurve3 as Le,SpotLight as ce,DirectionalLight as me,AmbientLight as vs,HemisphereLight as bs,PointLight as Ss,RectAreaLight as Ps,FrontSide as xs,MeshBasicMaterial as Ne,MeshLambertMaterial as ws,TextureLoader as Y,MeshMatcapMaterial as Cs,MeshPhongMaterial as Ms,MeshStandardMaterial as Ls,MeshPhysicalMaterial as Ns,ShaderMaterial as fe,ShaderChunk as K,UniformsUtils as Ge,ShaderLib as Gs,MeshToonMaterial as _s,UVMapping as js,ClampToEdgeWrapping as _e,LinearFilter as Es,CubeReflectionMapping as ks,CubeTextureLoader as Rs,FontLoader as Os,TextGeometry as $s,DoubleSide as Is,SpriteMaterial as zs,Sprite as Ts}from"three";import{OrbitControls as As}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Bs}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Fs}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Ds}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Us}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as Hs}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as Ws}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Xs}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ks}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Vs}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as qs}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Zs}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ys}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Js}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Qs(e){const{camera:t,resetPosition:r=new Z(0,0,0)}=e,s=new Wr,n=r.clone(),a=new Xr(new Z(0,0,1),0);return{position:n,updatePosition:P=>{s.setFromCamera(P,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(P,R)=>(s.setFromCamera(P,t),s.intersectObjects(R))}}function je(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new I(0,0),resetPositionV3:c=new Z(0,0,0),onEnter:P=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:T=()=>{},onIntersectEnter:W=()=>{},onIntersectOver:x=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:G=()=>{}}=e,m=i.clone(),p=new I(0,0),h=Qs({camera:t}),d=h.position,w={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Ar,removeListeners:Br,intersect:be};return w;function C(){m.copy(i),d.copy(c)}function de(y){let O,$;y instanceof TouchEvent&&y.touches&&y.touches.length>0?(O=y.touches[0].clientX,$=y.touches[0].clientY):(O=y.clientX,$=y.clientY);const g=r.getBoundingClientRect();m.x=O-g.left,m.y=$-g.top,p.x=m.x/g.width*2-1,p.y=-(m.y/g.height)*2+1,h.updatePosition(p)}function be(){if(s.length){const y=h.intersect(p,s),O=[...s],$=[];y.forEach(g=>{var A,_,M;const{object:S}=g,{component:L}=S.userData;if(S instanceof ue){if($.indexOf(S)!==-1)return;$.push(S)}if(!S.userData.over){S.userData.over=!0;const le={type:"pointerover",over:!0,component:L,intersect:g},xe={...le,type:"pointerenter"};x(le),W(xe),(A=L.onPointerOver)==null||A.call(L,le),(_=L.onPointerEnter)==null||_.call(L,xe)}const Pe={type:"pointermove",component:L,intersect:g};F(Pe),(M=L.onPointerMove)==null||M.call(L,Pe),O.splice(O.indexOf(S),1)}),O.forEach(g=>{var A,_;const{component:M}=g.userData;if(g.userData.over){g.userData.over=!1;const S={type:"pointerover",over:!1,component:M},L={...S,type:"pointerleave"};x(S),D(L),(A=M.onPointerOver)==null||A.call(M,S),(_=M.onPointerLeave)==null||_.call(M,L)}})}}function ee(y){de(y),P({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(y){de(y),R({type:"pointermove",position:m,positionN:p,positionV3:d}),be()}function Se(y){if(de(y),s.length){const O=h.intersect(p,s),$=[];O.forEach(g=>{var A;const{object:_}=g,{component:M}=_.userData;if(_ instanceof ue){if($.indexOf(_)!==-1)return;$.push(_)}const S={type:"click",component:M,intersect:g};G(S),(A=M.onClick)==null||A.call(M,S)})}T({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&C(),f({type:"pointerleave"})}function Ar(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Se),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),w.listeners=!0}function Br(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Se),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),w.listeners=!1}}function ei(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:P,dispose:D,render:T,renderC:W,setSize:m,addIntersectObject:x,removeIntersectObject:F};return i;function c(){const h=new Kr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function P(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(G(),window.addEventListener("resize",G)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new As(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,w])=>{h[d]=w}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=je(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function T(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function W(){s.forEach(h=>h()),i.composer.render()}function x(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",G),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function G(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const w=i.camera;if(w.type==="PerspectiveCamera"){const C=w;C.aspect=r.ratio,C.updateProjectionMatrix()}if(w.type==="OrthographicCamera"){const C=w;r.wWidth=C.right-C.left,r.wHeight=C.top-C.bottom}else{const C=p();r.wWidth=C[0],r.wHeight=C[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,w=2*Math.tan(d/2)*Math.abs(h.position.z);return[w*h.aspect,w]}}const N=Symbol("Renderer");var Ee=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const P=ei(c),R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:P,renderer:P.renderer,size:P.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[N]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.renderer.shadowMap.enabled=this.shadow,this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn(),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"});function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Fr(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function z(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function ke(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Re(e,t,r){return er?r:e}const ti="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",ri="0404E8_0404B5_0404CB_3333FC";function pe(e=ri,t=1024){const r=`${e}${si(t)}.png`;return`${ti}/${t}/${r}`}function si(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}var Oe=o({render(){return this.$slots.default?this.$slots.default():[]}}),$e=o({extends:Oe,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=X(N);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:Oe,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=X(N);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Ie=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=X(N),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Dr(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),B=o({name:"Object3D",inject:{renderer:N,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),ze=o({name:"Group",extends:B,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const J=()=>{};var Te=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:J},onPointerOver:{type:Function,default:J},onPointerMove:{type:Function,default:J},onPointerLeave:{type:Function,default:J},onClick:{type:Function,default:J},intersectMode:{type:String,default:"move"}},setup(){return{renderer:X(N)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=je({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Ae=o({extends:B,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=X(N);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:we}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ur(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const ii={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},Q=Symbol("Mesh"),H=o({name:"Mesh",extends:B,props:{castShadow:Boolean,receiveShadow:Boolean,...ii},setup(){return{}},provide(){return{[Q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function v(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const Be=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number},inject:{mesh:Q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function b(e,t,r){return o({name:e,extends:Be,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=b("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function We(e){return new ss(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Xe=b("CircleGeometry",He,We);const Ke={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new is(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=b("ConeGeometry",Ke,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new ns(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=b("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new as(e.radius,e.detail)}var tt=b("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new os(e.radius,e.detail)}var it=b("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new hs(e.points,e.segments,e.phiStart,e.phiLength)}var ot=b("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new ds(e.radius,e.detail)}var lt=b("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Me(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=b("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new ls(e.vertices,e.indices,e.radius,e.detail)}var yt=b("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new us(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=b("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new cs(e.radius,e.widthSegments,e.heightSegments)}var xt=b("SphereGeometry",St,Pt);const wt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Ct(e){return new ms(e.radius,e.detail)}var Mt=b("TetrahedronGeometry",wt,Ct);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new fs(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=b("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function jt(e){return new ps(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var Et=b("TorusKnotGeometry",_t,jt);const ye={points:Array,path:gs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function kt(e){let t;return e.points?t=new Le(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new ys(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Rt=o({extends:Be,props:ye,methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}}});function Ot(e,t){const r=new Le(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const P=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Z,T=new Z;for(let x=0;x({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof ce||this.light instanceof me)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof ce||e instanceof me)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:q,created(){this.initLight(new vs(this.color,this.intensity))},__hmrId:"AmbientLight"}),It=o({extends:q,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new me(this.color,this.intensity))},__hmrId:"DirectionalLight"}),zt=o({extends:q,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new bs(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),Tt=o({extends:q,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new Ss(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:q,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Bs.init();const e=new Ps(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Fs(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:q,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new ce(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const oe=Symbol("Material");var j=o({inject:{mesh:Q},props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:xs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[oe]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const E={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:j,props:{...E},methods:{createMaterial(){const e=new Ne(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new ws(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:j,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:pe(this.name),t=z(this.$props,["src","name"]);return t.matcap=new Y().load(e),new Cs(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:j,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...E},methods:{createMaterial(){const e=new Ms(z(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(E),e),e}},__hmrId:"PhongMaterial"});const Wt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ge=o({extends:j,props:{...Wt,...E},methods:{createMaterial(){const e=new Ls(z(this.$props,["normalScale"]));return Object.keys(Wt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(E),e),e}},__hmrId:"StandardMaterial"}),Xt=o({extends:ge,props:{flatShading:Boolean},methods:{createMaterial(){return new Ns(z(this.$props))}},__hmrId:"PhysicalMaterial"});const ni=` + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); + } +`,ai=` + varying vec2 vUv; + void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); + } +`;var Kt=o({extends:j,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:ni},fragmentShader:{type:String,default:ai}},methods:{createMaterial(){const e=new fe({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader});return["vertexShader","fragmentShader"].forEach(r=>{l(()=>this[r],s=>{this.setProp(r,s,!0)})}),e},addWatchers(){}},__hmrId:"ShaderMaterial"});function oi(e,t,r){return e.split(t).join(r)}const hi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),di=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),li={uniforms:Ge.merge([Gs.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` + #define USE_UV + ${K.meshphong_vert} + `,fragmentShader:` + #define USE_UV + #define SUBSURFACE + + ${hi} + + uniform float thicknessPower; + uniform float thicknessScale; + uniform float thicknessDistortion; + uniform float thicknessAmbient; + uniform float thicknessAttenuation; + uniform vec3 thicknessColor; + + void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) { + #ifdef USE_COLOR + vec3 thickness = vColor * thicknessColor; + #else + vec3 thickness = thicknessColor; + #endif + vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion)); + float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale; + vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; + reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; + } + `+di.replace("#include ",oi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` + RE_Direct( directLight, geometry, material, reflectedLight ); + #if defined( SUBSURFACE ) && defined( USE_UV ) + RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); + #endif + `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:j,props:Vt,methods:{createMaterial(){const e=li,t=Ge.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new fe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new _s(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"ToonMaterial"}),ve=o({inject:{material:oe},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:js},wrapS:{type:Number,default:_e},wrapT:{type:Number,default:_e},magFilter:{type:Number,default:Es},minFilter:{type:Number,default:we},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new Y().load(this.src,this.onLoaded,this.onProgress,this.onError);return["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof fe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:ve,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:ks}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Rs().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=v("Box",Fe,De),Qt=v("Circle",He,We),er=v("Cone",Ke,Ve),tr=v("Cylinder",Ze,Ye),rr=v("Dodecahedron",Qe,et),sr=v("Icosahedron",rt,st),ir=v("Lathe",nt,at),nr=v("Octahedron",ht,dt),ar=v("Plane",ut,ct),or=v("Polyhedron",ft,pt),hr=v("Ring",gt,vt),dr=v("Sphere",St,Pt),lr=v("Tetrahedron",wt,Ct);const ui={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var ur=o({extends:H,props:ui,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new Os;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new $s(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),cr=v("Torus",Lt,Nt),mr=v("TorusKnot",_t,jt),fr=o({extends:H,props:ye,created(){this.createGeometry(),this.addGeometryWatchers(ye)},methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}},__hmrId:"Tube"}),pr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Me(1,1,this.widthSegments,this.heightSegments),this.material=new Ne({side:Is,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new Y().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),yr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ue(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),gr=o({extends:B,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new Y().load(this.src,this.onLoaded),this.material=new zs({map:this.texture}),this.sprite=new Ts(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),vr=o({extends:B,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),br=o({extends:vr,created(){new Ds().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),Sr=o({extends:vr,created(){new Us().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const he=Symbol("Composer");var Pr=o({setup(){return{renderer:X(N)}},provide(){return{[he]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new Hs(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),k=o({inject:{renderer:N,composer:he},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),xr=o({extends:k,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ws(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const wr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Cr=o({extends:k,props:wr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new Xs(this.renderer.scene,this.renderer.camera,e);Object.keys(wr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Mr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Lr=o({extends:k,props:Mr,created(){const e=new Ks(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Mr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),Nr=o({extends:k,created(){var e;const t=new ie(Vs);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const Gr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var _r=o({extends:k,props:Gr,created(){if(!this.renderer)return;const e=new qs(this.renderer.size.width,this.renderer.size.height,{});Object.keys(Gr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),jr=o({extends:k,created(){if(!this.renderer)return;const e=new Zs(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Er=o({extends:k,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ys(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),kr={uniforms:{},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); + } + `,fragmentShader:` + varying vec2 vUv; + void main() { + gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); + } + `},Rr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new I},end:{value:new I},delta:{value:new I},texSize:{value:new I}},vertexShader:kr.vertexShader,fragmentShader:` + uniform sampler2D tDiffuse; + uniform float blurRadius; + uniform float gradientRadius; + uniform vec2 start; + uniform vec2 end; + uniform vec2 delta; + uniform vec2 texSize; + varying vec2 vUv; + + float random(vec3 scale, float seed) { + /* use the fragment position for a different seed per-pixel */ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); + } + + void main() { + vec4 color = vec4(0.0); + float total = 0.0; + + /* randomize the lookup values to hide the fixed number of samples */ + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + + vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); + float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius; + for (float t = -30.0; t <= 30.0; t++) { + float percent = (t + offset - 0.5) / 30.0; + float weight = 1.0 - abs(percent); + vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius); + // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius); + + /* switch to pre-multiplied alpha to correctly blur transparent images */ + texel.rgb *= texel.a; + // texel2.rgb *= texel2.a; + + color += texel * weight; + total += 2.0 * weight; + } + + gl_FragColor = color / total; + + /* switch back from pre-multiplied alpha */ + gl_FragColor.rgb /= gl_FragColor.a + 0.00001; + } + `};const ci={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var Or=o({extends:k,props:ci,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie(Rr),this.pass2=new ie(Rr);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new I().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const $r={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:k,props:$r,created(){if(!this.renderer)return;const e=new I(this.renderer.size.width,this.renderer.size.height),t=new Js(e,this.strength,this.radius,this.threshold);Object.keys($r).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),mi={uniforms:{tDiffuse:{value:null},center:{value:new I(.5,.5)},strength:{value:0}},vertexShader:kr.vertexShader,fragmentShader:` + uniform sampler2D tDiffuse; + uniform vec2 center; + uniform float strength; + varying vec2 vUv; + + float random(vec3 scale, float seed) { + /* use the fragment position for a different seed per-pixel */ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); + } + + void main() { + vec4 color = vec4(0.0); + float total = 0.0; + vec2 toCenter = center - vUv; + + /* randomize the lookup values to hide the fixed number of samples */ + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + + for (float t = 0.0; t <= 40.0; t++) { + float percent = (t + offset) / 40.0; + float weight = 4.0 * (percent - percent * percent); + vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength); + + /* switch to pre-multiplied alpha to correctly blur transparent images */ + texel.rgb *= texel.a; + + color += texel * weight; + total += weight; + } + + gl_FragColor = color / total; + + /* switch back from pre-multiplied alpha */ + gl_FragColor.rgb /= gl_FragColor.a + 0.00001; + } + `},zr=o({extends:k,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(mi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),fi=Object.freeze({__proto__:null,Renderer:Ee,RendererInjectionKey:N,OrthographicCamera:$e,PerspectiveCamera:ne,Camera:ne,Group:ze,Scene:Ie,SceneInjectionKey:ae,Object3D:B,Raycaster:Te,CubeCamera:Ae,BoxGeometry:Ue,CircleGeometry:Xe,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:xt,TetrahedronGeometry:Mt,TorusGeometry:Gt,TorusKnotGeometry:Et,TubeGeometry:Rt,AmbientLight:$t,DirectionalLight:It,HemisphereLight:zt,PointLight:Tt,RectAreaLight:At,SpotLight:Bt,Material:j,MaterialInjectionKey:oe,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Xt,ShaderMaterial:Kt,StandardMaterial:ge,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:ve,CubeTexture:Yt,Mesh:H,MeshInjectionKey:Q,Box:Jt,Circle:Qt,Cone:er,Cylinder:tr,Dodecahedron:rr,Icosahedron:sr,Lathe:ir,Octahedron:nr,Plane:ar,Polyhedron:or,Ring:hr,Sphere:dr,Tetrahedron:lr,Text:ur,Torus:cr,TorusKnot:mr,Tube:fr,Image:pr,InstancedMesh:yr,Sprite:gr,GLTFModel:br,FBXModel:Sr,EffectComposer:Pr,ComposerInjectionKey:he,RenderPass:xr,BokehPass:Cr,FilmPass:Lr,FXAAPass:Nr,HalftonePass:_r,SMAAPass:jr,SSAOPass:Er,TiltShiftPass:Or,UnrealBloomPass:Ir,ZoomBlurPass:zr,setFromProp:V,bindProps:U,bindProp:u,propsValues:z,lerp:ke,limit:Re,getMatcapUrl:pe});const Tr={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,fi[r])})}};function pi(e){return Hr(e).use(Tr)}function yi(){const e={loader:new Y,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Cr as BokehPass,Jt as Box,Ue as BoxGeometry,ne as Camera,Qt as Circle,Xe as CircleGeometry,he as ComposerInjectionKey,er as Cone,qe as ConeGeometry,Ae as CubeCamera,Yt as CubeTexture,tr as Cylinder,Je as CylinderGeometry,It as DirectionalLight,rr as Dodecahedron,tt as DodecahedronGeometry,Pr as EffectComposer,Sr as FBXModel,Nr as FXAAPass,Lr as FilmPass,br as GLTFModel,ze as Group,_r as HalftonePass,zt as HemisphereLight,sr as Icosahedron,it as IcosahedronGeometry,pr as Image,yr as InstancedMesh,Dt as LambertMaterial,ir as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,j as Material,oe as MaterialInjectionKey,H as Mesh,Q as MeshInjectionKey,B as Object3D,nr as Octahedron,lt as OctahedronGeometry,$e as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Xt as PhysicalMaterial,ar as Plane,mt as PlaneGeometry,Tt as PointLight,or as Polyhedron,yt as PolyhedronGeometry,Te as Raycaster,At as RectAreaLight,xr as RenderPass,Ee as Renderer,N as RendererInjectionKey,hr as Ring,bt as RingGeometry,jr as SMAAPass,Er as SSAOPass,Ie as Scene,ae as SceneInjectionKey,Kt as ShaderMaterial,dr as Sphere,xt as SphereGeometry,Bt as SpotLight,gr as Sprite,ge as StandardMaterial,qt as SubSurfaceMaterial,lr as Tetrahedron,Mt as TetrahedronGeometry,ur as Text,ve as Texture,Or as TiltShiftPass,Zt as ToonMaterial,cr as Torus,Gt as TorusGeometry,mr as TorusKnot,Et as TorusKnotGeometry,Tr as TroisJSVuePlugin,fr as Tube,Rt as TubeGeometry,Ir as UnrealBloomPass,zr as ZoomBlurPass,u as bindProp,U as bindProps,pi as createApp,pe as getMatcapUrl,ke as lerp,Re as limit,z as propsValues,V as setFromProp,yi as useTextures}; //# sourceMappingURL=trois.module.min.js.map diff --git a/build/trois.module.min.js.map b/build/trois.module.min.js.map index 209f38d..f5603b2 100644 --- a/build/trois.module.min.js.map +++ b/build/trois.module.min.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.min.js","sources":["../src/core/usePointer.js","../src/core/useRaycaster.js","../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/Camera.js","../src/core/OrthographicCamera.js","../src/core/PerspectiveCamera.js","../src/core/Object3D.js","../src/core/Group.js","../src/core/Scene.js","../src/core/Raycaster.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/CircleGeometry.js","../src/geometries/ConeGeometry.js","../src/geometries/CylinderGeometry.js","../src/geometries/DodecahedronGeometry.js","../src/geometries/IcosahedronGeometry.js","../src/geometries/LatheGeometry.js","../src/geometries/OctahedronGeometry.js","../src/geometries/PlaneGeometry.js","../src/geometries/PolyhedronGeometry.js","../src/geometries/RingGeometry.js","../src/geometries/SphereGeometry.js","../src/geometries/TetrahedronGeometry.js","../src/geometries/TorusGeometry.js","../src/geometries/TorusKnotGeometry.js","../src/geometries/TubeGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/DirectionalLight.js","../src/lights/HemisphereLight.js","../src/lights/PointLight.js","../src/lights/RectAreaLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/MatcapMaterial.js","../src/materials/PhongMaterial.js","../src/materials/StandardMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/ShaderMaterial.js","../src/materials/SubsurfaceScatteringShader.js","../src/materials/SubSurfaceMaterial.js","../src/materials/ToonMaterial.js","../src/materials/Texture.js","../src/materials/CubeTexture.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Circle.js","../src/meshes/Cone.js","../src/meshes/Cylinder.js","../src/meshes/Dodecahedron.js","../src/meshes/Icosahedron.js","../src/meshes/Lathe.js","../src/meshes/Octahedron.js","../src/meshes/Plane.js","../src/meshes/Polyhedron.js","../src/meshes/Ring.js","../src/meshes/Sphere.js","../src/meshes/Tetrahedron.js","../src/meshes/Text.js","../src/meshes/Torus.js","../src/meshes/TorusKnot.js","../src/meshes/Tube.js","../src/meshes/Image.js","../src/meshes/InstancedMesh.js","../src/meshes/Sprite.js","../src/models/Model.js","../src/models/GLTF.js","../src/models/FBX.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/FilmPass.js","../src/effects/FXAAPass.js","../src/effects/HalftonePass.js","../src/effects/SMAAPass.js","../src/effects/SSAOPass.js","../src/shaders/default.js","../src/shaders/TiltShift.js","../src/effects/TiltShiftPass.js","../src/effects/UnrealBloomPass.js","../src/shaders/ZoomBlur.js","../src/effects/ZoomBlurPass.js","../src/plugin.js"],"sourcesContent":["import { InstancedMesh, Vector2, Vector3 } from 'three';\r\nimport useRaycaster from './useRaycaster';\r\n\r\nexport default function usePointer(options) {\r\n const {\r\n camera,\r\n domElement,\r\n intersectObjects,\r\n touch = true,\r\n resetOnEnd = false,\r\n resetPosition = new Vector2(0, 0),\r\n resetPositionV3 = new Vector3(0, 0, 0),\r\n onEnter = () => {},\r\n onMove = () => {},\r\n onLeave = () => {},\r\n onIntersectEnter = () => {},\r\n onIntersectOver = () => {},\r\n onIntersectMove = () => {},\r\n onIntersectLeave = () => {},\r\n onIntersectClick = () => {},\r\n } = options;\r\n\r\n const position = resetPosition.clone();\r\n const positionN = new Vector2(0, 0);\r\n\r\n const raycaster = useRaycaster({ camera });\r\n const positionV3 = raycaster.position;\r\n\r\n const obj = {\r\n position,\r\n positionN,\r\n positionV3,\r\n intersectObjects,\r\n listeners: false,\r\n addListeners,\r\n removeListeners,\r\n intersect,\r\n };\r\n\r\n return obj;\r\n\r\n function reset() {\r\n position.copy(resetPosition);\r\n positionV3.copy(resetPositionV3);\r\n };\r\n\r\n function updatePosition(event) {\r\n let x, y;\r\n if (event.touches && event.touches.length > 0) {\r\n x = event.touches[0].clientX;\r\n y = event.touches[0].clientY;\r\n } else {\r\n x = event.clientX;\r\n y = event.clientY;\r\n }\r\n\r\n const rect = domElement.getBoundingClientRect();\r\n position.x = x - rect.left;\r\n position.y = y - rect.top;\r\n positionN.x = (position.x / rect.width) * 2 - 1;\r\n positionN.y = -(position.y / rect.height) * 2 + 1;\r\n raycaster.updatePosition(positionN);\r\n };\r\n\r\n function intersect() {\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const offObjects = [...intersectObjects];\r\n const iMeshes = [];\r\n\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n if (!object.over) {\r\n object.over = true;\r\n const overEvent = { type: 'pointerover', over: true, component, intersect };\r\n const enterEvent = { ...overEvent, type: 'pointerenter' };\r\n onIntersectOver(overEvent);\r\n onIntersectEnter(enterEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerEnter?.(enterEvent);\r\n }\r\n\r\n const moveEvent = { type: 'pointermove', component, intersect };\r\n onIntersectMove(moveEvent);\r\n component.onPointerMove?.(moveEvent);\r\n\r\n offObjects.splice(offObjects.indexOf(object), 1);\r\n });\r\n\r\n offObjects.forEach(object => {\r\n const { component } = object;\r\n if (object.over) {\r\n object.over = false;\r\n const overEvent = { type: 'pointerover', over: false, component };\r\n const leaveEvent = { ...overEvent, type: 'pointerleave' };\r\n onIntersectOver(overEvent);\r\n onIntersectLeave(leaveEvent);\r\n component.onPointerOver?.(overEvent);\r\n component.onPointerLeave?.(leaveEvent);\r\n }\r\n });\r\n }\r\n };\r\n\r\n function pointerEnter(event) {\r\n updatePosition(event);\r\n onEnter({ type: 'pointerenter', position, positionN, positionV3 });\r\n };\r\n\r\n function pointerMove(event) {\r\n updatePosition(event);\r\n onMove({ type: 'pointermove', position, positionN, positionV3 });\r\n intersect();\r\n };\r\n\r\n function pointerClick(event) {\r\n updatePosition(event);\r\n if (intersectObjects.length) {\r\n const intersects = raycaster.intersect(positionN, intersectObjects);\r\n const iMeshes = [];\r\n intersects.forEach(intersect => {\r\n const { object } = intersect;\r\n const { component } = object;\r\n\r\n // only once for InstancedMesh\r\n if (object instanceof InstancedMesh) {\r\n if (iMeshes.indexOf(object) !== -1) return;\r\n iMeshes.push(object);\r\n }\r\n\r\n const event = { type: 'click', component, intersect };\r\n onIntersectClick(event);\r\n component.onClick?.(event);\r\n });\r\n }\r\n };\r\n\r\n function pointerLeave() {\r\n if (resetOnEnd) reset();\r\n onLeave({ type: 'pointerleave' });\r\n };\r\n\r\n function addListeners() {\r\n domElement.addEventListener('mouseenter', pointerEnter);\r\n domElement.addEventListener('mousemove', pointerMove);\r\n domElement.addEventListener('mouseleave', pointerLeave);\r\n domElement.addEventListener('click', pointerClick);\r\n if (touch) {\r\n domElement.addEventListener('touchstart', pointerEnter);\r\n domElement.addEventListener('touchmove', pointerMove);\r\n domElement.addEventListener('touchend', pointerLeave);\r\n }\r\n obj.listeners = true;\r\n };\r\n\r\n function removeListeners() {\r\n domElement.removeEventListener('mouseenter', pointerEnter);\r\n domElement.removeEventListener('mousemove', pointerMove);\r\n domElement.removeEventListener('mouseleave', pointerLeave);\r\n domElement.removeEventListener('click', pointerClick);\r\n\r\n domElement.removeEventListener('touchstart', pointerEnter);\r\n domElement.removeEventListener('touchmove', pointerMove);\r\n domElement.removeEventListener('touchend', pointerLeave);\r\n obj.listeners = false;\r\n };\r\n};\r\n","import { Plane, Raycaster, Vector3 } from 'three';\r\n\r\nexport default function useRaycaster(options) {\r\n const {\r\n camera,\r\n resetPosition = new Vector3(0, 0, 0),\r\n } = options;\r\n\r\n const raycaster = new Raycaster();\r\n const position = resetPosition.clone();\r\n const plane = new Plane(new Vector3(0, 0, 1), 0);\r\n\r\n const updatePosition = (coords) => {\r\n raycaster.setFromCamera(coords, camera);\r\n camera.getWorldDirection(plane.normal);\r\n raycaster.ray.intersectPlane(plane, position);\r\n };\r\n\r\n const intersect = (coords, objects) => {\r\n raycaster.setFromCamera(coords, camera);\r\n return raycaster.intersectObjects(objects);\r\n };\r\n\r\n return {\r\n position,\r\n updatePosition,\r\n intersect,\r\n };\r\n};\r\n","import { WebGLRenderer } from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport usePointer from './usePointer';\n\n/**\n * Three.js helper\n */\nexport default function useThree() {\n // default conf\n const conf = {\n canvas: null,\n antialias: true,\n alpha: false,\n autoClear: true,\n orbit_ctrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n };\n\n // size\n const size = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n };\n\n // handlers\n const afterInitCallbacks = [];\n let afterResizeCallbacks = [];\n let beforeRenderCallbacks = [];\n\n const intersectObjects = [];\n\n // returned object\n const obj = {\n conf,\n renderer: null,\n camera: null,\n cameraCtrl: null,\n scene: null,\n pointer: null,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n onAfterInit,\n onAfterResize, offAfterResize,\n // onBeforeRender, offBeforeRender,\n addIntersectObject, removeIntersectObject,\n };\n\n /**\n * init three\n */\n function init(params) {\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n conf[key] = value;\n });\n }\n\n if (!obj.scene) {\n console.error('Missing Scene');\n return;\n }\n\n if (!obj.camera) {\n console.error('Missing Camera');\n return;\n }\n\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\n obj.renderer.autoClear = conf.autoClear;\n\n if (conf.resize) {\n onResize();\n window.addEventListener('resize', onResize);\n } else {\n setSize(conf.width, conf.height);\n }\n\n initPointer();\n\n if (conf.orbit_ctrl) {\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\n if (conf.orbit_ctrl instanceof Object) {\n Object.entries(conf.orbit_ctrl).forEach(([key, value]) => {\n obj.orbitCtrl[key] = value;\n });\n }\n }\n\n afterInitCallbacks.forEach(c => c());\n\n return true;\n };\n\n function initPointer() {\n let pointerConf = {\n camera: obj.camera,\n domElement: obj.renderer.domElement,\n intersectObjects,\n };\n\n if (conf.pointer && conf.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...conf.pointer };\n }\n\n obj.pointer = usePointer(pointerConf);\n if (conf.pointer || intersectObjects.length) {\n obj.pointer.addListeners();\n if (conf.pointer.intersectMode === 'frame') {\n onBeforeRender(() => {\n obj.pointer.intersect();\n });\n }\n }\n }\n\n /**\n * add after init callback\n */\n function onAfterInit(callback) {\n afterInitCallbacks.push(callback);\n }\n\n /**\n * add after resize callback\n */\n function onAfterResize(callback) {\n afterResizeCallbacks.push(callback);\n }\n\n /**\n * remove after resize callback\n */\n function offAfterResize(callback) {\n afterResizeCallbacks = afterResizeCallbacks.filter(c => c !== callback);\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(callback) {\n beforeRenderCallbacks.push(callback);\n }\n\n /**\n * remove before render callback\n */\n function offBeforeRender(callback) {\n beforeRenderCallbacks = beforeRenderCallbacks.filter(c => c !== callback);\n }\n\n /**\n * default render\n */\n function render() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.renderer.render(obj.scene, obj.camera);\n }\n\n /**\n * composer render\n */\n function renderC() {\n if (obj.orbitCtrl) obj.orbitCtrl.update();\n beforeRenderCallbacks.forEach(c => c());\n obj.composer.render();\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o);\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners();\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o) {\n const i = intersectObjects.indexOf(o);\n if (i !== -1) {\n intersectObjects.splice(i, 1);\n }\n // remove listeners if needed\n if (obj.pointer && !conf.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners();\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n beforeRenderCallbacks = [];\n window.removeEventListener('resize', onResize);\n if (obj.pointer) obj.pointer.removeListeners();\n if (obj.orbitCtrl) obj.orbitCtrl.dispose();\n if (obj.renderer) obj.renderer.dispose();\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (conf.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight);\n } else {\n const elt = obj.renderer.domElement.parentNode;\n setSize(elt.clientWidth, elt.clientHeight);\n }\n afterResizeCallbacks.forEach(c => c());\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width, height) {\n size.width = width;\n size.height = height;\n size.ratio = width / height;\n\n obj.renderer.setSize(width, height, false);\n obj.camera.aspect = size.ratio;\n obj.camera.updateProjectionMatrix();\n\n if (obj.composer) {\n obj.composer.setSize(width, height);\n }\n\n if (obj.camera.type === 'OrthographicCamera') {\n size.wWidth = obj.camera.right - obj.camera.left;\n size.wHeight = obj.camera.top - obj.camera.bottom;\n } else {\n const wsize = getCameraSize();\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }\n\n return obj;\n}\n","import { defineComponent, h } from 'vue';\nimport useThree from './useThree';\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object], default: false },\n pointer: { type: [Boolean, Object], default: false },\n resize: { type: [Boolean, String], default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n },\n setup() {\n return {\n three: useThree(),\n raf: true,\n onMountedCallbacks: [],\n beforeRenderCallbacks: [],\n afterRenderCallbacks: [],\n };\n },\n provide() {\n return {\n three: this.three,\n // renderer: this.three.renderer,\n rendererComponent: this,\n };\n },\n mounted() {\n const params = {\n canvas: this.$el,\n antialias: this.antialias,\n alpha: this.alpha,\n autoClear: this.autoClear,\n orbit_ctrl: this.orbitCtrl,\n pointer: this.pointer,\n resize: this.resize,\n width: this.width,\n height: this.height,\n };\n\n if (this.three.init(params)) {\n this.renderer = this.three.renderer;\n this.renderer.shadowMap.enabled = this.shadow;\n\n this._render = this.three.composer ? this.three.renderC : this.three.render;\n\n if (this.xr) {\n this.renderer.xr.enabled = true;\n this.renderer.setAnimationLoop(this.render);\n } else {\n requestAnimationFrame(this.renderLoop);\n }\n };\n\n this.onMountedCallbacks.forEach(c => c());\n },\n beforeUnmount() {\n this.beforeRenderCallbacks = [];\n this.afterRenderCallbacks = [];\n this.raf = false;\n this.three.dispose();\n },\n methods: {\n onMounted(cb) {\n this.onMountedCallbacks.push(cb);\n },\n onBeforeRender(cb) {\n this.beforeRenderCallbacks.push(cb);\n },\n offBeforeRender(cb) {\n this.beforeRenderCallbacks = this.beforeRenderCallbacks.filter(c => c !== cb);\n },\n onAfterRender(cb) {\n this.afterRenderCallbacks.push(cb);\n },\n offAfterRender(cb) {\n this.afterRenderCallbacks = this.afterRenderCallbacks.filter(c => c !== cb);\n },\n onAfterResize(cb) {\n this.three.onAfterResize(cb);\n },\n offAfterResize(cb) {\n this.three.offAfterResize(cb);\n },\n render(time) {\n this.beforeRenderCallbacks.forEach(c => c({ time }));\n this._render();\n this.afterRenderCallbacks.forEach(c => c({ time }));\n },\n renderLoop(time) {\n if (this.raf) requestAnimationFrame(this.renderLoop);\n this.render(time);\n },\n },\n render() {\n return h('canvas', {}, this.$slots.default());\n },\n __hmrId: 'Renderer',\n});\n","import { toRef, watch } from 'vue';\n\nexport function setFromProp(o, prop) {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value;\n });\n }\n};\n\nexport function bindProps(src, props, dst) {\n props.forEach(prop => {\n bindProp(src, prop, dst);\n });\n};\n\nexport function bindProp(src, srcProp, dst, dstProp) {\n if (!dstProp) dstProp = srcProp;\n const ref = toRef(src, srcProp);\n if (ref.value instanceof Object) {\n setFromProp(dst[dstProp], ref.value);\n watch(ref, (value) => { setFromProp(dst[dstProp], value); }, { deep: true });\n } else {\n if (ref.value) dst[dstProp] = src[srcProp];\n watch(ref, (value) => { dst[dstProp] = value; });\n }\n};\n\nexport function propsValues(props, exclude) {\n const values = {};\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value;\n }\n });\n return values;\n};\n\nexport function lerp(value1, value2, amount) {\n amount = amount < 0 ? 0 : amount;\n amount = amount > 1 ? 1 : amount;\n return value1 + (value2 - value1) * amount;\n};\n\nexport function lerpv2(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n};\n\nexport function lerpv3(v1, v2, amount) {\n v1.x = lerp(v1.x, v2.x, amount);\n v1.y = lerp(v1.y, v2.y, amount);\n v1.z = lerp(v1.z, v2.z, amount);\n};\n\nexport function limit(val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\nexport function getMatcapUrl(hash, format = 1024) {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`;\n return `${MATCAP_ROOT}/${format}/${fileName}`;\n};\n\nfunction getMatcapFormatString(format) {\n switch (format) {\n case 64:\n return '-64px';\n case 128:\n return '-128px';\n case 256:\n return '-256px';\n case 512:\n return '-512px';\n default:\n return '';\n }\n}\n","import { defineComponent } from 'vue';\n// import Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n // TODO: eventually extend Object3D, for now: error 'injection \"scene\" not found'\n // because camera is a sibling of scene in Trois\n // extends: Object3D,\n inject: ['three'],\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { OrthographicCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n inject: ['three'],\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n },\n created() {\n this.camera = new OrthographicCamera(this.left, this.right, this.top, this.bottom, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'OrthographicCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { PerspectiveCamera } from 'three';\nimport { bindProp } from '../tools';\nimport Camera from './Camera.js';\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n inject: ['three'],\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n lookAt: { type: Object, default: null },\n },\n created() {\n this.camera = new PerspectiveCamera(this.fov, this.aspect, this.near, this.far);\n bindProp(this, 'position', this.camera);\n\n if (this.lookAt) this.camera.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.camera.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n ['aspect', 'far', 'fov', 'near'].forEach(p => {\n watch(() => this[p], () => {\n this.camera[p] = this[p];\n this.camera.updateProjectionMatrix();\n });\n });\n\n this.three.camera = this.camera;\n },\n __hmrId: 'PerspectiveCamera',\n});\n","import { defineComponent, watch } from 'vue';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n name: 'Object3D',\n inject: ['three', 'scene', 'rendererComponent'],\n emits: ['created', 'ready'],\n props: {\n position: { type: Object, default: { x: 0, y: 0, z: 0 } },\n rotation: { type: Object, default: { x: 0, y: 0, z: 0 } },\n scale: { type: Object, default: { x: 1, y: 1, z: 1 } },\n lookAt: { type: Object, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.autoRemove) this.removeFromParent();\n },\n methods: {\n initObject3D(o3d) {\n this.o3d = o3d;\n this.o3d.userData = this.userData;\n this.$emit('created', this.o3d);\n\n bindProp(this, 'position', this.o3d);\n bindProp(this, 'rotation', this.o3d);\n bindProp(this, 'scale', this.o3d);\n\n // TODO : fix lookat.x\n if (this.lookAt) this.o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z);\n watch(() => this.lookAt, (v) => { this.o3d.lookAt(v.x, v.y, v.z); }, { deep: true });\n\n this._parent = this.getParent();\n if (this.addToParent()) this.$emit('ready', this);\n else console.error('Missing parent (Scene, Group...)');\n },\n getParent() {\n let parent = this.$parent;\n while (parent) {\n if (parent.add) return parent;\n parent = parent.$parent;\n }\n return false;\n },\n addToParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.add(o3d);\n return true;\n }\n return false;\n },\n removeFromParent(o) {\n const o3d = o || this.o3d;\n if (this._parent) {\n this._parent.remove(o3d);\n return true;\n }\n return false;\n },\n add(o) { this.o3d.add(o); },\n remove(o) { this.o3d.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Object3D',\n});\n","import { defineComponent } from 'vue';\nimport { Group } from 'three';\nimport Object3D from './Object3D.js';\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n created() {\n this.group = new Group();\n this.initObject3D(this.group);\n },\n __hmrId: 'Group',\n});\n","import { defineComponent, watch } from 'vue';\nimport { Scene, Color } from 'three';\n\nexport default defineComponent({\n name: 'Scene',\n inject: ['three'],\n props: {\n id: String,\n background: [String, Number],\n },\n setup(props) {\n const scene = new Scene();\n if (props.background) scene.background = new Color(props.background);\n watch(() => props.background, (value) => { scene.background.set(value); });\n return { scene };\n },\n provide() {\n return {\n scene: this.scene,\n };\n },\n mounted() {\n if (!this.three.scene) {\n this.three.scene = this.scene;\n }\n },\n methods: {\n add(o) { this.scene.add(o); },\n remove(o) { this.scene.remove(o); },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Scene',\n});\n","import { defineComponent } from 'vue';\r\nimport usePointer from './usePointer';\r\n\r\nexport default defineComponent({\r\n name: 'Raycaster',\r\n inject: ['three', 'rendererComponent'],\r\n props: {\r\n onPointerEnter: { type: Function, default: () => {} },\r\n onPointerOver: { type: Function, default: () => {} },\r\n onPointerMove: { type: Function, default: () => {} },\r\n onPointerLeave: { type: Function, default: () => {} },\r\n onClick: { type: Function, default: () => {} },\r\n intersectMode: { type: String, default: 'move' },\r\n },\r\n mounted() {\r\n this.rendererComponent.onMounted(() => {\r\n this.pointer = usePointer({\r\n camera: this.three.camera,\r\n domElement: this.three.renderer.domElement,\r\n intersectObjects: this.getIntersectObjects(),\r\n onIntersectEnter: this.onPointerEnter,\r\n onIntersectOver: this.onPointerOver,\r\n onIntersectMove: this.onPointerMove,\r\n onIntersectLeave: this.onPointerLeave,\r\n onIntersectClick: this.onClick,\r\n });\r\n this.pointer.addListeners();\r\n\r\n if (this.intersectMode === 'frame') {\r\n this.rendererComponent.onBeforeRender(this.pointer.intersect);\r\n }\r\n });\r\n },\r\n unmounted() {\r\n if (this.pointer) {\r\n this.pointer.removeListeners();\r\n this.rendererComponent.offBeforeRender(this.pointer.intersect);\r\n }\r\n },\r\n methods: {\r\n getIntersectObjects() {\r\n return this.three.scene.children.filter(e => e.type === 'Mesh');\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n __hmrId: 'Raycaster',\r\n});\r\n","import { defineComponent, watch } from 'vue';\n\nconst Geometry = defineComponent({\n inject: ['mesh'],\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh');\n }\n\n this.watchProps = [];\n Object.entries(this.$props).forEach(e => this.watchProps.push(e[0]));\n\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n\n this.addWatchers();\n },\n unmounted() {\n this.geometry.dispose();\n },\n methods: {\n addWatchers() {\n this.watchProps.forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n rotateGeometry() {\n if (this.rotateX) this.geometry.rotateX(this.rotateX);\n if (this.rotateY) this.geometry.rotateY(this.rotateY);\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ);\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.rotateGeometry();\n this.mesh.setGeometry(this.geometry);\n oldGeo.dispose();\n },\n },\n render() { return []; },\n});\n\nexport default Geometry;\n\nexport function geometryComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n });\n};\n","import { geometryComponent } from './Geometry.js';\nimport { BoxGeometry } from 'three';\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments);\n }\n};\n\nexport default geometryComponent('BoxGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CircleGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CircleGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { ConeGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('ConeGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { CylinderGeometry } from 'three';\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { DodecahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new DodecahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { IcosahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new IcosahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { LatheGeometry } from 'three';\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength);\n};\n\nexport default geometryComponent('LatheGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { OctahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new OctahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PlaneGeometry } from 'three';\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n};\n\nexport function createGeometry(comp) {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { PolyhedronGeometry } from 'three';\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail);\n};\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { RingGeometry } from 'three';\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength);\n};\n\nexport default geometryComponent('RingGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { SphereGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n};\n\nexport function createGeometry(comp) {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments);\n};\n\nexport default geometryComponent('SphereGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TetrahedronGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n};\n\nexport function createGeometry(comp) {\n return new TetrahedronGeometry(comp.radius, comp.detail);\n};\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n};\n\nexport function createGeometry(comp) {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc);\n};\n\nexport default geometryComponent('TorusGeometry', props, createGeometry);\n","import { geometryComponent } from './Geometry.js';\nimport { TorusKnotGeometry } from 'three';\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n};\n\nexport function createGeometry(comp) {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q);\n};\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three';\nimport Geometry from './Geometry.js';\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n};\n\nexport function createGeometry(comp) {\n let curve;\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points);\n } else if (comp.path) {\n curve = comp.path;\n } else {\n console.error('Missing path curve or points.');\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed);\n};\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n});\n\nexport function updateTubeGeometryPoints(tube, points) {\n const curve = new CatmullRomCurve3(points);\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters;\n const frames = curve.computeFrenetFrames(tubularSegments, closed);\n tube.tangents = frames.tangents;\n tube.normals = frames.normals;\n tube.binormals = frames.binormals;\n tube.parameters.path = curve;\n\n const pArray = tube.attributes.position.array;\n const nArray = tube.attributes.normal.array;\n const normal = new Vector3();\n let P;\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i);\n }\n updateSegment(tubularSegments);\n\n tube.attributes.position.needsUpdate = true;\n tube.attributes.normal.needsUpdate = true;\n\n function updateSegment(i) {\n P = curve.getPointAt(i / tubularSegments, P);\n const N = frames.normals[i];\n const B = frames.binormals[i];\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n normal.x = (cos * N.x + sin * B.x);\n normal.y = (cos * N.y + sin * B.y);\n normal.z = (cos * N.z + sin * B.z);\n normal.normalize();\n const index = (i * (radialSegments + 1) + j) * 3;\n nArray[index] = normal.x;\n nArray[index + 1] = normal.y;\n nArray[index + 2] = normal.z;\n pArray[index] = P.x + radius * normal.x;\n pArray[index + 1] = P.y + radius * normal.y;\n pArray[index + 2] = P.z + radius * normal.z;\n }\n }\n}\n","import { defineComponent, watch } from 'vue';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp, setFromProp } from '../tools';\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object, default: { x: 512, y: 512 } },\n shadowCamera: { type: Object, default: {} },\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n unmounted() {\n if (this.light.target) this.removeFromParent(this.light.target);\n },\n methods: {\n initLight() {\n if (this.light.target) {\n bindProp(this, 'target', this.light.target, 'position');\n }\n\n if (this.light.shadow) {\n this.light.castShadow = this.castShadow;\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\n setFromProp(this.light.shadow.camera, this.shadowCamera);\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.light.color.set(this.color);\n } else {\n this.light[p] = this[p];\n }\n });\n });\n\n this.initObject3D(this.light);\n if (this.light.target) this.addToParent(this.light.target);\n },\n },\n __hmrId: 'Light',\n});\n","import { defineComponent } from 'vue';\nimport { AmbientLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.light = new AmbientLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'AmbientLight',\n});\n","import { defineComponent } from 'vue';\nimport { DirectionalLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: Object,\n },\n created() {\n this.light = new DirectionalLight(this.color, this.intensity);\n this.initLight();\n },\n __hmrId: 'DirectionalLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HemisphereLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);\n watch(() => this.groundColor, (value) => { this.light.groundColor.set(value); });\n this.initLight();\n },\n __hmrId: 'HemisphereLight',\n});\n","import { defineComponent } from 'vue';\nimport { PointLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: {\n type: Number,\n default: 0,\n },\n decay: {\n type: Number,\n default: 1,\n },\n },\n created() {\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\n this.initLight();\n },\n __hmrId: 'PointLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { RectAreaLight } from 'three';\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js';\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init();\n this.light = new RectAreaLight(this.color, this.intensity, this.width, this.height);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n\n if (this.helper) {\n this.lightHelper = new RectAreaLightHelper(this.light);\n this.light.add(this.lightHelper);\n }\n\n this.initLight();\n },\n unmounted() {\n if (this.lightHelper) this.removeFromParent(this.lightHelper);\n },\n __hmrId: 'RectAreaLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { SpotLight } from 'three';\nimport Light from './Light.js';\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\n ['angle', 'decay', 'distance', 'penumbra'].forEach(p => {\n watch(() => this[p], () => {\n this.light[p] = this[p];\n });\n });\n this.initLight();\n },\n __hmrId: 'SpotLight',\n});\n","import { defineComponent, watch } from 'vue';\nimport { FrontSide } from 'three';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n\n this._addWatchers();\n if (this.addWatchers) this.addWatchers();\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n setProp(key, value, needsUpdate = false) {\n this.material[key] = value;\n this.material.needsUpdate = needsUpdate;\n },\n setTexture(texture, key = 'map') {\n this.setProp(key, texture, true);\n },\n _addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n watch(() => this[p], () => {\n if (p === 'color') {\n this.material.color.set(this.color);\n } else {\n this.material[p] = this[p];\n }\n });\n });\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'Material',\n});\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n};\n","import { defineComponent } from 'vue';\nimport { MeshBasicMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshBasicMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'BasicMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshLambertMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshLambertMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'LambertMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshMatcapMaterial, TextureLoader } from 'three';\nimport { propsValues, getMatcapUrl } from '../tools';\nimport Material from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: String,\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.name ? getMatcapUrl(this.name) : this.src;\n const opts = propsValues(this.$props, ['src', 'name']);\n opts.matcap = new TextureLoader().load(src);\n this.material = new MeshMatcapMaterial(opts);\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'MatcapMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshPhongMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhongMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO : handle flatShading ?\n ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular'].forEach(p => {\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'PhongMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { MeshStandardMaterial } from 'three';\nimport { bindProp, bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object, default: { x: 1, y: 1 } },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n};\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']));\n },\n addWatchers() {\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return;\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n this.material[p].set(value);\n } else {\n this.material[p] = value;\n }\n });\n });\n bindProp(this, 'normalScale', this.material);\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'StandardMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshPhysicalMaterial } from 'three';\nimport { propsValues } from '../tools';\nimport StandardMaterial from './StandardMaterial';\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n this.material = new MeshPhysicalMaterial(propsValues(this.$props));\n },\n addWatchers() {\n // TODO\n },\n },\n __hmrId: 'PhysicalMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ShaderMaterial } from 'three';\nimport { propsValues } from '../tools';\n\nconst defaultVertexShader = `\nvarying vec2 vUv;\nvoid main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}`;\n\nconst defaultFragmentShader = `\nvarying vec2 vUv;\nvoid main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n}`;\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n uniforms: { type: Object, default: () => { return {}; } },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n provide() {\n return {\n material: this,\n };\n },\n created() {\n this.createMaterial();\n ['vertexShader', 'fragmentShader'].forEach(p => {\n watch(() => this[p], () => {\n // recreate material if we change either shader\n this.material.dispose();\n this.createMaterial();\n });\n });\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n this.material = new ShaderMaterial(propsValues(this.$props));\n this.mesh.setMaterial(this.material);\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : [];\n },\n __hmrId: 'ShaderMaterial',\n});\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three';\n\nfunction replaceAll(string, find, replace) {\n return string.split(find).join(replace);\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'));\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'));\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n};\n\nexport default SubsurfaceScatteringShader;\n","import { defineComponent } from 'vue';\nimport { Color, ShaderMaterial as TShaderMaterial, UniformsUtils } from 'three';\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader.js';\n\nexport default defineComponent({\n inject: ['three', 'mesh'],\n props: {\n color: { type: String, default: '#ffffff' },\n thicknessColor: { type: String, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n transparent: { type: Boolean, default: false },\n opacity: { type: Number, default: 1 },\n vertexColors: { type: Boolean, default: false },\n },\n created() {\n this.createMaterial();\n this.mesh.setMaterial(this.material);\n },\n unmounted() {\n this.material.dispose();\n },\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader;\n const uniforms = UniformsUtils.clone(params.uniforms);\n\n Object.entries(this.$props).forEach(([key, value]) => {\n let _key = key, _value = value;\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse';\n _value = new Color(value);\n }\n if (!['transparent', 'vertexColors'].includes(key)) {\n uniforms[_key].value = _value;\n }\n });\n\n this.material = new TShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n });\n },\n },\n render() {\n return [];\n },\n __hmrId: 'SubSurfaceMaterial',\n});\n","import { defineComponent } from 'vue';\nimport { MeshToonMaterial } from 'three';\nimport { bindProps, propsValues } from '../tools';\nimport Material, { wireframeProps } from './Material';\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n this.material = new MeshToonMaterial(propsValues(this.$props));\n },\n addWatchers() {\n bindProps(this, Object.keys(wireframeProps), this.material);\n },\n },\n __hmrId: 'ToonMaterial',\n});\n","import { defineComponent, watch } from 'vue';\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, TextureLoader, UVMapping } from 'three';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n name: { type: String, default: 'map' },\n uniform: { type: String, default: null },\n src: String,\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object, default: { x: 1, y: 1 } },\n rotation: { type: Number, default: 0 },\n center: { type: Object, default: { x: 0, y: 0 } },\n },\n created() {\n this.refreshTexture();\n watch(() => this.src, this.refreshTexture);\n },\n unmounted() {\n if (this.material && this.material.setTexture) this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError);\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'rotation', 'center'];\n wathProps.forEach(prop => {\n bindProp(this, prop, this.texture);\n });\n },\n refreshTexture() {\n this.createTexture();\n // handle standard material\n if (this.material && this.material.setTexture) { this.material.setTexture(this.texture, this.name); }\n // handle shader material\n else if (this.material && this.material.material.type === \"ShaderMaterial\") {\n // require a `uniform` prop so we know what to call the uniform\n if (!this.uniform) {\n console.warn('\"uniform\" prop required to use texture in a shader.')\n return\n }\n this.material.uniforms[this.uniform] = { value: this.texture };\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() { return []; },\n});\n","import { defineComponent, watch } from 'vue';\nimport { CubeTextureLoader, CubeRefractionMapping } from 'three';\n\nexport default defineComponent({\n inject: ['material'],\n emits: ['loaded'],\n props: {\n path: String,\n urls: {\n type: Array,\n default: ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n onLoad: Function,\n onProgress: Function,\n onError: Function,\n name: { type: String, default: 'envMap' },\n refraction: Boolean,\n // todo: remove ?\n refractionRatio: { type: Number, default: 0.98 },\n },\n created() {\n this.refreshTexture();\n watch(() => this.path, this.refreshTexture);\n watch(() => this.urls, this.refreshTexture);\n },\n unmounted() {\n this.material.setTexture(null, this.name);\n this.texture.dispose();\n },\n methods: {\n createTexture() {\n this.texture = new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError);\n },\n refreshTexture() {\n this.createTexture();\n this.material.setTexture(this.texture, this.name);\n if (this.refraction) {\n this.texture.mapping = CubeRefractionMapping;\n this.material.setProp('refractionRatio', this.refractionRatio);\n }\n },\n onLoaded() {\n if (this.onLoad) this.onLoad();\n this.$emit('loaded');\n },\n },\n render() {\n return [];\n },\n});\n","import { defineComponent, watch } from 'vue';\nimport { Mesh as TMesh } from 'three';\nimport Object3D from '../core/Object3D.js';\nimport { bindProp } from '../tools';\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n};\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n // can't use setup because it will not be used in sub components\n // setup() {},\n provide() {\n return {\n mesh: this,\n };\n },\n mounted() {\n if (!this.mesh && !this.loading) this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new TMesh(this.geometry, this.material);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n addGeometryWatchers(props) {\n Object.keys(props).forEach(prop => {\n watch(() => this[prop], () => {\n this.refreshGeometry();\n });\n });\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n if (this.mesh) this.mesh.material = material;\n },\n refreshGeometry() {\n const oldGeo = this.geometry;\n this.createGeometry();\n this.mesh.geometry = this.geometry;\n oldGeo.dispose();\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n // for predefined mesh (geometry is not unmounted)\n if (this.geometry) this.geometry.dispose();\n },\n __hmrId: 'Mesh',\n});\n\nexport default Mesh;\n\nexport function meshComponent(name, props, createGeometry) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n },\n __hmrId: name,\n });\n};\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/BoxGeometry.js';\n\nexport default meshComponent('Box', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CircleGeometry.js';\n\nexport default meshComponent('Circle', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/ConeGeometry.js';\n\nexport default meshComponent('Cone', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/CylinderGeometry.js';\n\nexport default meshComponent('Cylinder', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry.js';\n\nexport default meshComponent('Dodecahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry.js';\n\nexport default meshComponent('Icosahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/LatheGeometry.js';\n\nexport default meshComponent('Lathe', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/OctahedronGeometry.js';\n\nexport default meshComponent('Octahedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PlaneGeometry.js';\n\nexport default meshComponent('Plane', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry.js';\n\nexport default meshComponent('Polyhedron', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/RingGeometry.js';\n\nexport default meshComponent('Ring', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/SphereGeometry.js';\n\nexport default meshComponent('Sphere', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry.js';\n\nexport default meshComponent('Tetrahedron', props, createGeometry);\n","import { defineComponent, watch } from 'vue';\nimport { FontLoader, TextGeometry } from 'three';\nimport Mesh from './Mesh.js';\n\nconst props = {\n text: String,\n fontSrc: String,\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String], default: false },\n};\n\nexport default defineComponent({\n extends: Mesh,\n props,\n data() {\n return {\n loading: true,\n };\n },\n created() {\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ];\n watchProps.forEach(p => {\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry();\n });\n });\n\n const loader = new FontLoader();\n loader.load(this.fontSrc, (font) => {\n this.loading = false;\n this.font = font;\n this.createGeometry();\n this.initMesh();\n });\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n });\n\n if (this.align === 'center') {\n this.geometry.center();\n }\n },\n },\n});\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusGeometry.js';\n\nexport default meshComponent('Torus', props, createGeometry);\n","import { meshComponent } from './Mesh.js';\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry.js';\n\nexport default meshComponent('TorusKnot', props, createGeometry);\n","import { defineComponent } from 'vue';\nimport Mesh from './Mesh.js';\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js';\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry();\n this.addGeometryWatchers(props);\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this);\n },\n // update curve points (without using prop, faster)\n updatePoints(points) {\n updateTubeGeometryPoints(this.geometry, points);\n },\n },\n __hmrId: 'Tube',\n});\n","import { defineComponent, watch } from 'vue';\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, TextureLoader } from 'three';\nimport Mesh from './Mesh.js';\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: String,\n width: Number,\n height: Number,\n keepSize: Boolean,\n },\n created() {\n this.createGeometry();\n this.createMaterial();\n this.initMesh();\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n watch(() => this[p], this.resize);\n });\n\n if (this.keepSize) this.three.onAfterResize(this.resize);\n },\n methods: {\n createGeometry() {\n this.geometry = new PlaneGeometry(1, 1, 1, 1);\n },\n createMaterial() {\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });\n },\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded);\n },\n refreshTexture() {\n if (this.texture) this.texture.dispose();\n this.material.map = this.loadTexture();\n this.material.needsUpdate = true;\n },\n onLoaded(texture) {\n this.texture = texture;\n this.resize();\n this.$emit('loaded');\n },\n resize() {\n if (!this.texture) return;\n const screen = this.three.size;\n const iW = this.texture.image.width;\n const iH = this.texture.image.height;\n const iRatio = iW / iH;\n let w, h;\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width;\n h = this.height * screen.wHeight / screen.height;\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width;\n h = w / iRatio;\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height;\n w = h * iRatio;\n }\n this.mesh.scale.x = w;\n this.mesh.scale.y = h;\n },\n },\n __hmrId: 'Image',\n});\n","import { defineComponent } from 'vue';\nimport { InstancedMesh } from 'three';\nimport Object3D from '../core/Object3D';\nimport { bindProp } from '../tools';\nimport { pointerProps } from './Mesh';\n\nexport default defineComponent({\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n count: Number,\n ...pointerProps,\n },\n provide() {\n return {\n mesh: this,\n };\n },\n beforeMount() {\n if (!this.$slots.default) {\n console.error('Missing Geometry');\n }\n },\n mounted() {\n this.initMesh();\n },\n methods: {\n initMesh() {\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count);\n this.mesh.component = this;\n\n bindProp(this, 'castShadow', this.mesh);\n bindProp(this, 'receiveShadow', this.mesh);\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.three.addIntersectObject(this.mesh);\n }\n\n this.initObject3D(this.mesh);\n },\n setGeometry(geometry) {\n this.geometry = geometry;\n if (this.mesh) this.mesh.geometry = geometry;\n },\n setMaterial(material) {\n this.material = material;\n this.material.instancingColor = true;\n if (this.mesh) this.mesh.material = material;\n },\n },\n unmounted() {\n if (this.mesh) {\n this.three.removeIntersectObject(this.mesh);\n }\n },\n __hmrId: 'InstancedMesh',\n});\n","import { defineComponent } from 'vue';\nimport { Sprite, SpriteMaterial, TextureLoader } from 'three';\nimport Object3D from '../core/Object3D.js';\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: String,\n },\n data() {\n return {\n loading: true,\n };\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded);\n this.material = new SpriteMaterial({ map: this.texture });\n this.sprite = new Sprite(this.material);\n this.geometry = this.sprite.geometry;\n this.initObject3D(this.sprite);\n },\n unmounted() {\n this.texture.dispose();\n this.material.dispose();\n },\n methods: {\n onLoaded() {\n this.loading = false;\n this.updateUV();\n this.$emit('loaded');\n },\n updateUV() {\n this.iWidth = this.texture.image.width;\n this.iHeight = this.texture.image.height;\n this.iRatio = this.iWidth / this.iHeight;\n\n let x = 0.5, y = 0.5;\n if (this.iRatio > 1) {\n y = 0.5 / this.iRatio;\n } else {\n x = 0.5 / this.iRatio;\n }\n\n const positions = this.geometry.attributes.position.array;\n positions[0] = -x; positions[1] = -y;\n positions[5] = x; positions[6] = -y;\n positions[10] = x; positions[11] = y;\n positions[15] = -x; positions[16] = y;\n this.geometry.attributes.position.needsUpdate = true;\n },\n },\n __hmrId: 'Sprite',\n});\n","import { defineComponent } from 'vue';\r\nimport Object3D from '../core/Object3D.js';\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n emits: ['load', 'progress', 'error'],\r\n data() {\r\n return {\r\n progress: 0,\r\n };\r\n },\r\n methods: {\r\n onLoad(model) {\r\n this.$emit('load', model);\r\n this.initObject3D(model);\r\n },\r\n onProgress(progress) {\r\n this.progress = progress.loaded / progress.total;\r\n this.$emit('progress', progress);\r\n },\r\n onError(error) {\r\n this.$emit('error', error);\r\n },\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new GLTFLoader();\r\n loader.load(this.src, (gltf) => {\r\n this.onLoad(gltf.scene);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\r\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';\r\nimport Model from './Model.js';\r\n\r\nexport default defineComponent({\r\n extends: Model,\r\n props: {\r\n src: String,\r\n },\r\n created() {\r\n const loader = new FBXLoader();\r\n loader.load(this.src, (fbx) => {\r\n this.onLoad(fbx);\r\n }, this.onProgress, this.onError);\r\n },\r\n});\r\n","import { defineComponent } from 'vue';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\n\nexport default defineComponent({\n setup() {\n return {\n passes: [],\n };\n },\n inject: ['three'],\n provide() {\n return {\n passes: this.passes,\n };\n },\n mounted() {\n this.three.onAfterInit(() => {\n this.composer = new EffectComposer(this.three.renderer);\n this.three.renderer.autoClear = false;\n this.passes.forEach(pass => {\n this.composer.addPass(pass);\n });\n this.three.composer = this.composer;\n\n this.resize();\n this.three.onAfterResize(this.resize);\n });\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n this.composer.setSize(this.three.size.width, this.three.size.height);\n },\n },\n render() {\n return this.$slots.default();\n },\n __hmrId: 'EffectComposer',\n});\n","import { defineComponent } from 'vue';\n\nexport default defineComponent({\n inject: ['three', 'passes'],\n emits: ['ready'],\n beforeMount() {\n if (!this.passes) {\n console.error('Missing parent EffectComposer');\n }\n },\n unmounted() {\n if (this.pass.dispose) this.pass.dispose();\n },\n methods: {\n completePass(pass) {\n this.passes.push(pass);\n this.pass = pass;\n this.$emit('ready', pass);\n },\n },\n render() {\n return [];\n },\n __hmrId: 'EffectPass',\n});\n","import { defineComponent } from 'vue';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const pass = new RenderPass(this.three.scene, this.three.camera);\n this.completePass(pass);\n },\n __hmrId: 'RenderPass',\n});\n","import { defineComponent } from 'vue';\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n focus: {\n type: Number,\n default: 1,\n },\n aperture: {\n type: Number,\n default: 0.025,\n },\n maxblur: {\n type: Number,\n default: 0.01,\n },\n },\n watch: {\n focus() { this.pass.uniforms.focus.value = this.focus; },\n aperture() { this.pass.uniforms.aperture.value = this.aperture; },\n maxblur() { this.pass.uniforms.maxblur.value = this.maxblur; },\n },\n mounted() {\n if (!this.three.scene) {\n console.error('Missing Scene');\n }\n if (!this.three.camera) {\n console.error('Missing Camera');\n }\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.three.size.width,\n height: this.three.size.height,\n };\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\n this.completePass(pass);\n },\n __hmrId: 'BokehPass',\n});\n","import { defineComponent } from 'vue';\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n },\n watch: {\n noiseIntensity() { this.pass.uniforms.nIntensity.value = this.noiseIntensity; },\n scanlinesIntensity() { this.pass.uniforms.sIntensity.value = this.scanlinesIntensity; },\n scanlinesCount() { this.pass.uniforms.sCount.value = this.scanlinesCount; },\n grayscale() { this.pass.uniforms.grayscale.value = this.grayscale; },\n },\n mounted() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale);\n this.completePass(pass);\n },\n __hmrId: 'FilmPass',\n});\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n const pass = new ShaderPass(FXAAShader);\n this.completePass(pass);\n\n // resize will be called in three init\n this.three.onAfterResize(this.resize);\n },\n unmounted() {\n this.three.offAfterResize(this.resize);\n },\n methods: {\n resize() {\n const { resolution } = this.pass.material.uniforms;\n resolution.value.x = 1 / this.three.size.width;\n resolution.value.y = 1 / this.three.size.height;\n },\n },\n __hmrId: 'FXAAPass',\n});\n","import { defineComponent, watch } from 'vue';\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n },\n mounted() {\n const pass = new HalftonePass(this.three.size.width, this.three.size.height, {});\n\n ['shape', 'radius', 'rotateR', 'rotateG', 'rotateB', 'scatter'].forEach(p => {\n pass.uniforms[p].value = this[p];\n watch(() => this[p], () => {\n pass.uniforms[p].value = this[p];\n });\n });\n\n this.completePass(pass);\n },\n __hmrId: 'HalftonePass',\n});\n","import { defineComponent } from 'vue';\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n mounted() {\n // three size is not set yet, but this pass will be resized by effect composer\n const pass = new SMAAPass(this.three.size.width, this.three.size.height);\n this.completePass(pass);\n },\n __hmrId: 'SMAAPass',\n});\n","import { defineComponent } from 'vue';\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n scene: null,\n camera: null,\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n mounted() {\n const pass = new SSAOPass(\n this.scene || this.three.scene,\n this.camera || this.three.camera,\n this.three.size.width,\n this.three.size.height\n );\n\n for (const key of Object.keys(this.options)) {\n pass[key] = this.options[key];\n }\n\n this.completePass(pass);\n },\n __hmrId: 'SSAOPass',\n});\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n};\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent, watch } from 'vue';\nimport { Vector2 } from 'three';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport TiltShift from '../shaders/TiltShift.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object, default: { x: 0, y: 100 } },\n end: { type: Object, default: { x: 10, y: 100 } },\n },\n mounted() {\n this.pass = new ShaderPass(TiltShift);\n this.passes.push(this.pass);\n\n this.pass1 = new ShaderPass(TiltShift);\n this.passes.push(this.pass1);\n\n const uniforms = this.uniforms = this.pass.uniforms;\n const uniforms1 = this.uniforms1 = this.pass1.uniforms;\n uniforms1.blurRadius = uniforms.blurRadius;\n uniforms1.gradientRadius = uniforms.gradientRadius;\n uniforms1.start = uniforms.start;\n uniforms1.end = uniforms.end;\n uniforms1.texSize = uniforms.texSize;\n\n bindProp(this, 'blurRadius', uniforms.blurRadius, 'value');\n bindProp(this, 'gradientRadius', uniforms.gradientRadius, 'value');\n\n this.updateFocusLine();\n ['start', 'end'].forEach(p => {\n watch(() => this[p], this.updateFocusLine, { deep: true });\n });\n\n this.pass.setSize = (width, height) => {\n uniforms.texSize.value.set(width, height);\n };\n\n // emit ready event with two passes - do so manually in this file instead\n // of calling `completePass` like in other effect types\n this.$emit('ready', [this.pass, this.pass1]);\n },\n methods: {\n updateFocusLine() {\n this.uniforms.start.value.copy(this.start);\n this.uniforms.end.value.copy(this.end);\n const dv = new Vector2().copy(this.end).sub(this.start).normalize();\n this.uniforms.delta.value.copy(dv);\n this.uniforms1.delta.value.set(-dv.y, dv.x);\n },\n },\n __hmrId: 'TiltShiftPass',\n});\n","import { defineComponent } from 'vue';\nimport { Vector2 } from 'three';\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\nimport EffectPass from './EffectPass.js';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n },\n watch: {\n strength() { this.pass.strength = this.strength; },\n radius() { this.pass.radius = this.radius; },\n threshold() { this.pass.threshold = this.threshold; },\n },\n mounted() {\n const size = new Vector2(this.three.size.width, this.three.size.height);\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\n this.completePass(pass);\n },\n __hmrId: 'UnrealBloomPass',\n});\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three';\nimport DefaultShader from './default';\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n};\n","import { defineComponent } from 'vue';\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';\nimport EffectPass from './EffectPass.js';\nimport ZoomBlur from '../shaders/ZoomBlur.js';\nimport { bindProp } from '../tools';\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object, default: { x: 0.5, y: 0.5 } },\n strength: { type: Number, default: 0.5 },\n },\n mounted() {\n const pass = new ShaderPass(ZoomBlur);\n\n const uniforms = this.uniforms = pass.uniforms;\n bindProp(this, 'center', uniforms.center, 'value');\n bindProp(this, 'strength', uniforms.strength, 'value');\n\n this.completePass(pass);\n },\n __hmrId: 'ZoomBlurPass',\n});\n","import { createApp as _createApp } from 'vue';\nimport * as TROIS from './index.js';\n\nexport const TroisJSVuePlugin = {\n install: (app) => {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ];\n\n comps.forEach(comp => {\n app.component(comp, TROIS[comp]);\n });\n },\n};\n\nexport function createApp(params) {\n return _createApp(params).use(TroisJSVuePlugin);\n};\n"],"names":["usePointer","options","camera","domElement","intersectObjects","touch","resetOnEnd","resetPosition","Vector2","resetPositionV3","Vector3","onEnter","onMove","onLeave","onIntersectEnter","onIntersectOver","onIntersectMove","onIntersectLeave","onIntersectClick","position","clone","positionN","raycaster","Raycaster","plane","Plane","updatePosition","coords","setFromCamera","getWorldDirection","normal","ray","intersectPlane","intersect","objects","useRaycaster","positionV3","obj","listeners","addListeners","addEventListener","pointerEnter","pointerMove","pointerLeave","pointerClick","removeListeners","removeEventListener","event","x","y","touches","length","clientX","clientY","rect","getBoundingClientRect","left","top","width","height","intersects","offObjects","iMeshes","forEach","object","component","InstancedMesh","indexOf","push","over","overEvent","type","enterEvent","onPointerOver","onPointerEnter","moveEvent","onPointerMove","splice","leaveEvent","onPointerLeave","onClick","copy","useThree","conf","canvas","antialias","alpha","autoClear","orbit_ctrl","pointer","resize","size","wWidth","wHeight","ratio","afterInitCallbacks","afterResizeCallbacks","beforeRenderCallbacks","renderer","cameraCtrl","scene","init","params","Object","entries","key","value","console","error","WebGLRenderer","onResize","window","setSize","initPointer","orbitCtrl","OrbitControls","c","dispose","render","update","renderC","composer","onAfterInit","callback","onAfterResize","offAfterResize","filter","addIntersectObject","o","removeIntersectObject","i","pointerConf","intersectMode","innerWidth","innerHeight","elt","parentNode","clientWidth","clientHeight","aspect","updateProjectionMatrix","right","bottom","wsize","vFOV","fov","Math","PI","h","tan","abs","z","getCameraSize","defineComponent","name","props","Boolean","default","String","shadow","xr","setup","three","raf","onMountedCallbacks","afterRenderCallbacks","[object Object]","this","rendererComponent","$el","shadowMap","enabled","_render","setAnimationLoop","requestAnimationFrame","renderLoop","methods","cb","time","$slots","__hmrId","setFromProp","prop","bindProps","src","dst","bindProp","srcProp","dstProp","ref","toRef","watch","deep","propsValues","exclude","values","includes","lerp","value1","value2","amount","lerpv2","v1","v2","lerpv3","limit","val","min","max","getMatcapUrl","hash","format","getMatcapFormatString","inject","extends","Camera","Number","near","far","zoom","OrthographicCamera","p","lookAt","PerspectiveCamera","v","emits","rotation","scale","autoRemove","userData","removeFromParent","o3d","$emit","_parent","getParent","addToParent","parent","$parent","add","remove","Object3D","group","Group","initObject3D","id","background","Scene","Color","set","Function","onMounted","getIntersectObjects","onBeforeRender","offBeforeRender","children","e","Geometry","rotateX","rotateY","rotateZ","mesh","watchProps","$props","createGeometry","rotateGeometry","setGeometry","geometry","addWatchers","refreshGeometry","oldGeo","geometryComponent","depth","widthSegments","heightSegments","depthSegments","comp","BoxGeometry","radius","segments","thetaStart","thetaLength","CircleGeometry","radialSegments","openEnded","ConeGeometry","radiusTop","radiusBottom","CylinderGeometry","detail","DodecahedronGeometry","IcosahedronGeometry","points","Array","phiStart","phiLength","LatheGeometry","OctahedronGeometry","PlaneGeometry","vertices","indices","PolyhedronGeometry","innerRadius","outerRadius","thetaSegments","phiSegments","RingGeometry","SphereGeometry","TetrahedronGeometry","tube","tubularSegments","arc","TorusGeometry","q","TorusKnotGeometry","path","Curve","closed","curve","CatmullRomCurve3","TubeGeometry","radiusSegments","updateTubeGeometryPoints","parameters","frames","computeFrenetFrames","tangents","normals","binormals","pArray","attributes","array","nArray","P","updateSegment","getPointAt","N","B","j","sin","cos","normalize","index","needsUpdate","color","intensity","castShadow","shadowMapSize","shadowCamera","light","target","mapSize","Light","AmbientLight","initLight","DirectionalLight","groundColor","HemisphereLight","distance","decay","PointLight","helper","RectAreaLightUniformsLib","RectAreaLight","lightHelper","RectAreaLightHelper","angle","penumbra","SpotLight","depthTest","depthWrite","fog","opacity","side","FrontSide","transparent","vertexColors","material","createMaterial","setMaterial","_addWatchers","texture","setProp","wireframeProps","wireframe","wireframeLinewidth","Material","MeshBasicMaterial","keys","MeshLambertMaterial","flatShading","opts","matcap","TextureLoader","load","MeshMatcapMaterial","emissive","emissiveIntensity","reflectivity","shininess","specular","MeshPhongMaterial","aoMapIntensity","bumpScale","displacementBias","displacementScale","envMapIntensity","lightMapIntensity","metalness","normalScale","roughness","refractionRatio","MeshStandardMaterial","StandardMaterial","MeshPhysicalMaterial","uniforms","vertexShader","fragmentShader","ShaderMaterial","meshphongFragHead","ShaderChunk","meshphong_frag","slice","meshphongFragBody","SubsurfaceScatteringShader","UniformsUtils","merge","ShaderLib","phong","thicknessColor","thicknessDistortion","thicknessAmbient","thicknessAttenuation","thicknessPower","thicknessScale","meshphong_vert","replace","string","lights_fragment_begin","find","split","join","_key","_value","TShaderMaterial","lights","MeshToonMaterial","uniform","onLoad","onProgress","onError","mapping","UVMapping","wrapS","ClampToEdgeWrapping","wrapT","magFilter","LinearFilter","minFilter","LinearMipmapLinearFilter","repeat","center","refreshTexture","setTexture","onLoaded","createTexture","warn","urls","refraction","CubeTextureLoader","setPath","CubeRefractionMapping","pointerProps","onPointerDown","onPointerUp","Mesh","receiveShadow","loading","initMesh","TMesh","meshComponent","addGeometryWatchers","text","fontSrc","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align","data","font","FontLoader","TextGeometry","keepSize","DoubleSide","map","loadTexture","screen","iRatio","image","w","count","instancingColor","SpriteMaterial","sprite","Sprite","updateUV","iWidth","iHeight","positions","progress","model","loaded","total","Model","GLTFLoader","gltf","FBXLoader","fbx","passes","EffectComposer","pass","addPass","EffectPass","RenderPass","completePass","focus","aperture","maxblur","BokehPass","noiseIntensity","scanlinesIntensity","scanlinesCount","grayscale","nIntensity","sIntensity","sCount","FilmPass","ShaderPass","FXAAShader","resolution","shape","rotateR","rotateG","rotateB","scatter","HalftonePass","SMAAPass","SSAOPass","tDiffuse","blurRadius","gradientRadius","start","end","delta","texSize","DefaultShader","TiltShift","pass1","uniforms1","updateFocusLine","dv","sub","strength","threshold","UnrealBloomPass","ZoomBlur","TroisJSVuePlugin","install","app","TROIS","createApp","_createApp","use"],"mappings":"q5EAGe,SAASA,GAAWC,GACjC,MAAMC,OACJA,EAAMC,WACNA,EAAUC,iBACVA,EAAgBC,MAChBA,GAAQ,EAAIC,WACZA,GAAa,EAAKC,cAClBA,EAAgB,IAAIC,EAAQ,EAAG,GAAEC,gBACjCA,EAAkB,IAAIC,EAAQ,EAAG,EAAG,GAAEC,QACtCA,EAAU,SAAQC,OAClBA,EAAS,SAAQC,QACjBA,EAAU,SAAQC,iBAClBA,EAAmB,SAAQC,gBAC3BA,EAAkB,SAAQC,gBAC1BA,EAAkB,SAAQC,iBAC1BA,EAAmB,SAAQC,iBAC3BA,EAAmB,UACjBjB,EAEEkB,EAAWZ,EAAca,QACzBC,EAAY,IAAIb,EAAQ,EAAG,GAE3Bc,ECvBO,SAAsBrB,GACnC,MAAMC,OACJA,EAAMK,cACNA,EAAgB,IAAIG,EAAQ,EAAG,EAAG,IAChCT,EAEEqB,EAAY,IAAIC,EAChBJ,EAAWZ,EAAca,QACzBI,EAAQ,IAAIC,EAAM,IAAIf,EAAQ,EAAG,EAAG,GAAI,GAa9C,MAAO,CACLS,SAAAA,EACAO,eAbsBC,IACtBL,EAAUM,cAAcD,EAAQzB,GAChCA,EAAO2B,kBAAkBL,EAAMM,QAC/BR,EAAUS,IAAIC,eAAeR,EAAOL,IAWpCc,UARgB,CAACN,EAAQO,KACzBZ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A,QAAS,gBACT,YAAa,oBACb,OAAQ,eAER,QACA,gBACA,SAEA,WACA,YAEA,YACA,iBACA,WACA,WACA,eACA,aACA,UACA,WACA,WACA,gBACA,kBACA,eAEA,cAGI3f,SAAQoN,IACZuS,EAAIzf,UAAUkN,EAAMwS,GAAMxS,SAKzB,SAASyS,GAAUtd,GACxB,OAAOud,EAAWvd,GAAQwd,IAAIN"} \ No newline at end of file +{"version":3,"file":"trois.module.min.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { Camera, Intersection, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.copy(resetPosition)\n positionV3.copy(resetPositionV3)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component.onPointerOver?.(overEvent)\n component.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: IntersectObject): void\n removeIntersectObject(o: IntersectObject): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: IntersectObject[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: IntersectObject) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: IntersectObject) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): void\n raf: boolean\n\n // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener(t: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n const config: ThreeConfigInterface = {\n canvas,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n // if (this.three.pointer) {\n // this.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\n // }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn()\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || (exclude && !exclude.includes(key))) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, PropType, watch } from 'vue'\nimport { bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (this.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: this.getIntersectObjects(),\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n },\r\n setup(props) {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => { cubeCamera.update(renderer, scene) }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera }\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport const MeshInjectionKey: InjectionKey = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {},\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent

>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { defineComponent, InjectionKey, watch } from 'vue'\nimport { FrontSide, Material, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number], default: '#ffffff' },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material from './Material'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\n },\n __hmrId: 'ShaderMaterial',\n})\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include ',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, default: () => ({ x: 0, y: 0 }) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n path: { type: String, required: true },\n urls: {\n type: Array as PropType,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: CubeReflectionMapping },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Font, FontLoader, TextGeometry } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n this.initObject3D(model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Sprite',\n\n 'FBXModel',\n 'GLTFModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n\n 'GLTFViewer',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Scene","Texture","Group","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","ShaderMaterial","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":"gkFAcqC,EAAuD,MACpF,CACJ,SACA,gBAAgB,GAAI,GAAQ,EAAG,EAAG,IAChC,EAEE,EAAY,GAAIA,IAChB,EAAW,EAAc,QACzB,EAAQ,GAAIC,IAAM,GAAI,GAAQ,EAAG,EAAG,GAAI,SAavC,CACL,WACA,eAbqB,AAAC,GAAoB,GAChC,cAAc,EAAQ,KACzB,kBAAkB,EAAM,UACrB,IAAI,eAAe,EAAO,IAWpC,UARgB,CAAC,EAAiB,OACxB,cAAc,EAAQ,GACzB,EAAU,iBAAiB,iBCwBH,EAAmD,MAC9E,CACJ,SACA,aACA,mBACA,QAAQ,GACR,aAAa,GACb,gBAAgB,GAAI,GAAQ,EAAG,GAC/B,kBAAkB,GAAI,GAAQ,EAAG,EAAG,GACpC,UAAU,IAAM,GAChB,SAAS,IAAM,GACf,UAAU,IAAM,GAChB,UAAU,IAAM,GAChB,mBAAmB,IAAM,GACzB,kBAAkB,IAAM,GACxB,kBAAkB,IAAM,GACxB,mBAAmB,IAAM,GACzB,mBAAmB,IAAM,IACvB,EAEE,EAAW,EAAc,QACzB,EAAY,GAAI,GAAQ,EAAG,GAE3B,EAAY,GAAa,CAAE,WAC3B,EAAa,EAAU,SAEvB,EAAwB,CAC5B,WACA,YACA,aACA,mBACA,UAAW,GACX,gBACA,mBACA,oBAGK,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KAAM,SAAU,EAAK,SAAS,OAAQ,WACtC,KAAM,WAAY,EAAK,SAAS,SAAU,cAE9C,eAAe,IAEtB,QAAS,m3CClBE,IAAmB,CAC9B,QAAQ,EAAgB,CACR,CACZ,SACA,qBACA,oBACA,YACA,WACA,QACA,QAEA,eACA,mBACA,kBACA,aACA,gBACA,YAEA,gBACA,kBACA,iBACA,gBACA,mBACA,iBACA,mBACA,qBACA,eAEA,UACA,cAEA,OAEA,MAAO,cACP,SAAU,iBACV,OAAQ,eACR,WAAY,mBACZ,eAAgB,uBAChB,cAAe,sBACf,QAAS,gBACT,aAAc,qBACd,QAAS,gBACT,aAAc,qBACd,OAAQ,eACR,SAAU,iBACV,cAAe,sBACf,OACA,QAAS,gBACT,YAAa,oBACb,OAAQ,eAER,QACA,gBACA,SAEA,WACA,YAEA,YACA,iBACA,WACA,WACA,eACA,aACA,UACA,WACA,WACA,gBACA,kBACA,eAEA,cAGI,QAAQ,GAAQ,GAEhB,UAAU,EAAM,GAAM,oBAKN,EAAkB,OACnCC,IAAW,GAAQ,IAAI,iBCtEyB,MACjD,GAAyB,CAC7B,OAAQ,GAAI,GACZ,MAAO,EACP,SAAU,GACV,aAAc,EACd,eACA,iBAEK,cAEe,EAAkC,EAAiB,GACnE,MAAQ,EAAO,SACf,SAAS,OAAO,KAChB,aAAe,UACX,IAAI,EAAO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file diff --git a/package.json b/package.json index 6a5b3d1..4a029db 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,13 @@ { "name": "troisjs", - "version": "0.2.3", + "version": "0.3.0-beta.0", "scripts": { "dev": "vite", "types": "tsc", "build": "vue-tsc --noEmit && vite build", - "rollup": "rollup -c" + "rollup": "tsc && rollup -c" }, "devDependencies": { - "@microsoft/api-extractor": "^7.14.0", "@rollup/plugin-replace": "^2.3.3", "@types/three": "^0.127.1", "@typescript-eslint/eslint-plugin": "^4.22.0", @@ -30,7 +29,6 @@ "rollup-plugin-esbuild": "^4.1.0", "stats.js": "0.17.0", "three": "^0.127", - "tslib": "^2.2.0", "typescript": "^4.1.5", "vite": "^2.1.5", "vue": "^3.0.11", @@ -45,9 +43,10 @@ "url": "git+https://github.com/troisjs/trois.git" }, "keywords": [ + "threejs", "vuejs", - "vitejs", - "threejs" + "webgl", + "vitejs" ], "author": "Kevin Levron", "license": "ISC", diff --git a/src/materials/index.ts b/src/materials/index.ts index b46195c..93c4f77 100644 --- a/src/materials/index.ts +++ b/src/materials/index.ts @@ -1,4 +1,4 @@ -export { MaterialInjectionKey } from './Material' +export { default as Material, MaterialInjectionKey } from './Material' export { default as BasicMaterial } from './BasicMaterial' export { default as LambertMaterial } from './LambertMaterial' export { default as MatcapMaterial } from './MatcapMaterial' diff --git a/src/use/useTextures.ts b/src/use/useTextures.ts index 3318e56..9145ac2 100644 --- a/src/use/useTextures.ts +++ b/src/use/useTextures.ts @@ -1,10 +1,10 @@ import { Texture, TextureLoader } from 'three' -interface TextureConfigInterface { +export interface TextureConfigInterface { src: string } -interface TexturesInterface { +export interface TexturesInterface { loader: TextureLoader count: number textures: Texture[],