Change the asset keys
This commit is contained in:
@@ -24,7 +24,7 @@ export function render_worn(player: Player, pose: PlayerPose, tint?: Vec3) {
|
||||
// what's worn on a player in that pose, its vertices to emit, the batch by default, like the player in the inventory
|
||||
export function push_worn(worn_items: ItemStack[], pose: PlayerPose, tint?: Vec3, emit?: VertexSink) {
|
||||
if (worn_items.length === 0) return;
|
||||
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
|
||||
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
|
||||
const to_world = pose_to_world(pose);
|
||||
for (const stack of worn_items) {
|
||||
const worn = EverythingRegistry.get<ItemRegistry>("items", stack.type_id)?.worn;
|
||||
@@ -48,7 +48,7 @@ export function push_worn(worn_items: ItemStack[], pose: PlayerPose, tint?: Vec3
|
||||
// what's worn on a player's right arm, in first person, like artifacts' renderFirstPersonArm. transform is the arm's,
|
||||
// from points around its pivot (see hand_renderer's arm_pose). the atlas has to be the current texture
|
||||
export function render_worn_arm(player: Player, transform: (x: number, y: number, z: number) => Vec3, tint?: Vec3) {
|
||||
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
|
||||
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
|
||||
const [px, py, pz] = right_arm(player.slim).pivot;
|
||||
// the model's pixels, standing still, to around the arm's pivot
|
||||
const to_arm = (x: number, y: number, z: number) => transform(x - px, y - py, z - pz);
|
||||
|
||||
Reference in New Issue
Block a user