@createlumina/model

1.0.0 • Public • Published

Model Module

Version made for Lumina projects. Original credits goes to Voxelum/minecraft-launcher-core-node

npm version Downloads Install size npm Build Status stability-experimental

This module can only used for browser environment

Usage

Build THREE.js model for block and player

Please read how to use resourcepacks before this

Create THREE.js block model:

import { BlockModelFactory } from '@createlumina/model';

const textureRegistry: TextureRegistry;

const factory = new BlockModelFactory(textureRegistry);
const model: BlockModel.Resolved;
const o3d: THREE.Object3D = factory.getObject(model);
// add o3d to your three scene

Create THREE.js player model:

import { PlayerModel } from '@createlumina/model';

const player: PlayerModel = new PlayerModel();
const isSlimSkin: boolean; // if this skin use alex model
player.setSkin('http://your-skin-url', isSlimSkin);

const o3d: THREE.Object3D = player.playerObject3d;
// add o3d to your three scene

Package Sidebar

Install

npm i @createlumina/model

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

99.9 kB

Total Files

13

Last publish

Collaborators

  • padowyt2