Skip to content

Commit

Permalink
chore: bump version to v0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Jul 24, 2024
1 parent e113f08 commit 5630fc3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.0](https://github.com/arianrhodsandlot/nostalgist/compare/v0.9.2...v0.10.0) - 2024-07-24
### Changed
- update default retroarch-emscripten-build version to v1.19.1
- add `getEmscripten` and `getEmscriptenAL`

## [0.9.2](https://github.com/arianrhodsandlot/nostalgist/compare/v0.9.1...v0.9.2) - 2024-03-15

### Fixed
Expand Down
31 changes: 13 additions & 18 deletions demo/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,33 @@ async function gbc() {
}

async function launchNestopia() {
const abortController = new AbortController()
setTimeout(() => {
abortController.abort()
}, 500)
nostalgist = await Nostalgist.launch({
core: 'nestopia',
rom: 'pong1k.nes',
signal: abortController.signal,
})
}

async function launchFceummWithCoreConfig() {
nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
shader: 'crt/crt-easymode',
retroarchCoreConfig: {
fceumm_turbo_enable: 'Both',
},
rom: 'flappybird.nes',
shader: 'crt/crt-easymode',
})
}

async function launchFceummWithRaLegacy() {
nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
resolveCoreJs(core) {
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/[email protected]/retroarch/${core}_libretro.js`
},
resolveCoreWasm(core) {
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/[email protected]/retroarch/${core}_libretro.wasm`
},
rom: 'flappybird.nes',
})
}

Expand Down Expand Up @@ -87,7 +82,7 @@ function restart() {
}

function resize() {
nostalgist.resize({ width: 400, height: 400 })
nostalgist.resize({ height: 400, width: 400 })
}

async function screenshot() {
Expand All @@ -107,30 +102,30 @@ function getCurrentNostalgist() {
}

Nostalgist.configure({
style: { width: '800px', height: '600px', position: 'static' },
style: { height: '600px', position: 'static', width: '800px' },
})

document.body.addEventListener('click', async function listener({ target }) {
if (!(target instanceof HTMLButtonElement)) {
return
}
const handlers = {
nes,
megadrive,
exit,
gbc,
launchNestopia,
launchCustomRom,
launchFceummWithCoreConfig,
launchFceummWithRaLegacy,
launchCustomRom,
launchNestopia,
launchState,
saveState,
loadState,
megadrive,
nes,
pause,
resume,
restart,
resize,
restart,
resume,
saveState,
screenshot,
exit,
}
const textContent = target.textContent || ''
if (textContent in handlers) {
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": "nostalgist",
"description": "Nostalgist.js is a JavaScript library that allows you to run emulators of retro consoles within web browsers.",
"version": "0.9.2",
"version": "0.10.0",
"author": {
"name": "arianrhodsandlot",
"email": "[email protected]"
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5630fc3

Please sign in to comment.