index.js 931 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
  2. var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
  3. var xmlCode = ``;
  4. Page({
  5. behaviors:[sceneReadyBehavior],
  6. data: {
  7. heightScale: 0.5,
  8. cubeAlpha: 100,
  9. sphereAlpha: 100,
  10. clearR: 0,
  11. clearG: 0,
  12. clearB: 0,
  13. clearA: 0,
  14. xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
  15. },
  16. changeClearR(e) {
  17. this.setData({
  18. clearR: e.detail.value
  19. });
  20. },
  21. changeClearG(e) {
  22. this.setData({
  23. clearG: e.detail.value
  24. });
  25. },
  26. changeClearB(e) {
  27. this.setData({
  28. clearB: e.detail.value
  29. });
  30. },
  31. changeClearA(e) {
  32. this.setData({
  33. clearA: e.detail.value
  34. });
  35. },
  36. changeCubeAlpha(e) {
  37. this.setData({
  38. cubeAlpha: e.detail.value
  39. });
  40. },
  41. changeSphereAlpha(e) {
  42. this.setData({
  43. sphereAlpha: e.detail.value
  44. });
  45. }
  46. });