iobroker.mywebui 1.42.6 → 1.42.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.mywebui",
3
- "version": "1.42.6",
3
+ "version": "1.42.8",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413 with 3D Editor",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -3,30 +3,42 @@ import { iobrokerHandler } from "../common/IobrokerHandler.js";
3
3
 
4
4
  export class IobrokerWebui3DScreenEditor extends BaseCustomWebComponentConstructorAppend {
5
5
  static template = html`
6
- <div id="editor-container" style="width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;">
7
- <div id="toolbar" style="height:40px;background:#2a2a2a;border-bottom:1px solid #444;display:flex;align-items:center;padding:0 10px;gap:10px;">
8
- <button id="saveBtn" style="padding:5px 15px;background:#0078d4;color:white;border:none;cursor:pointer;border-radius:3px;">Save</button>
9
- <button id="addAssetBtn" style="padding:5px 15px;background:#28a745;color:white;border:none;cursor:pointer;border-radius:3px;">+ Asset</button>
10
- <button id="addLightBtn" style="padding:5px 15px;background:#ffa500;color:white;border:none;cursor:pointer;border-radius:3px;">+ Light</button>
6
+ <div id="editor-container" style="width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#1a1a1a;">
7
+ <!-- Toolbar -->
8
+ <div id="toolbar" style="height:48px;background:linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);border-bottom:1px solid #333;display:flex;align-items:center;padding:0 12px;gap:8px;box-shadow:0 2px 8px rgba(0,0,0,0.5);">
9
+ <button id="saveBtn" style="padding:8px 16px;background:#0078d4;color:white;border:none;cursor:pointer;border-radius:4px;font-weight:bold;font-size:12px;">💾 Save</button>
10
+ <button id="addAssetBtn" style="padding:8px 16px;background:#28a745;color:white;border:none;cursor:pointer;border-radius:4px;font-weight:bold;font-size:12px;">➕ Model</button>
11
+ <button id="addLightBtn" style="padding:8px 16px;background:#ffa500;color:white;border:none;cursor:pointer;border-radius:4px;font-weight:bold;font-size:12px;">💡 Light</button>
11
12
  <input id="fileInput" type="file" accept=".glb,.gltf,.fbx,.obj" style="display:none;">
12
- <button id="undoBtn" style="padding:5px 15px;background:#444;color:#aaa;border:none;cursor:pointer;border-radius:3px;">↶ Undo</button>
13
- <button id="redoBtn" style="padding:5px 15px;background:#444;color:#aaa;border:none;cursor:pointer;border-radius:3px;">↷ Redo</button>
13
+ <div style="width:1px;height:24px;background:#444;margin:0 8px;"></div>
14
+ <button id="undoBtn" style="padding:8px 12px;background:#333;color:#aaa;border:1px solid #444;cursor:pointer;border-radius:4px;font-size:12px;">↶</button>
15
+ <button id="redoBtn" style="padding:8px 12px;background:#333;color:#aaa;border:1px solid #444;cursor:pointer;border-radius:4px;font-size:12px;">↷</button>
14
16
  <div style="flex:1;"></div>
15
- <button id="gridToggle" style="padding:5px 10px;background:#444;color:#aaa;border:none;cursor:pointer;border-radius:3px;">Grid</button>
16
- <button id="axesToggle" style="padding:5px 10px;background:#444;color:#aaa;border:none;cursor:pointer;border-radius:3px;">Axes</button>
17
+ <button id="gridToggle" style="padding:8px 12px;background:#333;color:#888;border:1px solid #444;cursor:pointer;border-radius:4px;font-size:12px;">Grid</button>
18
+ <button id="axesToggle" style="padding:8px 12px;background:#333;color:#888;border:1px solid #444;cursor:pointer;border-radius:4px;font-size:12px;">Axes</button>
17
19
  </div>
18
- <div id="mainContent" style="flex:1;display:flex;overflow:hidden;">
19
- <div id="leftPanel" style="width:280px;background:#1e1e1e;border-right:1px solid #444;overflow:auto;display:flex;flex-direction:column;">
20
- <div style="display:flex;border-bottom:1px solid #444;">
21
- <button id="treeTab" style="flex:1;padding:10px;background:#2a2a2a;color:#0f0;border:none;cursor:pointer;font-weight:bold;">Scene</button>
22
- <button id="assetsTab" style="flex:1;padding:10px;background:#1e1e1e;color:#aaa;border:none;cursor:pointer;">Assets</button>
20
+
21
+ <!-- Main Content -->
22
+ <div id="mainContent" style="flex:1;display:flex;overflow:hidden;gap:0;">
23
+ <!-- Viewport (Main) -->
24
+ <div id="viewport" style="flex:1;background:#2a2a2a;position:relative;overflow:hidden;box-shadow:inset 0 0 20px rgba(0,0,0,0.8);"></div>
25
+
26
+ <!-- Asset Panel (Right) -->
27
+ <div id="rightPanel" style="width:280px;background:#1e1e1e;border-left:1px solid #333;overflow:hidden;display:flex;flex-direction:column;box-shadow:-2px 0 8px rgba(0,0,0,0.3);">
28
+ <!-- Tabs -->
29
+ <div style="display:flex;border-bottom:1px solid #333;background:#242424;">
30
+ <button id="treeTab" style="flex:1;padding:12px;background:#2a2a2a;color:#0f0;border:none;cursor:pointer;font-weight:bold;font-size:12px;border-bottom:2px solid #0f0;">Scene</button>
31
+ <button id="assetsTab" style="flex:1;padding:12px;background:#1e1e1e;color:#888;border:none;cursor:pointer;font-weight:bold;font-size:12px;border-bottom:2px solid transparent;">Assets</button>
23
32
  </div>
24
- <div id="sceneTree" style="padding:10px;flex:1;overflow:auto;"></div>
25
- <div id="assetsList" style="padding:10px;flex:1;overflow:auto;display:none;">
26
- <div id="assetsListContent" style="color:#aaa;font-size:12px;">No assets loaded</div>
33
+
34
+ <!-- Scene Tree -->
35
+ <div id="sceneTree" style="padding:12px;flex:1;overflow:auto;font-size:12px;"></div>
36
+
37
+ <!-- Assets List -->
38
+ <div id="assetsList" style="padding:12px;flex:1;overflow:auto;display:none;font-size:12px;">
39
+ <div id="assetsListContent" style="color:#888;">No assets loaded</div>
27
40
  </div>
28
41
  </div>
29
- <div id="viewport" style="flex:1;background:#333;position:relative;overflow:hidden;"></div>
30
42
  </div>
31
43
  </div>
32
44
  `;
@@ -347,17 +359,14 @@ export class IobrokerWebui3DScreenEditor extends BaseCustomWebComponentConstruct
347
359
  this.selectedObject = obj;
348
360
  obj.userData.selected = true;
349
361
 
350
- // Apply highlight material
362
+ // Apply subtle highlight (outline glow, not full color change)
351
363
  obj.traverse((child) => {
352
- if (child.material) {
364
+ if (child.isMesh && child.material) {
353
365
  child.userData.originalMaterial = child.material;
354
- const hlMat = new this.THREE.MeshStandardMaterial({
355
- color: 0xffff00,
356
- emissive: 0xffff00,
357
- emissiveIntensity: 0.3,
358
- metalness: 0.3,
359
- roughness: 0.4
360
- });
366
+ // Clone original material and add slight emission
367
+ const hlMat = child.material.clone();
368
+ hlMat.emissive.setHex(0xffff00);
369
+ hlMat.emissiveIntensity = 0.15; // Subtle glow
361
370
  child.material = hlMat;
362
371
  }
363
372
  });
@@ -369,9 +369,17 @@ export class IobrokerWebuiSolutionExplorer extends BaseCustomWebComponentConstru
369
369
  window.appShell.openScreenEditor(nm, type, s.html, s.style, s.script, s.settings, s.properties);
370
370
  }
371
371
  else if (type == '3dscreen') {
372
+ // Create 3D editor component
372
373
  const editor = document.createElement('iobroker-webui-3dscreen-editor');
373
374
  editor.setAttribute('scene-name', nm);
374
- window.appShell.openDialog(editor, { x: 50, y: 50, width: 1200, height: 800 });
375
+ // Open as borderless, full-size dialog
376
+ window.appShell.openDialog(editor, {
377
+ x: 0, y: 0,
378
+ width: window.innerWidth,
379
+ height: window.innerHeight,
380
+ modal: true,
381
+ title: '3D Screen: ' + nm
382
+ });
375
383
  }
376
384
  });
377
385
  },