wip
BIN
packages/frontend/assets/room/object-thumbs/clipped-picture.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
packages/frontend/assets/room/object-thumbs/curtain.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
packages/frontend/assets/room/object-thumbs/large-mousepad.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
BIN
packages/frontend/assets/room/object-thumbs/record-player.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
packages/frontend/assets/room/object-thumbs/spot-light.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
packages/frontend/assets/room/object-thumbs/stanchion-pole.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
packages/frontend/assets/room/object-thumbs/wire-basket.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
packages/frontend/assets/room/object-thumbs/wire-net.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -248,6 +248,7 @@ async function cancel() {
|
||||
display: block;
|
||||
touch-action: none;
|
||||
background: #000;
|
||||
cursor: grab;
|
||||
}
|
||||
.canvas:focus {
|
||||
outline: none;
|
||||
|
||||
@@ -89,10 +89,6 @@ export abstract class EngineControllerBase {
|
||||
if (this.options.resolution === 2) babylonEngine.setHardwareScalingLevel(0.5);
|
||||
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
||||
|
||||
//this.engine = new RoomEngine(this.roomState.value, {
|
||||
// engine: babylonEngine,
|
||||
// ...this.options,
|
||||
//});
|
||||
this.engine = await params.createEngine(babylonEngine);
|
||||
|
||||
this.engine.on('ev', ({ type, ctx }) => {
|
||||
|
||||
@@ -116,6 +116,11 @@ export class RoomObjectPreviewEngine extends EventEmitter {
|
||||
window.takeScreenshot = () => {
|
||||
const def = getObjectDef(this.objectType);
|
||||
|
||||
this.scene.clearColor = new BABYLON.Color4(0, 0, 0, 0);
|
||||
this.scene.autoClear = true;
|
||||
this.sr.disableSnapshotRendering();
|
||||
this.pipeline.dispose();
|
||||
|
||||
const boundingInfo = getMeshesBoundingBox(this.objectMesh!.getChildMeshes().filter(m => m.isEnabled() && m.isVisible));
|
||||
|
||||
const camera = new BABYLON.ArcRotateCamera('camera', Math.PI / 4, Math.PI / 2.5, cm(300), new BABYLON.Vector3(0, cm(90), 0), this.scene);
|
||||
@@ -268,10 +273,6 @@ export class RoomObjectPreviewEngine extends EventEmitter {
|
||||
const size = boundingInfo.extendSize;
|
||||
const distance = Math.max(size.x, size.y, size.z) * 2;
|
||||
this.camera.radius = distance * 3;
|
||||
//this.camera.orthoLeft = -distance;
|
||||
//this.camera.orthoRight = distance;
|
||||
//this.camera.orthoTop = distance;
|
||||
//this.camera.orthoBottom = -distance;
|
||||
|
||||
this.pipeline.addCamera(this.camera);
|
||||
|
||||
|
||||