minecraft-renderer 0.1.62 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/mesherWasm.js +22 -22
- package/dist/minecraft-renderer.js +54 -54
- package/dist/minecraft-renderer.js.meta.json +1 -1
- package/dist/threeWorker.js +407 -407
- package/package.json +1 -1
- package/src/graphicsBackend/config.ts +3 -3
- package/src/graphicsBackend/rendererDefaultOptions.ts +41 -24
- package/src/graphicsBackend/rendererOptionsSync.ts +23 -23
- package/src/graphicsBackend/types.ts +3 -3
- package/src/index.ts +8 -8
- package/src/lib/bindAbortableListener.test.ts +65 -0
- package/src/lib/bindAbortableListener.ts +41 -0
- package/src/lib/workerProxy.ts +238 -118
- package/src/lib/workerSyncOps.test.ts +154 -0
- package/src/lib/worldrendererCommon.removeColumn.test.ts +182 -0
- package/src/lib/worldrendererCommon.ts +86 -54
- package/src/three/documentRenderer.ts +1 -1
- package/src/three/entities.ts +21 -11
- package/src/three/graphicsBackendBase.ts +18 -8
- package/src/three/menuBackground/activeView.ts +1 -1
- package/src/three/menuBackground/config.ts +9 -9
- package/src/three/menuBackground/index.ts +10 -10
- package/src/three/menuBackground/renderer.ts +12 -12
- package/src/three/menuBackground/types.ts +9 -9
- package/src/three/menuBackground/{futuristic.ts → v2.ts} +110 -59
- package/src/three/menuBackground/{futuristicMeta.ts → v2Meta.ts} +6 -6
- package/src/three/modules/rain.ts +1 -1
- package/src/three/worldRendererThree.ts +2 -1
- package/src/wasm-mesher/tests/mesherWasmRequestTracker.test.ts +29 -0
- package/src/wasm-mesher/worker/mesherWasm.ts +7 -0
- package/src/wasm-mesher/worker/mesherWasmRequestTracker.ts +10 -0
- package/src/worldView/worldView.spiral.test.ts +38 -0
- package/src/worldView/worldView.ts +41 -8
- package/src/worldView/worldViewWorkerBridge.test.ts +59 -0
- package/src/lib/workerProxy.restore.test.ts +0 -29
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { describe, expect, it } from 'vitest'
|
|
3
|
-
import { restoreTransferred } from './workerProxy'
|
|
4
|
-
|
|
5
|
-
describe('restoreTransferred Set/Map', () => {
|
|
6
|
-
const worker = null as unknown as Worker
|
|
7
|
-
|
|
8
|
-
it('restores Set from __setValues', () => {
|
|
9
|
-
const out = restoreTransferred({ __restorer: 'Set', __setValues: ['a', 'b'] }, [], worker, false)
|
|
10
|
-
expect(out).toEqual(new Set(['a', 'b']))
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
it('does not throw when legacy values is a function (Map.values collision)', () => {
|
|
14
|
-
const map = new Map([['k', 1]])
|
|
15
|
-
const out = restoreTransferred({ __restorer: 'Set', values: map.values.bind(map) }, [], worker, false)
|
|
16
|
-
expect(out).toEqual(new Set())
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
it('restores Map from __mapEntries', () => {
|
|
20
|
-
const out = restoreTransferred({ __restorer: 'Map', __mapEntries: [['a', 1]] }, [], worker, false)
|
|
21
|
-
expect(out).toEqual(new Map([['a', 1]]))
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
it('does not throw when legacy entries is a function', () => {
|
|
25
|
-
const m = new Map()
|
|
26
|
-
const out = restoreTransferred({ __restorer: 'Map', entries: m.entries.bind(m) }, [], worker, false)
|
|
27
|
-
expect(out).toEqual(new Map())
|
|
28
|
-
})
|
|
29
|
-
})
|