index.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <!-- 必须强制指定页面编码为 UTF-8 -->
  5. <meta charset="utf-8">
  6. <!-- Demo 的简要说明,必须要填写 -->
  7. <meta name="description" content="Kity 实现的环形取色器">
  8. <!-- Demo 的作者,建议填写 -->
  9. <meta name="author" content="kity@baidu.com">
  10. <!-- Demo 的标题,必须填写 -->
  11. <title>取色器</title>
  12. <!-- Demo 开发过程中使用 CMD 引入 Kity 源码,方便调试 -->
  13. <!-- dev start -->
  14. <!-- 目录型的 Demo 注意修正源码引用路径 -->
  15. <script src="../../dev-lib/sea.js"></script>
  16. <script>
  17. // 设置好 kity 源代码目录
  18. seajs.config( { base: '../../src'} );
  19. // 定义 Demo 模块
  20. define('demo', function(require) {
  21. var Paper = require('graphic/paper');
  22. var RingPalette = require('../demo/ringpalette/ringpalette');
  23. var paper = new Paper(document.body);
  24. paper.setViewBox(-750, -500, 1500, 1000);
  25. paper.addShape(new RingPalette());
  26. });
  27. </script>
  28. <style>
  29. body, div, html {
  30. margin: 0;
  31. padding: 0;
  32. overflow: hidden;
  33. height: 100%;
  34. }
  35. </style>
  36. </head>
  37. <body></body>
  38. <script>
  39. seajs.use('demo');
  40. </script>
  41. </html>