Просмотр исходного кода

Make tweakpane editor portable, default TweakpaneUiPlugin expanded true if not mobile/tablet.

master
Palash Bansal 1 год назад
Родитель
Сommit
171f0b8526
Аккаунт пользователя с таким Email не найден

+ 1
- 1
plugins/tweakpane-editor/package.json Просмотреть файл

"replace": { "replace": {
"dependencies": {}, "dependencies": {},
"peerDependencies": { "peerDependencies": {
"threepipe": "^0.0.42",
"threepipe": "^0.0.43",
"@threepipe/plugin-tweakpane": "^0.5.4" "@threepipe/plugin-tweakpane": "^0.5.4"
} }
} }

+ 2
- 2
plugins/tweakpane/package-lock.json Просмотреть файл

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

+ 1
- 1
plugins/tweakpane/package.json Просмотреть файл

{ {
"name": "@threepipe/plugin-tweakpane", "name": "@threepipe/plugin-tweakpane",
"description": "Tweakpane UI Plugin for ThreePipe", "description": "Tweakpane UI Plugin for ThreePipe",
"version": "0.5.5",
"version": "0.5.6",
"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",

+ 9
- 3
plugins/tweakpane/src/TweakpaneUiPlugin.ts Просмотреть файл

UiObjectConfig, UiObjectConfig,
uploadFile, uploadFile,
Vector2, Vector2,
Vector3, Texture,
Vector4, UndoManagerPlugin, WebGLRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets,
Vector3,
Texture,
Vector4,
UndoManagerPlugin,
WebGLRenderTarget,
WebGLCubeRenderTarget,
WebGLMultipleRenderTargets,
mobileAndTabletCheck,
} from 'threepipe' } from 'threepipe'
import styles from './tpTheme.css?inline' import styles from './tpTheme.css?inline'
import {tpImageInputGenerator} from './tpImageInputGenerator' import {tpImageInputGenerator} from './tpImageInputGenerator'
@uiDropdown('Color Mode', ['black', 'white', 'blue'].map(label=>({label}))) @uiDropdown('Color Mode', ['black', 'white', 'blue'].map(label=>({label})))
colorMode: 'black'|'white'|'blue' colorMode: 'black'|'white'|'blue'


constructor(expanded = false, bigTheme = true, container?: HTMLElement, colorMode?: 'black'|'white'|'blue') {
constructor(expanded = !mobileAndTabletCheck(), bigTheme = true, container?: HTMLElement, colorMode?: 'black'|'white'|'blue') {
super(container ?? document.getElementById(TweakpaneUiPlugin.CONTAINER_SLOT) ?? document.getElementById('tweakpaneMainPanelSlot') ?? document.body, { super(container ?? document.getElementById(TweakpaneUiPlugin.CONTAINER_SLOT) ?? document.getElementById('tweakpaneMainPanelSlot') ?? document.body, {
expanded, autoPostFrame: false, expanded, autoPostFrame: false,
}, false) }, false)

Загрузка…
Отмена
Сохранить