Bladeren bron

Mark three.js textures, objects as ui primitives

master
Palash Bansal 1 jaar geleden
bovenliggende
commit
443af99fe4
No account linked to committer's email address

+ 7
- 6
plugins/blueprintjs/package-lock.json Bestand weergeven

@@ -1,18 +1,19 @@
{
"name": "@threepipe/plugin-blueprintjs",
"version": "0.3.1",
"version": "0.3.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@threepipe/plugin-blueprintjs",
"version": "0.3.1",
"version": "0.3.2",
"license": "Apache-2.0",
"dependencies": {
"threepipe": "file:./../../src/"
},
"devDependencies": {
"uiconfig-blueprint": "0.1.0-dev.5"
"uiconfig-blueprint": "0.1.0-dev.5",
"uiconfig.js": "^0.1.3"
}
},
"../../src": {},
@@ -588,9 +589,9 @@
}
},
"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,
"license": "MIT"
},

+ 3
- 2
plugins/blueprintjs/package.json Bestand weergeven

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

+ 10
- 1
plugins/blueprintjs/src/BlueprintJsUiPlugin.ts Bestand weergeven

@@ -14,7 +14,7 @@ import {
uploadFile,
Vector2,
Vector3,
Vector4, UiObjectConfig,
Vector4, UiObjectConfig, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget,
} from 'threepipe'

export class BlueprintJsUiPlugin extends UiConfigRendererBlueprint implements IViewerPluginSync {
@@ -28,6 +28,15 @@ export class BlueprintJsUiPlugin extends UiConfigRendererBlueprint implements IV
autoPostFrame: false,
})
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

+ 2
- 2
plugins/tweakpane/package-lock.json Bestand weergeven

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

+ 1
- 1
plugins/tweakpane/package.json Bestand weergeven

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

+ 11
- 2
plugins/tweakpane/src/TweakpaneUiPlugin.ts Bestand weergeven

@@ -18,8 +18,8 @@ import {
UiObjectConfig,
uploadFile,
Vector2,
Vector3,
Vector4, UndoManagerPlugin,
Vector3, Texture,
Vector4, UndoManagerPlugin, WebGLRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets,
} from 'threepipe'
import styles from './tpTheme.css?inline'
import {tpImageInputGenerator} from './tpImageInputGenerator'
@@ -44,6 +44,15 @@ export class TweakpaneUiPlugin extends UiConfigRendererTweakpane implements IVie
this._root!.registerPlugin(TweakpaneImagePlugin as any)
if (bigTheme) createStyles(styles, container)
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

Laden…
Annuleren
Opslaan