@needle-tools/engine 2.65.1-pre → 2.65.2-pre

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.65.2-pre] - 2023-03-11
8
+ - Change: custom shaders should not log warning for unsupported ``OrthoParams`` shader property
9
+ - Change: Animator methods starting with uppercase are marked as deprecated because UnityEvent methods are now exported starting with lowercase letter, added lowercase methods
10
+
7
11
  ## [2.65.1-pre] - 2023-03-10
8
12
  - Fix: ParticleSystem using `min/max` size in the renderer module is now minimally handled
9
13
  - Fix: ParticleSystem emission when using local space with scaled parents
@@ -34723,7 +34723,7 @@ class Xn {
34723
34723
  r(this, "rootMotionHandler");
34724
34724
  this.model = A, KC && console.log(this);
34725
34725
  }
34726
- Play(A, g = -1, I = Number.NEGATIVE_INFINITY, i = 0) {
34726
+ play(A, g = -1, I = Number.NEGATIVE_INFINITY, i = 0) {
34727
34727
  if (g < 0)
34728
34728
  g = 0;
34729
34729
  else if (g >= this.model.layers.length) {
@@ -34738,57 +34738,61 @@ class Xn {
34738
34738
  }
34739
34739
  console.warn("Could not find " + A + " to play");
34740
34740
  }
34741
- Reset() {
34741
+ reset() {
34742
34742
  this.setStartTransition();
34743
34743
  }
34744
- SetBool(A, g) {
34744
+ setBool(A, g) {
34745
34745
  var i, e;
34746
34746
  const I = typeof A == "string" ? "name" : "hash";
34747
34747
  return (e = (i = this.model) == null ? void 0 : i.parameters) == null ? void 0 : e.filter((C) => C[I] === A).forEach((C) => C.value = g);
34748
34748
  }
34749
- GetBool(A) {
34749
+ getBool(A) {
34750
34750
  var I, i, e;
34751
34751
  const g = typeof A == "string" ? "name" : "hash";
34752
34752
  return ((e = (i = (I = this.model) == null ? void 0 : I.parameters) == null ? void 0 : i.find((C) => C[g] === A)) == null ? void 0 : e.value) ?? !1;
34753
34753
  }
34754
- SetFloat(A, g) {
34754
+ setFloat(A, g) {
34755
34755
  var i, e;
34756
34756
  const I = typeof A == "string" ? "name" : "hash";
34757
34757
  return (e = (i = this.model) == null ? void 0 : i.parameters) == null ? void 0 : e.filter((C) => C[I] === A).forEach((C) => C.value = g);
34758
34758
  }
34759
- GetFloat(A) {
34759
+ getFloat(A) {
34760
34760
  var I, i, e;
34761
34761
  const g = typeof A == "string" ? "name" : "hash";
34762
34762
  return ((e = (i = (I = this.model) == null ? void 0 : I.parameters) == null ? void 0 : i.find((C) => C[g] === A)) == null ? void 0 : e.value) ?? 0;
34763
34763
  }
34764
- SetInteger(A, g) {
34764
+ setInteger(A, g) {
34765
34765
  var i, e;
34766
34766
  const I = typeof A == "string" ? "name" : "hash";
34767
34767
  return (e = (i = this.model) == null ? void 0 : i.parameters) == null ? void 0 : e.filter((C) => C[I] === A).forEach((C) => C.value = g);
34768
34768
  }
34769
- GetInteger(A) {
34769
+ getInteger(A) {
34770
34770
  var I, i, e;
34771
34771
  const g = typeof A == "string" ? "name" : "hash";
34772
34772
  return ((e = (i = (I = this.model) == null ? void 0 : I.parameters) == null ? void 0 : i.find((C) => C[g] === A)) == null ? void 0 : e.value) ?? 0;
34773
34773
  }
34774
- SetTrigger(A) {
34774
+ setTrigger(A) {
34775
34775
  var I, i;
34776
34776
  KC && console.log("SET TRIGGER", A);
34777
34777
  const g = typeof A == "string" ? "name" : "hash";
34778
34778
  return (i = (I = this.model) == null ? void 0 : I.parameters) == null ? void 0 : i.filter((e) => e[g] === A).forEach((e) => e.value = !0);
34779
34779
  }
34780
- ResetTrigger(A) {
34780
+ resetTrigger(A) {
34781
34781
  var I, i;
34782
34782
  const g = typeof A == "string" ? "name" : "hash";
34783
34783
  return (i = (I = this.model) == null ? void 0 : I.parameters) == null ? void 0 : i.filter((e) => e[g] === A).forEach((e) => e.value = !1);
34784
34784
  }
34785
- IsInTransition() {
34785
+ isInTransition() {
34786
34786
  return this._activeStates.length > 1;
34787
34787
  }
34788
- SetSpeed(A) {
34788
+ setSpeed(A) {
34789
34789
  this._speed = A;
34790
34790
  }
34791
+ /**@deprecated use findState */
34791
34792
  FindState(A) {
34793
+ return this.findState(A);
34794
+ }
34795
+ findState(A) {
34792
34796
  if (!A)
34793
34797
  return null;
34794
34798
  if (Array.isArray(this.model.layers)) {
@@ -35198,53 +35202,102 @@ class Bt extends vA {
35198
35202
  get runtimeAnimatorController() {
35199
35203
  return this._animatorController;
35200
35204
  }
35205
+ // NOTE: the uppercase events have been deprecated because UnityEvent methods are all exported with lowercase first letter
35206
+ /**@deprecated use play */
35201
35207
  Play(g, I = -1, i = Number.NEGATIVE_INFINITY, e = 0) {
35208
+ this.play(g, I, i, e);
35209
+ }
35210
+ play(g, I = -1, i = Number.NEGATIVE_INFINITY, e = 0) {
35202
35211
  var C;
35203
- (C = this.runtimeAnimatorController) == null || C.Play(g, I, i, e);
35212
+ (C = this.runtimeAnimatorController) == null || C.play(g, I, i, e);
35204
35213
  }
35214
+ /**@deprecated use reset */
35205
35215
  Reset() {
35216
+ this.reset();
35217
+ }
35218
+ reset() {
35206
35219
  var g;
35207
- (g = this._animatorController) == null || g.Reset();
35220
+ (g = this._animatorController) == null || g.reset();
35208
35221
  }
35222
+ /**@deprecated use setBool */
35209
35223
  SetBool(g, I) {
35224
+ this.setBool(g, I);
35225
+ }
35226
+ setBool(g, I) {
35210
35227
  var i;
35211
- (i = this.runtimeAnimatorController) == null || i.SetBool(g, I);
35228
+ (i = this.runtimeAnimatorController) == null || i.setBool(g, I);
35212
35229
  }
35230
+ /**@deprecated use getBool */
35213
35231
  GetBool(g) {
35232
+ return this.getBool(g);
35233
+ }
35234
+ getBool(g) {
35214
35235
  var I;
35215
- return ((I = this.runtimeAnimatorController) == null ? void 0 : I.GetBool(g)) ?? !1;
35236
+ return console.log("name", g), ((I = this.runtimeAnimatorController) == null ? void 0 : I.getBool(g)) ?? !1;
35216
35237
  }
35238
+ /**@deprecated use setFloat */
35217
35239
  SetFloat(g, I) {
35240
+ this.setFloat(g, I);
35241
+ }
35242
+ setFloat(g, I) {
35218
35243
  var i;
35219
- (i = this.runtimeAnimatorController) == null || i.SetFloat(g, I);
35244
+ (i = this.runtimeAnimatorController) == null || i.setFloat(g, I);
35220
35245
  }
35246
+ /**@deprecated use getFloat */
35221
35247
  GetFloat(g) {
35248
+ return this.getFloat(g);
35249
+ }
35250
+ getFloat(g) {
35222
35251
  var I;
35223
- return ((I = this.runtimeAnimatorController) == null ? void 0 : I.GetFloat(g)) ?? -1;
35252
+ return ((I = this.runtimeAnimatorController) == null ? void 0 : I.getFloat(g)) ?? -1;
35224
35253
  }
35254
+ /**@deprecated use setInteger */
35225
35255
  SetInteger(g, I) {
35256
+ this.setInteger(g, I);
35257
+ }
35258
+ setInteger(g, I) {
35226
35259
  var i;
35227
- (i = this.runtimeAnimatorController) == null || i.SetInteger(g, I);
35260
+ (i = this.runtimeAnimatorController) == null || i.setInteger(g, I);
35228
35261
  }
35262
+ /**@deprecated use getInteger */
35229
35263
  GetInteger(g) {
35264
+ return this.getInteger(g);
35265
+ }
35266
+ getInteger(g) {
35230
35267
  var I;
35231
- return ((I = this.runtimeAnimatorController) == null ? void 0 : I.GetInteger(g)) ?? -1;
35268
+ return ((I = this.runtimeAnimatorController) == null ? void 0 : I.getInteger(g)) ?? -1;
35232
35269
  }
35270
+ /**@deprecated use setTrigger */
35233
35271
  SetTrigger(g) {
35272
+ this.setTrigger(g);
35273
+ }
35274
+ setTrigger(g) {
35234
35275
  var I;
35235
- (I = this.runtimeAnimatorController) == null || I.SetTrigger(g);
35276
+ console.log("name", g), (I = this.runtimeAnimatorController) == null || I.setTrigger(g);
35236
35277
  }
35278
+ /**@deprecated use resetTrigger */
35237
35279
  ResetTrigger(g) {
35280
+ this.resetTrigger(g);
35281
+ }
35282
+ resetTrigger(g) {
35238
35283
  var I;
35239
- (I = this.runtimeAnimatorController) == null || I.ResetTrigger(g);
35284
+ (I = this.runtimeAnimatorController) == null || I.resetTrigger(g);
35240
35285
  }
35286
+ /**@deprecated use isInTransition */
35241
35287
  IsInTransition() {
35288
+ return this.isInTransition();
35289
+ }
35290
+ isInTransition() {
35242
35291
  var g;
35243
- return ((g = this.runtimeAnimatorController) == null ? void 0 : g.IsInTransition()) ?? !1;
35292
+ return ((g = this.runtimeAnimatorController) == null ? void 0 : g.isInTransition()) ?? !1;
35244
35293
  }
35294
+ /**@deprecated use setSpeed */
35245
35295
  SetSpeed(g) {
35296
+ return this.setSpeed(g);
35297
+ }
35298
+ setSpeed(g) {
35246
35299
  var I;
35247
- g !== this.speed && (this.speed = g, (I = this._animatorController) == null || I.SetSpeed(g));
35300
+ g !== this.speed && (this.speed = g, (I = this._animatorController) == null || I.setSpeed(g));
35248
35301
  }
35249
35302
  set minMaxSpeed(g) {
35250
35303
  this.speed = Ig.lerp(g.x, g.y, Math.random());
@@ -35255,12 +35308,12 @@ class Bt extends vA {
35255
35308
  awake() {
35256
35309
  if (ok && console.log("ANIMATOR", this.name, this), !!this.gameObject && this.runtimeAnimatorController) {
35257
35310
  const g = this.runtimeAnimatorController.clone();
35258
- g ? (console.assert(this.runtimeAnimatorController !== g), this.runtimeAnimatorController = g, console.assert(this.runtimeAnimatorController === g), this.runtimeAnimatorController.bind(this), this.runtimeAnimatorController.SetSpeed(this.speed), this.runtimeAnimatorController.normalizedStartOffset = this.normalizedStartOffset) : console.warn("Could not clone animator controller", this.runtimeAnimatorController);
35311
+ g ? (console.assert(this.runtimeAnimatorController !== g), this.runtimeAnimatorController = g, console.assert(this.runtimeAnimatorController === g), this.runtimeAnimatorController.bind(this), this.runtimeAnimatorController.setSpeed(this.speed), this.runtimeAnimatorController.normalizedStartOffset = this.normalizedStartOffset) : console.warn("Could not clone animator controller", this.runtimeAnimatorController);
35259
35312
  }
35260
35313
  }
35261
35314
  onDisable() {
35262
35315
  var g;
35263
- this.keepAnimatorControllerStateOnDisable || (g = this._animatorController) == null || g.Reset();
35316
+ this.keepAnimatorControllerStateOnDisable || (g = this._animatorController) == null || g.reset();
35264
35317
  }
35265
35318
  onBeforeRender() {
35266
35319
  this._animatorController && this._animatorController.update();
@@ -38090,7 +38143,7 @@ function sE(t, A) {
38090
38143
  yt || (yt = new kS(), yt.setDecoderPath(lk), yt.setDecoderConfig({ type: "js" }), Nn && console.log("Setting draco decoder path to", lk)), xo || (xo = new kt(), xo.setTranscoderPath(Dk), Nn && console.log("Setting ktx2 transcoder path to", Dk), A.renderer && xo.detectSupport(A.renderer)), kw || (kw = b_, Nn && console.log("Using the default meshopt decoder")), t.setDRACOLoader(yt), t.setKTX2Loader(xo), t.setMeshoptDecoder(kw);
38091
38144
  }
38092
38145
  var qN = /* @__PURE__ */ ((t) => (t[t.INT = 5124] = "INT", t[t.FLOAT = 5126] = "FLOAT", t[t.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", t[t.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", t[t.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", t[t.INT_VEC2 = 35667] = "INT_VEC2", t[t.INT_VEC3 = 35668] = "INT_VEC3", t[t.INT_VEC4 = 35669] = "INT_VEC4", t[t.BOOL = 35670] = "BOOL", t[t.BOOL_VEC2 = 35671] = "BOOL_VEC2", t[t.BOOL_VEC3 = 35672] = "BOOL_VEC3", t[t.BOOL_VEC4 = 35673] = "BOOL_VEC4", t[t.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", t[t.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", t[t.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", t[t.SAMPLER_2D = 35678] = "SAMPLER_2D", t[t.SAMPLER_3D = 35680] = "SAMPLER_3D", t[t.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", t[t.UNKNOWN = 0] = "UNKNOWN", t))(qN || {});
38093
- const YC = dA("debugshaders"), An = "NEEDLE_techniques_webgl";
38146
+ const YC = dA("debugcustomshader"), An = "NEEDLE_techniques_webgl";
38094
38147
  class Y_ {
38095
38148
  constructor() {
38096
38149
  r(this, "objectToWorldMatrix", new XA());
@@ -38344,7 +38397,7 @@ class x_ {
38344
38397
  a[u] = { value: cO }, console.warn("Missing/unassigned texture, fallback to white: " + u);
38345
38398
  break;
38346
38399
  default:
38347
- console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: " + u, Q[d]);
38400
+ u === "unity_OrthoParams" || console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: " + u, Q[d]);
38348
38401
  break;
38349
38402
  }
38350
38403
  }