Showing
5 changed files
with
145 additions
and
0 deletions
gif-generator/examples/tui/black-theme.js
0 → 100644
1 | +var blackTheme = { | ||
2 | + 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png', | ||
3 | + 'common.bisize.width': '251px', | ||
4 | + 'common.bisize.height': '21px', | ||
5 | + 'common.backgroundImage': 'none', | ||
6 | + 'common.backgroundColor': '#1e1e1e', | ||
7 | + 'common.border': '0px', | ||
8 | + | ||
9 | + // header | ||
10 | + 'header.backgroundImage': 'none', | ||
11 | + 'header.backgroundColor': 'transparent', | ||
12 | + 'header.border': '0px', | ||
13 | + | ||
14 | + // load button | ||
15 | + 'loadButton.backgroundColor': '#fff', | ||
16 | + 'loadButton.border': '1px solid #ddd', | ||
17 | + 'loadButton.color': '#222', | ||
18 | + 'loadButton.fontFamily': "'Noto Sans', sans-serif", | ||
19 | + 'loadButton.fontSize': '12px', | ||
20 | + | ||
21 | + // download button | ||
22 | + 'downloadButton.backgroundColor': '#fdba3b', | ||
23 | + 'downloadButton.border': '1px solid #fdba3b', | ||
24 | + 'downloadButton.color': '#fff', | ||
25 | + 'downloadButton.fontFamily': "'Noto Sans', sans-serif", | ||
26 | + 'downloadButton.fontSize': '12px', | ||
27 | + | ||
28 | + // main icons | ||
29 | + 'menu.normalIcon.color': '#8a8a8a', | ||
30 | + 'menu.activeIcon.color': '#555555', | ||
31 | + 'menu.disabledIcon.color': '#434343', | ||
32 | + 'menu.hoverIcon.color': '#e9e9e9', | ||
33 | + 'menu.iconSize.width': '24px', | ||
34 | + 'menu.iconSize.height': '24px', | ||
35 | + | ||
36 | + // submenu icons | ||
37 | + 'submenu.normalIcon.color': '#8a8a8a', | ||
38 | + 'submenu.activeIcon.color': '#e9e9e9', | ||
39 | + 'submenu.iconSize.width': '32px', | ||
40 | + 'submenu.iconSize.height': '32px', | ||
41 | + | ||
42 | + // submenu primary color | ||
43 | + 'submenu.backgroundColor': '#1e1e1e', | ||
44 | + 'submenu.partition.color': '#3c3c3c', | ||
45 | + | ||
46 | + // submenu labels | ||
47 | + 'submenu.normalLabel.color': '#8a8a8a', | ||
48 | + 'submenu.normalLabel.fontWeight': 'lighter', | ||
49 | + 'submenu.activeLabel.color': '#fff', | ||
50 | + 'submenu.activeLabel.fontWeight': 'lighter', | ||
51 | + | ||
52 | + // checkbox style | ||
53 | + 'checkbox.border': '0px', | ||
54 | + 'checkbox.backgroundColor': '#fff', | ||
55 | + | ||
56 | + // range style | ||
57 | + 'range.pointer.color': '#fff', | ||
58 | + 'range.bar.color': '#666', | ||
59 | + 'range.subbar.color': '#d1d1d1', | ||
60 | + | ||
61 | + 'range.disabledPointer.color': '#414141', | ||
62 | + 'range.disabledBar.color': '#282828', | ||
63 | + 'range.disabledSubbar.color': '#414141', | ||
64 | + | ||
65 | + 'range.value.color': '#fff', | ||
66 | + 'range.value.fontWeight': 'lighter', | ||
67 | + 'range.value.fontSize': '11px', | ||
68 | + 'range.value.border': '1px solid #353535', | ||
69 | + 'range.value.backgroundColor': '#151515', | ||
70 | + 'range.title.color': '#fff', | ||
71 | + 'range.title.fontWeight': 'lighter', | ||
72 | + | ||
73 | + // colorpicker style | ||
74 | + 'colorpicker.button.border': '1px solid #1e1e1e', | ||
75 | + 'colorpicker.title.color': '#fff', | ||
76 | +}; |
gif-generator/examples/tui/index.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | + <head> | ||
4 | + <meta charset="UTF-8" /> | ||
5 | + <title>TUI Example</title> | ||
6 | + <link | ||
7 | + type="text/css" | ||
8 | + href="https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.css" | ||
9 | + rel="stylesheet" | ||
10 | + /> | ||
11 | + <link type="text/css" href="./tui-image-editor.css" rel="stylesheet" /> | ||
12 | + <style> | ||
13 | + @import url(http://fonts.googleapis.com/css?family=Noto+Sans); | ||
14 | + html, | ||
15 | + body { | ||
16 | + height: 100%; | ||
17 | + margin: 0; | ||
18 | + } | ||
19 | + </style> | ||
20 | + </head> | ||
21 | + <body> | ||
22 | + <div id="tui-image-editor-container"></div> | ||
23 | + <script | ||
24 | + type="text/javascript" | ||
25 | + src="https://api-storage.cloud.toast.com/v1/AUTH_e18353c4ea5746c097143946d0644e61/toast-ui-cdn/tui-image-editor/v3.11.0/example/fabric-v4.2.0.js" | ||
26 | + ></script> | ||
27 | + <script | ||
28 | + type="text/javascript" | ||
29 | + src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js" | ||
30 | + ></script> | ||
31 | + <script | ||
32 | + type="text/javascript" | ||
33 | + src="https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js" | ||
34 | + ></script> | ||
35 | + <script | ||
36 | + type="text/javascript" | ||
37 | + src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js" | ||
38 | + ></script> | ||
39 | + <script type="text/javascript" src="./tui-image-editor.js"></script> | ||
40 | + <script type="text/javascript" src="./black-theme.js"></script> | ||
41 | + <script type="text/javascript" src="../../dist/gif-generator.js"></script> | ||
42 | + <script type="text/javascript" src="./gif.js"></script> | ||
43 | + <script> | ||
44 | + // Image editor | ||
45 | + var imageEditor = new tui.ImageEditor("#tui-image-editor-container", { | ||
46 | + includeUI: { | ||
47 | + loadImage: { | ||
48 | + path: "./sampleImage2.png", | ||
49 | + name: "SampleImage", | ||
50 | + }, | ||
51 | + theme: blackTheme, // or whiteTheme | ||
52 | + initMenu: "filter", | ||
53 | + menuBarPosition: "bottom", | ||
54 | + }, | ||
55 | + cssMaxWidth: 700, | ||
56 | + cssMaxHeight: 500, | ||
57 | + usageStatistics: false, | ||
58 | + }); | ||
59 | + window.onresize = function () { | ||
60 | + imageEditor.ui.resizeEditor(); | ||
61 | + }; | ||
62 | + | ||
63 | + let gifGenerator; | ||
64 | + setTimeout(function () { | ||
65 | + gifGenerator = new GifGenerator(imageEditor._graphics.getCanvas()); | ||
66 | + }, 1000); | ||
67 | + </script> | ||
68 | + </body> | ||
69 | +</html> |
gif-generator/examples/tui/sampleImage2.png
0 → 100644
1.32 MB
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
-
Please register or login to post a comment