Selaa lähdekoodia

downgrade rhino3dm, remove gltf version manipulation, type fix in plugin templates

master
Palash Bansal 1 vuosi sitten
vanhempi
commit
8b361be123
No account linked to committer's email address

+ 1
- 1
plugins/plugin-template-rollup/src/SamplePlugin.ts Näytä tiedosto

@@ -4,7 +4,7 @@ import styles from './SamplePlugin.css'

console.log(TweakpaneUiPlugin)

export class SamplePlugin extends AViewerPluginSync<string> {
export class SamplePlugin extends AViewerPluginSync {
public static readonly PluginType: string = 'SamplePlugin'
enabled = true
dependencies = []

+ 16
- 16
plugins/plugin-template-vite/package.json Näytä tiedosto

@@ -8,22 +8,6 @@
"threepipe": "file:./../../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": {
".": {
"types": "./dist/index.d.ts",
@@ -68,5 +52,21 @@
"type": "git",
"url": "git://github.com/repalash/threepipe.git",
"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"
}
}
}
}

+ 1
- 1
plugins/plugin-template-vite/src/SamplePlugin.ts Näytä tiedosto

@@ -4,7 +4,7 @@ import styles from './SamplePlugin.css?inline'

console.log(TweakpaneUiPlugin)

export class SamplePlugin extends AViewerPluginSync<string> {
export class SamplePlugin extends AViewerPluginSync {
public static readonly PluginType: string = 'SamplePlugin'
enabled = true
dependencies = []

+ 1
- 4
src/assetmanager/export/GLTFWriter2.ts Näytä tiedosto

@@ -7,14 +7,11 @@ import {ThreeSerialization} from '../../utils'
export class GLTFWriter2 extends GLTFExporter.Utils.GLTFWriter {


protected _assetVersion: number
readonly TPAssetVersion = 1

constructor() {
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 & {

+ 4
- 1
src/assetmanager/import/Rhino3dmLoader2.ts Näytä tiedosto

@@ -12,9 +12,12 @@ import {
Object3D,
Points,
} from 'three'
import {getUrlQueryParam} from 'ts-browser-helpers'

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) {
super(manager)

Loading…
Peruuta
Tallenna