Parcourir la source

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

master
Palash Bansal il y a 1 an
Parent
révision
8b361be123
Aucun compte lié à l'adresse e-mail de l'auteur

+ 1
- 1
plugins/plugin-template-rollup/src/SamplePlugin.ts Voir le fichier



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 = []

+ 16
- 16
plugins/plugin-template-vite/package.json Voir le fichier

"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"
}
}
} }
} }

+ 1
- 1
plugins/plugin-template-vite/src/SamplePlugin.ts Voir le fichier



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 = []

+ 1
- 4
src/assetmanager/export/GLTFWriter2.ts Voir le fichier

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 & {

+ 4
- 1
src/assetmanager/import/Rhino3dmLoader2.ts Voir le fichier

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)

Chargement…
Annuler
Enregistrer