up squid & anvil restoring pre-flat support, lint
This commit is contained in:
parent
8407b6e006
commit
26383a2ed7
5 changed files with 23 additions and 23 deletions
|
|
@ -63,7 +63,7 @@
|
|||
"esbuild-plugin-polyfill-node": "^0.3.0",
|
||||
"express": "^4.18.2",
|
||||
"filesize": "^10.0.12",
|
||||
"flying-squid": "npm:@zardoy/flying-squid@^0.0.28",
|
||||
"flying-squid": "npm:@zardoy/flying-squid@^0.0.29",
|
||||
"fs-extra": "^11.1.1",
|
||||
"google-drive-browserfs": "github:zardoy/browserfs#google-drive",
|
||||
"iconify-icon": "^1.0.8",
|
||||
|
|
|
|||
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
|
|
@ -104,8 +104,8 @@ importers:
|
|||
specifier: ^10.0.12
|
||||
version: 10.0.12
|
||||
flying-squid:
|
||||
specifier: npm:@zardoy/flying-squid@^0.0.28
|
||||
version: '@zardoy/flying-squid@0.0.28(encoding@0.1.13)'
|
||||
specifier: npm:@zardoy/flying-squid@^0.0.29
|
||||
version: '@zardoy/flying-squid@0.0.29(encoding@0.1.13)'
|
||||
fs-extra:
|
||||
specifier: ^11.1.1
|
||||
version: 11.1.1
|
||||
|
|
@ -150,7 +150,7 @@ importers:
|
|||
version: 6.1.1
|
||||
prismarine-provider-anvil:
|
||||
specifier: github:zardoy/prismarine-provider-anvil#everything
|
||||
version: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/2663cad29c8f231c299f63e31c5040b6c1872bcc(minecraft-data@3.65.0)
|
||||
version: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/0228b5252f48a0d6ad7f36d7189851c427fbe8c4(minecraft-data@3.65.0)
|
||||
prosemirror-example-setup:
|
||||
specifier: ^1.2.2
|
||||
version: 1.2.2
|
||||
|
|
@ -3075,8 +3075,8 @@ packages:
|
|||
resolution: {integrity: sha512-6xm38yGVIa6mKm/DUCF2zFFJhERh/QWp1ufm4cNUvxsONBmfPg8uZ9pZBdOmF6qFGr/HlT6ABBkCSx/dlEtvWg==}
|
||||
engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'}
|
||||
|
||||
'@zardoy/flying-squid@0.0.28':
|
||||
resolution: {integrity: sha512-KVxGVBTNfyKWGWBdPYGL3gnmsojr18nKSkAbTyjpHpGBrqAOZIEEHKYwElShKXXjgXHlv/CI2Hp3L3R3NldCAQ==}
|
||||
'@zardoy/flying-squid@0.0.29':
|
||||
resolution: {integrity: sha512-E5Nk1gMeH+fAHM5aJY8kIxjBS/zuPtPD6QPeZg+laPV5H58Jx3Et17clF1zC9MT2wyFQ5wi5uTnfdGBTpSEqHw==}
|
||||
engines: {node: '>=8'}
|
||||
hasBin: true
|
||||
|
||||
|
|
@ -6762,8 +6762,8 @@ packages:
|
|||
prismarine-physics@1.8.0:
|
||||
resolution: {integrity: sha512-gbM+S+bmVtOKVv+Z0WGaHMeEeBHISIDsRDRlv8sr0dex3ZJRhuq8djA02CBreguXtI18ZKh6q3TSj2qDr45NHA==}
|
||||
|
||||
prismarine-provider-anvil@https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/2663cad29c8f231c299f63e31c5040b6c1872bcc:
|
||||
resolution: {tarball: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/2663cad29c8f231c299f63e31c5040b6c1872bcc}
|
||||
prismarine-provider-anvil@https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/0228b5252f48a0d6ad7f36d7189851c427fbe8c4:
|
||||
resolution: {tarball: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/0228b5252f48a0d6ad7f36d7189851c427fbe8c4}
|
||||
version: 2.8.0
|
||||
|
||||
prismarine-realms@1.3.2:
|
||||
|
|
@ -11971,7 +11971,7 @@ snapshots:
|
|||
'@types/emscripten': 1.39.8
|
||||
tslib: 1.14.1
|
||||
|
||||
'@zardoy/flying-squid@0.0.28(encoding@0.1.13)':
|
||||
'@zardoy/flying-squid@0.0.29(encoding@0.1.13)':
|
||||
dependencies:
|
||||
'@tootallnate/once': 2.0.0
|
||||
change-case: 4.1.2
|
||||
|
|
@ -11990,7 +11990,7 @@ snapshots:
|
|||
prismarine-entity: 2.3.1
|
||||
prismarine-item: 1.14.0
|
||||
prismarine-nbt: 2.5.0
|
||||
prismarine-provider-anvil: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/2663cad29c8f231c299f63e31c5040b6c1872bcc(minecraft-data@3.65.0)
|
||||
prismarine-provider-anvil: https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/0228b5252f48a0d6ad7f36d7189851c427fbe8c4(minecraft-data@3.65.0)
|
||||
prismarine-windows: 2.9.0
|
||||
prismarine-world: https://codeload.github.com/zardoy/prismarine-world/tar.gz/187a87f6d71cba12881a7bbaa510ed9085bf6da7
|
||||
rambda: 9.2.0
|
||||
|
|
@ -16615,7 +16615,7 @@ snapshots:
|
|||
prismarine-nbt: 2.5.0
|
||||
vec3: 0.1.8
|
||||
|
||||
prismarine-provider-anvil@https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/2663cad29c8f231c299f63e31c5040b6c1872bcc(minecraft-data@3.65.0):
|
||||
prismarine-provider-anvil@https://codeload.github.com/zardoy/prismarine-provider-anvil/tar.gz/0228b5252f48a0d6ad7f36d7189851c427fbe8c4(minecraft-data@3.65.0):
|
||||
dependencies:
|
||||
prismarine-block: https://codeload.github.com/zardoy/prismarine-block/tar.gz/dd4954fff3b334f8ce063d18e39b2e9414ece5b8
|
||||
prismarine-chunk: https://codeload.github.com/zardoy/prismarine-chunk/tar.gz/9662306deea57d8d0ba0a2a3f3f7adb95f0131e3(minecraft-data@3.65.0)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export * from 'crypto-browserify'
|
||||
export function createPublicKey () { }
|
||||
export function createPublicKey() { }
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ const states = require('minecraft-protocol/src/states')
|
|||
|
||||
window.serverDataChannel ??= {}
|
||||
export const customCommunication = {
|
||||
sendData (data) {
|
||||
sendData(data) {
|
||||
setTimeout(() => {
|
||||
window.serverDataChannel[this.isServer ? 'emitClient' : 'emitServer'](data)
|
||||
})
|
||||
},
|
||||
receiverSetup (processData) {
|
||||
receiverSetup(processData) {
|
||||
window.serverDataChannel[this.isServer ? 'emitServer' : 'emitClient'] = (data) => {
|
||||
processData(data)
|
||||
}
|
||||
|
|
@ -20,18 +20,18 @@ export const customCommunication = {
|
|||
}
|
||||
|
||||
class CustomChannelClient extends EventEmitter {
|
||||
constructor (isServer, version) {
|
||||
constructor(isServer, version) {
|
||||
super()
|
||||
this.version = version
|
||||
this.isServer = !!isServer
|
||||
this.state = states.HANDSHAKING
|
||||
}
|
||||
|
||||
get state () {
|
||||
get state() {
|
||||
return this.protocolState
|
||||
}
|
||||
|
||||
setSerializer (state) {
|
||||
setSerializer(state) {
|
||||
customCommunication.receiverSetup.call(this, (/** @type {{name, params, state?}} */parsed) => {
|
||||
if (!options.excludeCommunicationDebugEvents.includes(parsed.name)) {
|
||||
debug(`receive in ${this.isServer ? 'server' : 'client'}: ${parsed.name}`)
|
||||
|
|
@ -42,7 +42,7 @@ class CustomChannelClient extends EventEmitter {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures, grouped-accessor-pairs
|
||||
set state (newProperty) {
|
||||
set state(newProperty) {
|
||||
const oldProperty = this.protocolState
|
||||
this.protocolState = newProperty
|
||||
|
||||
|
|
@ -51,12 +51,12 @@ class CustomChannelClient extends EventEmitter {
|
|||
this.emit('state', newProperty, oldProperty)
|
||||
}
|
||||
|
||||
end (reason) {
|
||||
end(reason) {
|
||||
this._endReason = reason
|
||||
this.emit('end', this._endReason) // still emits on server side only, doesn't send anything to our client
|
||||
}
|
||||
|
||||
write (name, params) {
|
||||
write(name, params) {
|
||||
if(!options.excludeCommunicationDebugEvents.includes(name)) {
|
||||
debug(`[${this.state}] from ${this.isServer ? 'server' : 'client'}: ` + name)
|
||||
debug(params)
|
||||
|
|
@ -66,11 +66,11 @@ class CustomChannelClient extends EventEmitter {
|
|||
customCommunication.sendData.call(this, { name, params, state: this.state })
|
||||
}
|
||||
|
||||
writeBundle (packets) {
|
||||
writeBundle(packets) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
writeRaw (buffer) {
|
||||
writeRaw(buffer) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const { XRControllerModelFactory } = require('three/examples/jsm/webxr/XRControl
|
|||
const { buttonMap: standardButtonsMap } = require('contro-max/build/gamepad')
|
||||
const { activeModalStack, hideModal } = require('./globalState')
|
||||
|
||||
async function initVR () {
|
||||
async function initVR() {
|
||||
const { renderer } = viewer
|
||||
if (!('xr' in navigator)) return
|
||||
const isSupported = await navigator.xr.isSessionSupported('immersive-vr') && !!XRSession.prototype.updateRenderState // e.g. android webview doesn't support updateRenderState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue