Kaynağa Gözat

Mark three.js textures, objects as ui primitives

master
Palash Bansal 1 yıl önce
ebeveyn
işleme
443af99fe4
No account linked to committer's email address

+ 7
- 6
plugins/blueprintjs/package-lock.json Dosyayı Görüntüle

{ {
"name": "@threepipe/plugin-blueprintjs", "name": "@threepipe/plugin-blueprintjs",
"version": "0.3.1",
"version": "0.3.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@threepipe/plugin-blueprintjs", "name": "@threepipe/plugin-blueprintjs",
"version": "0.3.1",
"version": "0.3.2",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"threepipe": "file:./../../src/" "threepipe": "file:./../../src/"
}, },
"devDependencies": { "devDependencies": {
"uiconfig-blueprint": "0.1.0-dev.5"
"uiconfig-blueprint": "0.1.0-dev.5",
"uiconfig.js": "^0.1.3"
} }
}, },
"../../src": {}, "../../src": {},
} }
}, },
"node_modules/uiconfig.js": { "node_modules/uiconfig.js": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/uiconfig.js/-/uiconfig.js-0.1.2.tgz",
"integrity": "sha512-J6Rgu6L3YB4guzcYmGspMlNTRBXlvdwFRG0nMMY+VlQJFuiE1i76UsAm+sssbZN6OTlPZzqonrSZFlLtCGkM7w==",
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/uiconfig.js/-/uiconfig.js-0.1.3.tgz",
"integrity": "sha512-Q3eXWGrwXO46lkjfCsMQX6fsMKLmg4u4rrvZMkRJlQiDmsQyCaDdIJy7CMKrBWWfL9e6f4w+66SHAb+u4rOL2g==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },

+ 3
- 2
plugins/blueprintjs/package.json Dosyayı Görüntüle

{ {
"name": "@threepipe/plugin-blueprintjs", "name": "@threepipe/plugin-blueprintjs",
"description": "Blueprint.js UI Plugin for ThreePipe", "description": "Blueprint.js UI Plugin for ThreePipe",
"version": "0.3.1",
"version": "0.3.2",
"devDependencies": { "devDependencies": {
"uiconfig-blueprint": "0.1.0-dev.5"
"uiconfig-blueprint": "0.1.0-dev.5",
"uiconfig.js": "^0.1.3"
}, },
"dependencies": { "dependencies": {
"threepipe": "file:./../../src/" "threepipe": "file:./../../src/"

+ 10
- 1
plugins/blueprintjs/src/BlueprintJsUiPlugin.ts Dosyayı Görüntüle

uploadFile, uploadFile,
Vector2, Vector2,
Vector3, Vector3,
Vector4, UiObjectConfig,
Vector4, UiObjectConfig, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget,
} from 'threepipe' } from 'threepipe'


export class BlueprintJsUiPlugin extends UiConfigRendererBlueprint implements IViewerPluginSync { export class BlueprintJsUiPlugin extends UiConfigRendererBlueprint implements IViewerPluginSync {
autoPostFrame: false, autoPostFrame: false,
}) })
this.THREE = {Color, Vector4, Vector3, Vector2, Texture} as any this.THREE = {Color, Vector4, Vector3, Vector2, Texture} as any

// @ts-expect-error required for tpTextureInputComponent so that it doesn't clone it. todo check others as well like object3d etc
Texture.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLRenderTarget.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLCubeRenderTarget.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLMultipleRenderTargets.prototype._ui_isPrimitive = true
} }


protected _viewer?: ThreeViewer protected _viewer?: ThreeViewer

+ 2
- 2
plugins/tweakpane/package-lock.json Dosyayı Görüntüle

{ {
"name": "@threepipe/plugin-tweakpane", "name": "@threepipe/plugin-tweakpane",
"version": "0.5.1",
"version": "0.5.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@threepipe/plugin-tweakpane", "name": "@threepipe/plugin-tweakpane",
"version": "0.5.1",
"version": "0.5.3",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"threepipe": "file:./../../src/" "threepipe": "file:./../../src/"

+ 1
- 1
plugins/tweakpane/package.json Dosyayı Görüntüle

{ {
"name": "@threepipe/plugin-tweakpane", "name": "@threepipe/plugin-tweakpane",
"description": "Tweakpane UI Plugin for ThreePipe", "description": "Tweakpane UI Plugin for ThreePipe",
"version": "0.5.2",
"version": "0.5.3",
"devDependencies": { "devDependencies": {
"tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.404/package.tgz", "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.404/package.tgz",
"uiconfig-tweakpane": "^0.0.10", "uiconfig-tweakpane": "^0.0.10",

+ 11
- 2
plugins/tweakpane/src/TweakpaneUiPlugin.ts Dosyayı Görüntüle

UiObjectConfig, UiObjectConfig,
uploadFile, uploadFile,
Vector2, Vector2,
Vector3,
Vector4, UndoManagerPlugin,
Vector3, Texture,
Vector4, UndoManagerPlugin, WebGLRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets,
} from 'threepipe' } from 'threepipe'
import styles from './tpTheme.css?inline' import styles from './tpTheme.css?inline'
import {tpImageInputGenerator} from './tpImageInputGenerator' import {tpImageInputGenerator} from './tpImageInputGenerator'
this._root!.registerPlugin(TweakpaneImagePlugin as any) this._root!.registerPlugin(TweakpaneImagePlugin as any)
if (bigTheme) createStyles(styles, container) if (bigTheme) createStyles(styles, container)
this.colorMode = colorMode ?? (localStorage ? localStorage.getItem('tpTheme') as any : 'blue') ?? 'blue' this.colorMode = colorMode ?? (localStorage ? localStorage.getItem('tpTheme') as any : 'blue') ?? 'blue'

// @ts-expect-error required for tpTextureInputComponent so that it doesn't clone it. todo check others as well like object3d etc
Texture.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLRenderTarget.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLCubeRenderTarget.prototype._ui_isPrimitive = true
// @ts-expect-error same
WebGLMultipleRenderTargets.prototype._ui_isPrimitive = true
} }


protected _viewer?: ThreeViewer protected _viewer?: ThreeViewer

Loading…
İptal
Kaydet