Skip to content

Commit

Permalink
v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andersdn committed May 31, 2022
1 parent 4a5da0e commit b27c3df
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 5 deletions.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
## todo
## Look At Me

For more information please visit [https://andersdn.github.io/lookatme/](https://andersdn.github.io/lookatme/)

---

## For Developers...

Run Locally
```
npm run start
```
Generate a Distribution
```
npm run dist
```

## Backlog

- [ ] Save settings between sessions
- [ ] Locale Files for translations
- [ ] Review UX of having the whole app be draggable
- [ ] Auto update
- [ ] Actually signed builds for app store


2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Move the window around hovering on your floating window and dragging on the `✥
- If you have resized your window somtimes you can accidelty move the resize icon off screen, so this option brings it back to the ceter of your screen.
- 🐁 Ignore Mouse Events
- Disables mouse events and locks the position of the window
- 🪞 Mirror Camera
- Flips the camera
- ℹ️ About / Help
- Takes you here
- 🚪 Quit
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
opacity: 0.75;
transition: opacity ease 0.25s;
}
.mirrorCamera{
transform: rotateY(180deg);
}
</style>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "look-at-me",
"productName": "Look At Me",
"version": "0.0.1",
"version": "0.0.2",
"description": "It's you but floating",
"main": "src/main.js",
"scripts": {
Expand Down
31 changes: 28 additions & 3 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let selectedCamera = false;
let selectedFilter = 'blur';
let selectedSize = 0.5;
let selectedIgnoreMouse = false;
let selectedMirrorCamera = false;

let currentStream;

Expand Down Expand Up @@ -136,7 +137,8 @@ const setSize = () => {
selectedSize: selectedSize,
selectedCamera: selectedCamera,
selectedFilter: selectedFilter,
selectedIgnoreMouse: selectedIgnoreMouse
selectedIgnoreMouse: selectedIgnoreMouse,
selectedMirrorCamera: selectedMirrorCamera
})
);

Expand Down Expand Up @@ -181,7 +183,8 @@ const setActiveCamera = (deviceId) => {
selectedSize: selectedSize,
selectedCamera: selectedCamera,
selectedFilter: selectedFilter,
selectedIgnoreMouse: selectedIgnoreMouse
selectedIgnoreMouse: selectedIgnoreMouse,
selectedMirrorCamera: selectedMirrorCamera
})
);
};
Expand Down Expand Up @@ -226,7 +229,29 @@ ipcRenderer.on('set-ignore-mouse', function (event, shouldIgnoreMouse) {
selectedSize: selectedSize,
selectedCamera: selectedCamera,
selectedFilter: selectedFilter,
selectedIgnoreMouse: selectedIgnoreMouse
selectedIgnoreMouse: selectedIgnoreMouse,
selectedMirrorCamera: selectedMirrorCamera
})
);

});

ipcRenderer.on('set-mirror-camera', function (event, shouldMirrorCamera) {
selectedMirrorCamera = shouldMirrorCamera;
if(selectedMirrorCamera){
document.getElementById('mainWindow').classList.add("mirrorCamera");
} else {
document.getElementById('mainWindow').classList.remove("mirrorCamera");
}

ipcRenderer.send(
'update-settings',
JSON.stringify({
selectedSize: selectedSize,
selectedCamera: selectedCamera,
selectedFilter: selectedFilter,
selectedIgnoreMouse: selectedIgnoreMouse,
selectedMirrorCamera: selectedMirrorCamera
})
);

Expand Down
11 changes: 11 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ global.selectedCamera = false;
global.selectedFilter = 'blur';
global.prevCameraList = null;
global.selectedIgnoreMouse = false;
global.mirrorCamera = false;
global.tray = null;

const iconPath = path.join(__dirname, 'iconTemplate.png');
Expand Down Expand Up @@ -92,6 +93,10 @@ app.whenReady().then(async () => {
mainWindow.setIgnoreMouseEvents(global.selectedIgnoreMouse);
mainWindow.webContents.send('set-ignore-mouse', global.selectedIgnoreMouse);
}
const toggleMirrorCamera = () => {
global.mirrorCamera = !global.mirrorCamera;
mainWindow.webContents.send('set-mirror-camera', global.mirrorCamera);
}
const setSize = (sizeVal) => {
global.selectedSize = sizeVal;
mainWindow.center();
Expand Down Expand Up @@ -179,6 +184,12 @@ app.whenReady().then(async () => {
type: 'checkbox',
checked: !!global.selectedIgnoreMouse,
},
{
click: () => toggleMirrorCamera(),
label: '🪞 Mirror Camera',
type: 'checkbox',
checked: !!global.mirrorCamera,
},
{ type: 'separator' },
{ label: 'ℹ️ About / Help', role: 'help', click : ()=>shell.openExternal('https://andersdn.github.io/lookatme/')},
{ label: '🚪 Quit', accelerator: 'CommandOrControl+Q', role: 'quit' },
Expand Down

0 comments on commit b27c3df

Please sign in to comment.