roavatar-renderer 1.6.1 → 1.6.2

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48939,7 +48939,7 @@ class AnimatorWrapper extends InstanceWrapper {
48939
48939
  const entries = this.data.animationSet[name];
48940
48940
  if (entries && entries.length > 0) {
48941
48941
  const isSpecificSub = subAnimSpecifier !== void 0 && subAnimSpecifier >= 0;
48942
- const entry = isSpecificSub ? entries[subAnimSpecifier] : this._pickRandom(entries);
48942
+ const entry = (isSpecificSub ? entries[subAnimSpecifier] : this._pickRandom(entries)) || entries[0];
48943
48943
  if (entry) {
48944
48944
  toPlayTrack = this._getTrack(entry.id);
48945
48945
  }
@@ -49246,27 +49246,20 @@ class AnimatorWrapper extends InstanceWrapper {
49246
49246
  if (subAnimIdStr.length > 0) {
49247
49247
  const subAnimId = BigInt(API.Misc.idFromStr(subAnimIdStr));
49248
49248
  const foundAnimTrack = this.data.animationTracks.get(subAnimId);
49249
+ if (!this.data.animationSet[animName]) {
49250
+ this.data.animationSet[animName] = [];
49251
+ }
49252
+ this.data.animationSet[animName].push({
49253
+ id: `rbxassetid://${subAnimId}`,
49254
+ weight: subWeight
49255
+ });
49249
49256
  if (foundAnimTrack) {
49250
49257
  if (forceLoop) {
49251
49258
  foundAnimTrack.looped = true;
49252
49259
  }
49253
- if (!this.data.animationSet[animName]) {
49254
- this.data.animationSet[animName] = [];
49255
- }
49256
- this.data.animationSet[animName].push({
49257
- id: `rbxassetid://${subAnimId}`,
49258
- weight: subWeight
49259
- });
49260
49260
  } else {
49261
49261
  promises.push(new Promise((resolve) => {
49262
49262
  this.loadAnimation(subAnimId, forceLoop).then((result) => {
49263
- if (!this.data.animationSet[animName]) {
49264
- this.data.animationSet[animName] = [];
49265
- }
49266
- this.data.animationSet[animName].push({
49267
- id: `rbxassetid://${subAnimId}`,
49268
- weight: subWeight
49269
- });
49270
49263
  resolve(result instanceof Response ? result : void 0);
49271
49264
  });
49272
49265
  }));
@@ -49330,7 +49323,7 @@ class AnimatorWrapper extends InstanceWrapper {
49330
49323
  }
49331
49324
  switch (type) {
49332
49325
  case "main":
49333
- if (this.data.currentAnimation !== name) {
49326
+ if (this.data.currentAnimation !== name || subAnimSpecifier !== -1) {
49334
49327
  if (!name.startsWith("emote.") || staticFacialAnimation) {
49335
49328
  this.playAnimation("mood", "mood");
49336
49329
  } else {
@@ -50876,18 +50869,13 @@ class HumanoidDescriptionWrapper extends InstanceWrapper {
50876
50869
  if (animationSetEntries) {
50877
50870
  for (const subAnim of animationSetEntries) {
50878
50871
  const subAnimId = BigInt(API.Misc.idFromStr(subAnim.id));
50872
+ animatorW.data.animationSet[animName].push(subAnim);
50879
50873
  if (!animatorW.data.animationTracks.has(subAnimId)) {
50880
50874
  promises.push(new Promise((resolve) => {
50881
50875
  animatorW.loadAnimation(subAnimId, true).then((result) => {
50882
- if (!animatorW.data.animationSet[animName]) {
50883
- animatorW.data.animationSet[animName] = [];
50884
- }
50885
- animatorW.data.animationSet[animName].push(subAnim);
50886
50876
  resolve(result instanceof Response ? result : void 0);
50887
50877
  });
50888
50878
  }));
50889
- } else {
50890
- animatorW.data.animationSet[animName].push(subAnim);
50891
50879
  }
50892
50880
  }
50893
50881
  } else {
@@ -57702,7 +57690,7 @@ class RBXRenderer {
57702
57690
  if (RBXRenderer.renderer) RBXRenderer.renderer.setClearColor(new Color(0, 0, 0), 0);
57703
57691
  RBXRenderer.renderer.outputColorSpace = SRGBColorSpace;
57704
57692
  RBXRenderer.renderer.shadowMap.enabled = true;
57705
- RBXRenderer.renderer.shadowMap.type = PCFSoftShadowMap;
57693
+ RBXRenderer.renderer.shadowMap.type = PCFShadowMap;
57706
57694
  RBXRenderer.renderer.setPixelRatio(globalThis.devicePixelRatio * 1 || 1);
57707
57695
  RBXRenderer.renderer.setSize(...RBXRenderer.resolution);
57708
57696
  if (FLAGS.USE_POST_PROCESSING && FLAGS.POST_PROCESSING_IS_DOUBLE_SIZE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roavatar-renderer",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "A renderer for Roblox avatars, used by the RoAvatar extension.",
5
5
  "author": "steinan",
6
6
  "type": "module",