3DStreet / 3dstreet-editor

3DStreet Editor Repo
https://3dstreet.app
Other
18 stars 3 forks source link

entities with `data-no-pause` should always play in editor #406

Closed kfarr closed 4 months ago

kfarr commented 4 months ago

issue: some components such as 3d tiles should not pause when in editor mode

proposed solution: if an entity has empty attribute of data-no-pause* then ensure it is playing even while other entities are paused in editor

*this naming convention continues pattern of using data prefix for editor stuff, such as data-layer-name storing user-friendly entity display name

how to do this:

in both cases above, search for any entities with data-no-pause and for each play()

Algorush commented 4 months ago

https://github.com/3DStreet/3dstreet-editor/pull/409

kfarr commented 4 months ago

This works as expected. Test as follows:

add this entity to scene: <a-entity test data-no-pause></a-entity>

component code:

      AFRAME.registerComponent('test', {
        init: function() {
        },
        tick: function() {
          console.log('ticking')
        }
      })

with this change, now you will see tick events in console log even while in editor mode