index.js 677 B

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