index.js 776 B

123456789101112131415161718192021222324252627282930313233343536
  1. Component({
  2. behaviors: [require('../common/share-behavior').default],
  3. properties: {
  4. visibleIndex: {
  5. type: Number,
  6. value: 1,
  7. observer: function (newVal, oldVal) {
  8. }
  9. },
  10. cullMask: {
  11. type: Number,
  12. value: 0b001,
  13. observer: function (newVal, oldVal) {
  14. }
  15. }
  16. },
  17. data: {
  18. loaded: false
  19. },
  20. lifetimes: {},
  21. methods: {
  22. handleReady({detail}) {
  23. const xrScene = this.scene = detail.value;
  24. console.log('xr-scene', xrScene);
  25. },
  26. handleAssetsProgress: function({detail}) {
  27. console.log('assets progress', detail.value);
  28. },
  29. handleAssetsLoaded: function({detail}) {
  30. console.log('assets loaded', detail.value);
  31. this.setData({loaded: true});
  32. }
  33. }
  34. })