minecraft-renderer 0.1.31 → 0.1.32
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/dist/minecraft-renderer.js +57 -57
- package/dist/minecraft-renderer.js.meta.json +1 -1
- package/dist/threeWorker.js +419 -419
- package/package.json +1 -1
- package/src/graphicsBackend/config.ts +1 -0
- package/src/lib/worldrendererCommon.ts +1 -1
- package/src/three/hand.ts +103 -52
- package/src/three/handLegacy.ts +90 -0
- package/src/three/holdingBlock.ts +269 -335
- package/src/three/holdingBlockFactory.ts +16 -0
- package/src/three/holdingBlockLegacy.ts +957 -0
- package/src/three/holdingBlockTypes.ts +22 -0
- package/src/three/worldRendererThree.ts +26 -5
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import HoldingBlock from './holdingBlock'
|
|
3
|
+
import HoldingBlockLegacy from './holdingBlockLegacy'
|
|
4
|
+
import type { IHoldingBlock } from './holdingBlockTypes'
|
|
5
|
+
import type { WorldRendererThree } from './worldRendererThree'
|
|
6
|
+
|
|
7
|
+
export function createHoldingBlock(
|
|
8
|
+
worldRenderer: WorldRendererThree,
|
|
9
|
+
offHand: boolean = false
|
|
10
|
+
): IHoldingBlock {
|
|
11
|
+
const config = worldRenderer.displayOptions.inWorldRenderingConfig
|
|
12
|
+
if (config.handRenderer === 'legacy') {
|
|
13
|
+
return new HoldingBlockLegacy(worldRenderer, offHand)
|
|
14
|
+
}
|
|
15
|
+
return new HoldingBlock(worldRenderer, offHand)
|
|
16
|
+
}
|