Function
| Static Public Summary | ||
| public |
Helper to convert multi-block structures to models used by ModelRender |
|
| public |
OrbitControls(object: *, domElement: *) |
|
| public |
deepDisposeMesh(obj: *, removeChildren: *) |
|
| public |
deleteObjectProperties(obj: *) |
|
| public |
findMatchingVariant(variants: *, selector: *): * |
|
| public |
loadAndMergeModel(model: *, assetRoot: *): * |
|
| public |
loadBlockState(state: string, assetRoot: string): Promise<object> Loads a blockstate file and returns the contained JSON |
|
| public |
loadJsonFromPath(root: string, path: string): Promise<object> Loads a model file and returns the contained JSON |
|
| public |
loadModel(model: *, type: *, assetRoot: *): * |
|
| public |
Loads a Mincraft texture an returns it as Base64 |
|
| public |
loadTextureMeta(texture: *, assetRoot: *): * |
|
| public |
loadTextures(textureNames: *, assetRoot: *): * |
|
| public |
mergeCubeMeshes(cubes: *, toBuffer: *): {"geometry": *, "materials": *} |
|
| public |
mergeMeshes__(meshes: *, toBufferGeometry: *): * |
|
| public |
mergeParents(model: *, modelName: *, assetRoot: *): * |
|
| public |
modelCacheKey(model: *): * |
|
| public |
parseModel(model: *, modelOptions: *, parsedModelList: *, assetRoot: *): * |
|
| public |
parseModelType(string: *): {"type": string, "model": string} |
|
| public |
Scales UV values |
|
| public |
toRadians(angle: *): * |
|
| public |
trimCanvas(c: *): * |
|
| public |
variantStringToObject(str: *): * |
|
| public |
worker(self: *) |
|
Static Public
public ModelConverter() source
import ModelConverter from 'minerender/src/model/modelConverter.js'Helper to convert multi-block structures to models used by ModelRender
public OrbitControls(object: *, domElement: *) source
import OrbitControls from 'minerender/src/lib/OrbitControls.js'Params:
| Name | Type | Attribute | Description |
| object | * | ||
| domElement | * |
public deepDisposeMesh(obj: *, removeChildren: *) source
import {deepDisposeMesh} from 'minerender/src/renderBase.js'Params:
| Name | Type | Attribute | Description |
| obj | * | ||
| removeChildren | * |
public deleteObjectProperties(obj: *) source
import {deleteObjectProperties} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| obj | * |
public findMatchingVariant(variants: *, selector: *): * source
import {findMatchingVariant} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| variants | * | ||
| selector | * |
Return:
| * |
public loadAndMergeModel(model: *, assetRoot: *): * source
import {loadAndMergeModel} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| model | * | ||
| assetRoot | * |
Return:
| * |
public loadBlockState(state: string, assetRoot: string): Promise<object> source
import {loadBlockState} from 'minerender/src/functions.js'Loads a blockstate file and returns the contained JSON
Params:
| Name | Type | Attribute | Description |
| state | string | Name of the blockstate |
|
| assetRoot | string | Asset root, see DEFAULT_ROOT |
public loadJsonFromPath(root: string, path: string): Promise<object> source
import {loadJsonFromPath} from 'minerender/src/functions.js'Loads a model file and returns the contained JSON
Params:
| Name | Type | Attribute | Description |
| root | string | Asset root, see DEFAULT_ROOT |
|
| path | string | Path to the model file |
public loadModel(model: *, type: *, assetRoot: *): * source
import {loadModel} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| model | * | ||
| type | * | ||
| assetRoot | * |
Return:
| * |
public loadTextureAsBase64(root: string, namespace: string, dir: string, name: string): Promise<string> source
import {loadTextureAsBase64} from 'minerender/src/functions.js'Loads a Mincraft texture an returns it as Base64
Params:
| Name | Type | Attribute | Description |
| root | string | Asset root, see DEFAULT_ROOT |
|
| namespace | string | Namespace, usually 'minecraft' |
|
| dir | string | Directory of the texture |
|
| name | string | Name of the texture |
public loadTextureMeta(texture: *, assetRoot: *): * source
import {loadTextureMeta} from 'minerender/src/functions.js'Params:
| Name | Type | Attribute | Description |
| texture | * | ||
| assetRoot | * |
Return:
| * |
public loadTextures(textureNames: *, assetRoot: *): * source
import {loadTextures} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| textureNames | * | ||
| assetRoot | * |
Return:
| * |
public mergeCubeMeshes(cubes: *, toBuffer: *): {"geometry": *, "materials": *} source
import {mergeCubeMeshes} from 'minerender/src/renderBase.js'Params:
| Name | Type | Attribute | Description |
| cubes | * | ||
| toBuffer | * |
Return:
| {"geometry": *, "materials": *} |
public mergeMeshes__(meshes: *, toBufferGeometry: *): * source
import {mergeMeshes__} from 'minerender/src/renderBase.js'Params:
| Name | Type | Attribute | Description |
| meshes | * | ||
| toBufferGeometry | * |
Return:
| * |
public mergeParents(model: *, modelName: *, assetRoot: *): * source
import {mergeParents} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| model | * | ||
| modelName | * | ||
| assetRoot | * |
Return:
| * |
public modelCacheKey(model: *): * source
import {modelCacheKey} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| model | * |
Return:
| * |
public parseModel(model: *, modelOptions: *, parsedModelList: *, assetRoot: *): * source
import {parseModel} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| model | * | ||
| modelOptions | * | ||
| parsedModelList | * | ||
| assetRoot | * |
Return:
| * |
public parseModelType(string: *): {"type": string, "model": string} source
import {parseModelType} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| string | * |
public scaleUv(uv: number, size: number, scale: number): number source
import {scaleUv} from 'minerender/src/functions.js'Scales UV values
public toRadians(angle: *): * source
import {toRadians} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| angle | * |
Return:
| * |
public trimCanvas(c: *): * source
import {trimCanvas} from 'minerender/src/functions.js'Params:
| Name | Type | Attribute | Description |
| c | * |
Return:
| * |
public variantStringToObject(str: *): * source
import {variantStringToObject} from 'minerender/src/model/modelFunctions.js'Params:
| Name | Type | Attribute | Description |
| str | * |
Return:
| * |
public worker(self: *) source
import worker from 'minerender/src/model/ModelWorker.js'Params:
| Name | Type | Attribute | Description |
| self | * |
Reference
Source
