mc-assets 0.2.36 → 0.2.38

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 CHANGED
@@ -10,11 +10,11 @@ npm i mc-assets
10
10
 
11
11
  ## Features
12
12
 
13
- - **NEW ITEMS FORMAT SUPPORT!!!** - Get different item models based on conditions (using item, display context, etc)
14
13
  - **Automatic Updates** - This library is automatically updated and published to npm.
15
14
  - **Fully Typed** - Today is nothing can be done without TypeScript. We ship best type definitions possible.
16
15
  - **Early Access** - It always includes the latest pre and rc (release candidate) version.
17
- - **Version Accurate** - Includes all released versions starting from 1.7.10.
16
+ - **Version Accurate** - Includes data for **all released versions** starting from 1.7.10.
17
+ - **New Items Format Support** - Get different item models based on conditions (using item, display context, etc)
18
18
  - **Memory Efficient** - Small installation size, for the fastest download & loading time.
19
19
  - **Simple & Complete API** - Works in browsers out of the box and provides parsers for all the data this library provides.
20
20
  - **Easy to Use Items Textures** - Includes hand-crafted isometric textures for some blocks.
@@ -203,12 +203,6 @@ export class AssetsParser {
203
203
  collectModels(modelData);
204
204
  collectedParentModels.reverse(); // from parent to child
205
205
  for (const model of collectedParentModels) {
206
- if (model.ambientocclusion !== undefined) {
207
- this.resolvedModel.ao = model.ambientocclusion;
208
- }
209
- if (model.ao !== undefined) {
210
- this.resolvedModel.ao = model.ao;
211
- }
212
206
  if (model.textures) {
213
207
  this.resolvedModel.textures ??= {};
214
208
  for (let [key, value] of Object.entries(model.textures)) {
@@ -226,6 +220,11 @@ export class AssetsParser {
226
220
  if (model.elements) {
227
221
  this.resolvedModel.elements = structuredClone(model.elements);
228
222
  }
223
+ for (const [key, value] of Object.entries(model)) {
224
+ if (key !== 'elements' && key !== 'textures' && key !== 'parent') {
225
+ this.resolvedModel[key] = value;
226
+ }
227
+ }
229
228
  }
230
229
  const resolveTexture = (originalTexturePath, _originalKey, chain) => {
231
230
  chain.push(_originalKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mc-assets",
3
- "version": "0.2.36",
3
+ "version": "0.2.38",
4
4
  "author": "Vitaly Turovsky <vital2580@icloud.com>",
5
5
  "license": "MIT",
6
6
  "files": [