@luminocity/lemonate-engine 26.3.12 → 26.3.14

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.
@@ -41290,7 +41290,7 @@ class Item extends EventEmitter {
41290
41290
  }
41291
41291
  }
41292
41292
 
41293
- var engine$1 = "26.3.12";
41293
+ var engine$1 = "26.3.14";
41294
41294
  var bullet = "3.26";
41295
41295
  var lua = "5.4.3";
41296
41296
  var packageVersionInfo = {
@@ -104690,7 +104690,7 @@ class SgItem extends SgResourceOwner {
104690
104690
  return;
104691
104691
  if (!newActive && this.active) {
104692
104692
  try {
104693
- this.deactivate();
104693
+ this.onSceneDeactivated();
104694
104694
  }
104695
104695
  catch (err) {
104696
104696
  console.error("Error when deactivating: ", err);
@@ -104698,7 +104698,7 @@ class SgItem extends SgResourceOwner {
104698
104698
  }
104699
104699
  if (newActive && !this.active) {
104700
104700
  try {
104701
- this.activate();
104701
+ this.onSceneActivated();
104702
104702
  }
104703
104703
  catch (err) {
104704
104704
  console.error("Error when deactivating: ", err);
@@ -104715,24 +104715,24 @@ class SgItem extends SgResourceOwner {
104715
104715
  if (obj)
104716
104716
  obj.visible = this.isRendered();
104717
104717
  }
104718
- activate() {
104718
+ onSceneActivated() {
104719
104719
  for (const child of this.children) {
104720
- child.activate();
104720
+ child.onSceneActivated();
104721
104721
  }
104722
104722
  }
104723
- deactivate() {
104723
+ onSceneDeactivated() {
104724
104724
  for (const child of this.children) {
104725
- child.deactivate();
104725
+ child.onSceneDeactivated();
104726
104726
  }
104727
104727
  }
104728
104728
  setActive(active) {
104729
104729
  this.setFieldValue("Active", active);
104730
104730
  }
104731
- enable() {
104731
+ activate() {
104732
104732
  if (!this.isActive())
104733
104733
  this.setFieldValue("Active", true);
104734
104734
  }
104735
- disable() {
104735
+ deactivate() {
104736
104736
  if (this.isActive())
104737
104737
  this.setFieldValue("Active", false);
104738
104738
  }
@@ -119318,12 +119318,12 @@ class SgAudio extends SgItem {
119318
119318
  this.isPaused = false;
119319
119319
  }
119320
119320
  }
119321
- activate() {
119322
- super.activate();
119321
+ onSceneActivated() {
119322
+ super.onSceneActivated();
119323
119323
  this.playOrActivate();
119324
119324
  }
119325
- deactivate() {
119326
- super.deactivate();
119325
+ onSceneDeactivated() {
119326
+ super.onSceneDeactivated();
119327
119327
  this.stopOrDeactivate();
119328
119328
  }
119329
119329
  async create() {
@@ -124671,7 +124671,7 @@ class ProjectItem extends Item {
124671
124671
  const primary = entry.getFieldValue("Primary");
124672
124672
  const sceneGraph = this.engine.activeSceneGraphCollection.addSceneItem(scene, true, transform);
124673
124673
  if (sceneGraph) {
124674
- sceneGraph.root.setActive(true);
124674
+ sceneGraph.root.onSceneActivated();
124675
124675
  this.engine.eventBus.$emit('project:sceneActivated', sceneGraph.getId());
124676
124676
  if (primary) {
124677
124677
  this._setPrimaryScene(entry);
@@ -124744,7 +124744,7 @@ class ProjectItem extends Item {
124744
124744
  if (scene) {
124745
124745
  const sceneGraph = scene.getSceneGraph();
124746
124746
  if (sceneGraph) {
124747
- sceneGraph.root.setActive(false);
124747
+ sceneGraph.root.onSceneDeactivated();
124748
124748
  this.engine.activeSceneGraphCollection.remove(sceneGraph);
124749
124749
  this.engine.eventBus.$emit('project:sceneDeactivated', sceneGraph.getId());
124750
124750
  }
@@ -133731,7 +133731,7 @@ class RtSceneObject extends RtBase {
133731
133731
  if (!obj)
133732
133732
  return null;
133733
133733
  if (obj instanceof SgItem) {
133734
- obj.enable();
133734
+ obj.activate();
133735
133735
  }
133736
133736
  }
133737
133737
  disable(params) {
@@ -133739,7 +133739,7 @@ class RtSceneObject extends RtBase {
133739
133739
  if (!obj)
133740
133740
  return null;
133741
133741
  if (obj instanceof SgItem) {
133742
- obj.disable();
133742
+ obj.deactivate();
133743
133743
  }
133744
133744
  }
133745
133745
  getParent(params) {