roavatar-renderer 1.9.10 → 1.9.11

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/index.d.ts CHANGED
@@ -529,7 +529,7 @@ export declare type AssetMetaJson = {
529
529
  /** @category Outfit */
530
530
  export declare class AssetType {
531
531
  _id: number;
532
- name: string;
532
+ _name: string;
533
533
  constructor();
534
534
  clone(): AssetType;
535
535
  toJson(): {
@@ -539,6 +539,8 @@ export declare class AssetType {
539
539
  fromJson(assetTypeJson: AssetTypeJson): void;
540
540
  set id(newId: number);
541
541
  get id(): number;
542
+ set name(newName: string);
543
+ get name(): string;
542
544
  }
543
545
 
544
546
  /** @category Outfit */
package/dist/index.js CHANGED
@@ -35110,37 +35110,45 @@ class ItemInfo {
35110
35110
  class AssetType {
35111
35111
  _id;
35112
35112
  //67
35113
- name;
35113
+ _name;
35114
35114
  //JacketAccessory
35115
35115
  constructor() {
35116
35116
  this._id = 2;
35117
- this.name = "TShirt";
35117
+ this._name = "TShirt";
35118
35118
  }
35119
35119
  clone() {
35120
35120
  const copy = new AssetType();
35121
35121
  copy.id = this.id;
35122
- copy.name = this.name;
35122
+ copy._name = this._name;
35123
35123
  return copy;
35124
35124
  }
35125
35125
  toJson() {
35126
35126
  return {
35127
35127
  "id": this.id,
35128
- "name": this.name
35128
+ "name": this._name
35129
35129
  };
35130
35130
  }
35131
35131
  fromJson(assetTypeJson) {
35132
35132
  if (assetTypeJson.id)
35133
35133
  this.id = assetTypeJson.id;
35134
35134
  if (assetTypeJson.name)
35135
- this.name = assetTypeJson.name;
35135
+ this._name = assetTypeJson.name;
35136
35136
  }
35137
35137
  set id(newId) {
35138
35138
  this._id = newId;
35139
- this.name = AssetTypes[Number(newId)];
35139
+ this._name = AssetTypes[Number(newId)];
35140
35140
  }
35141
35141
  get id() {
35142
35142
  return this._id;
35143
35143
  }
35144
+ set name(newName) {
35145
+ const newId = AssetTypeNameToId.get(newName);
35146
+ this._id = newId || this._id;
35147
+ this._name = newName;
35148
+ }
35149
+ get name() {
35150
+ return this._name;
35151
+ }
35144
35152
  }
35145
35153
  function cloneVecXYZ(vec) {
35146
35154
  return { X: vec.X, Y: vec.Y, Z: vec.Z };
@@ -45829,6 +45837,7 @@ class ModelLayersDesc {
45829
45837
  }
45830
45838
  const targetCage = meshMap.get(this.targetCages[i]);
45831
45839
  targetCage.removeDuplicateVertices();
45840
+ offsetMesh(targetCage, this.targetOffsets[i]);
45832
45841
  inheritSkeleton(targetCage, targetMesh);
45833
45842
  targetCage.setBoneSource(this.getTargetName(i));
45834
45843
  targetCage.setBoneSourceSize();
@@ -45836,14 +45845,12 @@ class ModelLayersDesc {
45836
45845
  const distDeformer = this.targetDeformers[0];
45837
45846
  const dist_mesh = distDeformer ? meshMap.get(distDeformer.targetCage).clone() : meshMap.get(this.targetCages[0]).clone();
45838
45847
  const dist_mesh_mesh = meshMap.get(this.targetMeshes[0]);
45839
- offsetMesh(dist_mesh, this.targetOffsets[0]);
45840
45848
  scaleMesh(dist_mesh, this.targetSizes[0].divide(new Vector3().fromVec3(dist_mesh_mesh.size)));
45841
45849
  offsetMesh(dist_mesh, this.targetCFrames[0]);
45842
45850
  for (let i = 1; i < this.targetCages.length; i++) {
45843
45851
  const deformer = this.targetDeformers[i];
45844
45852
  const targetCage = deformer ? meshMap.get(deformer.targetCage).clone() : meshMap.get(this.targetCages[i]).clone();
45845
45853
  const targetMesh = meshMap.get(this.targetMeshes[i]);
45846
- offsetMesh(targetCage, this.targetOffsets[i]);
45847
45854
  scaleMesh(targetCage, this.targetSizes[i].divide(new Vector3().fromVec3(targetMesh.size)));
45848
45855
  offsetMesh(targetCage, this.targetCFrames[i]);
45849
45856
  dist_mesh.combine(targetCage);
@@ -47719,7 +47726,7 @@ class MaterialDesc extends DisposableDesc {
47719
47726
  const rbxRenderer = RBXRenderer.getRenderer();
47720
47727
  if (!hasColorLayer && rbxRenderer || FLAGS.RENDERTARGET_TO_CANVASTEXTURE && rbxRenderer) {
47721
47728
  const data = new Uint8Array(width * height * 4);
47722
- await rbxRenderer.readRenderTargetPixelsAsync(renderTarget, 0, 0, width, height, data);
47729
+ await rbxRenderer.readRenderTargetPixelsAsync(renderTargetFinal, 0, 0, width, height, data);
47723
47730
  for (let i = 3; i < data.length; i += 4) {
47724
47731
  if (data[i] < 255) {
47725
47732
  hasTransparency = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roavatar-renderer",
3
- "version": "1.9.10",
3
+ "version": "1.9.11",
4
4
  "description": "A renderer for Roblox avatars, used by the RoAvatar extension.",
5
5
  "author": "steinan",
6
6
  "type": "module",