-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
148 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Build release | ||
|
||
on: push | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: 14 | ||
- name: install dependencies | ||
run: npm install | ||
- name: publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npm run publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,50 @@ | ||
// preload with contextIsolation enabled | ||
const { contextBridge, ipcRenderer } = require('electron'); | ||
const { contextBridge, ipcRenderer } = require("electron"); | ||
const dataAccess = require("../js/dataaccess"); | ||
const AdminSoundManager = require("../js/soundManager"); | ||
const pathModule = require("path"); | ||
var soundManager; | ||
dataAccess.getSettings(settings => { | ||
dataAccess.getSettings((settings) => { | ||
soundManager = new AdminSoundManager(pathModule); | ||
soundManager.setSoundLibraryPath(settings.maptool.soundLibraryPath) | ||
}) | ||
soundManager.setSoundLibraryPath(settings.maptool.soundLibraryPath); | ||
}); | ||
|
||
const util = require("./server.util"); | ||
const ElementCreator = require("../js/lib/elementCreator"); | ||
const diceRoller = require("../js/diceroller") | ||
const diceRoller = require("../js/diceroller"); | ||
|
||
const constants = dataAccess.getConstantsSync(); | ||
|
||
|
||
contextBridge.exposeInMainWorld('api', { | ||
contextBridge.exposeInMainWorld("api", { | ||
util, | ||
constants, | ||
diceRoller, | ||
extname: (path) => pathModule.extname(path), | ||
messageWindow: (windowName, eventName, args) => { return ipcRenderer.send('notify-window', { name: windowName, event: eventName, args: args }) }, | ||
}) | ||
|
||
messageWindow: (windowName, eventName, args) => { | ||
return ipcRenderer.send("notify-window", { name: windowName, event: eventName, args: args }); | ||
}, | ||
}); | ||
|
||
contextBridge.exposeInMainWorld('subscribe', { | ||
contextBridge.exposeInMainWorld("subscribe", { | ||
on: (event, handler) => ipcRenderer.on(event, handler), | ||
requestMapToolState: () => ipcRenderer.send('request-maptool-state'), | ||
notifyServerState: (args) => { console.log(args); ipcRenderer.send('maptool-server-state', args) } | ||
}) | ||
|
||
contextBridge.exposeInMainWorld('dataAccess', { | ||
getSettings: (callback) => { dataAccess.getSettings(callback) }, | ||
getParty: (callback) => { dataAccess.getParty(callback) }, | ||
base64: async (path) => await dataAccess.base64(path) | ||
}) | ||
|
||
contextBridge.exposeInMainWorld('soundManager', { | ||
getAvailableSounds: async () => { return await soundManager.getAvailableSounds() } | ||
}) | ||
requestMapToolState: () => ipcRenderer.send("request-maptool-state"), | ||
notifyServerState: (args) => { | ||
ipcRenderer.send("maptool-server-state", args); | ||
}, | ||
}); | ||
|
||
contextBridge.exposeInMainWorld("dataAccess", { | ||
getSettings: (callback) => { | ||
dataAccess.getSettings(callback); | ||
}, | ||
getParty: (callback) => { | ||
dataAccess.getParty(callback); | ||
}, | ||
base64: async (path) => await dataAccess.base64(path), | ||
}); | ||
|
||
contextBridge.exposeInMainWorld("soundManager", { | ||
getAvailableSounds: async () => { | ||
return await soundManager.getAvailableSounds(); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,53 @@ | |
</main> | ||
|
||
<div id="chat-container" class="hidden"></div> | ||
<svg> | ||
<filter id="effect_fill_filter" x="0%" y="0%" width="100%" height="100%"> | ||
<feImage id="effect_fill_filter_img" /> | ||
</filter> | ||
<filter id="night-mode"> | ||
<feColorMatrix | ||
type="matrix" | ||
values=" | ||
0.2 0 0 0 0 | ||
0 0.2 0 0 0 | ||
0 0 0.3 0 0.01 | ||
0 0 0 0 1" | ||
/> | ||
</filter> | ||
<filter id="winter-mode"> | ||
<feColorMatrix | ||
type="matrix" | ||
values=" | ||
0.6 0 0 0 0 | ||
0 0.6 0 0 0 | ||
0.3 0.2 2.5 0 0 | ||
0 0 0 1.8 0" | ||
/> | ||
</filter> | ||
<filter id="red_hue_filter"> | ||
<feColorMatrix | ||
type="matrix" | ||
values="0.78 0 0 0 0 | ||
0 0.04 0 0 0 | ||
0 0 0.04 0 0 | ||
0 0 0 1 0 " | ||
/> | ||
</filter> | ||
<filter id="daylight"> | ||
<!--Blur effect--> | ||
|
||
<!--Lighting effect--> | ||
<feSpecularLighting result="spec2" specularConstant="1.4" specularExponent="13" lighting-color="rgba(255,255,0,0.01)"> | ||
<!--Light source effect--> | ||
<feDistantLight azimuth="25" elevation="5" /> | ||
</feSpecularLighting> | ||
<!--Composition of inputs--> | ||
<feComposite in="SourceGraphic" in2="spec2" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" /> | ||
</filter> | ||
</svg> | ||
</body> | ||
|
||
<script src="client/connectionConfig.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script> | ||
<script src="client/hammer.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters