Skip to content

Commit 206fb5e

Browse files
authored
Merge branch 'hyperfy-xyz:main' into main
2 parents 7a45f39 + 70b9d5b commit 206fb5e

File tree

8 files changed

+51
-17
lines changed

8 files changed

+51
-17
lines changed

CHANGELOG.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16+
## [v0.9.0]
17+
18+
### Added
19+
- core: standalone viewer/clients
20+
- apps: add world.getPlayers() to list all players in the world
21+
- apps: screen-space UI
22+
- core: add player health
23+
- apps: support world.overlapSphere queries
24+
- core: player to player collision (optional, disabled by default)
25+
- apps: player.push(force)
26+
- core: support ctrl+z to undo added, moved and removed apps
27+
- core: build mode right click with mouse to inspect
28+
- apps: new "buttons" prop
29+
- apps: app.sendTo(playerId, name, data) available on server
30+
- apps: node.children array of all child nodes
31+
- apps: uiimage.src support asset urls from props
32+
- apps: emit an app.on('destroy', cb) event that is run right before an app is destroyed/restarted
33+
- apps: add player.isAdmin for securely checking if a player is an admin
34+
35+
### Changed
36+
- apps: support webp image props
37+
- infra: pipe all client variables through initial server snapshot
38+
- core: preload local avatar and movement emotes before entering the world
39+
- apps: ui borderRadius use arcs instead of quadratic curves
40+
- apps: player effects moved to player.applyEffect (BREAKING CHANGE)
41+
- core: use more memory efficient app proxies
42+
- core: support custom app runtime method injection
43+
- core: show red reticle when in build mode for clarity
44+
- apps: unify player.id/userId/networkId etc as player.id
45+
46+
### Fixed
47+
- core: avatar feet too far above ground
48+
- core: fix esm module bundling
49+
- apps: anchors positions behind by one frame
50+
- apps: ui canvas using incorrect color space
51+
- apps: ensure control.camera initial values are accurate
52+
- apps: exporting app with emojis in props broken
53+
- apps: ui pointer events were not accurate
54+
- apps: ensure player enter event is emitted after they receive snapshot
55+
- apps: ui gap value not correctly multiplied by resolution
56+
1657
## [v0.8.1]
1758

1859
### Fixed
@@ -248,7 +289,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
248289
- Basic project structure
249290
- Core functionality from original project
250291

251-
[Unreleased]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.8.1...HEAD
292+
[Unreleased]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.9.0...HEAD
293+
[0.9.0]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.8.1...v0.9.0
252294
[0.8.1]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.8.0...v0.8.1
253295
[0.8.0]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.7.1...v0.8.0
254296
[0.7.1]: https://github.com/hyperfy-xyz/hyperfy/compare/v0.7.0...v0.7.1

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hyperfy",
3-
"version": "0.8.1",
3+
"version": "0.9.0",
44
"type": "module",
55
"main": "index.js",
66
"homepage": "https://github.com/hyperfy-xyz/hyperfy#readme",

src/core/packets.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const names = [
1515
'entityRemoved',
1616
'playerTeleport',
1717
'playerPush',
18-
'sendTo',
1918
'kick',
2019
]
2120

src/core/systems/Apps.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ export class Apps extends System {
196196
if (internalEvents.includes(name)) {
197197
return console.error(`apps cannot send internal events (${name})`)
198198
}
199+
if (!world.network.isServer) {
200+
throw new Error('sendTo can only be called on the server')
201+
}
199202
const player = world.entities.get(playerId)
200203
if (!player) return
201204
const event = [entity.data.id, entity.blueprint.version, name, data]

src/core/systems/ClientNetwork.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ export class ClientNetwork extends System {
4040
this.ws.send(packet)
4141
}
4242

43-
sendTo(playerId, name, data) {
44-
const packet = writePacket('sendTo', { playerId, name, data })
45-
this.ws.send(packet)
46-
}
47-
4843
async upload(file) {
4944
{
5045
// first check if we even need to upload it

src/core/systems/ServerNetwork.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,6 @@ export class ServerNetwork extends System {
433433
this.sendTo(data.networkId, 'playerSessionAvatar', data.avatar)
434434
}
435435

436-
onSendTo = (socket, data) => {
437-
this.sendTo(data.playerId, data.name, data.data)
438-
}
439-
440436
onDisconnect = (socket, code) => {
441437
socket.player.destroy(true)
442438
this.sockets.delete(socket.id)

src/server/Storage.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs-extra'
2-
import { throttle } from 'lodash-es'
2+
import { cloneDeep, throttle } from 'lodash-es'
33

44
export class Storage {
55
constructor(file) {
@@ -17,8 +17,7 @@ export class Storage {
1717
}
1818

1919
set(key, value) {
20-
if (this.data[key] === value) return
21-
this.data[key] = value
20+
this.data[key] = cloneDeep(value)
2221
this.save()
2322
}
2423

0 commit comments

Comments
 (0)