| { | { | ||||
| "name": "threepipe", | "name": "threepipe", | ||||
| "version": "0.0.6-dev", | |||||
| "version": "0.0.7", | |||||
| "lockfileVersion": 2, | "lockfileVersion": 2, | ||||
| "requires": true, | "requires": true, | ||||
| "packages": { | "packages": { | ||||
| "": { | "": { | ||||
| "name": "threepipe", | "name": "threepipe", | ||||
| "version": "0.0.6-dev", | |||||
| "license": "MIT", | |||||
| "version": "0.0.7", | |||||
| "license": "Apache-2.0", | |||||
| "dependencies": { | "dependencies": { | ||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1010/package.tgz", | |||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1011/package.tgz", | |||||
| "@types/webxr": "^0.5.1", | "@types/webxr": "^0.5.1", | ||||
| "@types/wicg-file-system-access": "^2020.9.5", | "@types/wicg-file-system-access": "^2020.9.5", | ||||
| "ts-browser-helpers": "^0.6.0" | "ts-browser-helpers": "^0.6.0" | ||||
| "rollup-plugin-license": "^3.0.1", | "rollup-plugin-license": "^3.0.1", | ||||
| "rollup-plugin-postcss": "^4.0.2", | "rollup-plugin-postcss": "^4.0.2", | ||||
| "stats.js": "^0.17.0", | "stats.js": "^0.17.0", | ||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2009/package.tgz", | |||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2010/package.tgz", | |||||
| "tslib": "^2.5.0", | "tslib": "^2.5.0", | ||||
| "tweakpane": "^3.1.9", | "tweakpane": "^3.1.9", | ||||
| "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.403/package.tgz", | "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.403/package.tgz", | ||||
| "dev": true | "dev": true | ||||
| }, | }, | ||||
| "node_modules/@types/three": { | "node_modules/@types/three": { | ||||
| "version": "0.152.1010", | |||||
| "resolved": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1010/package.tgz", | |||||
| "integrity": "sha512-Mnl6+lJhZUj2zLMqK7a5qrG8QLHHqHVQ8MJ7i5NzjGZ/ZJ//GqY6B24q7Z8F3ei8ASWQv0YteEfH5noc3Z2lMQ==", | |||||
| "version": "0.152.1011", | |||||
| "resolved": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1011/package.tgz", | |||||
| "integrity": "sha512-ZnWZWjxjNybypRf6aBaydSVPICNQ3HRdeHJXvhHWESFre1Whc7/WuF4VRd0EwfWPHMF8jSO4Y/TAQ0S+PG1hUA==", | |||||
| "dependencies": { | "dependencies": { | ||||
| "@tweenjs/tween.js": "~18.6.4", | "@tweenjs/tween.js": "~18.6.4", | ||||
| "fflate": "~0.6.9", | "fflate": "~0.6.9", | ||||
| } | } | ||||
| }, | }, | ||||
| "node_modules/three": { | "node_modules/three": { | ||||
| "version": "0.152.2009", | |||||
| "resolved": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2009/package.tgz", | |||||
| "integrity": "sha512-qUqy+/uRzvW3F4xvyRCnnJVZ8yssgSYurrUCU1I3AJq7lz/p2CoWbdZYWXBXpNxR8+0Awx9S6Cy0Ah5Lq7g6Hw==", | |||||
| "version": "0.152.2010", | |||||
| "resolved": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2010/package.tgz", | |||||
| "integrity": "sha512-STTCnJzxPLXkXCe41qSXx5G/bXWvkg22NjvBLCTwv8SpaP9m4HsTqNCbdwxu5cFjiPAtkYsBKnMqP4ows80urw==", | |||||
| "dev": true, | "dev": true, | ||||
| "license": "MIT" | "license": "MIT" | ||||
| }, | }, | ||||
| "dev": true | "dev": true | ||||
| }, | }, | ||||
| "@types/three": { | "@types/three": { | ||||
| "version": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1010/package.tgz", | |||||
| "integrity": "sha512-Mnl6+lJhZUj2zLMqK7a5qrG8QLHHqHVQ8MJ7i5NzjGZ/ZJ//GqY6B24q7Z8F3ei8ASWQv0YteEfH5noc3Z2lMQ==", | |||||
| "version": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1011/package.tgz", | |||||
| "integrity": "sha512-ZnWZWjxjNybypRf6aBaydSVPICNQ3HRdeHJXvhHWESFre1Whc7/WuF4VRd0EwfWPHMF8jSO4Y/TAQ0S+PG1hUA==", | |||||
| "requires": { | "requires": { | ||||
| "@tweenjs/tween.js": "~18.6.4", | "@tweenjs/tween.js": "~18.6.4", | ||||
| "fflate": "~0.6.9", | "fflate": "~0.6.9", | ||||
| } | } | ||||
| }, | }, | ||||
| "three": { | "three": { | ||||
| "version": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2009/package.tgz", | |||||
| "integrity": "sha512-qUqy+/uRzvW3F4xvyRCnnJVZ8yssgSYurrUCU1I3AJq7lz/p2CoWbdZYWXBXpNxR8+0Awx9S6Cy0Ah5Lq7g6Hw==", | |||||
| "version": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2010/package.tgz", | |||||
| "integrity": "sha512-STTCnJzxPLXkXCe41qSXx5G/bXWvkg22NjvBLCTwv8SpaP9m4HsTqNCbdwxu5cFjiPAtkYsBKnMqP4ows80urw==", | |||||
| "dev": true | "dev": true | ||||
| }, | }, | ||||
| "through": { | "through": { |
| { | { | ||||
| "name": "threepipe", | "name": "threepipe", | ||||
| "version": "0.0.6-dev", | |||||
| "version": "0.0.7", | |||||
| "description": "A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.", | "description": "A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.", | ||||
| "main": "src/index.ts", | "main": "src/index.ts", | ||||
| "module": "dist/index.mjs", | "module": "dist/index.mjs", | ||||
| "canvas" | "canvas" | ||||
| ], | ], | ||||
| "author": "repalash <palash@shaders.app>", | "author": "repalash <palash@shaders.app>", | ||||
| "license": "MIT", | |||||
| "license": "Apache-2.0", | |||||
| "bugs": { | "bugs": { | ||||
| "url": "https://github.com/repalash/threepipe/issues" | "url": "https://github.com/repalash/threepipe/issues" | ||||
| }, | }, | ||||
| "rollup-plugin-license": "^3.0.1", | "rollup-plugin-license": "^3.0.1", | ||||
| "rollup-plugin-postcss": "^4.0.2", | "rollup-plugin-postcss": "^4.0.2", | ||||
| "stats.js": "^0.17.0", | "stats.js": "^0.17.0", | ||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2009/package.tgz", | |||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2010/package.tgz", | |||||
| "tslib": "^2.5.0", | "tslib": "^2.5.0", | ||||
| "tweakpane": "^3.1.9", | "tweakpane": "^3.1.9", | ||||
| "@tweakpane/core": "^1.1.8", | "@tweakpane/core": "^1.1.8", | ||||
| "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.403/package.tgz" | "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.403/package.tgz" | ||||
| }, | }, | ||||
| "dependencies": { | "dependencies": { | ||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1010/package.tgz", | |||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1011/package.tgz", | |||||
| "@types/webxr": "^0.5.1", | "@types/webxr": "^0.5.1", | ||||
| "@types/wicg-file-system-access": "^2020.9.5", | "@types/wicg-file-system-access": "^2020.9.5", | ||||
| "ts-browser-helpers": "^0.6.0" | "ts-browser-helpers": "^0.6.0" | ||||
| "uiconfig.js": "^0.0.4", | "uiconfig.js": "^0.0.4", | ||||
| "ts-browser-helpers": "^0.5.0", | "ts-browser-helpers": "^0.5.0", | ||||
| "uiconfig-tweakpane": "^0.0.3", | "uiconfig-tweakpane": "^0.0.3", | ||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2009/package.tgz", | |||||
| "three-f": "https://github.com/repalash/three.js-modded/archive/refs/tags/v0.152.2009.tar.gz", | |||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1010/package.tgz", | |||||
| "@types/three-f": "https://github.com/repalash/three-ts-types/archive/refs/tags/v0.152.1010.tar.gz", | |||||
| "three": "https://github.com/repalash/three.js-modded/releases/download/v0.152.2010/package.tgz", | |||||
| "three-f": "https://github.com/repalash/three.js-modded/archive/refs/tags/v0.152.2010.tar.gz", | |||||
| "@types/three": "https://github.com/repalash/three-ts-types/releases/download/v0.152.1011/package.tgz", | |||||
| "@types/three-f": "https://github.com/repalash/three-ts-types/archive/refs/tags/v0.152.1011.tar.gz", | |||||
| "@types/three-pkg": "https://gitpkg.now.sh/repalash/three-ts-types/types/three?modded_three", | "@types/three-pkg": "https://gitpkg.now.sh/repalash/three-ts-types/types/three?modded_three", | ||||
| "tweakpane-image-plugin": "git+ssh://github.com/repalash/tweakpane-image-plugin.git#52d5542047fd07d2e7225b5b67c9f7620366f2c7" | "tweakpane-image-plugin": "git+ssh://github.com/repalash/tweakpane-image-plugin.git#52d5542047fd07d2e7225b5b67c9f7620366f2c7" | ||||
| }, | }, |
| res = await loader.loadAsync(path + (options.queryString ? (path.includes('?') ? '&' : '?') + options.queryString : ''), (e)=>{ | res = await loader.loadAsync(path + (options.queryString ? (path.includes('?') ? '&' : '?') + options.queryString : ''), (e)=>{ | ||||
| if (onDownloadProgress) onDownloadProgress(e) | if (onDownloadProgress) onDownloadProgress(e) | ||||
| this.dispatchEvent({type: 'importFile', path, state:'downloading', progress: e.total > 0 ? e.loaded / e.total : 1}) | |||||
| this.dispatchEvent({ | |||||
| type: 'importFile', path, | |||||
| state:'downloading', | |||||
| loadedBytes: e.loaded || undefined, | |||||
| totalBytes: e.total || undefined, | |||||
| progress: e.total > 0 ? e.loaded / e.total : 1, | |||||
| }) | |||||
| }) | }) | ||||
| if (loader.transform) res = await loader.transform(res, options) | if (loader.transform) res = await loader.transform(res, options) | ||||
| import {Object3D} from 'three' | import {Object3D} from 'three' | ||||
| import {ThreeViewer} from '../../viewer' | import {ThreeViewer} from '../../viewer' | ||||
| import { | import { | ||||
| glbEncryptionProcessor, | |||||
| GLTFLightExtrasExtension, | GLTFLightExtrasExtension, | ||||
| GLTFMaterialExtrasExtension, | GLTFMaterialExtrasExtension, | ||||
| GLTFMaterialsAlphaMapExtension, | GLTFMaterialsAlphaMapExtension, | ||||
| GLTFObject3DExtrasExtension, | GLTFObject3DExtrasExtension, | ||||
| GLTFViewerConfigExtension, | GLTFViewerConfigExtension, | ||||
| } from '../gltf' | } from '../gltf' | ||||
| import {glbEncryptionProcessor} from '../gltf/gltfEncyptionHelpers' | |||||
| export type GLTFExporter2Options = { | export type GLTFExporter2Options = { | ||||
| /** | /** | ||||
| * embed images in glb even when remote url is available, {@default false} | |||||
| * embed images in glb even when remote url is available | |||||
| * @default false | |||||
| */ | */ | ||||
| embedUrlImages?: boolean, | embedUrlImages?: boolean, | ||||
| /** | /** | ||||
| * Embed previews of images in glb, {@default false} | |||||
| * Embed previews of images in glb | |||||
| * @default false | |||||
| */ | */ | ||||
| embedUrlImagePreviews?: boolean, | embedUrlImagePreviews?: boolean, | ||||
| /** | /** | ||||
| */ | */ | ||||
| externalImagesInExtras?: boolean, | externalImagesInExtras?: boolean, | ||||
| /** | /** | ||||
| * see GLTFViewerExport->processViewer, {@default false} | |||||
| * see GLTFViewerExport->processViewer | |||||
| * @default false | |||||
| */ | */ | ||||
| encodeUint16Rgbe?: boolean | encodeUint16Rgbe?: boolean | ||||
| /** | /** | ||||
| * Number of spaces to use when exporting to json, {@default 2} | |||||
| * Number of spaces to use when exporting to json | |||||
| * @default 2 | |||||
| */ | */ | ||||
| jsonSpaces?: number, | jsonSpaces?: number, | ||||
| /** | /** | ||||
| * Encrypt the exported file in a GLB container using {@link encryptKey}, {@default false}. Works only for glb export. | |||||
| * Encrypt the exported file in a GLB container using {@link encryptKey} | |||||
| * @default false. | |||||
| * Works only for glb export. | |||||
| */ | */ | ||||
| encrypt?: boolean, | encrypt?: boolean, | ||||
| /** | /** | ||||
| * Encryption key, if not provided, will be prompted, {@default undefined}. Works only for glb export. | |||||
| * Encryption key, if not provided, will be prompted | |||||
| * @default undefined. | |||||
| * Works only for glb export. | |||||
| */ | */ | ||||
| encryptKey?: string|Uint8Array, | encryptKey?: string|Uint8Array, | ||||
| } | } | ||||
| export interface IGLBEncryptionPreparser extends GLTFPreparser{ | export interface IGLBEncryptionPreparser extends GLTFPreparser{ | ||||
| key: string | ((encryption: any, json: any)=>string|Promise<string>) | |||||
| key: string | ((encryption: any, json: any, path: string)=>string|Promise<string>) | |||||
| } | } | ||||
| /** | /** | ||||
| * Sample encryption preparser for {@link GLTFLoader2} that unwraps the glb container and decrypts the content. The encryption key can be provided in the file or set in this const is prompted from the user. | * Sample encryption preparser for {@link GLTFLoader2} that unwraps the glb container and decrypts the content. The encryption key can be provided in the file or set in this const is prompted from the user. | ||||
| */ | */ | ||||
| export const glbEncryptionPreparser: IGLBEncryptionPreparser = { | export const glbEncryptionPreparser: IGLBEncryptionPreparser = { | ||||
| key: (encryption: any, _: any) => { | |||||
| return encryption.key || window && window.prompt && window.prompt('GLTFEncryption: Please enter the password/key for this model') || '' | |||||
| key: (encryption: any, _: any, path: string) => { | |||||
| return encryption.key || window && window.prompt && window.prompt('GLTFEncryption: Please enter the password/key for the model: ' + path) || '' | |||||
| }, | }, | ||||
| async process(dat: string | ArrayBuffer) { | |||||
| if (typeof dat === 'string') return dat | |||||
| async process(data: string | ArrayBuffer, path: string) { | |||||
| if (typeof data === 'string') return data | |||||
| const prefixBytes = 100 | const prefixBytes = 100 | ||||
| const prefix = new TextDecoder().decode(new Uint8Array(dat, 0, prefixBytes)) | |||||
| if (!prefix.includes('GLBWrapper')) return dat | |||||
| const binaryExtension = new GLTFBinaryExtension(dat) | |||||
| const prefix = new TextDecoder().decode(new Uint8Array(data, 0, prefixBytes)) | |||||
| if (!prefix.includes('GLBWrapper')) return data | |||||
| const binaryExtension = new GLTFBinaryExtension(data) | |||||
| const json = JSON.parse(binaryExtension.content || '{}') | const json = JSON.parse(binaryExtension.content || '{}') | ||||
| let dat2 = binaryExtension.body || dat | |||||
| let data2 = binaryExtension.body || data | |||||
| const encryption = json.asset?.encryption | const encryption = json.asset?.encryption | ||||
| if (!encryption) return dat2 | |||||
| if (!encryption) return data2 | |||||
| const type = encryption.type | const type = encryption.type | ||||
| const version = encryption.version | const version = encryption.version | ||||
| if (type === 'aesgcm' && version === 1) { | if (type === 'aesgcm' && version === 1) { | ||||
| const key = await getOrCall(this.key, encryption, json) || '' | |||||
| const key = await getOrCall(this.key, encryption, json, path) || '' | |||||
| try { | try { | ||||
| dat2 = (await aesGcmDecrypt(new Uint8Array(dat2), key)).buffer | |||||
| data2 = (await aesGcmDecrypt(new Uint8Array(data2), key)).buffer | |||||
| } catch (e) { | } catch (e) { | ||||
| throw new ErrorEvent('decryption error') | throw new ErrorEvent('decryption error') | ||||
| } | } | ||||
| } | } | ||||
| return dat2 | |||||
| return data2 | |||||
| }, | }, | ||||
| } | } |
| import {GLTF, GLTFLoader, GLTFLoaderPlugin, GLTFParser} from 'three/examples/jsm/loaders/GLTFLoader.js' | import {GLTF, GLTFLoader, GLTFLoaderPlugin, GLTFParser} from 'three/examples/jsm/loaders/GLTFLoader.js' | ||||
| import {LoadingManager, Object3D} from 'three' | import {LoadingManager, Object3D} from 'three' | ||||
| import {AnyOptions, safeSetProperty} from 'ts-browser-helpers' | import {AnyOptions, safeSetProperty} from 'ts-browser-helpers' | ||||
| import {ThreeViewer} from '../../viewer/ThreeViewer' | |||||
| import {generateUUID} from '../../three/utils/misc' | |||||
| import {GLTFViewerConfigExtension} from '../gltf/GLTFViewerConfigExtension' | |||||
| import {GLTFMaterialExtrasExtension} from '../gltf/GLTFMaterialExtrasExtension' | |||||
| import {GLTFObject3DExtrasExtension} from '../gltf/GLTFObject3DExtrasExtension' | |||||
| import {GLTFLightExtrasExtension} from '../gltf/GLTFLightExtrasExtension' | |||||
| import {GLTFMaterialsBumpMapExtension} from '../gltf/GLTFMaterialsBumpMapExtension' | |||||
| import {GLTFMaterialsLightMapExtension} from '../gltf/GLTFMaterialsLightMapExtension' | |||||
| import {GLTFMaterialsDisplacementMapExtension} from '../gltf/GLTFMaterialsDisplacementMapExtension' | |||||
| import {GLTFMaterialsAlphaMapExtension} from '../gltf/GLTFMaterialsAlphaMapExtension' | |||||
| import {ThreeViewer} from '../../viewer' | |||||
| import {generateUUID} from '../../three' | |||||
| import { | |||||
| glbEncryptionPreparser, | |||||
| GLTFLightExtrasExtension, | |||||
| GLTFMaterialExtrasExtension, | |||||
| GLTFMaterialsAlphaMapExtension, | |||||
| GLTFMaterialsBumpMapExtension, | |||||
| GLTFMaterialsDisplacementMapExtension, | |||||
| GLTFMaterialsLightMapExtension, | |||||
| GLTFObject3DExtrasExtension, | |||||
| GLTFViewerConfigExtension, | |||||
| } from '../gltf' | |||||
| import {RootSceneImportResult} from '../IAssetImporter' | import {RootSceneImportResult} from '../IAssetImporter' | ||||
| import {ILoader} from '../IImporter' | import {ILoader} from '../IImporter' | ||||
| import {glbEncryptionPreparser} from '../gltf' | |||||
| export class GLTFLoader2 extends GLTFLoader implements ILoader<GLTF, Object3D|undefined> { | export class GLTFLoader2 extends GLTFLoader implements ILoader<GLTF, Object3D|undefined> { | ||||
| isGLTFLoader2 = true | isGLTFLoader2 = true | ||||
| */ | */ | ||||
| preparsers: GLTFPreparser[] = [] | preparsers: GLTFPreparser[] = [] | ||||
| async preparse(data: ArrayBuffer | string): Promise<ArrayBuffer | string> { | |||||
| async preparse(data: ArrayBuffer | string, path: string): Promise<ArrayBuffer | string> { | |||||
| for (const preparser of this.preparsers) { | for (const preparser of this.preparsers) { | ||||
| data = await preparser.process(data) | |||||
| data = await preparser.process(data, path) | |||||
| } | } | ||||
| return data | return data | ||||
| } | } | ||||
| parse(data: ArrayBuffer | string, path: string, onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void) { | |||||
| this.preparse.call(this, data) | |||||
| parse(data: ArrayBuffer | string, path: string, onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void, url?: string) { | |||||
| this.preparse.call(this, data, url || path) | |||||
| .then((res: ArrayBuffer | string) => res ? super.parse(res, path, onLoad, onError) : onError && onError(new ErrorEvent('no data'))) | .then((res: ArrayBuffer | string) => res ? super.parse(res, path, onLoad, onError) : onError && onError(new ErrorEvent('no data'))) | ||||
| .catch((e: any) => { | .catch((e: any) => { | ||||
| console.error(e) | console.error(e) | ||||
| } | } | ||||
| export interface GLTFPreparser{ | export interface GLTFPreparser{ | ||||
| process(dat: string | ArrayBuffer): Promise<string | ArrayBuffer> | |||||
| process(data: string | ArrayBuffer, path: string): Promise<string | ArrayBuffer> | |||||
| [key: string]: any | [key: string]: any | ||||
| } | } |
| import {IDisposable, PartialRecord} from 'ts-browser-helpers' | import {IDisposable, PartialRecord} from 'ts-browser-helpers' | ||||
| import {Clock, Event, ShaderMaterial, Texture, Vector2, Vector4, WebGLRenderer, WebGLRenderTarget} from 'three' | import {Clock, Event, ShaderMaterial, Texture, Vector2, Vector4, WebGLRenderer, WebGLRenderTarget} from 'three' | ||||
| import {CreateRenderTargetOptions, IRenderTarget} from '../rendering/RenderTarget' | |||||
| import {IShaderPropertiesUpdater} from '../materials/MaterialExtension' | |||||
| import {IPassID, IPipelinePass} from '../postprocessing/Pass' | |||||
| import {EffectComposer2} from '../postprocessing/EffectComposer2' | |||||
| import {RenderTargetManager} from '../rendering/RenderTargetManager' | |||||
| import {CreateRenderTargetOptions, IRenderTarget, RenderTargetManager} from '../rendering' | |||||
| import {IShaderPropertiesUpdater} from '../materials' | |||||
| import {EffectComposer2, IPassID, IPipelinePass} from '../postprocessing' | |||||
| import {IScene} from './IScene' | import {IScene} from './IScene' | ||||
| import {BlobExt} from '../assetmanager' | import {BlobExt} from '../assetmanager' | ||||
| import {IObject3D, IObject3DEvent, IObject3DEventTypes, IObject3DUserData, IObjectSetDirtyOptions} from './IObject' | import {IObject3D, IObject3DEvent, IObject3DEventTypes, IObject3DUserData, IObjectSetDirtyOptions} from './IObject' | ||||
| import {Color, Scene} from 'three' | import {Color, Scene} from 'three' | ||||
| import {IShaderPropertiesUpdater} from '../materials/MaterialExtension' | |||||
| import {IShaderPropertiesUpdater} from '../materials' | |||||
| import {ICamera} from './ICamera' | import {ICamera} from './ICamera' | ||||
| import {Box3B} from '../three/math/Box3B' | |||||
| import {Box3B} from '../three' | |||||
| import {ITexture} from './ITexture' | import {ITexture} from './ITexture' | ||||
| export interface AddObjectOptions { | export interface AddObjectOptions { |
| import type {ICamera, ICameraEvent, ICameraUserData, TCameraControlsMode} from '../ICamera' | import type {ICamera, ICameraEvent, ICameraUserData, TCameraControlsMode} from '../ICamera' | ||||
| import {ICameraSetDirtyOptions} from '../ICamera' | import {ICameraSetDirtyOptions} from '../ICamera' | ||||
| import type {ICameraControls, TControlsCtor} from './ICameraControls' | import type {ICameraControls, TControlsCtor} from './ICameraControls' | ||||
| import {OrbitControls3} from '../../three/controls/OrbitControls3' | |||||
| import {OrbitControls3} from '../../three' | |||||
| import {IObject3D} from '../IObject' | import {IObject3D} from '../IObject' | ||||
| import {ThreeSerialization} from '../../utils/serialization' | |||||
| import {ThreeSerialization} from '../../utils' | |||||
| import {iCameraCommons} from '../object/iCameraCommons' | import {iCameraCommons} from '../object/iCameraCommons' | ||||
| // todo: maybe change domElement to some wrapper/base class of viewer | // todo: maybe change domElement to some wrapper/base class of viewer |
| import {ShaderMaterial2} from './ShaderMaterial2' | import {ShaderMaterial2} from './ShaderMaterial2' | ||||
| import {getTexelDecoding2} from '../../three/utils/encoding' | |||||
| import {getTexelDecoding2} from '../../three' | |||||
| import { | import { | ||||
| BufferGeometry, | BufferGeometry, | ||||
| Camera, | Camera, |
| import {IMaterial} from '../IMaterial' | import {IMaterial} from '../IMaterial' | ||||
| import {objectHasOwn} from 'ts-browser-helpers' | import {objectHasOwn} from 'ts-browser-helpers' | ||||
| import {IObject3D, IObject3DEvent, IObjectProcessor, IObjectSetDirtyOptions} from '../IObject' | import {IObject3D, IObject3DEvent, IObjectProcessor, IObjectSetDirtyOptions} from '../IObject' | ||||
| import {copyObject3DUserData} from '../../utils/serialization' | |||||
| import {copyObject3DUserData} from '../../utils' | |||||
| import {IGeometry, IGeometryEvent} from '../IGeometry' | import {IGeometry, IGeometryEvent} from '../IGeometry' | ||||
| import {Box3B} from '../../three' | import {Box3B} from '../../three' | ||||
| import {makeIObject3DUiConfig} from './IObjectUi' | import {makeIObject3DUiConfig} from './IObjectUi' |
| import {IPassID, IPipelinePass} from '../../postprocessing' | import {IPassID, IPipelinePass} from '../../postprocessing' | ||||
| import {ISerializedConfig, ThreeViewer} from '../../viewer' | |||||
| import {AViewerPluginSync, ISerializedConfig, ThreeViewer} from '../../viewer' | |||||
| import {AnyFunction, serialize} from 'ts-browser-helpers' | import {AnyFunction, serialize} from 'ts-browser-helpers' | ||||
| import {SerializationMetaType} from '../../utils/serialization' | |||||
| import {AViewerPluginSync} from '../../viewer/AViewerPlugin' | |||||
| import {SerializationMetaType} from '../../utils' | |||||
| export abstract class PipelinePassPlugin<T extends IPipelinePass, TPassId extends IPassID, TEvent extends string, TViewer extends ThreeViewer=ThreeViewer> extends AViewerPluginSync<TEvent, TViewer> { | export abstract class PipelinePassPlugin<T extends IPipelinePass, TPassId extends IPassID, TEvent extends string, TViewer extends ThreeViewer=ThreeViewer> extends AViewerPluginSync<TEvent, TViewer> { | ||||
| abstract passId: TPassId | abstract passId: TPassId |
| export {DepthBufferPlugin} from './pipeline/DepthBufferPlugin' | export {DepthBufferPlugin} from './pipeline/DepthBufferPlugin' | ||||
| export {NormalBufferPlugin} from './pipeline/NormalBufferPlugin' | export {NormalBufferPlugin} from './pipeline/NormalBufferPlugin' | ||||
| export type {DepthBufferPluginEventTypes, DepthBufferPluginPass, DepthBufferPluginTarget} from './pipeline/DepthBufferPlugin' | export type {DepthBufferPluginEventTypes, DepthBufferPluginPass, DepthBufferPluginTarget} from './pipeline/DepthBufferPlugin' | ||||
| export type {NormalBufferPluginEventTypes, NormalBufferPluginPass, NormalBufferPluginTarget} from './pipeline/NormalBufferPlugin' | |||||
| // ui | // ui | ||||
| export {RenderTargetPreviewPlugin} from './ui/RenderTargetPreviewPlugin' | export {RenderTargetPreviewPlugin} from './ui/RenderTargetPreviewPlugin' |
| import {AViewerPluginSync} from '../../viewer/AViewerPlugin' | |||||
| import {type ThreeViewer} from '../../viewer/' | import {type ThreeViewer} from '../../viewer/' | ||||
| // noinspection ES6PreferShortImport | |||||
| import {AViewerPluginSync} from '../../viewer/AViewerPlugin' | |||||
| import {Dropzone} from '../../utils' | import {Dropzone} from '../../utils' | ||||
| import {uiButton, uiConfig, uiFolderContainer, UiObjectConfig, uiToggle} from 'uiconfig.js' | import {uiButton, uiConfig, uiFolderContainer, UiObjectConfig, uiToggle} from 'uiconfig.js' | ||||
| import type {AddAssetOptions, ImportFilesOptions, ImportResult} from '../../assetmanager' | import type {AddAssetOptions, ImportFilesOptions, ImportResult} from '../../assetmanager' |
| import { | import { | ||||
| convertArrayBufferToStringsInMeta, | convertArrayBufferToStringsInMeta, | ||||
| getEmptyMeta, | getEmptyMeta, | ||||
| GLStatsJS, | |||||
| IDialogWrapper, | |||||
| jsonToBlob, | jsonToBlob, | ||||
| metaFromResources, | metaFromResources, | ||||
| MetaImporter, | MetaImporter, | ||||
| SerializationMetaType, | SerializationMetaType, | ||||
| SerializationResourcesType, | SerializationResourcesType, | ||||
| ThreeSerialization, | ThreeSerialization, | ||||
| } from '../utils/serialization' | |||||
| windowDialogWrapper, | |||||
| } from '../utils' | |||||
| import { | import { | ||||
| AssetManager, | AssetManager, | ||||
| AssetManagerOptions, | AssetManagerOptions, | ||||
| ImportResult, | ImportResult, | ||||
| RootSceneImportResult, | RootSceneImportResult, | ||||
| } from '../assetmanager' | } from '../assetmanager' | ||||
| import {GLStatsJS, IDialogWrapper, windowDialogWrapper} from '../utils' | |||||
| import {IViewerPlugin, IViewerPluginSync} from './IViewerPlugin' | import {IViewerPlugin, IViewerPluginSync} from './IViewerPlugin' | ||||
| // noinspection ES6PreferShortImport | |||||
| import {DropzonePlugin, DropzonePluginOptions} from '../plugins/interaction/DropzonePlugin' | import {DropzonePlugin, DropzonePluginOptions} from '../plugins/interaction/DropzonePlugin' | ||||
| import {uiConfig, uiFolderContainer, UiObjectConfig} from 'uiconfig.js' | import {uiConfig, uiFolderContainer, UiObjectConfig} from 'uiconfig.js' | ||||
| import {IRenderTarget} from '../rendering' | import {IRenderTarget} from '../rendering' |