| console.log(TweakpaneUiPlugin) | console.log(TweakpaneUiPlugin) | ||||
| export class SamplePlugin extends AViewerPluginSync<string> { | |||||
| export class SamplePlugin extends AViewerPluginSync { | |||||
| public static readonly PluginType: string = 'SamplePlugin' | public static readonly PluginType: string = 'SamplePlugin' | ||||
| enabled = true | enabled = true | ||||
| dependencies = [] | dependencies = [] |
| "threepipe": "file:./../../src/", | "threepipe": "file:./../../src/", | ||||
| "@threepipe/plugin-tweakpane": "file:./../tweakpane/src/" | "@threepipe/plugin-tweakpane": "file:./../tweakpane/src/" | ||||
| }, | }, | ||||
| "clean-package": { | |||||
| "remove": [ | |||||
| "clean-package", | |||||
| "scripts", | |||||
| "devDependencies", | |||||
| "//", | |||||
| "markdown-to-html" | |||||
| ], | |||||
| "replace": { | |||||
| "dependencies": {}, | |||||
| "peerDependencies": { | |||||
| "threepipe": "^0.0.26", | |||||
| "@threepipe/plugin-tweakpane": "^0.2.0" | |||||
| } | |||||
| } | |||||
| }, | |||||
| "exports": { | "exports": { | ||||
| ".": { | ".": { | ||||
| "types": "./dist/index.d.ts", | "types": "./dist/index.d.ts", | ||||
| "type": "git", | "type": "git", | ||||
| "url": "git://github.com/repalash/threepipe.git", | "url": "git://github.com/repalash/threepipe.git", | ||||
| "directory": "plugins/plugin-template-vite" | "directory": "plugins/plugin-template-vite" | ||||
| }, | |||||
| "clean-package": { | |||||
| "remove": [ | |||||
| "clean-package", | |||||
| "scripts", | |||||
| "devDependencies", | |||||
| "//", | |||||
| "markdown-to-html" | |||||
| ], | |||||
| "replace": { | |||||
| "dependencies": {}, | |||||
| "peerDependencies": { | |||||
| "threepipe": "^0.0.26", | |||||
| "@threepipe/plugin-tweakpane": "^0.2.0" | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } |
| console.log(TweakpaneUiPlugin) | console.log(TweakpaneUiPlugin) | ||||
| export class SamplePlugin extends AViewerPluginSync<string> { | |||||
| export class SamplePlugin extends AViewerPluginSync { | |||||
| public static readonly PluginType: string = 'SamplePlugin' | public static readonly PluginType: string = 'SamplePlugin' | ||||
| enabled = true | enabled = true | ||||
| dependencies = [] | dependencies = [] |
| export class GLTFWriter2 extends GLTFExporter.Utils.GLTFWriter { | export class GLTFWriter2 extends GLTFExporter.Utils.GLTFWriter { | ||||
| protected _assetVersion: number | |||||
| readonly TPAssetVersion = 1 | readonly TPAssetVersion = 1 | ||||
| constructor() { | constructor() { | ||||
| super() | super() | ||||
| // slightly increment the version to be safe if three.js forgot to update the version | |||||
| this._assetVersion = parseFloat(this.json.asset.version) + 0.001 * this.TPAssetVersion | |||||
| this.json.asset.version = this._assetVersion.toString() | |||||
| this.json.asset.subversion = this.TPAssetVersion | |||||
| } | } | ||||
| declare options: GLTFExporterOptions & { | declare options: GLTFExporterOptions & { |
| Object3D, | Object3D, | ||||
| Points, | Points, | ||||
| } from 'three' | } from 'three' | ||||
| import {getUrlQueryParam} from 'ts-browser-helpers' | |||||
| export class Rhino3dmLoader2 extends Rhino3dmLoader { | export class Rhino3dmLoader2 extends Rhino3dmLoader { | ||||
| public static LIBRARY_PATH = 'https://cdn.jsdelivr.net/npm/rhino3dm@8.9.0/' | |||||
| // todo since 8.4.0(next version) it's not able to load some files like https://drive.google.com/file/d/1mWOCGIOWmaC4L7IxCvWM9dgeVYeDl8L-/view (request for access) | |||||
| // gets stuck at `rhino.File3dm.fromByteArray` call in the worker. Note three.js uses 8.4.0 version of rhino3dm. | |||||
| public static LIBRARY_PATH = `https://cdn.jsdelivr.net/npm/rhino3dm@${getUrlQueryParam('rhino3dm', '8.0.1')}/` | |||||
| constructor(manager?: LoadingManager) { | constructor(manager?: LoadingManager) { | ||||
| super(manager) | super(manager) |