index.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Component({
  2. behaviors: [require('../common/share-behavior').default],
  3. properties: {},
  4. data: {
  5. loadedSaoMiao:false,
  6. loaded: false,
  7. arReady: false,
  8. loaded2:false,
  9. position2:[0,0,0],
  10. rot:0,
  11. str:"1"
  12. },
  13. lifetimes: {
  14. async attached() {
  15. console.log('data', this.data);
  16. }
  17. },
  18. methods: {
  19. handleReady: function ({detail}) {
  20. const xrScene = this.scene = detail.value;
  21. console.log('xr-scene', xrScene);
  22. },
  23. handleAssetsProgress: function({detail}) {
  24. this.triggerEvent('assetsProgress', detail.value);
  25. },
  26. handleAssetsLoaded: function ({detail}) {
  27. },handleGltfLoaded2: function() {
  28. },handleGltfLoaded: function() {
  29. },
  30. handleTrackerSwitch: function ({detail}) {
  31. const active = detail.value;
  32. if(active)
  33. {
  34. wx.redirectTo({
  35. url: '/pages/ar/plane-ar-v2-marker/plane-ar-v2-marker',
  36. // url: '/pages/ar-classic/scene-classic-showsix/index',
  37. success: () => {
  38. },
  39. fail: () => {
  40. },
  41. });
  42. }
  43. },handleARTrackerState({detail}) {
  44. },
  45. handleAnimationStop: function() {
  46. console.log('animation Stop');
  47. }
  48. }
  49. })