mirror of
https://github.com/aNNiMON/HotaruFX.git
synced 2024-09-19 14:14:21 +03:00
Add image examples
This commit is contained in:
parent
0c912fcca7
commit
657de1771c
@ -274,6 +274,8 @@ public class EditorController implements Initializable, DocumentListener {
|
|||||||
map.put("Rectangle", "rectangle.hfx");
|
map.put("Rectangle", "rectangle.hfx");
|
||||||
map.put("Round Rectangle", "round-rect.hfx");
|
map.put("Round Rectangle", "round-rect.hfx");
|
||||||
map.put("Font", "font.hfx");
|
map.put("Font", "font.hfx");
|
||||||
|
map.put("Image", "image.hfx");
|
||||||
|
map.put("Image Rotate & Zoom", "image_rotate_zoom.hfx");
|
||||||
map.put("Text Clipping", "clip-text.hfx");
|
map.put("Text Clipping", "clip-text.hfx");
|
||||||
map.put("Blend Modes", "blend-modes.hfx");
|
map.put("Blend Modes", "blend-modes.hfx");
|
||||||
map.put("Stroke Ants", "stroke-ants.hfx");
|
map.put("Stroke Ants", "stroke-ants.hfx");
|
||||||
|
21
app/src/main/resources/examples/image.hfx
Normal file
21
app/src/main/resources/examples/image.hfx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
composition(1280, 720, 30)
|
||||||
|
|
||||||
|
IMG = image("http://lorempixel.com/1280/720/city", {
|
||||||
|
x: -160,
|
||||||
|
y: -120,
|
||||||
|
smooth: true,
|
||||||
|
fitWidth: 320,
|
||||||
|
fitHeight: 240
|
||||||
|
})
|
||||||
|
|
||||||
|
easing = easeOut
|
||||||
|
|
||||||
|
IMG@x.add(1 sec, -960, easing)
|
||||||
|
IMG@y.add(1 sec, -540, easing)
|
||||||
|
|
||||||
|
IMG@fitWidth
|
||||||
|
.add(1 sec, 1920, easing)
|
||||||
|
IMG@fitHeight
|
||||||
|
.add(1 sec, 1080, easing)
|
||||||
|
|
||||||
|
render(IMG)
|
33
app/src/main/resources/examples/image_rotate_zoom.hfx
Normal file
33
app/src/main/resources/examples/image_rotate_zoom.hfx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
composition(1280, 720, 30)
|
||||||
|
|
||||||
|
IMG = image("http://lorempixel.com/1280/720/city", {
|
||||||
|
x: -160,
|
||||||
|
y: -120,
|
||||||
|
smooth: true,
|
||||||
|
fitWidth: 320,
|
||||||
|
fitHeight: 240,
|
||||||
|
opacity: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
easing = easeOut
|
||||||
|
|
||||||
|
IMG@opacity.add(0.5 sec, 1)
|
||||||
|
|
||||||
|
IMG@x.add(1 sec, -960, easing)
|
||||||
|
IMG@y.add(1 sec, -540, easing)
|
||||||
|
|
||||||
|
IMG@fitWidth
|
||||||
|
.add(1 sec, 1920, easing)
|
||||||
|
IMG@fitHeight
|
||||||
|
.add(1 sec, 1080, easing)
|
||||||
|
|
||||||
|
angle = 10
|
||||||
|
IMG@rotate
|
||||||
|
.add(1.4 sec, 0, hold)
|
||||||
|
.add(1.7 sec, angle, easeOut)
|
||||||
|
.add(1.9 sec, angle, hold)
|
||||||
|
.add(2.5 sec, -angle, ease)
|
||||||
|
.add(2.7 sec, -angle, hold)
|
||||||
|
.add(3 sec, 0, ease)
|
||||||
|
|
||||||
|
render(IMG)
|
Loading…
Reference in New Issue
Block a user