├── .github
└── workflows
│ ├── linux.yml
│ ├── mac.yml
│ ├── macos.yml
│ ├── ubuntu.yml
│ └── windows.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── LICENSE.md
├── README.md
└── src
├── app
├── CMakeLists.txt
├── GUI
│ ├── BoxesList
│ │ ├── boolpropertywidget.cpp
│ │ ├── boolpropertywidget.h
│ │ ├── boxscrollarea.cpp
│ │ ├── boxscrollarea.h
│ │ ├── boxscroller.cpp
│ │ ├── boxscroller.h
│ │ ├── boxscrollwidget.cpp
│ │ ├── boxscrollwidget.h
│ │ ├── boxsinglewidget.cpp
│ │ ├── boxsinglewidget.h
│ │ ├── boxtargetwidget.cpp
│ │ └── boxtargetwidget.h
│ ├── Dialogs
│ │ ├── animationtopaintdialog.cpp
│ │ ├── animationtopaintdialog.h
│ │ ├── dialogsinterfaceimpl.cpp
│ │ └── dialogsinterfaceimpl.h
│ ├── Expressions
│ │ ├── expressiondialog.cpp
│ │ ├── expressiondialog.h
│ │ ├── expressioneditor.cpp
│ │ ├── expressioneditor.h
│ │ ├── expressionhighlighter.cpp
│ │ └── expressionhighlighter.h
│ ├── RenderWidgets
│ │ ├── closablecontainer.cpp
│ │ ├── closablecontainer.h
│ │ ├── outputsettingsdialog.cpp
│ │ ├── outputsettingsdialog.h
│ │ ├── outputsettingsdisplaywidget.cpp
│ │ ├── outputsettingsdisplaywidget.h
│ │ ├── outputsettingsprofilesdialog.cpp
│ │ ├── outputsettingsprofilesdialog.h
│ │ ├── renderinstancewidget.cpp
│ │ ├── renderinstancewidget.h
│ │ ├── rendersettingsdialog.cpp
│ │ ├── rendersettingsdialog.h
│ │ ├── rendersettingsdisplaywidget.cpp
│ │ ├── rendersettingsdisplaywidget.h
│ │ ├── renderwidget.cpp
│ │ └── renderwidget.h
│ ├── Settings
│ │ ├── generalsettingswidget.cpp
│ │ ├── generalsettingswidget.h
│ │ ├── pluginssettingswidget.cpp
│ │ ├── pluginssettingswidget.h
│ │ ├── settingsdialog.cpp
│ │ ├── settingsdialog.h
│ │ ├── timelinesettingswidget.cpp
│ │ └── timelinesettingswidget.h
│ ├── animationdockwidget.cpp
│ ├── animationdockwidget.h
│ ├── canvasbasewrappernode.cpp
│ ├── canvasbasewrappernode.h
│ ├── canvaswindow.cpp
│ ├── canvaswindow.h
│ ├── canvaswindowevents.cpp
│ ├── canvaswrappernode.cpp
│ ├── canvaswrappernode.h
│ ├── effectactions.cpp
│ ├── ekeyfilter.cpp
│ ├── ekeyfilter.h
│ ├── ewidgetsimpl.cpp
│ ├── ewidgetsimpl.h
│ ├── extraactions.cpp
│ ├── graphboxeslist.cpp
│ ├── keysview.cpp
│ ├── keysview.h
│ ├── layouthandler.cpp
│ ├── layouthandler.h
│ ├── mainwindow.cpp
│ ├── mainwindow.h
│ ├── timelinebasewrappernode.cpp
│ ├── timelinebasewrappernode.h
│ ├── timelinedockwidget.cpp
│ ├── timelinedockwidget.h
│ ├── timelinehighlightwidget.cpp
│ ├── timelinehighlightwidget.h
│ ├── timelinewidget.cpp
│ ├── timelinewidget.h
│ ├── timelinewrappernode.cpp
│ ├── timelinewrappernode.h
│ ├── toolbox.cpp
│ ├── window.cpp
│ └── window.h
├── app.desktop.in
├── appdata.xml.in
├── effectsloader.cpp
├── effectsloader.h
├── eimporters.cpp
├── eimporters.h
├── evfileio.cpp
├── friction.iss
├── friction.qss
├── friction.rc.in
├── main.cpp
├── memorychecker.cpp
├── memorychecker.h
├── memoryhandler.cpp
├── memoryhandler.h
├── meta.xml.in
├── pixmaps
│ ├── Checkbox_checked_disabled.png
│ ├── Checkbox_checked_normal.png
│ ├── crosshair_closed.png
│ ├── cursor-adj-s.xpm
│ ├── cursor-crosshairs.xpm
│ ├── cursor-ellipse.xpm
│ ├── cursor-eraser.xpm
│ ├── cursor-node.xpm
│ ├── cursor-pen.xpm
│ ├── cursor-pencil.xpm
│ ├── cursor-rect.xpm
│ ├── cursor-text-insert.xpm
│ ├── cursor-text.xpm
│ ├── cursor_add.png
│ ├── cursor_arrow.png
│ ├── cursor_arrow_forbidden.png
│ ├── cursor_color_picker.png
│ ├── cursor_crosshair_open.png
│ ├── cursor_crosshair_precise_open.png
│ ├── cursor_forbidden_everywhere.png
│ ├── cursor_hand_closed.png
│ ├── cursor_hand_open.png
│ ├── cursor_move_n_s.png
│ ├── cursor_move_ne_sw.png
│ ├── cursor_move_nw_se.png
│ ├── cursor_move_w_e.png
│ ├── cursor_pencil.png
│ ├── down-arrow.png
│ ├── enve.ico
│ └── up-arrow.png
├── presets
│ └── render
│ │ ├── 001-friction-preset-mp4-h264.conf
│ │ ├── 002-friction-preset-mp4-h264-mp3.conf
│ │ ├── 003-friction-preset-prores-444.conf
│ │ ├── 004-friction-preset-prores-444-aac.conf
│ │ ├── 005-friction-preset-png.conf
│ │ └── 006-friction-preset-tiff.conf
├── renderhandler.cpp
├── renderhandler.h
├── resources.qrc
├── svgo.config.js
└── xdg
│ ├── friction.desktop
│ └── friction.xml
├── cmake
├── friction-common.cmake
├── friction-ffmpeg.cmake
├── friction-meta.cmake
├── friction-quazip.cmake
└── friction-version.cmake
├── core
├── Animators
│ ├── SmartPath
│ │ ├── listofnodes.cpp
│ │ ├── listofnodes.h
│ │ ├── node.cpp
│ │ ├── node.h
│ │ ├── nodelist.cpp
│ │ ├── nodelist.h
│ │ ├── smartpath.cpp
│ │ ├── smartpath.h
│ │ ├── smartpathanimator.cpp
│ │ ├── smartpathanimator.h
│ │ ├── smartpathanimatoractions.cpp
│ │ ├── smartpathcollection.cpp
│ │ └── smartpathcollection.h
│ ├── animator.cpp
│ ├── animator.h
│ ├── animatort.cpp
│ ├── animatort.h
│ ├── basedanimatort.cpp
│ ├── basedanimatort.h
│ ├── basedkeyt.cpp
│ ├── basedkeyt.h
│ ├── boolanimator.cpp
│ ├── boolanimator.h
│ ├── brushsettingsanimator.cpp
│ ├── brushsettingsanimator.h
│ ├── clampedpoint.cpp
│ ├── clampedpoint.h
│ ├── clampedvalue.cpp
│ ├── clampedvalue.h
│ ├── coloranimator.cpp
│ ├── coloranimator.h
│ ├── complexanimator.cpp
│ ├── complexanimator.h
│ ├── complexkey.cpp
│ ├── complexkey.h
│ ├── customproperties.cpp
│ ├── customproperties.h
│ ├── dynamiccomplexanimator.h
│ ├── eboxorsound.cpp
│ ├── eboxorsound.h
│ ├── eeffect.cpp
│ ├── eeffect.h
│ ├── gradient.cpp
│ ├── gradient.h
│ ├── gradientpoints.cpp
│ ├── gradientpoints.h
│ ├── graphanimator.cpp
│ ├── graphanimator.h
│ ├── graphanimatort.cpp
│ ├── graphanimatort.h
│ ├── graphkey.cpp
│ ├── graphkey.h
│ ├── graphkeyt.cpp
│ ├── graphkeyt.h
│ ├── intanimator.cpp
│ ├── intanimator.h
│ ├── interoptimalanimatort.h
│ ├── interpolationanimator.cpp
│ ├── interpolationanimator.h
│ ├── interpolationanimatort.cpp
│ ├── interpolationanimatort.h
│ ├── interpolationkey.cpp
│ ├── interpolationkey.h
│ ├── interpolationkeyt.cpp
│ ├── interpolationkeyt.h
│ ├── key.cpp
│ ├── key.h
│ ├── keyt.cpp
│ ├── keyt.h
│ ├── outlinesettingsanimator.cpp
│ ├── outlinesettingsanimator.h
│ ├── overlappingkeylist.cpp
│ ├── overlappingkeylist.h
│ ├── overlappingkeys.cpp
│ ├── overlappingkeys.h
│ ├── paintsettingsanimator.cpp
│ ├── paintsettingsanimator.h
│ ├── qcubicsegment1danimator.cpp
│ ├── qcubicsegment1danimator.h
│ ├── qpointfanimator.cpp
│ ├── qpointfanimator.h
│ ├── qrealanimator.cpp
│ ├── qrealanimator.h
│ ├── qrealkey.cpp
│ ├── qrealkey.h
│ ├── qrealpoint.cpp
│ ├── qrealpoint.h
│ ├── qrealsnapshot.cpp
│ ├── qrealsnapshot.h
│ ├── qrealvalueeffect.cpp
│ ├── qrealvalueeffect.h
│ ├── qstringanimator.cpp
│ ├── qstringanimator.h
│ ├── sceneboundgradient.cpp
│ ├── sceneboundgradient.h
│ ├── staticcomplexanimator.cpp
│ ├── staticcomplexanimator.h
│ ├── steppedanimator.cpp
│ ├── steppedanimator.h
│ ├── texteffectcollection.cpp
│ ├── texteffectcollection.h
│ ├── transformanimator.cpp
│ └── transformanimator.h
├── BlendEffects
│ ├── blendeffect.cpp
│ ├── blendeffect.h
│ ├── blendeffectboxshadow.cpp
│ ├── blendeffectboxshadow.h
│ ├── blendeffectcollection.cpp
│ ├── blendeffectcollection.h
│ ├── blendeffectmenucreator.cpp
│ ├── blendeffectmenucreator.h
│ ├── moveblendeffect.cpp
│ ├── moveblendeffect.h
│ ├── targetedblendeffect.cpp
│ └── targetedblendeffect.h
├── Boxes
│ ├── animationbox.cpp
│ ├── animationbox.h
│ ├── boundingbox.cpp
│ ├── boundingbox.h
│ ├── boxrendercontainer.cpp
│ ├── boxrendercontainer.h
│ ├── boxrenderdata.cpp
│ ├── boxrenderdata.h
│ ├── boxwithpatheffects.cpp
│ ├── boxwithpatheffects.h
│ ├── canvasrenderdata.cpp
│ ├── canvasrenderdata.h
│ ├── circle.cpp
│ ├── circle.h
│ ├── containerbox.cpp
│ ├── containerbox.h
│ ├── customboxcreator.h
│ ├── ecustombox.cpp
│ ├── ecustombox.h
│ ├── effectsrenderer.cpp
│ ├── effectsrenderer.h
│ ├── effectsubtaskspawner.cpp
│ ├── effectsubtaskspawner.h
│ ├── externallinkboxt.h
│ ├── frameremapping.cpp
│ ├── frameremapping.h
│ ├── imagebox.cpp
│ ├── imagebox.h
│ ├── imagerenderdata.cpp
│ ├── imagerenderdata.h
│ ├── imagesequencebox.cpp
│ ├── imagesequencebox.h
│ ├── internallinkbox.cpp
│ ├── internallinkbox.h
│ ├── internallinkboxbase.h
│ ├── internallinkcanvas.cpp
│ ├── internallinkcanvas.h
│ ├── internallinkgroupbox.cpp
│ ├── internallinkgroupbox.h
│ ├── layerboxrenderdata.cpp
│ ├── layerboxrenderdata.h
│ ├── linkcanvasrenderdata.cpp
│ ├── linkcanvasrenderdata.h
│ ├── nullobject.cpp
│ ├── nullobject.h
│ ├── pathbox.cpp
│ ├── pathbox.h
│ ├── pathboxrenderdata.cpp
│ ├── pathboxrenderdata.h
│ ├── patheffectsmenu.cpp
│ ├── patheffectsmenu.h
│ ├── rectangle.cpp
│ ├── rectangle.h
│ ├── renderdatahandler.cpp
│ ├── renderdatahandler.h
│ ├── smartvectorpath.cpp
│ ├── smartvectorpath.h
│ ├── svglinkbox.cpp
│ ├── svglinkbox.h
│ ├── textbox.cpp
│ ├── textbox.h
│ ├── textboxrenderdata.cpp
│ ├── textboxrenderdata.h
│ ├── videobox.cpp
│ └── videobox.h
├── CMakeLists.txt
├── CacheHandlers
│ ├── cachecontainer.cpp
│ ├── cachecontainer.h
│ ├── hddcachablecachehandler.cpp
│ ├── hddcachablecachehandler.h
│ ├── hddcachablecont.cpp
│ ├── hddcachablecont.h
│ ├── hddcachablerangecont.cpp
│ ├── hddcachablerangecont.h
│ ├── imagecachecontainer.cpp
│ ├── imagecachecontainer.h
│ ├── imagedatahandler.cpp
│ ├── imagedatahandler.h
│ ├── samples.cpp
│ ├── samples.h
│ ├── sceneframecontainer.cpp
│ ├── sceneframecontainer.h
│ ├── soundcachecontainer.cpp
│ ├── soundcachecontainer.h
│ ├── soundcachehandler.cpp
│ ├── soundcachehandler.h
│ ├── soundtmpfilehandlers.cpp
│ ├── soundtmpfilehandlers.h
│ ├── tmpdeleter.cpp
│ ├── tmpdeleter.h
│ ├── tmploader.cpp
│ ├── tmploader.h
│ ├── tmpsaver.cpp
│ ├── tmpsaver.h
│ ├── usedrange.cpp
│ ├── usedrange.h
│ └── usepointer.h
├── Expressions
│ ├── expression.cpp
│ ├── expression.h
│ ├── expressionpresets.cpp
│ ├── expressionpresets.h
│ ├── framebinding.cpp
│ ├── framebinding.h
│ ├── presets
│ │ ├── clamp.fexpr
│ │ ├── copyX.fexpr
│ │ ├── copyY.fexpr
│ │ ├── easeInBack.fexpr
│ │ ├── easeInBounce.fexpr
│ │ ├── easeInCirc.fexpr
│ │ ├── easeInCubic.fexpr
│ │ ├── easeInElastic.fexpr
│ │ ├── easeInExpo.fexpr
│ │ ├── easeInOutBack.fexpr
│ │ ├── easeInOutBounce.fexpr
│ │ ├── easeInOutCirc.fexpr
│ │ ├── easeInOutCubic.fexpr
│ │ ├── easeInOutElastic.fexpr
│ │ ├── easeInOutExpo.fexpr
│ │ ├── easeInOutQuad.fexpr
│ │ ├── easeInOutQuart.fexpr
│ │ ├── easeInOutQuint.fexpr
│ │ ├── easeInOutSine.fexpr
│ │ ├── easeInQuad.fexpr
│ │ ├── easeInQuart.fexpr
│ │ ├── easeInQuint.fexpr
│ │ ├── easeInSine.fexpr
│ │ ├── easeOutBack.fexpr
│ │ ├── easeOutBounce.fexpr
│ │ ├── easeOutCirc.fexpr
│ │ ├── easeOutCubic.fexpr
│ │ ├── easeOutElastic.fexpr
│ │ ├── easeOutExpo.fexpr
│ │ ├── easeOutQuad.fexpr
│ │ ├── easeOutQuart.fexpr
│ │ ├── easeOutQuint.fexpr
│ │ ├── easeOutSine.fexpr
│ │ ├── lerp.fexpr
│ │ ├── noise.fexpr
│ │ ├── orbitX.fexpr
│ │ ├── orbitY.fexpr
│ │ ├── oscillation.fexpr
│ │ ├── rotation.fexpr
│ │ ├── time.fexpr
│ │ ├── trackObject.fexpr
│ │ ├── wave.fexpr
│ │ └── wiggle.fexpr
│ ├── propertybinding.cpp
│ ├── propertybinding.h
│ ├── propertybindingbase.cpp
│ ├── propertybindingbase.h
│ ├── propertybindingparser.cpp
│ ├── propertybindingparser.h
│ ├── scenebinding.cpp
│ ├── scenebinding.h
│ ├── valuebinding.cpp
│ └── valuebinding.h
├── FileCacheHandlers
│ ├── animationcachehandler.cpp
│ ├── animationcachehandler.h
│ ├── audiostreamsdata.cpp
│ ├── audiostreamsdata.h
│ ├── filecachehandler.cpp
│ ├── filecachehandler.h
│ ├── filedatacachehandler.cpp
│ ├── filedatacachehandler.h
│ ├── filehandlerobjref.cpp
│ ├── filehandlerobjref.h
│ ├── imagecachehandler.cpp
│ ├── imagecachehandler.h
│ ├── imagesequencecachehandler.cpp
│ ├── imagesequencecachehandler.h
│ ├── soundreader.cpp
│ ├── soundreader.h
│ ├── soundreaderformerger.cpp
│ ├── soundreaderformerger.h
│ ├── svgfilecachehandler.cpp
│ ├── svgfilecachehandler.h
│ ├── videocachehandler.cpp
│ ├── videocachehandler.h
│ ├── videoframeloader.cpp
│ ├── videoframeloader.h
│ ├── videostreamsdata.cpp
│ └── videostreamsdata.h
├── GUI
│ ├── boxeslistactionbutton.cpp
│ ├── boxeslistactionbutton.h
│ ├── coloranimatorbutton.cpp
│ ├── coloranimatorbutton.h
│ ├── dialogsinterface.cpp
│ ├── dialogsinterface.h
│ ├── edialogs.cpp
│ ├── edialogs.h
│ ├── ewidgets.cpp
│ ├── ewidgets.h
│ ├── global.cpp
│ ├── global.h
│ ├── propertynamedialog.cpp
│ ├── propertynamedialog.h
│ ├── sizesetter.cpp
│ ├── sizesetter.h
│ ├── valueinput.cpp
│ └── valueinput.h
├── MovablePoints
│ ├── animatedpoint.cpp
│ ├── animatedpoint.h
│ ├── boxpathpoint.cpp
│ ├── boxpathpoint.h
│ ├── gradientpoint.cpp
│ ├── gradientpoint.h
│ ├── movablepoint.cpp
│ ├── movablepoint.h
│ ├── nonanimatedmovablepoint.cpp
│ ├── nonanimatedmovablepoint.h
│ ├── pathpivot.cpp
│ ├── pathpivot.h
│ ├── pathpointshandler.cpp
│ ├── pathpointshandler.h
│ ├── pointshandler.cpp
│ ├── pointshandler.h
│ ├── segment.cpp
│ ├── segment.h
│ ├── smartctrlpoint.cpp
│ ├── smartctrlpoint.h
│ ├── smartnodepoint.cpp
│ └── smartnodepoint.h
├── Paint
│ ├── brushcontexedwrapper.cpp
│ ├── brushcontexedwrapper.h
│ ├── brushescontext.cpp
│ ├── brushescontext.h
│ ├── simplebrushwrapper.cpp
│ └── simplebrushwrapper.h
├── PathEffects
│ ├── custompatheffect.cpp
│ ├── custompatheffect.h
│ ├── custompatheffectcreator.h
│ ├── dashpatheffect.cpp
│ ├── dashpatheffect.h
│ ├── displacepatheffect.cpp
│ ├── displacepatheffect.h
│ ├── duplicatepatheffect.cpp
│ ├── duplicatepatheffect.h
│ ├── linespatheffect.cpp
│ ├── linespatheffect.h
│ ├── patheffect.cpp
│ ├── patheffect.h
│ ├── patheffectcaller.cpp
│ ├── patheffectcaller.h
│ ├── patheffectcollection.cpp
│ ├── patheffectcollection.h
│ ├── patheffectmenucreator.cpp
│ ├── patheffectmenucreator.h
│ ├── patheffectsinclude.h
│ ├── patheffectstask.cpp
│ ├── patheffectstask.h
│ ├── solidifypatheffect.cpp
│ ├── solidifypatheffect.h
│ ├── spatialdisplacepatheffect.cpp
│ ├── spatialdisplacepatheffect.h
│ ├── subdividepatheffect.cpp
│ ├── subdividepatheffect.h
│ ├── subpatheffect.cpp
│ ├── subpatheffect.h
│ ├── sumpatheffect.cpp
│ ├── sumpatheffect.h
│ ├── zigzagpatheffect.cpp
│ └── zigzagpatheffect.h
├── Private
│ ├── Tasks
│ │ ├── complextask.cpp
│ │ ├── complextask.h
│ │ ├── execcontroller.cpp
│ │ ├── execcontroller.h
│ │ ├── gputaskexecutor.cpp
│ │ ├── gputaskexecutor.h
│ │ ├── offscreenqgl33c.cpp
│ │ ├── offscreenqgl33c.h
│ │ ├── taskexecutor.cpp
│ │ ├── taskexecutor.h
│ │ ├── taskque.cpp
│ │ ├── taskque.h
│ │ ├── taskquehandler.cpp
│ │ ├── taskquehandler.h
│ │ ├── taskscheduler.cpp
│ │ └── taskscheduler.h
│ ├── document.cpp
│ ├── document.h
│ ├── documentrw.cpp
│ ├── esettings.cpp
│ ├── esettings.h
│ ├── memorystructs.cpp
│ ├── memorystructs.h
│ └── qatomiclist.h
├── Properties
│ ├── boolproperty.cpp
│ ├── boolproperty.h
│ ├── boolpropertycontainer.cpp
│ ├── boolpropertycontainer.h
│ ├── boxtargetproperty.cpp
│ ├── boxtargetproperty.h
│ ├── comboboxproperty.cpp
│ ├── comboboxproperty.h
│ ├── emimedata.h
│ ├── namedproperty.h
│ ├── newproperty.h
│ ├── property.cpp
│ └── property.h
├── RasterEffects
│ ├── blureffect.cpp
│ ├── blureffect.h
│ ├── brightnesscontrasteffect.cpp
│ ├── brightnesscontrasteffect.frag
│ ├── brightnesscontrasteffect.h
│ ├── colorizeeffect.cpp
│ ├── colorizeeffect.frag
│ ├── colorizeeffect.h
│ ├── customrastereffect.cpp
│ ├── customrastereffect.h
│ ├── customrastereffectcreator.h
│ ├── motionblureffect.cpp
│ ├── motionblureffect.h
│ ├── noisefadeeffect.cpp
│ ├── noisefadeeffect.frag
│ ├── noisefadeeffect.h
│ ├── openglrastereffectcaller.cpp
│ ├── openglrastereffectcaller.h
│ ├── rastereffect.cpp
│ ├── rastereffect.h
│ ├── rastereffectcaller.cpp
│ ├── rastereffectcaller.h
│ ├── rastereffectcollection.cpp
│ ├── rastereffectcollection.h
│ ├── rastereffectmenucreator.cpp
│ ├── rastereffectmenucreator.h
│ ├── rastereffectsinclude.h
│ ├── shadoweffect.cpp
│ ├── shadoweffect.h
│ ├── wipeeffect.cpp
│ ├── wipeeffect.frag
│ └── wipeeffect.h
├── ReadWrite
│ ├── efuturepos.h
│ ├── ereadstream.cpp
│ ├── ereadstream.h
│ ├── evformat.h
│ ├── ewritestream.cpp
│ ├── ewritestream.h
│ ├── filefooter.cpp
│ ├── filefooter.h
│ └── xevformat.h
├── Segments
│ ├── conicsegment.cpp
│ ├── conicsegment.h
│ ├── cubiclist.cpp
│ ├── cubiclist.h
│ ├── cubicnode.h
│ ├── fitcurves.cpp
│ ├── fitcurves.h
│ ├── qcubicsegment1d.cpp
│ ├── qcubicsegment1d.h
│ ├── qcubicsegment2d.cpp
│ ├── qcubicsegment2d.h
│ ├── quadsegment.h
│ ├── smoothcurves.cpp
│ └── smoothcurves.h
├── ShaderEffects
│ ├── PropertyCreators
│ │ ├── coloranimatorcreator.h
│ │ ├── intanimatorcreator.h
│ │ ├── qpointfanimatorcreator.h
│ │ ├── qrealanimatorcreator.h
│ │ └── shaderpropertycreator.h
│ ├── shadereffect.cpp
│ ├── shadereffect.h
│ ├── shadereffectcaller.cpp
│ ├── shadereffectcaller.h
│ ├── shadereffectcreator.cpp
│ ├── shadereffectcreator.h
│ ├── shadereffectjs.cpp
│ ├── shadereffectjs.h
│ ├── shadereffectprogram.cpp
│ ├── shadereffectprogram.h
│ ├── shadervaluehandler.cpp
│ ├── shadervaluehandler.h
│ ├── uniformspecifiercreator.cpp
│ └── uniformspecifiercreator.h
├── Sound
│ ├── audiohandler.cpp
│ ├── audiohandler.h
│ ├── eindependentsound.cpp
│ ├── eindependentsound.h
│ ├── esound.cpp
│ ├── esound.h
│ ├── esoundlink.cpp
│ ├── esoundlink.h
│ ├── esoundobjectbase.cpp
│ ├── esoundobjectbase.h
│ ├── esoundsettings.cpp
│ ├── esoundsettings.h
│ ├── evideosound.cpp
│ ├── evideosound.h
│ ├── soundcomposition.cpp
│ ├── soundcomposition.h
│ ├── soundmerger.cpp
│ └── soundmerger.h
├── Tasks
│ ├── domeletask.cpp
│ ├── domeletask.h
│ ├── etask.cpp
│ ├── etask.h
│ ├── etaskbase.cpp
│ ├── etaskbase.h
│ ├── updatable.cpp
│ └── updatable.h
├── Timeline
│ ├── animationrect.cpp
│ ├── animationrect.h
│ ├── durationrectangle.cpp
│ ├── durationrectangle.h
│ ├── fixedlenanimationrect.cpp
│ └── fixedlenanimationrect.h
├── TransformEffects
│ ├── followobjecteffect.cpp
│ ├── followobjecteffect.h
│ ├── followobjecteffectbase.cpp
│ ├── followobjecteffectbase.h
│ ├── followobjectrelativeeffect.cpp
│ ├── followobjectrelativeeffect.h
│ ├── followpatheffect.cpp
│ ├── followpatheffect.h
│ ├── parenteffect.cpp
│ ├── parenteffect.h
│ ├── targettransformeffect.cpp
│ ├── targettransformeffect.h
│ ├── trackeffect.cpp
│ ├── trackeffect.h
│ ├── transformeffect.cpp
│ ├── transformeffect.h
│ ├── transformeffectcollection.cpp
│ ├── transformeffectcollection.h
│ ├── transformeffectmenucreator.cpp
│ └── transformeffectmenucreator.h
├── XML
│ ├── runtimewriteid.h
│ ├── xevexporter.cpp
│ ├── xevexporter.h
│ ├── xevimporter.cpp
│ ├── xevimporter.h
│ ├── xevzipfilesaver.cpp
│ ├── xevzipfilesaver.h
│ ├── xmlexporthelpers.cpp
│ └── xmlexporthelpers.h
├── action.cpp
├── action.h
├── actions.cpp
├── actions.h
├── appsupport.cpp
├── appsupport.h
├── canvas.cpp
├── canvas.h
├── canvasbase.cpp
├── canvasbase.h
├── canvashandlesmartpath.cpp
├── canvasmouseevents.cpp
├── canvasmouseinteractions.cpp
├── canvasselectedboxesactions.cpp
├── canvasselectedpointsactions.cpp
├── clipboardcontainer.cpp
├── clipboardcontainer.h
├── colorhelpers.cpp
├── colorhelpers.h
├── colorsetting.cpp
├── colorsetting.h
├── colorshaders
│ ├── alpha.frag
│ ├── blue.frag
│ ├── border.frag
│ ├── doubleborder.frag
│ ├── gradient.frag
│ ├── green.frag
│ ├── hsl_saturation.frag
│ ├── hsv_saturation.frag
│ ├── hue.frag
│ ├── lightness.frag
│ ├── plain.frag
│ ├── red.frag
│ └── value.frag
├── conncontext.cpp
├── conncontext.h
├── conncontextobjlist.h
├── conncontextptr.h
├── core_global.h
├── coreresources.qrc
├── cpurendertools.h
├── customhandler.h
├── customidentifier.cpp
├── customidentifier.h
├── differsinterpolate.cpp
├── differsinterpolate.h
├── drawpath.cpp
├── drawpath.h
├── eevent.cpp
├── eevent.h
├── efiltersettings.cpp
├── efiltersettings.h
├── etexture.cpp
├── etexture.h
├── etextureframebuffer.cpp
├── etextureframebuffer.h
├── exceptions.cpp
├── exceptions.h
├── fileshandler.cpp
├── fileshandler.h
├── filesourcescache.cpp
├── filesourcescache.h
├── formatoptions.h
├── framerange.cpp
├── framerange.h
├── glhelpers.cpp
├── glhelpers.h
├── gpurendertools.cpp
├── gpurendertools.h
├── hardwareenums.h
├── hardwareinfo.cpp
├── hardwareinfo.h
├── importhandler.cpp
├── importhandler.h
├── matrixdecomposition.cpp
├── matrixdecomposition.h
├── memorydatahandler.cpp
├── memorydatahandler.h
├── namefixer.cpp
├── namefixer.h
├── nodepointvalues.cpp
├── nodepointvalues.h
├── outputsettings.cpp
├── outputsettings.h
├── paintsettings.h
├── paintsettingsapplier.cpp
├── paintsettingsapplier.h
├── pathoperations.cpp
├── pathoperations.h
├── pointhelpers.cpp
├── pointhelpers.h
├── pointtypemenu.h
├── randomgrid.cpp
├── randomgrid.h
├── rangemap.h
├── regexhelpers.h
├── renderinstancesettings.cpp
├── renderinstancesettings.h
├── rendersettings.cpp
├── rendersettings.h
├── shaders
│ ├── maxalpha.frag
│ ├── plain.vert
│ └── textured.vert
├── simplemath.cpp
├── simplemath.h
├── simpletask.cpp
├── simpletask.h
├── singlewidgettarget.cpp
├── singlewidgettarget.h
├── skia
│ ├── skiadefines.h
│ ├── skiahelpers.cpp
│ ├── skiahelpers.h
│ ├── skiaincludes.h
│ ├── skqtconversions.cpp
│ └── skqtconversions.h
├── smartPointers
│ ├── ememory.h
│ ├── eobject.h
│ ├── selfref.h
│ ├── stdpointer.h
│ ├── stdselfref.cpp
│ └── stdselfref.h
├── svgexporter.cpp
├── svgexporter.h
├── svgexporthelpers.cpp
├── svgexporthelpers.h
├── svgimporter.cpp
├── svgimporter.h
├── switchablecontext.cpp
├── switchablecontext.h
├── swt_abstraction.cpp
├── swt_abstraction.h
├── swt_rulescollection.cpp
├── swt_rulescollection.h
├── texteffect.cpp
├── texteffect.h
├── themesupport.cpp
├── themesupport.h
├── threadsafeqjsengine.h
├── transformvalues.cpp
├── transformvalues.h
├── typemenu.cpp
├── typemenu.h
├── undoredo.cpp
├── undoredo.h
├── videoencoder.cpp
├── videoencoder.h
├── windowsincludes.h
├── wrappedint.cpp
├── wrappedint.h
├── zipfileloader.cpp
├── zipfileloader.h
├── zipfilesaver.cpp
└── zipfilesaver.h
├── engine
└── CMakeLists.txt
├── examples
├── pathEffects
│ └── eLinearize
│ │ ├── eLinearize.pro
│ │ ├── elinearize.cpp
│ │ ├── elinearize.h
│ │ └── elinearize_global.h
├── rasterEffects
│ ├── dabTest
│ │ ├── dabTest.pro
│ │ ├── dabtest.cpp
│ │ ├── dabtest.h
│ │ ├── dabtest_global.h
│ │ ├── normal.frag
│ │ └── resources.qrc
│ ├── eBlur
│ │ ├── eBlur.pro
│ │ ├── eblur.cpp
│ │ ├── eblur.h
│ │ └── eblur_global.h
│ ├── eShadow
│ │ ├── eShadow.pro
│ │ ├── eshadow.cpp
│ │ ├── eshadow.h
│ │ └── eshadow_global.h
│ └── oil
│ │ ├── OilImpl
│ │ ├── oilPaint.h
│ │ ├── oilbristle.cpp
│ │ ├── oilbristle.h
│ │ ├── oilbrush.cpp
│ │ ├── oilbrush.h
│ │ ├── oilhelpers.cpp
│ │ ├── oilhelpers.h
│ │ ├── oilsimulator.cpp
│ │ ├── oilsimulator.h
│ │ ├── oiltrace.cpp
│ │ └── oiltrace.h
│ │ ├── oileffect.cpp
│ │ └── oileffect.h
└── shaderEffects
│ ├── eBrightnessContrast.frag
│ ├── eBrightnessContrast.gre
│ ├── eColorize.frag
│ ├── eColorize.gre
│ ├── eColorize2.frag
│ ├── eColorize2.gre
│ ├── eDots.frag
│ ├── eDots.gre
│ ├── eExplode.frag
│ ├── eExplode.gre
│ ├── eMultiplyRed.frag
│ ├── eMultiplyRed.gre
│ ├── eNoiseFade.frag
│ ├── eNoiseFade.gre
│ ├── eWipe.frag
│ ├── eWipe.gre
│ ├── eWipeLeft.frag
│ ├── eWipeLeft.gre
│ ├── eWipeRight.frag
│ └── eWipeRight.gre
├── scripts
├── Dockerfile.vfxplatform
├── README.md
├── build.bat
├── build.sh
├── build_changelog.sh
├── build_hicolor.sh
├── build_mac.sh
├── build_mac_ci.sh
├── build_mac_sdk.sh
├── build_mxe_ffmpeg.sh
├── build_qscintilla.bat
├── build_qt5.bat
├── build_qt_debug.sh
├── build_source_tarball.sh
├── build_vfxplatform.sh
├── build_vfxplatform_friction.sh
├── build_vfxplatform_package.sh
├── build_vfxplatform_sdk01.sh
├── build_vfxplatform_sdk02.sh
├── build_vfxplatform_sdk03.sh
├── ci.sh
├── configure_qt5.bat
├── easing
│ ├── README.md
│ ├── build.sh
│ ├── presets
│ │ ├── README.md
│ │ ├── easeInBack.js
│ │ ├── easeInBounce.js
│ │ ├── easeInCirc.js
│ │ ├── easeInCubic.js
│ │ ├── easeInElastic.js
│ │ ├── easeInExpo.js
│ │ ├── easeInOutBack.js
│ │ ├── easeInOutBounce.js
│ │ ├── easeInOutCirc.js
│ │ ├── easeInOutCubic.js
│ │ ├── easeInOutElastic.js
│ │ ├── easeInOutExpo.js
│ │ ├── easeInOutQuad.js
│ │ ├── easeInOutQuart.js
│ │ ├── easeInOutQuint.js
│ │ ├── easeInOutSine.js
│ │ ├── easeInQuad.js
│ │ ├── easeInQuart.js
│ │ ├── easeInQuint.js
│ │ ├── easeInSine.js
│ │ ├── easeOutBack.js
│ │ ├── easeOutBounce.js
│ │ ├── easeOutCirc.js
│ │ ├── easeOutCubic.js
│ │ ├── easeOutElastic.js
│ │ ├── easeOutExpo.js
│ │ ├── easeOutQuad.js
│ │ ├── easeOutQuart.js
│ │ ├── easeOutQuint.js
│ │ └── easeOutSine.js
│ └── src
│ │ ├── bindings.js
│ │ ├── common.js
│ │ ├── easeInBack.js
│ │ ├── easeInBounce.js
│ │ ├── easeInCirc.js
│ │ ├── easeInCubic.js
│ │ ├── easeInElastic.js
│ │ ├── easeInExpo.js
│ │ ├── easeInOutBack.js
│ │ ├── easeInOutBounce.js
│ │ ├── easeInOutCirc.js
│ │ ├── easeInOutCubic.js
│ │ ├── easeInOutElastic.js
│ │ ├── easeInOutExpo.js
│ │ ├── easeInOutQuad.js
│ │ ├── easeInOutQuart.js
│ │ ├── easeInOutQuint.js
│ │ ├── easeInOutSine.js
│ │ ├── easeInQuad.js
│ │ ├── easeInQuart.js
│ │ ├── easeInQuint.js
│ │ ├── easeInSine.js
│ │ ├── easeOutBack.js
│ │ ├── easeOutBounce.js
│ │ ├── easeOutCirc.js
│ │ ├── easeOutCubic.js
│ │ ├── easeOutElastic.js
│ │ ├── easeOutExpo.js
│ │ ├── easeOutQuad.js
│ │ ├── easeOutQuart.js
│ │ ├── easeOutQuint.js
│ │ └── easeOutSine.js
├── flatpak
│ ├── build.sh
│ ├── devel-graphics.friction.Friction.json
│ ├── flathub.json
│ ├── graphics.friction.Friction.json
│ ├── package.sh
│ └── run.sh
├── git-backup.sh
├── macos_fix_dylib.sh
├── make_ico.sh
├── mkicns.sh
├── push_docker.sh
├── run_docker.sh
├── sign_checksums.sh
└── vfxplatform.spec
└── ui
├── CMakeLists.txt
├── dialogs
├── adjustscenedialog.cpp
├── adjustscenedialog.h
├── applyexpressiondialog.cpp
├── applyexpressiondialog.h
├── commandpalette.cpp
├── commandpalette.h
├── dialog.cpp
├── dialog.h
├── durationrectsettingsdialog.cpp
├── durationrectsettingsdialog.h
├── exportsvgdialog.cpp
├── exportsvgdialog.h
├── markereditordialog.cpp
├── markereditordialog.h
├── qrealpointvaluedialog.cpp
├── qrealpointvaluedialog.h
├── renderoutputwidget.cpp
├── renderoutputwidget.h
├── scenesettingsdialog.cpp
└── scenesettingsdialog.h
├── gradientwidgets
├── currentgradientwidget.cpp
├── currentgradientwidget.h
├── displayedgradientswidget.cpp
├── displayedgradientswidget.h
├── gradientslistwidget.cpp
├── gradientslistwidget.h
├── gradientwidget.cpp
└── gradientwidget.h
├── misc
├── keyfocustarget.cpp
├── keyfocustarget.h
├── noshortcutaction.cpp
└── noshortcutaction.h
├── optimalscrollarena
├── minimalscrollwidget.cpp
├── minimalscrollwidget.h
├── scrollarea.cpp
├── scrollarea.h
├── scrollvisiblepartbase.cpp
├── scrollvisiblepartbase.h
├── scrollwidget.cpp
├── scrollwidget.h
├── scrollwidgetvisiblepart.cpp
├── scrollwidgetvisiblepart.h
├── singlewidget.cpp
└── singlewidget.h
├── ui_global.h
└── widgets
├── aboutwidget.cpp
├── aboutwidget.h
├── actionbutton.cpp
├── actionbutton.h
├── alignwidget.cpp
├── alignwidget.h
├── assetswidget.cpp
├── assetswidget.h
├── bookmarkedcolors.cpp
├── bookmarkedcolors.h
├── bookmarkedwidget.cpp
├── bookmarkedwidget.h
├── buttonbase.cpp
├── buttonbase.h
├── buttonslist.cpp
├── buttonslist.h
├── canvassettingswidget.cpp
├── canvassettingswidget.h
├── canvastoolbar.cpp
├── canvastoolbar.h
├── changewidthwidget.cpp
├── changewidthwidget.h
├── colorlabel.cpp
├── colorlabel.h
├── colorsettingswidget.cpp
├── colorsettingswidget.h
├── colortoolbar.cpp
├── colortoolbar.h
├── colortoolbutton.cpp
├── colortoolbutton.h
├── colorvaluerect.cpp
├── colorvaluerect.h
├── colorwidget.cpp
├── colorwidget.h
├── colorwidgetshaders.cpp
├── colorwidgetshaders.h
├── ecombobox.cpp
├── ecombobox.h
├── editablecombobox.cpp
├── editablecombobox.h
├── fakemenubar.cpp
├── fakemenubar.h
├── fillstrokesettings.cpp
├── fillstrokesettings.h
├── flowlayout.cpp
├── flowlayout.h
├── fontswidget.cpp
├── fontswidget.h
├── framescrollbar.cpp
├── framescrollbar.h
├── framespinbox.cpp
├── framespinbox.h
├── glwidget.cpp
├── glwidget.h
├── glwindow.cpp
├── glwindow.h
├── labeledslider.cpp
├── labeledslider.h
├── markereditor.cpp
├── markereditor.h
├── performancesettingswidget.cpp
├── performancesettingswidget.h
├── presetsettingswidget.cpp
├── presetsettingswidget.h
├── qdoubleslider.cpp
├── qdoubleslider.h
├── qrealanimatorvalueslider.cpp
├── qrealanimatorvalueslider.h
├── savedcolorbutton.cpp
├── savedcolorbutton.h
├── savedcolorswidget.cpp
├── savedcolorswidget.h
├── scenechooser.cpp
├── scenechooser.h
├── settingswidget.cpp
├── settingswidget.h
├── toolbar.cpp
├── toolbar.h
├── toolbutton.h
├── twocolumnlayout.cpp
├── twocolumnlayout.h
├── uilayout.cpp
├── uilayout.h
├── vlabel.h
├── welcomedialog.cpp
├── welcomedialog.h
├── widgetstack.cpp
├── widgetstack.h
├── widgetwrappernode.cpp
├── widgetwrappernode.h
├── wrappernode.cpp
└── wrappernode.h
/.github/workflows/linux.yml:
--------------------------------------------------------------------------------
1 | name: Linux
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | release:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | - name: Build
11 | run: ./src/scripts/build.sh
12 | - name: Artifact
13 | uses: actions/upload-artifact@v4
14 | with:
15 | name: friction-ci-linux-x86_64
16 | path: distfiles/builds/*/*.AppImage
17 |
--------------------------------------------------------------------------------
/.github/workflows/mac.yml:
--------------------------------------------------------------------------------
1 | name: macOS (x86_64)
2 |
3 | on: workflow_dispatch
4 |
5 | jobs:
6 | release:
7 | runs-on: macos-13
8 | steps:
9 | - uses: actions/checkout@v4
10 | - name: Build
11 | run: ./src/scripts/build_mac_ci.sh
12 | - name: Artifact
13 | uses: actions/upload-artifact@v4
14 | with:
15 | name: friction-ci-macOS-x86_64
16 | path: build-release/*.dmg
17 |
--------------------------------------------------------------------------------
/.github/workflows/macos.yml:
--------------------------------------------------------------------------------
1 | name: macOS
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | release:
7 | runs-on: macos-15
8 | steps:
9 | - uses: actions/checkout@v4
10 | - name: Build
11 | run: ./src/scripts/build_mac_ci.sh
12 | - name: Artifact
13 | uses: actions/upload-artifact@v4
14 | with:
15 | name: friction-ci-macOS-arm64
16 | path: build-release/*.dmg
17 |
--------------------------------------------------------------------------------
/.github/workflows/ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: Ubuntu
2 |
3 | on: workflow_dispatch
4 |
5 | jobs:
6 | jammy:
7 | runs-on: ubuntu-22.04
8 | steps:
9 | - uses: actions/checkout@v3
10 | - name: Build
11 | run: APT=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh
12 | noble:
13 | runs-on: ubuntu-24.04
14 | steps:
15 | - uses: actions/checkout@v3
16 | - name: Build
17 | run: APT=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh
18 |
--------------------------------------------------------------------------------
/.github/workflows/windows.yml:
--------------------------------------------------------------------------------
1 | name: Windows
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | release:
7 | runs-on: windows-2022
8 | steps:
9 | - uses: actions/checkout@v3
10 | - name: Build
11 | shell: cmd
12 | run: .\src\scripts\build.bat ci
13 | - name: Artifact
14 | uses: actions/upload-artifact@v4
15 | with:
16 | name: friction-ci-windows-x64
17 | path: |
18 | build\output\friction-*.7z
19 | build\output\friction-*.exe
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | tmp
3 | *.user*
4 | qscintilla
5 | quazip
6 | 3rdparty
7 | .DS_Store
8 | *.tar
9 | *.zip
10 | *.tar.*
11 | *.dmg
12 | *.deb
13 | *.rpm
14 | *.exe
15 | snapshots
16 | .vscode
17 | build-*
18 | *.diff
19 | *.patch
20 | ffmpeg
21 | *.7z
22 | distfiles
23 | backup
24 | CHANGES.md
25 | friction-distfiles
26 | svgo-linux
27 | svgo-win.exe
28 | skia-build
29 | qt-*
30 | sdk
31 | build-release
32 | src/scripts/flatpak/.flatpak-builder
33 | src/scripts/flatpak/builddir
34 | src/scripts/flatpak/export
35 | src/scripts/flatpak/builder
36 | src/scripts/flatpak/repo
37 | src/scripts/flatpak/remote
38 | *.app
39 |
40 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "src/engine/skia"]
2 | path = src/engine/skia
3 | url = https://github.com/friction2d/skia
4 | [submodule "src/gperftools"]
5 | path = src/gperftools
6 | url = https://github.com/friction2d/gperftools
7 | [submodule "docs"]
8 | path = docs
9 | url = https://github.com/friction2d/friction2d.github.io
10 | [submodule "src/app/icons"]
11 | path = src/app/icons
12 | url = https://github.com/friction2d/friction-icon-theme
13 |
--------------------------------------------------------------------------------
/src/app/GUI/BoxesList/boxscrollarea.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "boxscrollarea.h"
27 | #include "GUI/mainwindow.h"
28 | #include "GUI/canvaswindow.h"
29 | BoxScrollArea::BoxScrollArea(QWidget *parent) :
30 | ScrollArea(parent) {
31 | setFocusPolicy(Qt::ClickFocus);
32 | }
33 |
--------------------------------------------------------------------------------
/src/app/GUI/BoxesList/boxscrollarea.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef BOXSCROLLAREA_H
27 | #define BOXSCROLLAREA_H
28 | #include "optimalscrollarena/scrollarea.h"
29 |
30 | class BoxScrollArea : public ScrollArea {
31 | public:
32 | BoxScrollArea(QWidget *parent = nullptr);
33 | };
34 |
35 | #endif // BOXSCROLLAREA_H
36 |
--------------------------------------------------------------------------------
/src/app/GUI/RenderWidgets/rendersettingsdisplaywidget.h:
--------------------------------------------------------------------------------
1 | #ifndef RENDERSETTINGSDISPLAYWIDGET_H
2 | #define RENDERSETTINGSDISPLAYWIDGET_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "renderinstancesettings.h"
9 |
10 | class RenderSettingsDisplayWidget : public QWidget {
11 | public:
12 | RenderSettingsDisplayWidget(QWidget* const parent);
13 |
14 | void setRenderSettings(const Canvas* const scene,
15 | const RenderSettings &settings);
16 | private:
17 | QVBoxLayout *mMainLayout;
18 | QLabel *mSceneLabel;
19 | QLabel *mFrameRangeLabel;
20 | QLabel *mResolutionLabel;
21 | QLabel *mFpsLabel;
22 | };
23 |
24 | #endif // RENDERSETTINGSDISPLAYWIDGET_H
25 |
--------------------------------------------------------------------------------
/src/app/GUI/Settings/settingsdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef SETTINGSDIALOG_H
2 | #define SETTINGSDIALOG_H
3 |
4 | #include
5 | #include
6 |
7 | class SettingsWidget;
8 |
9 | class SettingsDialog : public QDialog
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | explicit SettingsDialog(QWidget * const parent = nullptr);
15 | ~SettingsDialog();
16 |
17 | private:
18 | void addSettingsWidget(SettingsWidget* const widget,
19 | const QString& name);
20 | void updateSettings(bool restore = false);
21 |
22 | QTabWidget* mTabWidget = nullptr;
23 | QList mSettingWidgets;
24 | };
25 |
26 | #endif // SETTINGSDIALOG_H
27 |
--------------------------------------------------------------------------------
/src/app/GUI/canvasbasewrappernode.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "canvasbasewrappernode.h"
27 |
28 | CanvasBaseWrapperNode::CanvasBaseWrapperNode() :
29 | BaseWrapperNode("CanvasLayout", [](Canvas* const scene) {
30 | return new CanvasWrapperNode(scene);
31 | }) {}
32 |
--------------------------------------------------------------------------------
/src/app/GUI/canvasbasewrappernode.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CANVASBASEWRAPPERNODE_H
27 | #define CANVASBASEWRAPPERNODE_H
28 | #include "canvaswrappernode.h"
29 |
30 | class CanvasBaseWrapperNode : public BaseWrapperNode {
31 | public:
32 | CanvasBaseWrapperNode();
33 | };
34 |
35 | #endif // CANVASBASEWRAPPERNODE_H
36 |
--------------------------------------------------------------------------------
/src/app/GUI/timelinebasewrappernode.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "timelinebasewrappernode.h"
27 |
28 | TimelineBaseWrapperNode::TimelineBaseWrapperNode() :
29 | BaseWrapperNode("TimelineLayout", [](Canvas* const scene) {
30 | return new TimelineWrapperNode(scene);
31 | }) {}
32 |
--------------------------------------------------------------------------------
/src/app/GUI/timelinebasewrappernode.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef TIMELINEBASEWRAPPERNODE_H
27 | #define TIMELINEBASEWRAPPERNODE_H
28 | #include "timelinewrappernode.h"
29 |
30 | class TimelineBaseWrapperNode : public BaseWrapperNode {
31 | public:
32 | TimelineBaseWrapperNode();
33 | };
34 |
35 | #endif // TIMELINEBASEWRAPPERNODE_H
36 |
--------------------------------------------------------------------------------
/src/app/app.desktop.in:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Version=1.0
3 | Name=@FRICTION_DISPLAY_NAME@
4 | Exec=@FRICTION_NAME@ %f
5 | Icon=@PROJECT_FREEDESKTOP@
6 | Comment=@PROJECT_SUMMARY@
7 | GenericName=@FRICTION_NAME_GENERIC@
8 | StartupNotify=true
9 | Terminal=false
10 | Type=Application
11 | Categories=Graphics;
12 | MimeType=application/x-@PROJECT_FREEDESKTOP@;
13 | StartupWMClass=@FRICTION_NAME@
14 |
--------------------------------------------------------------------------------
/src/app/friction.rc.in:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "@WINDOWS_ICON_FILE@"
2 | 1 VERSIONINFO
3 | FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
4 | PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
5 | FILEOS 0x4
6 | FILETYPE 0x1
7 | {
8 | BLOCK "StringFileInfo"
9 | {
10 | BLOCK "040904b0"
11 | {
12 | VALUE "Comments", "@PRODUCT_COMMENTS@"
13 | VALUE "CompanyName", "@PRODUCT_COMPANY_NAME@"
14 | VALUE "FileDescription", "@PRODUCT_FILE_DESCRIPTION@"
15 | VALUE "FileVersion", "@PRODUCT_VERSION@"
16 | VALUE "InternalName", "@PRODUCT_INTERNAL_NAME@"
17 | VALUE "LegalCopyright", "@PRODUCT_COMPANY_COPYRIGHT@"
18 | VALUE "OriginalFilename", "@PRODUCT_ORIGINAL_FILENAME@"
19 | VALUE "ProductName", "@PRODUCT_BUNDLE@"
20 | VALUE "ProductVersion", "@PRODUCT_VERSION@"
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/app/meta.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @FRICTION_DISPLAY_NAME@
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/app/pixmaps/Checkbox_checked_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/Checkbox_checked_disabled.png
--------------------------------------------------------------------------------
/src/app/pixmaps/Checkbox_checked_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/Checkbox_checked_normal.png
--------------------------------------------------------------------------------
/src/app/pixmaps/crosshair_closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/crosshair_closed.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_add.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_arrow.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_arrow_forbidden.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_arrow_forbidden.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_color_picker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_color_picker.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_crosshair_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_crosshair_open.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_crosshair_precise_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_crosshair_precise_open.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_forbidden_everywhere.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_forbidden_everywhere.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_hand_closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_hand_closed.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_hand_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_hand_open.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_move_n_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_move_n_s.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_move_ne_sw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_move_ne_sw.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_move_nw_se.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_move_nw_se.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_move_w_e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_move_w_e.png
--------------------------------------------------------------------------------
/src/app/pixmaps/cursor_pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/cursor_pencil.png
--------------------------------------------------------------------------------
/src/app/pixmaps/down-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/down-arrow.png
--------------------------------------------------------------------------------
/src/app/pixmaps/enve.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/enve.ico
--------------------------------------------------------------------------------
/src/app/pixmaps/up-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/friction2d/friction/80205ebdca76ebd8fc1c93165dfe44658fba4584/src/app/pixmaps/up-arrow.png
--------------------------------------------------------------------------------
/src/app/presets/render/001-friction-preset-mp4-h264.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_enabled=false
3 | format=mp4
4 | name=MP4 Video
5 | video_bitrate=9000000
6 | video_codec=libx264
7 | video_enabled=true
8 | video_pixel_format=yuv420p
9 | video_profile=-99
10 |
--------------------------------------------------------------------------------
/src/app/presets/render/002-friction-preset-mp4-h264-mp3.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_bitrate=320000
3 | audio_channel_layout=Stereo
4 | audio_codec=libmp3lame
5 | audio_enabled=true
6 | audio_sample_format=s16p
7 | audio_sample_rate=48000
8 | format=mp4
9 | name=MP4 Video + Audio
10 | video_bitrate=9000000
11 | video_codec=libx264
12 | video_enabled=true
13 | video_pixel_format=yuv420p
14 | video_profile=-99
15 |
--------------------------------------------------------------------------------
/src/app/presets/render/003-friction-preset-prores-444.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_enabled=false
3 | format=mov
4 | name=ProRes Video
5 | video_bitrate=9000000
6 | video_codec=prores
7 | video_enabled=true
8 | video_pixel_format=yuva444p10le
9 | video_profile=4
10 |
--------------------------------------------------------------------------------
/src/app/presets/render/004-friction-preset-prores-444-aac.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_bitrate=320000
3 | audio_channel_layout=Stereo
4 | audio_codec=aac
5 | audio_enabled=true
6 | audio_sample_format=fltp
7 | audio_sample_rate=48000
8 | format=mov
9 | name=ProRes Video + Audio
10 | video_bitrate=9000000
11 | video_codec=prores
12 | video_enabled=true
13 | video_pixel_format=yuva444p10le
14 | video_profile=4
15 |
--------------------------------------------------------------------------------
/src/app/presets/render/005-friction-preset-png.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_enabled=false
3 | format=image2
4 | name=PNG Image(s)
5 | video_bitrate=9000000
6 | video_codec=png
7 | video_enabled=true
8 | video_pixel_format=rgba
9 | video_profile=-99
10 |
--------------------------------------------------------------------------------
/src/app/presets/render/006-friction-preset-tiff.conf:
--------------------------------------------------------------------------------
1 | [output_profile_v1]
2 | audio_enabled=false
3 | format=image2
4 | name=TIFF Image(s)
5 | video_bitrate=9000000
6 | video_codec=tiff
7 | video_enabled=true
8 | video_pixel_format=rgba
9 | video_profile=-99
10 |
--------------------------------------------------------------------------------
/src/app/svgo.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | 'removeXMLProcInst',
4 | 'collapseGroups',
5 | 'removeUselessDefs',
6 | 'removeEmptyContainers',
7 | ],
8 | };
9 |
10 |
--------------------------------------------------------------------------------
/src/app/xdg/friction.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Version=1.0
3 | Name=Friction
4 | Exec=__FRICTION__ %f
5 | Icon=graphics.friction.Friction
6 | Comment=Motion graphics and animation
7 | GenericName=Friction Graphics
8 | StartupNotify=true
9 | Terminal=false
10 | Type=Application
11 | Categories=Graphics;
12 | MimeType=application/x-graphics.friction.Friction;
13 | StartupWMClass=friction
14 |
--------------------------------------------------------------------------------
/src/app/xdg/friction.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Friction
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/cmake/friction-quazip.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Friction - https://friction.graphics
3 | #
4 | # Copyright (c) Ole-André Rodlie and contributors
5 | #
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program. If not, see .
18 | #
19 | # See 'README.md' for more information.
20 | #
21 |
22 | set(QUAZIP_LIBRARIES_DIRS "/usr/lib" CACHE STRING "quazip library path")
23 | set(QUAZIP_LIBRARIES "quazip5" CACHE STRING "quazip library")
24 | set(QUAZIP_INCLUDE_DIRS "/usr/include/quazip5" CACHE STRING "quazip includes path")
25 |
--------------------------------------------------------------------------------
/src/core/Animators/animatort.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "animatort.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/basedanimatort.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "basedanimatort.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/basedkeyt.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "basedkeyt.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/boolanimator.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef BOOLANIMATOR_H
27 | #define BOOLANIMATOR_H
28 |
29 | #include "intanimator.h"
30 |
31 | class CORE_EXPORT BoolAnimator : public IntAnimator {
32 | e_OBJECT
33 | BoolAnimator(const QString& name);
34 | public:
35 | bool getBoolValue();
36 | void setCurrentBoolValue(const bool value);
37 | bool getBoolValue(const qreal relFrame);
38 | };
39 |
40 | #endif // BOOLANIMATOR_H
41 |
--------------------------------------------------------------------------------
/src/core/Animators/graphanimatort.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "graphanimatort.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/graphkeyt.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "graphkeyt.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/graphkeyt.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef GRAPHKEYT_H
27 | #define GRAPHKEYT_H
28 | #include "basedkeyt.h"
29 | #include "graphkey.h"
30 |
31 | template
32 | class GraphKeyT : public BasedKeyT {
33 | e_OBJECT
34 | protected:
35 | using BasedKeyT::BasedKeyT;
36 | };
37 |
38 | #endif // GRAPHKEYT_H
39 |
--------------------------------------------------------------------------------
/src/core/Animators/interpolationanimatort.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "interpolationanimatort.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/interpolationkey.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "interpolationkey.h"
27 |
28 | InterpolationKey::InterpolationKey(const int frame,
29 | Animator * const parentAnimator) :
30 | GraphKey(frame, parentAnimator) {}
31 |
32 | InterpolationKey::InterpolationKey(Animator * const parentAnimator) :
33 | GraphKey(0, parentAnimator) {}
34 |
--------------------------------------------------------------------------------
/src/core/Animators/interpolationkeyt.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "interpolationkeyt.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/keyt.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "keyt.h"
27 |
--------------------------------------------------------------------------------
/src/core/Animators/keyt.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef KEYT_H
27 | #define KEYT_H
28 | #include "basedkeyt.h"
29 |
30 | template
31 | class KeyT : public BasedKeyT {
32 | e_OBJECT
33 | protected:
34 | using BasedKeyT::BasedKeyT;
35 | };
36 |
37 | #endif // KEYT_H
38 |
--------------------------------------------------------------------------------
/src/core/Animators/qrealvalueeffect.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "qrealvalueeffect.h"
27 |
28 | QrealValueEffect::QrealValueEffect(const QString &name) :
29 | StaticComplexAnimator(name) {
30 |
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/src/core/Animators/qrealvalueeffect.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef QREALVALUEEFFECT_H
27 | #define QREALVALUEEFFECT_H
28 | #include "staticcomplexanimator.h"
29 |
30 | class CORE_EXPORT QrealValueEffect : public StaticComplexAnimator {
31 | public:
32 | virtual qreal getDevAtRelFrame(const qreal relFrame) = 0;
33 |
34 | protected:
35 | QrealValueEffect(const QString& name);
36 | };
37 |
38 |
39 | #endif // QREALVALUEEFFECT_H
40 |
--------------------------------------------------------------------------------
/src/core/Animators/steppedanimator.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "steppedanimator.h"
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/core/BlendEffects/blendeffectboxshadow.h:
--------------------------------------------------------------------------------
1 | #ifndef BLENDEFFECTBOXSHADOW_H
2 | #define BLENDEFFECTBOXSHADOW_H
3 | #include "Animators/eboxorsound.h"
4 |
5 | class BlendEffect;
6 |
7 | class CORE_EXPORT BlendEffectBoxShadow : public eBoxOrSound {
8 | e_OBJECT
9 | e_DECLARE_TYPE(BlendEffectBoxShadow)
10 | protected:
11 | BlendEffectBoxShadow(BoundingBox * const box,
12 | BlendEffect* const effect);
13 | public:
14 | bool SWT_shouldBeVisible(
15 | const SWT_RulesCollection &rules,
16 | const bool parentSatisfies,
17 | const bool parentMainTarget) const;
18 |
19 |
20 | void prp_setupTreeViewMenu(PropertyMenu * const menu)
21 | { Q_UNUSED(menu); }
22 |
23 | void prp_drawTimelineControls(
24 | QPainter * const p, const qreal pixelsPerFrame,
25 | const FrameRange &absFrameRange, const int rowHeight);
26 |
27 | QMimeData *SWT_createMimeData() { return nullptr; }
28 |
29 | void prp_writeProperty_impl(eWriteStream& dst) const
30 | { Q_UNUSED(dst) Q_ASSERT(false); }
31 | void prp_readProperty_impl(eReadStream& src)
32 | { Q_UNUSED(src) Q_ASSERT(false); }
33 |
34 | qsptr createLink() const;
35 | private:
36 | BoundingBox* const mBox;
37 | BlendEffect* const mEffect;
38 | };
39 |
40 | #endif // BLENDEFFECTBOXSHADOW_H
41 |
--------------------------------------------------------------------------------
/src/core/BlendEffects/blendeffectmenucreator.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | #include "BlendEffects/blendeffectmenucreator.h"
25 |
26 | #include "BlendEffects/moveblendeffect.h"
27 | #include "BlendEffects/targetedblendeffect.h"
28 |
29 | void BlendEffectMenuCreator::forEveryEffect(const EffectAdder &add)
30 | {
31 | add(QObject::tr("Move"),
32 | []() { return enve::make_shared(); });
33 | add(QObject::tr("Targeted"),
34 | []() { return enve::make_shared(); });
35 | }
36 |
--------------------------------------------------------------------------------
/src/core/Boxes/customboxcreator.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CUSTOMBOXCREATOR_H
27 | #define CUSTOMBOXCREATOR_H
28 | #include "Boxes/ecustombox.h"
29 | #include "customhandler.h"
30 |
31 | typedef CustomHandler CustomBoxCreator;
32 |
33 | #endif // CUSTOMBOXCREATOR_H
34 |
--------------------------------------------------------------------------------
/src/core/Boxes/ecustombox.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "ecustombox.h"
27 |
28 | eCustomBox::eCustomBox(const QString& name) :
29 | BoundingBox(name, eBoxType::custom) {}
30 |
31 | void eCustomBox::writeIdentifier(eWriteStream& dst) const {
32 | BoundingBox::writeIdentifier(dst);
33 | getIdentifier().write(dst);
34 | }
35 |
--------------------------------------------------------------------------------
/src/core/Boxes/ecustombox.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef ECUSTOMBOX_H
27 | #define ECUSTOMBOX_H
28 | #include "boundingbox.h"
29 | #include "../customidentifier.h"
30 |
31 | class CORE_EXPORT eCustomBox : public BoundingBox {
32 | public:
33 | eCustomBox(const QString& name);
34 |
35 | virtual CustomIdentifier getIdentifier() const = 0;
36 | private:
37 | void writeIdentifier(eWriteStream &dst) const final;
38 | };
39 |
40 | #endif // ECUSTOMBOX_H
41 |
--------------------------------------------------------------------------------
/src/core/Boxes/effectsubtaskspawner.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef EFFECTSUBTASKSPAWNER_H
27 | #define EFFECTSUBTASKSPAWNER_H
28 | #include "smartPointers/ememory.h"
29 |
30 | struct BoxRenderData;
31 | class RasterEffectCaller;
32 |
33 | namespace EffectSubTaskSpawner {
34 | CORE_EXPORT
35 | void sSpawn(const stdsptr& effect,
36 | const stdsptr& data);
37 | };
38 |
39 | #endif // EFFECTSUBTASKSPAWNER_H
40 |
--------------------------------------------------------------------------------
/src/core/Boxes/patheffectsmenu.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef PATHEFFECTSMENU_H
27 | #define PATHEFFECTSMENU_H
28 | #include "typemenu.h"
29 | #include "PathEffects/patheffectsinclude.h"
30 | #include "boundingbox.h"
31 |
32 | namespace PathEffectsMenu {
33 | CORE_EXPORT
34 | void addPathEffectsToBoxActionMenu(PropertyMenu * const menu);
35 | CORE_EXPORT
36 | void addPathEffectsToCollectionActionMenu(PropertyMenu * const menu);
37 | }
38 |
39 | #endif // PATHEFFECTSMENU_H
40 |
--------------------------------------------------------------------------------
/src/core/CacheHandlers/tmpdeleter.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "tmpdeleter.h"
27 | #include "imagecachecontainer.h"
28 | #include "skia/skiahelpers.h"
29 |
30 | TmpDeleter::TmpDeleter(const qsptr &file) :
31 | mTmpFile(file) {}
32 |
33 | void TmpDeleter::process() { mTmpFile.reset(); }
34 |
--------------------------------------------------------------------------------
/src/core/CacheHandlers/tmpdeleter.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef TMPFILEHANDLERS_H
27 | #define TMPFILEHANDLERS_H
28 | #include "Tasks/updatable.h"
29 | #include
30 |
31 | class CORE_EXPORT TmpDeleter : public eHddTask {
32 | e_OBJECT
33 | protected:
34 | TmpDeleter(const qsptr &file);
35 | public:
36 | void process();
37 | private:
38 | qsptr mTmpFile;
39 | };
40 |
41 |
42 | #endif // TMPFILEHANDLERS_H
43 |
--------------------------------------------------------------------------------
/src/core/CacheHandlers/usedrange.h:
--------------------------------------------------------------------------------
1 | #ifndef USEDRANGE_H
2 | #define USEDRANGE_H
3 | #include "hddcachablerangecont.h"
4 | class HddCachableCacheHandler;
5 |
6 | class CORE_EXPORT UsedRange {
7 | friend class HddCachableCacheHandler;
8 | UsedRange(HddCachableCacheHandler * const handler);
9 | public:
10 | typedef HddCachableRangeCont Cont;
11 |
12 | void addIfInRange(Cont* const cont);
13 | void removeIfInRange(Cont* const cont);
14 |
15 | void replaceRange(const iValueRange& range);
16 | void setRangeMin(const int min);
17 | void setRangeMax(const int max);
18 | void incRangeMax(const int inc = 1);
19 | void incRangeMin(const int inc = 1);
20 | void clearRange();
21 |
22 | const iValueRange& range() const { return mRange; }
23 | bool validRange() const { return mRange.isValid(); }
24 | private:
25 | HddCachableCacheHandler* const mHandler;
26 | iValueRange mRange;
27 | };
28 |
29 | #endif // USEDRANGE_H
30 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/clamp.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | definitions="function clamp(number, lower, upper) { return Math.max(lower, Math.min(number, upper)); }"
3 | categories=Core
4 | description=Clamp value to upper and lower.
5 | highlighters="clamp(x, lower, upper)"
6 | id=graphics.friction.clamp
7 | title=Clamp
8 | version=1
9 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/copyX.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="x = x"
4 | categories=
5 | definitions=
6 | description=It copies the value from it's X parameter. There is a proportion value that allow a proportional final Y value
7 | highlighters=
8 | id=graphics.friction.copyX
9 | license=
10 | script="// To be used for XY parameters\nscale = 1; // Change this value for a proportional copy\nreturn x * scale"
11 | title=Copy X
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/copyY.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="y = y"
4 | categories=
5 | definitions=
6 | description=It copies the value from it's Y parameter. There is a proportion value that allow a proportional final X value
7 | highlighters=
8 | id=graphics.friction.copyY
9 | license=
10 | script="// To be used for XY parameters\nscale = 1; // Change this value for a proportional copy\nreturn y * scale"
11 | title=Copy Y
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInBack.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// back easing in - backtracking slightly, then reversing direction and moving to target\nMath.easeInBack = function (t, b, c, d, s) {\n\tif (s == undefined) s = 1.70158;\n\treturn c*(t/=d)*t*((s+1)*t - s) + b;\n};"
6 | description=Ease In Back
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInBack
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInBack(frame, startVal, endVal, duration);"
11 | title=Back
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInCirc.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// circular easing in - accelerating from zero velocity\nMath.easeInCirc = function (t, b, c, d) {\n\treturn -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;\n};"
6 | description=Ease In Circ
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInCirc
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInCirc(frame, startVal, endVal, duration);"
11 | title=Circ
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInCubic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// cubic easing in - accelerating from zero velocity\nMath.easeInCubic = function (t, b, c, d) {\n\treturn c*(t/=d)*t*t + b;\n};"
6 | description=Ease In Cubic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInCubic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInCubic(frame, startVal, endVal, duration);"
11 | title=Cubic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInElastic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="Math.easeInElastic = function (t, b, c, d) {\n var s=1.70158;var p=0;var a=c;\n\tif (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;\n\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\treturn -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;\n};"
6 | description=Ease In Elastic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInElastic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInElastic(frame, startVal, endVal, duration);"
11 | title=Elastic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInExpo.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// exponential easing in - accelerating from zero velocity\nMath.easeInExpo = function (t, b, c, d) {\n\treturn (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;\n};"
6 | description=Ease In Expo
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInExpo
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInExpo(frame, startVal, endVal, duration);"
11 | title=Expo
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutBack.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// back easing in/out - backtracking slightly, then reversing direction and moving to target,\n// then overshooting target, reversing, and finally coming back to target\nMath.easeInOutBack = function (t, b, c, d, s) {\n\tif (s == undefined) s = 1.70158; \n\tif ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;\n\treturn c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;\n};"
6 | description=Ease In/Out Back
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutBack
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutBack(frame, startVal, endVal, duration);"
11 | title=Back
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutCirc.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// circular easing in/out - acceleration until halfway, then deceleration\nMath.easeInOutCirc = function (t, b, c, d) {\n\tif ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;\n\treturn c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;\n};"
6 | description=Ease In/Out Circ
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutCirc
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutCirc(frame, startVal, endVal, duration);"
11 | title=Circ
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutCubic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// cubic easing in/out - acceleration until halfway, then deceleration\nMath.easeInOutCubic = function (t, b, c, d) {\n\tif ((t/=d/2) < 1) return c/2*t*t*t + b;\n\treturn c/2*((t-=2)*t*t + 2) + b;\n};"
6 | description=Ease In/Out Cubic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutCubic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutCubic(frame, startVal, endVal, duration);"
11 | title=Cubic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutElastic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="Math.easeInOutElastic = function (t, b, c, d) {\n var s=1.70158;var p=0;var a=c;\n\tif (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);\n\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\tif (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;\n\treturn a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;\n};"
6 | description=Ease In/Out Elastic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutElastic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutElastic(frame, startVal, endVal, duration);"
11 | title=Elastic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutExpo.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// exponential easing in/out - accelerating until halfway, then decelerating\nMath.easeInOutExpo = function (t, b, c, d) {\n\tif (t==0) return b;\n\tif (t==d) return b+c;\n\tif ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;\n\treturn c/2 * (-Math.pow(2, -10 * --t) + 2) + b;\n};"
6 | description=Ease In/Out Expo
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutExpo
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutExpo(frame, startVal, endVal, duration);"
11 | title=Expo
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutQuad.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// quadratic easing in/out - acceleration until halfway, then deceleration\nMath.easeInOutQuad = function (t, b, c, d) {\n\tif ((t/=d/2) < 1) return c/2*t*t + b;\n\treturn -c/2 * ((--t)*(t-2) - 1) + b;\n};"
6 | description=Ease In/Out Quad
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutQuad
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutQuad(frame, startVal, endVal, duration);"
11 | title=Quad
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutQuart.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// quartic easing in/out - acceleration until halfway, then deceleration\nMath.easeInOutQuart = function (t, b, c, d) {\n\tif ((t/=d/2) < 1) return c/2*t*t*t*t + b;\n\treturn -c/2 * ((t-=2)*t*t*t - 2) + b;\n};"
6 | description=Ease In/Out Quart
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutQuart
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutQuart(frame, startVal, endVal, duration);"
11 | title=Quart
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutQuint.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// quintic easing in/out - acceleration until halfway, then deceleration\nMath.easeInOutQuint = function (t, b, c, d) {\n\tif ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;\n\treturn c/2*((t-=2)*t*t*t*t + 2) + b;\n};"
6 | description=Ease In/Out Quint
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutQuint
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutQuint(frame, startVal, endVal, duration);"
11 | title=Quint
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInOutSine.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In/Out
5 | definitions="// sinusoidal easing in/out - accelerating until halfway, then decelerating\nMath.easeInOutSine = function (t, b, c, d) {\n\treturn -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;\n};"
6 | description=Ease In/Out Sine
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInOutSine
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInOutSine(frame, startVal, endVal, duration);"
11 | title=Sine
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInQuad.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// quadratic easing in - accelerating from zero velocity\nMath.easeInQuad = function (t, b, c, d) {\n\treturn c*(t/=d)*t + b;\n};"
6 | description=Ease In Quad
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInQuad
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInQuad(frame, startVal, endVal, duration);"
11 | title=Quad
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInQuart.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// quartic easing in - accelerating from zero velocity\nMath.easeInQuart = function (t, b, c, d) {\n\treturn c*(t/=d)*t*t*t + b;\n};"
6 | description=Ease In Quart
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInQuart
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInQuart(frame, startVal, endVal, duration);"
11 | title=Quart
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInQuint.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// quintic easing in - accelerating from zero velocity\nMath.easeInQuint = function (t, b, c, d) {\n\treturn c*(t/=d)*t*t*t*t + b;\n};"
6 | description=Ease In Quint
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInQuint
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInQuint(frame, startVal, endVal, duration);"
11 | title=Quint
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeInSine.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease In
5 | definitions="// sinusoidal easing in - accelerating from zero velocity\nMath.easeInSine = function (t, b, c, d) {\n return -c * Math.cos(t/d * (Math.PI/2)) + c + b;\n};"
6 | description=Ease In Sine
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeInSine
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeInSine(frame, startVal, endVal, duration);"
11 | title=Sine
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutBack.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target\nMath.easeOutBack = function (t, b, c, d, s) {\n\tif (s == undefined) s = 1.70158;\n\treturn c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;\n};"
6 | description=Ease Out Back
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutBack
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutBack(frame, startVal, endVal, duration);"
11 | title=Back
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutCirc.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// circular easing out - decelerating to zero velocity\nMath.easeOutCirc = function (t, b, c, d) {\n\treturn c * Math.sqrt(1 - (t=t/d-1)*t) + b;\n};"
6 | description=Ease Out Circ
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutCirc
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutCirc(frame, startVal, endVal, duration);"
11 | title=Circ
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutCubic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// cubic easing out - decelerating to zero velocity\nMath.easeOutCubic = function (t, b, c, d) {\n\treturn c*((t=t/d-1)*t*t + 1) + b;\n};"
6 | description=Ease Out Cubic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutCubic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutCubic(frame, startVal, endVal, duration);"
11 | title=Cubic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutElastic.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="Math.easeOutElastic = function (t, b, c, d) {\n var s=1.70158;var p=0;var a=c;\n\tif (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;\n\tif (a < Math.abs(c)) { a=c; var s=p/4; }\n\telse var s = p/(2*Math.PI) * Math.asin (c/a);\n\treturn a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;\n};"
6 | description=Ease Out Elastic
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutElastic
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutElastic(frame, startVal, endVal, duration);"
11 | title=Elastic
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutExpo.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// exponential easing out - decelerating to zero velocity\nMath.easeOutExpo = function (t, b, c, d) {\n\treturn (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;\n};"
6 | description=Ease Out Expo
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutExpo
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutExpo(frame, startVal, endVal, duration);"
11 | title=Expo
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutQuad.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// quadratic easing out - decelerating to zero velocity\nMath.easeOutQuad = function (t, b, c, d) {\n\treturn -c *(t/=d)*(t-2) + b;\n};"
6 | description=Ease Out Quad
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutQuad
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutQuad(frame, startVal, endVal, duration);"
11 | title=Quad
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutQuart.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// quartic easing out - decelerating to zero velocity\nMath.easeOutQuart = function (t, b, c, d) {\n\treturn -c * ((t=t/d-1)*t*t*t - 1) + b;\n};"
6 | description=Ease Out Quart
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutQuart
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutQuart(frame, startVal, endVal, duration);"
11 | title=Quart
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutQuint.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// quintic easing out - decelerating to zero velocity\nMath.easeOutQuint = function (t, b, c, d) {\n\treturn c*((t=t/d-1)*t*t*t*t + 1) + b;\n};"
6 | description=Ease Out Quint
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutQuint
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutQuint(frame, startVal, endVal, duration);"
11 | title=Quint
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/easeOutSine.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings="current = $frame;"
4 | categories=Core, Easing, Ease Out
5 | definitions="// sinusoidal easing out - decelerating to zero velocity\nMath.easeOutSine = function (t, b, c, d) {\n\treturn c * Math.sin(t/d * (Math.PI/2)) + b;\n};"
6 | description=Ease Out Sine
7 | highlighters=@Invalid()
8 | id=graphics.friction.easeOutSine
9 | license=
10 | script="frame = current;\nstartVal = __START_VALUE__;\nendVal = __END_VALUE__;\nstartFrame = __START_FRAME__;\nendFrame = __END_FRAME__;\nduration = endFrame - startFrame;\nendVal = endVal - startVal;\nif (frame < startFrame) { frame = startFrame; }\nelse if (frame > endFrame) { frame = endFrame; }\nif (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }\nif (duration <= 0) { duration = 1; }\nif (frame < 0) { frame = 0; }\nreturn Math.easeOutSine(frame, startVal, endVal, duration);"
11 | title=Sine
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/lerp.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=
3 | bindings=
4 | categories=Core
5 | definitions="function lerp(a, b, t) {\n\treturn a + t * (b - a);\n}"
6 | description=Performs linear interpolation between two values.
7 | highlighters="lerp(a, b, t)"
8 | id=graphics.friction.lerp
9 | license=
10 | script=
11 | title=Lerp
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/orbitX.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="frame = $frame;\nvalue =$value "
4 | categories=
5 | definitions=
6 | description=To be applied to X parameter. It simulates the orbit around an origin with 'translate' X and Y parameters. It could be connected to custom properties to allow easier control of both expressions
7 | highlighters=
8 | id=graphics.friction.orbitX
9 | license=
10 | script="centerX = value;\nradius = 300;\n\nspeed = 150; // frames\ndirection = 1; // 1 clockwise, -1 counter clockwise\noffset = 0;\ncircleOverTimeX = Math.sin( (frame/speed) * 2 * Math.PI * direction + (offset * (Math.PI / 180)) ) * radius; \nreturn centerX + circleOverTimeX;"
11 | title=Orbit X
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/orbitY.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="frame = $frame;\nvalue =$value \n"
4 | categories=
5 | definitions=
6 | description=To be applied to Y parameter. It simulates the orbit around an origin with 'translate' X and Y parameters. It could be connected to custom properties to allow easier control of both expressions
7 | highlighters=
8 | id=graphics.friction.orbitY
9 | license=
10 | script="centerY = value;\nradius = 300;\n\nspeed = 150; // frames\ndirection = 1; // 1 clockwise, -1 counter clockwise\noffset = 0;\ncircleOverTimeY = -Math.cos( (frame/speed) * 2 * Math.PI * direction + (offset * (Math.PI / 180)) ) * radius;\nreturn centerY + circleOverTimeY;"
11 | title=Orbit Y
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/oscillation.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings=
4 | categories=
5 | definitions="function oscillation(origin, time, frequency, amplitude, shift) {\n var correctedShift = ((shift % (2 * Math.PI)) + (2 * Math.PI)) % (2 * Math.PI);\n var val = Math.cos((correctedShift + time) * frequency) * amplitude;\n return origin + val;\n}"
6 | description="It creates a oscillation movement like a wave"
7 | highlighters="oscillation(origin, time, frequency, amplitude, shift)"
8 | id=graphics.friction.oscillation
9 | license=
10 | script=
11 | title=Oscillation
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/rotation.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="fps = $scene.fps;\nframe = $frame;\nvalue = $value;"
4 | categories=
5 | definitions=
6 | description="It rotates the object on a constant speed controlled by FPS"
7 | highlighters=
8 | id=graphics.friction.rotation
9 | license=
10 | script="time = frame / fps;\nspeed = 100;\ndirection = 1; // clockwise = 1, counterclockwise = -1\noffset = value; // instead of controlling if with $value\n // you can use any float number\nreturn (time * speed + offset) % 360 * direction;"
11 | title=Rotation
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/time.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="frame =$frame;\nfps =$scene.fps;"
4 | categories=
5 | definitions=
6 | description="It animates the parameter based on the frame number and the frames per second of the scene."
7 | highlighters=
8 | id=graphics.friction.time
9 | license=
10 | script="time = frame / fps;\nreturn time"
11 | title=Time
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/trackObject.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="objectPos = transform.translation;\npivotPos = transform.pivot;\noffsetAngle = $value;\ntargetPos = your_target_object.transform.translation;\n"
4 | categories=
5 | definitions=
6 | description="It looks at another object, it is meant to be applied to a 'rotation' parameter"
7 | highlighters=
8 | id=graphics.friction.trackObject
9 | license=
10 | script="var realObjectPosX = objectPos[0] + pivotPos[0];\nvar realObjectPosY = objectPos[1] + pivotPos[1];\nvar realTargetPosX = targetPos[0];\nvar realTargetPosY = targetPos[1];\n\nvar deltaX = realTargetPosX - realObjectPosX;\nvar deltaY = realTargetPosY - realObjectPosY;\n\nvar angleRad = Math.atan2(deltaY, deltaX);\nvar angleDeg = angleRad * (180 / Math.PI);\n\nreturn angleDeg + offsetAngle;\n"
11 | title=Track object
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/wave.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="fps = $scene.fps;\nframe = $frame;\norigin = $value;\n"
4 | categories=Core
5 | definitions=
6 | description="It creates a wave function that can be used to animate objects"
7 | highlighters=@Invalid()
8 | id=graphics.friction.wave
9 | license=
10 | script="time = frame / fps;\nspeed = 5;\nfrequency = 1;\namplitude = 300;\nshift = 0;\nreturn oscillation(origin, time * speed, frequency, amplitude, shift)"
11 | title=Wave
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/Expressions/presets/wiggle.fexpr:
--------------------------------------------------------------------------------
1 | [General]
2 | author=pgilfernandez
3 | bindings="fps = $scene.fps;\nframe = $frame;\nvalue = $value;\n"
4 | categories=
5 | definitions=
6 | description="It creates random variation of the initial value of the parameter"
7 | highlighters=
8 | id=graphics.friction.wiggle
9 | license=
10 | script="time = frame / fps;\n\nfrequency = .5;\namplitude = 200; // pixels\nseed = 0; // randomize the start, integers works better\n\nreturn value + noise(frequency, amplitude, seed);\n\n// For more control use:\n// detail = 4;\n// return value + noise(frequency, amplitude, seed, time, detail);\n"
11 | title=Wiggle
12 | url=
13 | version=1
14 |
--------------------------------------------------------------------------------
/src/core/FileCacheHandlers/filehandlerobjref.cpp:
--------------------------------------------------------------------------------
1 | #include "filehandlerobjref.h"
2 |
3 | void FileHandlerObjRefBase::increment(FileCacheHandler * const handler) const {
4 | handler->mReferenceCount++;
5 | }
6 |
7 | void FileHandlerObjRefBase::decrement(FileCacheHandler * const handler) const {
8 | handler->mReferenceCount--;
9 | }
10 |
--------------------------------------------------------------------------------
/src/core/FileCacheHandlers/soundreaderformerger.h:
--------------------------------------------------------------------------------
1 | #ifndef SOUNDREADERFORMERGER_H
2 | #define SOUNDREADERFORMERGER_H
3 |
4 | #include "soundreader.h"
5 |
6 | #include "Animators/qrealsnapshot.h"
7 |
8 | class SoundMerger;
9 |
10 | class CORE_EXPORT SoundReaderForMerger : public SoundReader {
11 | e_OBJECT
12 | struct SingleSound {
13 | int fSampleShift;
14 | SampleRange fSamplesRange;
15 | QrealSnapshot fVolume;
16 | qreal fSpeed;
17 | };
18 | protected:
19 | SoundReaderForMerger(SoundHandler * const cacheHandler,
20 | const stdsptr& openedAudio,
21 | const int secondId, const SampleRange& sampleRange);
22 |
23 | void afterProcessing();
24 | public:
25 | void addSingleSound(void* const soundPtr,
26 | const int sampleShift,
27 | const SampleRange& absRange,
28 | const QrealSnapshot& volume,
29 | const qreal speed);
30 |
31 | void addMerger(SoundMerger * const merger);
32 | private:
33 | QList mSoundPtrs;
34 | QList mSSAbsRanges;
35 | QList> mMergers;
36 | };
37 |
38 | #endif // SOUNDREADERFORMERGER_H
39 |
--------------------------------------------------------------------------------
/src/core/FileCacheHandlers/svgfilecachehandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef SVGFILECACHEHANDLER_H
27 | #define SVGFILECACHEHANDLER_H
28 |
29 | #include "filecachehandler.h"
30 |
31 | class ContainerBox;
32 | class Gradient;
33 |
34 | class CORE_EXPORT SvgFileCacheHandler : public FileCacheHandler {
35 | e_OBJECT
36 | protected:
37 | SvgFileCacheHandler();
38 |
39 | void reload();
40 | public:
41 | void replace();
42 | };
43 |
44 | #endif // SVGFILECACHEHANDLER_H
45 |
--------------------------------------------------------------------------------
/src/core/GUI/ewidgets.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "ewidgets.h"
27 | #include
28 |
29 | eWidgets* eWidgets::sInstance = nullptr;
30 |
31 | eWidgets::eWidgets() {
32 | Q_ASSERT(!sInstance);
33 | sInstance = this;
34 | }
35 |
--------------------------------------------------------------------------------
/src/core/GUI/propertynamedialog.h:
--------------------------------------------------------------------------------
1 | #ifndef PROPERTYNAMEDIALOG_H
2 | #define PROPERTYNAMEDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "../core_global.h"
9 |
10 | class Property;
11 | class BoundingBox;
12 |
13 | class CORE_EXPORT PropertyNameDialog : public QDialog {
14 | public:
15 | PropertyNameDialog(const QString& initialValue,
16 | QWidget* const parent = nullptr);
17 |
18 | static bool sGetPropertyName(QString& name,
19 | QWidget* const parent);
20 | static void sRenameBox(BoundingBox * const box,
21 | QWidget * const parent);
22 | static void sRenameProperty(Property* const prop,
23 | QWidget* const parent);
24 |
25 | QString name() const
26 | { return mName->text(); }
27 | private:
28 | bool validate();
29 |
30 | QLineEdit* mName;
31 | QPushButton* mOkButton;
32 | QLabel* mErrorLabel;
33 | };
34 |
35 | #endif // PROPERTYNAMEDIALOG_H
36 |
--------------------------------------------------------------------------------
/src/core/PathEffects/custompatheffectcreator.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CUSTOMPATHEFFECTCREATOR_H
27 | #define CUSTOMPATHEFFECTCREATOR_H
28 | #include "PathEffects/custompatheffect.h"
29 | #include "customhandler.h"
30 |
31 | typedef CustomHandler CustomPathEffectCreator;
32 |
33 | #endif // CUSTOMPATHEFFECTCREATOR_H
34 |
--------------------------------------------------------------------------------
/src/core/PathEffects/patheffectcaller.cpp:
--------------------------------------------------------------------------------
1 | #include "patheffectcaller.h"
2 |
3 | PathEffectCaller::PathEffectCaller()
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/src/core/PathEffects/patheffectcaller.h:
--------------------------------------------------------------------------------
1 | #ifndef PATHEFFECTCALLER_H
2 | #define PATHEFFECTCALLER_H
3 |
4 | #include "../skia/skiaincludes.h"
5 | #include "../smartPointers/stdselfref.h"
6 |
7 | class CORE_EXPORT PathEffectCaller : public StdSelfRef {
8 | public:
9 | PathEffectCaller();
10 |
11 | virtual void apply(SkPath& path) = 0;
12 | };
13 |
14 | #endif // PATHEFFECTCALLER_H
15 |
--------------------------------------------------------------------------------
/src/core/PathEffects/sumpatheffect.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef SUMPATHEFFECT_H
27 | #define SUMPATHEFFECT_H
28 | #include "PathEffects/patheffect.h"
29 |
30 | class CORE_EXPORT SumPathEffect : public PathEffect {
31 | e_OBJECT
32 | protected:
33 | SumPathEffect();
34 | public:
35 | stdsptr getEffectCaller(const qreal relFrame,
36 | const qreal influence) const;
37 | };
38 |
39 |
40 | #endif // SUMPATHEFFECT_H
41 |
--------------------------------------------------------------------------------
/src/core/Private/Tasks/offscreenqgl33c.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "offscreenqgl33c.h"
27 |
28 | OffscreenQGL33c::OffscreenQGL33c() {
29 |
30 | }
31 |
32 | OffscreenQGL33c::~OffscreenQGL33c() {
33 | mContext->deleteLater();
34 | mOffscreenSurface->deleteLater();
35 | }
36 |
--------------------------------------------------------------------------------
/src/core/Properties/newproperty.h:
--------------------------------------------------------------------------------
1 | #ifndef NEWPROPERTY_H
2 | #define NEWPROPERTY_H
3 |
4 | #include "../ReadWrite/ereadstream.h"
5 | #include "../smartPointers/eobject.h"
6 |
7 | template
8 | class NewProperty : public T {
9 | e_OBJECT
10 | using T::T;
11 | public:
12 | void prp_readProperty(eReadStream &src) override {
13 | if(src.evFileVersion() < V) return;
14 | T::prp_readProperty(src);
15 | }
16 | };
17 |
18 | #endif // NEWPROPERTY_H
19 |
--------------------------------------------------------------------------------
/src/core/RasterEffects/blureffect.h:
--------------------------------------------------------------------------------
1 | #ifndef BLUREFFECT_H
2 | #define BLUREFFECT_H
3 |
4 | #include "rastereffect.h"
5 |
6 | class CORE_EXPORT BlurEffect : public RasterEffect {
7 | e_OBJECT
8 | protected:
9 | BlurEffect();
10 | public:
11 | stdsptr getEffectCaller(
12 | const qreal relFrame, const qreal resolution,
13 | const qreal influence, BoxRenderData* const data) const;
14 | QMargins getMargin() const;
15 | bool forceMargin() const { return true; }
16 |
17 | QDomElement saveBlurSVG(SvgExporter& exp,
18 | const FrameRange& visRange,
19 | const QDomElement& child) const;
20 | private:
21 | qsptr mRadius;
22 | };
23 |
24 | #endif // BLUREFFECT_H
25 |
--------------------------------------------------------------------------------
/src/core/RasterEffects/brightnesscontrasteffect.frag:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #version 330 core
27 | layout(location = 0) out vec4 fragColor;
28 |
29 | in vec2 texCoord;
30 |
31 | uniform sampler2D tex;
32 | uniform float brightness;
33 | uniform float contrast;
34 |
35 | void main(void) {
36 | vec4 color = texture(tex, texCoord);
37 | fragColor = vec4((color.rgb - 0.5*color.a) * (contrast + 1) + color.a*(0.5 + brightness), color.a);
38 | }
39 |
--------------------------------------------------------------------------------
/src/core/RasterEffects/customrastereffectcreator.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CUSTOMRasterEffectCREATOR_H
27 | #define CUSTOMRasterEffectCREATOR_H
28 | #include "RasterEffects/customrastereffect.h"
29 | #include "customhandler.h"
30 |
31 | typedef CustomHandler CustomRasterEffectCreator;
32 |
33 | #endif // CUSTOMRasterEffectCREATOR_H
34 |
--------------------------------------------------------------------------------
/src/core/RasterEffects/rastereffectsinclude.h:
--------------------------------------------------------------------------------
1 | #ifndef RASTEREFFECTSINCLUDE_H
2 | #define RASTEREFFECTSINCLUDE_H
3 |
4 | #include "blureffect.h"
5 | #include "shadoweffect.h"
6 | #include "motionblureffect.h"
7 | #include "wipeeffect.h"
8 | #include "noisefadeeffect.h"
9 | #include "colorizeeffect.h"
10 | #include "brightnesscontrasteffect.h"
11 |
12 | #endif // RASTEREFFECTSINCLUDE_H
13 |
--------------------------------------------------------------------------------
/src/core/RasterEffects/shadoweffect.h:
--------------------------------------------------------------------------------
1 | #ifndef SHADOWEFFECT_H
2 | #define SHADOWEFFECT_H
3 |
4 | #include "rastereffect.h"
5 |
6 | #include "skia/skqtconversions.h"
7 | #include "Animators/coloranimator.h"
8 | #include "Animators/qpointfanimator.h"
9 | #include "gpurendertools.h"
10 |
11 | class CORE_EXPORT ShadowEffect : public RasterEffect {
12 | public:
13 | ShadowEffect();
14 |
15 | stdsptr getEffectCaller(
16 | const qreal relFrame, const qreal resolution,
17 | const qreal influence, BoxRenderData* const data) const;
18 | bool forceMargin() const { return true; }
19 |
20 | QDomElement saveShadowSVG(SvgExporter& exp,
21 | const FrameRange& visRange,
22 | const QDomElement& child) const;
23 | private:
24 | qsptr mBlurRadius;
25 | qsptr mOpacity;
26 | qsptr mColor;
27 | qsptr mTranslation;
28 | };
29 |
30 | #endif // SHADOWEFFECT_H
31 |
--------------------------------------------------------------------------------
/src/core/ReadWrite/efuturepos.h:
--------------------------------------------------------------------------------
1 | #ifndef EFUTUREPOS_H
2 | #define EFUTUREPOS_H
3 |
4 | #include "../core_global.h"
5 |
6 | struct CORE_EXPORT eFuturePos {
7 | qint64 fMain;
8 | qint64 fFutureTable;
9 | };
10 |
11 | #endif // EFUTUREPOS_H
12 |
--------------------------------------------------------------------------------
/src/core/ReadWrite/filefooter.h:
--------------------------------------------------------------------------------
1 | #ifndef FILEFOOTER_H
2 | #define FILEFOOTER_H
3 | #include
4 | #include
5 |
6 | #include "exceptions.h"
7 |
8 | class eWriteStream;
9 |
10 | class CORE_EXPORT FileFooter {
11 | public:
12 | static void sWrite(eWriteStream& dst);
13 |
14 | static qint64 sSize(const int evVersion);
15 |
16 | static int sReadEvFileVersion(QIODevice * const src);
17 | private:
18 | static char sEVFormat[15];
19 | static char sAppName[15];
20 | static char sAppVersion[15];
21 | };
22 |
23 | #endif // FILEFOOTER_H
24 |
--------------------------------------------------------------------------------
/src/core/ReadWrite/xevformat.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef XEVFORMAT_H
27 | #define XEVFORMAT_H
28 |
29 | namespace XevFormat {
30 | enum {
31 | initial,
32 |
33 | nextVersion
34 | };
35 |
36 | const int version = nextVersion - 1;
37 | }
38 |
39 | #endif // XEVFORMAT_H
40 |
--------------------------------------------------------------------------------
/src/core/Segments/cubicnode.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CUBICNODE_H
27 | #define CUBICNODE_H
28 | #include
29 |
30 | #include "../core_global.h"
31 | struct CORE_EXPORT CubicNode {
32 | public:
33 | CubicNode(const QPointF& c1, const QPointF& p, const QPointF& c2) {
34 | mC1 = c1; mP = p; mC2 = c2;
35 | }
36 | private:
37 | QPointF mC1;
38 | QPointF mP;
39 | QPointF mC2;
40 | };
41 |
42 | #endif // CUBICNODE_H
43 |
--------------------------------------------------------------------------------
/src/core/Segments/fitcurves.h:
--------------------------------------------------------------------------------
1 | #ifndef FITCURVES_H
2 | #define FITCURVES_H
3 |
4 | #include
5 | #include
6 |
7 | #include "../core_global.h"
8 |
9 | typedef struct Point2Struct { /* 2d point */
10 | double x, y;
11 | } Point2;
12 | typedef Point2 Vector2;
13 | typedef Point2 *BezierCurve;
14 | typedef std::function BezierHandler;
15 |
16 | namespace FitCurves {
17 | CORE_EXPORT
18 | extern void FitCurve(QVector& data, const double error,
19 | const BezierHandler& bezierHandler,
20 | const bool useTangents,
21 | const bool split);
22 | CORE_EXPORT
23 | extern void FitCurve(QVector& data, const double error,
24 | const BezierHandler& bezierHandler,
25 | const int min, const int max,
26 | const bool useTangents,
27 | const bool split);
28 |
29 | };
30 |
31 | #endif // FITCURVES_H
32 |
--------------------------------------------------------------------------------
/src/core/ShaderEffects/PropertyCreators/coloranimatorcreator.h:
--------------------------------------------------------------------------------
1 | #ifndef COLORANIMATORCREATOR_H
2 | #define COLORANIMATORCREATOR_H
3 |
4 |
5 | #include "Animators/coloranimator.h"
6 | #include "shaderpropertycreator.h"
7 |
8 | class CORE_EXPORT ColorAnimatorCreator : public ShaderPropertyCreator {
9 | e_OBJECT
10 | ColorAnimatorCreator(const QColor iniVal,
11 | const bool glValue,
12 | const QString& name,
13 | const QString& nameUI) :
14 | ShaderPropertyCreator(glValue, name, nameUI),
15 | fIniVal(iniVal) {}
16 |
17 | const QColor fIniVal;
18 |
19 | qsptr create() const {
20 | const auto result = enve::make_shared(fNameUI);
21 | result->setColor(fIniVal);
22 | return result;
23 | }
24 | };
25 |
26 | #endif // COLORANIMATORCREATOR_H
27 |
--------------------------------------------------------------------------------
/src/core/Tasks/domeletask.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "domeletask.h"
27 |
28 | #include "svgexporter.h"
29 |
30 | DomEleTask::DomEleTask(SvgExporter& exp, const FrameRange& visRange) :
31 | mExp(exp), mVisRange(visRange) {}
32 |
33 | QDomElement& DomEleTask::initialize(const QString& tag) {
34 | mEle = mExp.createElement(tag);
35 | return mEle;
36 | }
37 |
38 | QDomElement& DomEleTask::element() { return mEle; }
39 |
--------------------------------------------------------------------------------
/src/core/Tasks/etask.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "etask.h"
27 |
28 | bool eTask::queTask() {
29 | mState = eTaskState::qued;
30 | afterQued();
31 | queTaskNow();
32 | return true;
33 | }
34 |
35 | void eTask::aboutToProcess(const Hardware hw) {
36 | mState = eTaskState::processing;
37 | beforeProcessing(hw);
38 | }
39 |
--------------------------------------------------------------------------------
/src/core/Tasks/updatable.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "Tasks/updatable.h"
27 | #include "Private/Tasks/taskscheduler.h"
28 | #include "Private/Tasks/taskexecutor.h"
29 |
30 | void eCpuTask::queTaskNow() {
31 | TaskScheduler::instance()->queCpuTask(ref());
32 | }
33 |
34 | void eHddTask::queTaskNow() {
35 | TaskScheduler::instance()->queHddTask(ref());
36 | }
37 |
--------------------------------------------------------------------------------
/src/core/canvasbase.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "canvasbase.h"
27 |
28 | CanvasBase::CanvasBase() : ContainerBox(eBoxType::canvas) {}
29 |
--------------------------------------------------------------------------------
/src/core/colorshaders/alpha.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 RGBColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 | uniform vec2 meshSize;
11 |
12 | vec3 hsv2rgb(vec3 c) {
13 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
14 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
15 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
16 | }
17 |
18 | void main(void) {
19 | float posFrac = 0.5f*(1.f + pos.x);
20 | float fragAlpha = posFrac;
21 | if(abs(currentValue - fragAlpha) < handleWidth) {
22 | if(lightHandle) {
23 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
24 | } else {
25 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
26 | }
27 | return;
28 | }
29 | vec3 meshColor;
30 | int hId = int(floor(posFrac/meshSize.x));
31 | int vId = int(floor(0.5f*(1.f + pos.y)/meshSize.y));
32 | if((hId + vId) % 2 == 0) {
33 | meshColor = vec3(0.2f, 0.2f, 0.2f);
34 | } else {
35 | meshColor = vec3(0.4f, 0.4f, 0.4f);
36 | }
37 | fragColor = vec4(mix(meshColor, RGBColor, fragAlpha), 1.f);
38 | }
39 |
--------------------------------------------------------------------------------
/src/core/colorshaders/blue.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 RGBColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | vec3 hsv2rgb(vec3 c) {
12 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
13 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
14 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
15 | }
16 |
17 | void main(void) {
18 | float fragBlue = 0.5f*(1.f + pos.x);
19 | if(abs(currentValue - fragBlue) < handleWidth) {
20 | if(lightHandle) {
21 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
22 | } else {
23 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
24 | }
25 | return;
26 | }
27 |
28 | fragColor = vec4(RGBColor.x, RGBColor.y, fragBlue, 1.f);
29 | }
30 |
--------------------------------------------------------------------------------
/src/core/colorshaders/border.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec2 borderSize;
6 | uniform vec4 borderColor;
7 |
8 | void main(void) {
9 | float posXFrac = 0.5f*(1.f + pos.x);
10 | float posYFrac = 0.5f*(1.f + pos.y);
11 |
12 | bool noBorderH = posXFrac > borderSize.x && posXFrac < 1.f - borderSize.x;
13 | bool noBorderV = posYFrac > borderSize.y && posYFrac < 1.f - borderSize.y;
14 |
15 | if(noBorderH && noBorderV) {
16 | fragColor = vec4(0.f, 0.f, 0.f, 0.f);
17 | return;
18 | }
19 | fragColor = borderColor;
20 | }
21 |
--------------------------------------------------------------------------------
/src/core/colorshaders/doubleborder.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec2 outerBorderSize;
6 | uniform vec2 innerBorderSize;
7 |
8 | uniform vec4 outerBorderColor;
9 | uniform vec4 innerBorderColor;
10 |
11 | void main(void) {
12 | float posXFrac = 0.5f*(1.f + pos.x);
13 | float posYFrac = 0.5f*(1.f + pos.y);
14 |
15 | vec2 combinedBorderSize = outerBorderSize + innerBorderSize;
16 |
17 | bool noBorderH = posXFrac > combinedBorderSize.x &&
18 | posXFrac < 1.f - combinedBorderSize.x;
19 | bool noBorderV = posYFrac > combinedBorderSize.y &&
20 | posYFrac < 1.f - combinedBorderSize.y;
21 |
22 | if(noBorderH && noBorderV) {
23 | fragColor = vec4(0.f, 0.f, 0.f, 0.f);
24 | return;
25 | }
26 |
27 | bool innerBorderH = posXFrac > outerBorderSize.x &&
28 | posXFrac < 1.f - outerBorderSize.x;
29 | bool innerBorderV = posYFrac > outerBorderSize.y &&
30 | posYFrac < 1.f - outerBorderSize.y;
31 |
32 | if(innerBorderH && innerBorderV) {
33 | fragColor = innerBorderColor;
34 | return;
35 | }
36 | fragColor = outerBorderColor;
37 | }
38 |
--------------------------------------------------------------------------------
/src/core/colorshaders/gradient.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec4 RGBAColor1;
6 | uniform vec4 RGBAColor2;
7 |
8 | uniform vec2 meshSize;
9 |
10 | void main(void) {
11 | float posFrac = 0.5f*(1.f + pos.x);
12 | vec4 colorMix = mix(RGBAColor1, RGBAColor2, posFrac);
13 | if(colorMix.a < 0.99999f) {
14 | vec3 meshColor;
15 | int hId = int(floor(posFrac/meshSize.x));
16 | int vId = int(floor(0.5f*(1.f + pos.y)/meshSize.y));
17 | if((hId + vId) % 2 == 0) {
18 | meshColor = vec3(0.2f, 0.2f, 0.2f);
19 | } else {
20 | meshColor = vec3(0.4f, 0.4f, 0.4f);
21 | }
22 | fragColor = vec4(mix(meshColor, colorMix.rgb, colorMix.a), 1.f);
23 | return;
24 | }
25 | fragColor = vec4(colorMix.rgb, 1.f);
26 | }
27 |
--------------------------------------------------------------------------------
/src/core/colorshaders/green.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 RGBColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | void main(void) {
12 | float fragGreen = 0.5f*(1.f + pos.x);
13 | if(abs(currentValue - fragGreen) < handleWidth) {
14 | if(lightHandle) {
15 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
16 | } else {
17 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
18 | }
19 | return;
20 | }
21 |
22 | fragColor = vec4(RGBColor.x, fragGreen, RGBColor.z, 1.f);
23 | }
24 |
--------------------------------------------------------------------------------
/src/core/colorshaders/hsv_saturation.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 HSVColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | vec3 hsv2rgb(vec3 c) {
12 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
13 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
14 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
15 | }
16 |
17 | void main(void) {
18 | float fragSaturation = 0.5f*(1.f + pos.x);
19 | if(abs(currentValue - fragSaturation) < handleWidth) {
20 | if(lightHandle) {
21 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
22 | } else {
23 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
24 | }
25 | return;
26 | }
27 | vec3 hsvaColor = vec3(HSVColor.x, fragSaturation, HSVColor.z);
28 | fragColor = vec4(hsv2rgb(hsvaColor), 1.f);
29 | }
30 |
--------------------------------------------------------------------------------
/src/core/colorshaders/hue.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 HSVColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | vec3 hsv2rgb(vec3 c) {
12 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
13 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
14 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
15 | }
16 |
17 | void main(void) {
18 | float fragHue = 0.5f*(1.f + pos.x);
19 | if(abs(currentValue - fragHue) < handleWidth) {
20 | if(lightHandle) {
21 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
22 | } else {
23 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
24 | }
25 | return;
26 | }
27 | vec3 hsvColor = vec3(fragHue, HSVColor.y, HSVColor.z);
28 | fragColor = vec4(hsv2rgb(hsvColor), 1.f);
29 | }
30 |
--------------------------------------------------------------------------------
/src/core/colorshaders/plain.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec4 RGBAColor;
6 | uniform vec2 meshSize;
7 |
8 | void main(void) {
9 | float posFrac = 0.5f*(1.f + pos.x);
10 | if(RGBAColor.a < 0.99999f) {
11 | vec3 meshColor;
12 | int hId = int(floor(posFrac/meshSize.x));
13 | int vId = int(floor(0.5f*(1.f + pos.y)/meshSize.y));
14 | if((hId + vId) % 2 == 0) {
15 | meshColor = vec3(0.2f, 0.2f, 0.2f);
16 | } else {
17 | meshColor = vec3(0.4f, 0.4f, 0.4f);
18 | }
19 | fragColor = vec4(mix(meshColor, RGBAColor.rgb, RGBAColor.a), 1.f);
20 | return;
21 | }
22 | fragColor = vec4(RGBAColor.rgb, 1.f);
23 | }
24 |
--------------------------------------------------------------------------------
/src/core/colorshaders/red.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 RGBColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | vec3 hsv2rgb(vec3 c) {
12 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
13 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
14 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
15 | }
16 |
17 | void main(void) {
18 | float fragRed = 0.5f*(1.f + pos.x);
19 | if(abs(currentValue - fragRed) < handleWidth) {
20 | if(lightHandle) {
21 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
22 | } else {
23 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
24 | }
25 | return;
26 | }
27 | fragColor = vec4(fragRed, RGBColor.y, RGBColor.z, 1.f);
28 | }
29 |
--------------------------------------------------------------------------------
/src/core/colorshaders/value.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout(location = 0) out vec4 fragColor;
3 | in vec3 pos;
4 |
5 | uniform vec3 HSVColor;
6 |
7 | uniform float currentValue;
8 | uniform float handleWidth; // fraction of width
9 | uniform bool lightHandle;
10 |
11 | vec3 hsv2rgb(vec3 c) {
12 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
13 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
14 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
15 | }
16 |
17 | void main(void) {
18 | float fragValue = 0.5f*(1.f + pos.x);
19 | if(abs(currentValue - fragValue) < handleWidth) {
20 | if(lightHandle) {
21 | fragColor = vec4(1.f, 1.f, 1.f, 1.f);
22 | } else {
23 | fragColor = vec4(0.f, 0.f, 0.f, 1.f);
24 | }
25 | return;
26 | }
27 | vec3 hsvColor = vec3(HSVColor.x, HSVColor.y, fragValue);
28 | fragColor = vec4(hsv2rgb(hsvColor), 1.f);
29 | }
30 |
--------------------------------------------------------------------------------
/src/core/conncontext.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "conncontext.h"
27 |
28 | ConnContext::ConnContext() {}
29 |
30 | ConnContext::~ConnContext() {
31 | clear();
32 | }
33 |
34 | ConnContext &ConnContext::operator<<(const QMetaObject::Connection &connection) {
35 | mConns << connection;
36 | return *this;
37 | }
38 |
39 | void ConnContext::clear() {
40 | for(const auto& conn : mConns)
41 | QObject::disconnect(conn);
42 | }
43 |
--------------------------------------------------------------------------------
/src/core/core_global.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CORE_GLOBAL_H
27 | #define CORE_GLOBAL_H
28 |
29 | #include
30 |
31 | #if defined(CORE_LIBRARY)
32 | # define CORE_EXPORT Q_DECL_EXPORT
33 | #else
34 | # define CORE_EXPORT Q_DECL_IMPORT
35 | #endif
36 |
37 | #endif // CORE_GLOBAL_H
38 |
--------------------------------------------------------------------------------
/src/core/cpurendertools.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef CPURENDERTOOLS_H
27 | #define CPURENDERTOOLS_H
28 |
29 | #include "skia/skiahelpers.h"
30 |
31 | struct CORE_EXPORT CpuRenderTools
32 | {
33 | const SkBitmap fSrcBtmp;
34 | SkBitmap fDstBtmp;
35 | };
36 |
37 | #endif // CPURENDERTOOLS_H
38 |
--------------------------------------------------------------------------------
/src/core/framerange.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "framerange.h"
27 |
28 | int iValueRange::EMIN = -TEN_MIL;
29 | int iValueRange::EMAX = TEN_MIL;
30 | iValueRange iValueRange::EMINMAX = {EMIN, EMAX};
31 | iValueRange iValueRange::INVALID = {1, 0};
32 |
--------------------------------------------------------------------------------
/src/core/hardwareenums.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef HARDWAREENUMS_H
27 | #define HARDWAREENUMS_H
28 |
29 | enum class HardwareSupport : short {
30 | cpuOnly,
31 | cpuPreffered,
32 | gpuPreffered,
33 | gpuOnly,
34 | hardwareDefault
35 | };
36 |
37 | enum class Hardware : short {
38 | cpu, gpu, hdd
39 | };
40 |
41 | #endif // HARDWAREENUMS_H
42 |
--------------------------------------------------------------------------------
/src/core/paintsettingsapplier.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "paintsettingsapplier.h"
27 |
--------------------------------------------------------------------------------
/src/core/pathoperations.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef PATHOPERATIONS_H
27 | #define PATHOPERATIONS_H
28 | #include
29 | class PathBox;
30 | class SkPath;
31 | class PathAnimator;
32 |
33 | extern void gSolidify(const qreal widthT,
34 | const SkPath &src,
35 | SkPath * const dst);
36 |
37 | #endif // PATHOPERATIONS_H
38 |
--------------------------------------------------------------------------------
/src/core/pointtypemenu.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef POINTTYPEMENU_H
27 | #define POINTTYPEMENU_H
28 | #include "typemenu.h"
29 |
30 | #endif // POINTTYPEMENU_H
31 |
--------------------------------------------------------------------------------
/src/core/shaders/plain.vert:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout (location = 0) in vec3 vPos;
3 |
4 | out vec3 pos;
5 |
6 | void main(void) {
7 | pos = vPos;
8 | gl_Position = vec4(vPos, 1.f);
9 | }
10 |
--------------------------------------------------------------------------------
/src/core/shaders/textured.vert:
--------------------------------------------------------------------------------
1 | #version 330 core
2 | layout (location = 0) in vec3 vPos;
3 | layout (location = 1) in vec2 vTexCoord;
4 |
5 | out vec2 texCoord;
6 |
7 | void main(void) {
8 | gl_Position = vec4(vPos, 1.f);
9 | texCoord = vTexCoord;
10 | }
11 |
--------------------------------------------------------------------------------
/src/core/skia/skiadefines.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef SKIADEFINES_H
27 | #define SKIADEFINES_H
28 | #include
29 |
30 | #ifdef QT_DEBUG
31 | #define GR_GL_CHECK_ERROR true
32 | #define GR_GL_LOG_CALLS true
33 | #define SK_DEBUG
34 | #undef SK_RELEASE
35 | #else
36 | #define GR_GL_CHECK_ERROR false
37 | #define GR_GL_LOG_CALLS false
38 | #define SK_RELEASE
39 | #undef SK_DEBUG
40 | #endif
41 |
42 | #endif // SKIADEFINES_H
43 |
--------------------------------------------------------------------------------
/src/core/smartPointers/stdselfref.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "stdselfref.h"
27 |
28 | StdSelfRef::~StdSelfRef() {}
29 |
--------------------------------------------------------------------------------
/src/core/transformvalues.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "transformvalues.h"
27 |
28 | QMatrix TransformValues::calculate() const {
29 | QMatrix result;
30 | result.translate(fPivotX + fMoveX, fPivotY + fMoveY);
31 | result.rotate(fRotation);
32 | result.scale(fScaleX, fScaleY);
33 | result.shear(fShearX, fShearY);
34 | result.translate(-fPivotX, -fPivotY);
35 | return result;
36 | }
37 |
--------------------------------------------------------------------------------
/src/core/typemenu.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "typemenu.h"
27 |
--------------------------------------------------------------------------------
/src/core/windowsincludes.h:
--------------------------------------------------------------------------------
1 | #ifndef WINDOWSINCLUDES_H
2 | #define WINDOWSINCLUDES_H
3 |
4 | #define NTDDI_VERSION NTDDI_WIN7
5 | #define _WIN32_WINNT _WIN32_WINNT_WIN7
6 | #define WINVER _WIN32_WINNT_WIN7
7 |
8 | #pragma comment(lib, "mincore_downlevel.lib")
9 | #include
10 | #include
11 |
12 | #endif // WINDOWSINCLUDES_H
13 |
--------------------------------------------------------------------------------
/src/examples/rasterEffects/dabTest/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | normal.frag
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/examples/rasterEffects/oil/OilImpl/oilPaint.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "OilBristle.h"
4 | #include "OilBrush.h"
5 | #include "OilTrace.h"
6 | #include "OilSimulator.h"
7 |
--------------------------------------------------------------------------------
/src/examples/rasterEffects/oil/OilImpl/oilhelpers.h:
--------------------------------------------------------------------------------
1 | #ifndef OILHELPERS_H
2 | #define OILHELPERS_H
3 |
4 | namespace OilHelpers {
5 | float ofNoise(float x);
6 | }
7 |
8 | #endif // OILHELPERS_H
9 |
--------------------------------------------------------------------------------
/src/examples/rasterEffects/oil/oileffect.h:
--------------------------------------------------------------------------------
1 | #ifndef OILEFFECT_H
2 | #define OILEFFECT_H
3 |
4 | #include "rastereffect.h"
5 |
6 | #include "Animators/qpointfanimator.h"
7 |
8 | class CORE_EXPORT OilEffect : public RasterEffect {
9 | e_OBJECT
10 | private:
11 | OilEffect();
12 | public:
13 | void prp_readProperty_impl(eReadStream &src);
14 |
15 | QMargins getMargin() const;
16 |
17 | stdsptr getEffectCaller(
18 | const qreal relFrame, const qreal resolution,
19 | const qreal influence, BoxRenderData* const data) const;
20 | private:
21 | qsptr mBrushSize;
22 | qsptr mAccuracy;
23 | qsptr mStrokeLength;
24 | qsptr mMaxStrokes;
25 | qsptr mBristleThickness;
26 | qsptr mBristleDensity;
27 | };
28 |
29 | #endif // OILEFFECT_H
30 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eBrightnessContrast.frag:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #version 330 core
27 | layout(location = 0) out vec4 fragColor;
28 |
29 | in vec2 texCoord;
30 |
31 | uniform sampler2D texture;
32 | uniform float brightness;
33 | uniform float contrast;
34 |
35 | void main(void) {
36 | vec4 color = texture2D(texture, texCoord);
37 | fragColor = vec4((color.rgb - 0.5*color.a) * (contrast + 1) + color.a*(0.5 + brightness), color.a);
38 | }
39 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eBrightnessContrast.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eColorize.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eColorize2.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eMultiplyRed.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eWipe.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eWipeLeft.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/examples/shaderEffects/eWipeRight.gre:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Script and files
2 |
3 | Various scripts and files used to build and maintain Friction in some way.
4 |
--------------------------------------------------------------------------------
/src/scripts/build_mac_ci.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 |
21 | set -e -x
22 |
23 | CWD=`pwd`
24 | CPU=`uname -m`
25 | SDK=1.0.0
26 |
27 | URL=https://github.com/friction2d/friction-sdk/releases/download/v${SDK}
28 | SDK_TAR=friction-sdk-${SDK}-macOS-${CPU}.tar.xz
29 |
30 | if [ ! -d "${CWD}/sdk" ]; then
31 | curl -OL ${URL}/${SDK_TAR}
32 | tar xf ${SDK_TAR}
33 | fi
34 |
35 | git submodule update --init --recursive
36 |
37 | CUSTOM=CI ./src/scripts/build_mac.sh
38 |
--------------------------------------------------------------------------------
/src/scripts/build_mxe_ffmpeg.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x
3 |
4 | CWD=`pwd`
5 | VERSION=4.2.10
6 | BUILD=${CWD}/ffmpeg-friction-${VERSION}-win64
7 | MXE=${CWD}/usr/x86_64-w64-mingw32.static
8 |
9 | if [ ! -f "${CWD}/settings.mk" ]; then
10 | echo "Run script in the MXE folder!"
11 | exit 1
12 | fi
13 |
14 | if [ -d "${BUILD}" ]; then
15 | rm -rf ${BUILD}
16 | fi
17 | mkdir -p ${BUILD}/{bin,include}
18 |
19 | make
20 |
21 | cp -a ${MXE}/include/{libavcodec,libavdevice,libavfilter,libavformat,libavresample,libavutil,libpostproc,libswresample,libswscale} ${BUILD}/include/
22 | cp -a ${MXE}/lib/*.def ${BUILD}/bin/
23 | cp -a ${MXE}/bin/*.{dll,lib} ${BUILD}/bin/
24 |
25 | if [ -d "${CWD}/legal" ]; then
26 | cp -a ${CWD}/legal ${BUILD}/
27 | fi
28 |
29 | zip -9 -r ${BUILD}.zip ${BUILD}
30 |
--------------------------------------------------------------------------------
/src/scripts/build_qscintilla.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM ### BUILD QSCINTILLA FOR FRICTION
4 | REM # Copyright (c) Ole-André Rodlie and contributors
5 | REM # GPLv3+
6 |
7 | set CWD=%cd%
8 | set SRC_DIR=%CWD%\src
9 | set QT_DIR=%SRC_DIR%\qt
10 | set QSCINTILLA_DIR=%SRC_DIR%\qscintilla
11 |
12 | set PATH=%ProgramFiles%\CMake\bin;%QT_DIR%\bin;%PATH%
13 |
14 | cd "%QSCINTILLA_DIR%\src"
15 | %QT_DIR%\bin\qmake.exe CONFIG+=release
16 | nmake
17 |
--------------------------------------------------------------------------------
/src/scripts/build_qt5.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM ### BUILD QT 5.15 FOR FRICTION
4 | REM # Copyright (c) Ole-André Rodlie and contributors
5 | REM # GPLv3+
6 |
7 | set CWD=%cd%
8 | set SRC_DIR=%CWD%\src
9 | set QT_DIR=%SRC_DIR%\qt
10 | set QT_V=5.15.16
11 |
12 | set PATH=C:\Python;%ProgramFiles%\CMake\bin;%PATH%
13 |
14 | cd "%SRC_DIR%\qt-everywhere-src-%QT_V%"
15 | nmake
16 | nmake
17 | nmake install
18 |
--------------------------------------------------------------------------------
/src/scripts/easing/README.md:
--------------------------------------------------------------------------------
1 | ## Easing Equations v1.5
2 |
3 | May 1, 2003
4 |
5 | (c) 2003 Robert Penner, all rights reserved.
6 |
7 | This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html.
8 |
9 | These tweening functions provide different flavors of
10 | math-based motion under a consistent API.
11 |
12 | ### Types of easing
13 |
14 | * Linear
15 | * Quadratic
16 | * Cubic
17 | * Quartic
18 | * Quintic
19 | * Sinusoidal
20 | * Exponential
21 | * Circular
22 | * Elastic
23 | * Back
24 | * Bounce
25 |
26 | ### Changes
27 |
28 | * 1.5 - added bounce easing
29 | * 1.4 - added elastic and back easing
30 | * 1.3 - tweaked the exponential easing functions to make endpoints exact
31 | * 1.2 - inline optimizations (changing t and multiplying in one step)--thanks to Tatsuo Kato for the idea
32 |
33 | Discussed in Chapter 7 of
34 | Robert Penner's Programming Macromedia Flash MX
35 | (including graphs of the easing equations)
36 |
37 | http://www.robertpenner.com/profmx
38 | http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20
39 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/README.md:
--------------------------------------------------------------------------------
1 | # Do not edit files in this folder!
2 |
3 | Edit the files in `src` and run the `build.sh` script.
4 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInBack.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // back easing in - backtracking slightly, then reversing direction and moving to target
3 | Math.easeInBack = function (t, b, c, d, s) {
4 | if (s == undefined) s = 1.70158;
5 | return c*(t/=d)*t*((s+1)*t - s) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInBack(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInCirc.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // circular easing in - accelerating from zero velocity
3 | Math.easeInCirc = function (t, b, c, d) {
4 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInCirc(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInCubic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // cubic easing in - accelerating from zero velocity
3 | Math.easeInCubic = function (t, b, c, d) {
4 | return c*(t/=d)*t*t + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInCubic(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInElastic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | Math.easeInElastic = function (t, b, c, d) {
3 | var s=1.70158;var p=0;var a=c;
4 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
5 | if (a < Math.abs(c)) { a=c; var s=p/4; }
6 | else var s = p/(2*Math.PI) * Math.asin (c/a);
7 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
8 | };
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | current = $frame;
11 | /*_FRICTION_EXPRESSION_PRESET_*/
12 | frame = current;
13 | startVal = __START_VALUE__;
14 | endVal = __END_VALUE__;
15 | startFrame = __START_FRAME__;
16 | endFrame = __END_FRAME__;
17 | duration = endFrame - startFrame;
18 | endVal = endVal - startVal;
19 | if (frame < startFrame) { frame = startFrame; }
20 | else if (frame > endFrame) { frame = endFrame; }
21 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
22 | if (duration <= 0) { duration = 1; }
23 | if (frame < 0) { frame = 0; }
24 | return Math.easeInElastic(frame, startVal, endVal, duration);
25 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInExpo.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // exponential easing in - accelerating from zero velocity
3 | Math.easeInExpo = function (t, b, c, d) {
4 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInExpo(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutBack.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // back easing in/out - backtracking slightly, then reversing direction and moving to target,
3 | // then overshooting target, reversing, and finally coming back to target
4 | Math.easeInOutBack = function (t, b, c, d, s) {
5 | if (s == undefined) s = 1.70158;
6 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
7 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
8 | };
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | current = $frame;
11 | /*_FRICTION_EXPRESSION_PRESET_*/
12 | frame = current;
13 | startVal = __START_VALUE__;
14 | endVal = __END_VALUE__;
15 | startFrame = __START_FRAME__;
16 | endFrame = __END_FRAME__;
17 | duration = endFrame - startFrame;
18 | endVal = endVal - startVal;
19 | if (frame < startFrame) { frame = startFrame; }
20 | else if (frame > endFrame) { frame = endFrame; }
21 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
22 | if (duration <= 0) { duration = 1; }
23 | if (frame < 0) { frame = 0; }
24 | return Math.easeInOutBack(frame, startVal, endVal, duration);
25 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutCirc.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // circular easing in/out - acceleration until halfway, then deceleration
3 | Math.easeInOutCirc = function (t, b, c, d) {
4 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
5 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInOutCirc(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutCubic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // cubic easing in/out - acceleration until halfway, then deceleration
3 | Math.easeInOutCubic = function (t, b, c, d) {
4 | if ((t/=d/2) < 1) return c/2*t*t*t + b;
5 | return c/2*((t-=2)*t*t + 2) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInOutCubic(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutElastic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | Math.easeInOutElastic = function (t, b, c, d) {
3 | var s=1.70158;var p=0;var a=c;
4 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
5 | if (a < Math.abs(c)) { a=c; var s=p/4; }
6 | else var s = p/(2*Math.PI) * Math.asin (c/a);
7 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
8 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
9 | };
10 | /*_FRICTION_EXPRESSION_PRESET_*/
11 | current = $frame;
12 | /*_FRICTION_EXPRESSION_PRESET_*/
13 | frame = current;
14 | startVal = __START_VALUE__;
15 | endVal = __END_VALUE__;
16 | startFrame = __START_FRAME__;
17 | endFrame = __END_FRAME__;
18 | duration = endFrame - startFrame;
19 | endVal = endVal - startVal;
20 | if (frame < startFrame) { frame = startFrame; }
21 | else if (frame > endFrame) { frame = endFrame; }
22 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
23 | if (duration <= 0) { duration = 1; }
24 | if (frame < 0) { frame = 0; }
25 | return Math.easeInOutElastic(frame, startVal, endVal, duration);
26 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutExpo.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // exponential easing in/out - accelerating until halfway, then decelerating
3 | Math.easeInOutExpo = function (t, b, c, d) {
4 | if (t==0) return b;
5 | if (t==d) return b+c;
6 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
7 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
8 | };
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | current = $frame;
11 | /*_FRICTION_EXPRESSION_PRESET_*/
12 | frame = current;
13 | startVal = __START_VALUE__;
14 | endVal = __END_VALUE__;
15 | startFrame = __START_FRAME__;
16 | endFrame = __END_FRAME__;
17 | duration = endFrame - startFrame;
18 | endVal = endVal - startVal;
19 | if (frame < startFrame) { frame = startFrame; }
20 | else if (frame > endFrame) { frame = endFrame; }
21 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
22 | if (duration <= 0) { duration = 1; }
23 | if (frame < 0) { frame = 0; }
24 | return Math.easeInOutExpo(frame, startVal, endVal, duration);
25 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutQuad.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quadratic easing in/out - acceleration until halfway, then deceleration
3 | Math.easeInOutQuad = function (t, b, c, d) {
4 | if ((t/=d/2) < 1) return c/2*t*t + b;
5 | return -c/2 * ((--t)*(t-2) - 1) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInOutQuad(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutQuart.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quartic easing in/out - acceleration until halfway, then deceleration
3 | Math.easeInOutQuart = function (t, b, c, d) {
4 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
5 | return -c/2 * ((t-=2)*t*t*t - 2) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInOutQuart(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutQuint.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quintic easing in/out - acceleration until halfway, then deceleration
3 | Math.easeInOutQuint = function (t, b, c, d) {
4 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
5 | return c/2*((t-=2)*t*t*t*t + 2) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeInOutQuint(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInOutSine.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // sinusoidal easing in/out - accelerating until halfway, then decelerating
3 | Math.easeInOutSine = function (t, b, c, d) {
4 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInOutSine(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInQuad.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quadratic easing in - accelerating from zero velocity
3 | Math.easeInQuad = function (t, b, c, d) {
4 | return c*(t/=d)*t + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInQuad(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInQuart.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quartic easing in - accelerating from zero velocity
3 | Math.easeInQuart = function (t, b, c, d) {
4 | return c*(t/=d)*t*t*t + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInQuart(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInQuint.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quintic easing in - accelerating from zero velocity
3 | Math.easeInQuint = function (t, b, c, d) {
4 | return c*(t/=d)*t*t*t*t + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInQuint(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeInSine.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // sinusoidal easing in - accelerating from zero velocity
3 | Math.easeInSine = function (t, b, c, d) {
4 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeInSine(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutBack.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target
3 | Math.easeOutBack = function (t, b, c, d, s) {
4 | if (s == undefined) s = 1.70158;
5 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
6 | };
7 | /*_FRICTION_EXPRESSION_PRESET_*/
8 | current = $frame;
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | frame = current;
11 | startVal = __START_VALUE__;
12 | endVal = __END_VALUE__;
13 | startFrame = __START_FRAME__;
14 | endFrame = __END_FRAME__;
15 | duration = endFrame - startFrame;
16 | endVal = endVal - startVal;
17 | if (frame < startFrame) { frame = startFrame; }
18 | else if (frame > endFrame) { frame = endFrame; }
19 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
20 | if (duration <= 0) { duration = 1; }
21 | if (frame < 0) { frame = 0; }
22 | return Math.easeOutBack(frame, startVal, endVal, duration);
23 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutCirc.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // circular easing out - decelerating to zero velocity
3 | Math.easeOutCirc = function (t, b, c, d) {
4 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutCirc(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutCubic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // cubic easing out - decelerating to zero velocity
3 | Math.easeOutCubic = function (t, b, c, d) {
4 | return c*((t=t/d-1)*t*t + 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutCubic(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutElastic.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | Math.easeOutElastic = function (t, b, c, d) {
3 | var s=1.70158;var p=0;var a=c;
4 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
5 | if (a < Math.abs(c)) { a=c; var s=p/4; }
6 | else var s = p/(2*Math.PI) * Math.asin (c/a);
7 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
8 | };
9 | /*_FRICTION_EXPRESSION_PRESET_*/
10 | current = $frame;
11 | /*_FRICTION_EXPRESSION_PRESET_*/
12 | frame = current;
13 | startVal = __START_VALUE__;
14 | endVal = __END_VALUE__;
15 | startFrame = __START_FRAME__;
16 | endFrame = __END_FRAME__;
17 | duration = endFrame - startFrame;
18 | endVal = endVal - startVal;
19 | if (frame < startFrame) { frame = startFrame; }
20 | else if (frame > endFrame) { frame = endFrame; }
21 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
22 | if (duration <= 0) { duration = 1; }
23 | if (frame < 0) { frame = 0; }
24 | return Math.easeOutElastic(frame, startVal, endVal, duration);
25 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutExpo.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // exponential easing out - decelerating to zero velocity
3 | Math.easeOutExpo = function (t, b, c, d) {
4 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutExpo(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutQuad.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quadratic easing out - decelerating to zero velocity
3 | Math.easeOutQuad = function (t, b, c, d) {
4 | return -c *(t/=d)*(t-2) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutQuad(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutQuart.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quartic easing out - decelerating to zero velocity
3 | Math.easeOutQuart = function (t, b, c, d) {
4 | return -c * ((t=t/d-1)*t*t*t - 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutQuart(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutQuint.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // quintic easing out - decelerating to zero velocity
3 | Math.easeOutQuint = function (t, b, c, d) {
4 | return c*((t=t/d-1)*t*t*t*t + 1) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutQuint(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/presets/easeOutSine.js:
--------------------------------------------------------------------------------
1 | /*_FRICTION_EXPRESSION_PRESET_*/
2 | // sinusoidal easing out - decelerating to zero velocity
3 | Math.easeOutSine = function (t, b, c, d) {
4 | return c * Math.sin(t/d * (Math.PI/2)) + b;
5 | };
6 | /*_FRICTION_EXPRESSION_PRESET_*/
7 | current = $frame;
8 | /*_FRICTION_EXPRESSION_PRESET_*/
9 | frame = current;
10 | startVal = __START_VALUE__;
11 | endVal = __END_VALUE__;
12 | startFrame = __START_FRAME__;
13 | endFrame = __END_FRAME__;
14 | duration = endFrame - startFrame;
15 | endVal = endVal - startVal;
16 | if (frame < startFrame) { frame = startFrame; }
17 | else if (frame > endFrame) { frame = endFrame; }
18 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
19 | if (duration <= 0) { duration = 1; }
20 | if (frame < 0) { frame = 0; }
21 | return Math.easeOutSine(frame, startVal, endVal, duration);
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/bindings.js:
--------------------------------------------------------------------------------
1 | current = $frame;
2 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/common.js:
--------------------------------------------------------------------------------
1 | frame = current;
2 | startVal = __START_VALUE__;
3 | endVal = __END_VALUE__;
4 | startFrame = __START_FRAME__;
5 | endFrame = __END_FRAME__;
6 | duration = endFrame - startFrame;
7 | endVal = endVal - startVal;
8 | if (frame < startFrame) { frame = startFrame; }
9 | else if (frame > endFrame) { frame = endFrame; }
10 | if (frame >= startFrame && frame <= endFrame) { frame = frame - startFrame; }
11 | if (duration <= 0) { duration = 1; }
12 | if (frame < 0) { frame = 0; }
13 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInBack.js:
--------------------------------------------------------------------------------
1 | // back easing in - backtracking slightly, then reversing direction and moving to target
2 | Math.easeInBack = function (t, b, c, d, s) {
3 | if (s == undefined) s = 1.70158;
4 | return c*(t/=d)*t*((s+1)*t - s) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInBounce.js:
--------------------------------------------------------------------------------
1 | // bounce easing out
2 | Math.easeOutBounce = function (t, b, c, d) {
3 | if ((t/=d) < (1/2.75)) {
4 | return c*(7.5625*t*t) + b;
5 | } else if (t < (2/2.75)) {
6 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
7 | } else if (t < (2.5/2.75)) {
8 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
9 | } else {
10 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
11 | }
12 | };
13 | // bounce easing in
14 | Math.easeInBounce = function (t, b, c, d) {
15 | return c - Math.easeOutBounce (d-t, 0, c, d) + b;
16 | };
17 | // bounce easing in/out
18 | Math.easeInOutBounce = function (t, b, c, d) {
19 | if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b;
20 | return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b;
21 | };
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInCirc.js:
--------------------------------------------------------------------------------
1 | // circular easing in - accelerating from zero velocity
2 | Math.easeInCirc = function (t, b, c, d) {
3 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInCubic.js:
--------------------------------------------------------------------------------
1 | // cubic easing in - accelerating from zero velocity
2 | Math.easeInCubic = function (t, b, c, d) {
3 | return c*(t/=d)*t*t + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInElastic.js:
--------------------------------------------------------------------------------
1 | Math.easeInElastic = function (t, b, c, d) {
2 | var s=1.70158;var p=0;var a=c;
3 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
4 | if (a < Math.abs(c)) { a=c; var s=p/4; }
5 | else var s = p/(2*Math.PI) * Math.asin (c/a);
6 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
7 | };
8 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInExpo.js:
--------------------------------------------------------------------------------
1 | // exponential easing in - accelerating from zero velocity
2 | Math.easeInExpo = function (t, b, c, d) {
3 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutBack.js:
--------------------------------------------------------------------------------
1 | // back easing in/out - backtracking slightly, then reversing direction and moving to target,
2 | // then overshooting target, reversing, and finally coming back to target
3 | Math.easeInOutBack = function (t, b, c, d, s) {
4 | if (s == undefined) s = 1.70158;
5 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
6 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
7 | };
8 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutBounce.js:
--------------------------------------------------------------------------------
1 | // bounce easing out
2 | Math.easeOutBounce = function (t, b, c, d) {
3 | if ((t/=d) < (1/2.75)) {
4 | return c*(7.5625*t*t) + b;
5 | } else if (t < (2/2.75)) {
6 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
7 | } else if (t < (2.5/2.75)) {
8 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
9 | } else {
10 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
11 | }
12 | };
13 | // bounce easing in
14 | Math.easeInBounce = function (t, b, c, d) {
15 | return c - Math.easeOutBounce (d-t, 0, c, d) + b;
16 | };
17 | // bounce easing in/out
18 | Math.easeInOutBounce = function (t, b, c, d) {
19 | if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b;
20 | return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b;
21 | };
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutCirc.js:
--------------------------------------------------------------------------------
1 | // circular easing in/out - acceleration until halfway, then deceleration
2 | Math.easeInOutCirc = function (t, b, c, d) {
3 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
4 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutCubic.js:
--------------------------------------------------------------------------------
1 | // cubic easing in/out - acceleration until halfway, then deceleration
2 | Math.easeInOutCubic = function (t, b, c, d) {
3 | if ((t/=d/2) < 1) return c/2*t*t*t + b;
4 | return c/2*((t-=2)*t*t + 2) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutElastic.js:
--------------------------------------------------------------------------------
1 | Math.easeInOutElastic = function (t, b, c, d) {
2 | var s=1.70158;var p=0;var a=c;
3 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
4 | if (a < Math.abs(c)) { a=c; var s=p/4; }
5 | else var s = p/(2*Math.PI) * Math.asin (c/a);
6 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
7 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
8 | };
9 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutExpo.js:
--------------------------------------------------------------------------------
1 | // exponential easing in/out - accelerating until halfway, then decelerating
2 | Math.easeInOutExpo = function (t, b, c, d) {
3 | if (t==0) return b;
4 | if (t==d) return b+c;
5 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
6 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
7 | };
8 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutQuad.js:
--------------------------------------------------------------------------------
1 | // quadratic easing in/out - acceleration until halfway, then deceleration
2 | Math.easeInOutQuad = function (t, b, c, d) {
3 | if ((t/=d/2) < 1) return c/2*t*t + b;
4 | return -c/2 * ((--t)*(t-2) - 1) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutQuart.js:
--------------------------------------------------------------------------------
1 | // quartic easing in/out - acceleration until halfway, then deceleration
2 | Math.easeInOutQuart = function (t, b, c, d) {
3 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
4 | return -c/2 * ((t-=2)*t*t*t - 2) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutQuint.js:
--------------------------------------------------------------------------------
1 | // quintic easing in/out - acceleration until halfway, then deceleration
2 | Math.easeInOutQuint = function (t, b, c, d) {
3 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
4 | return c/2*((t-=2)*t*t*t*t + 2) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInOutSine.js:
--------------------------------------------------------------------------------
1 | // sinusoidal easing in/out - accelerating until halfway, then decelerating
2 | Math.easeInOutSine = function (t, b, c, d) {
3 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInQuad.js:
--------------------------------------------------------------------------------
1 | // quadratic easing in - accelerating from zero velocity
2 | Math.easeInQuad = function (t, b, c, d) {
3 | return c*(t/=d)*t + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInQuart.js:
--------------------------------------------------------------------------------
1 | // quartic easing in - accelerating from zero velocity
2 | Math.easeInQuart = function (t, b, c, d) {
3 | return c*(t/=d)*t*t*t + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInQuint.js:
--------------------------------------------------------------------------------
1 | // quintic easing in - accelerating from zero velocity
2 | Math.easeInQuint = function (t, b, c, d) {
3 | return c*(t/=d)*t*t*t*t + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeInSine.js:
--------------------------------------------------------------------------------
1 | // sinusoidal easing in - accelerating from zero velocity
2 | Math.easeInSine = function (t, b, c, d) {
3 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutBack.js:
--------------------------------------------------------------------------------
1 | // back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target
2 | Math.easeOutBack = function (t, b, c, d, s) {
3 | if (s == undefined) s = 1.70158;
4 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutBounce.js:
--------------------------------------------------------------------------------
1 | // bounce easing out
2 | Math.easeOutBounce = function (t, b, c, d) {
3 | if ((t/=d) < (1/2.75)) {
4 | return c*(7.5625*t*t) + b;
5 | } else if (t < (2/2.75)) {
6 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
7 | } else if (t < (2.5/2.75)) {
8 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
9 | } else {
10 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
11 | }
12 | };
13 | // bounce easing in
14 | Math.easeInBounce = function (t, b, c, d) {
15 | return c - Math.easeOutBounce (d-t, 0, c, d) + b;
16 | };
17 | // bounce easing in/out
18 | Math.easeInOutBounce = function (t, b, c, d) {
19 | if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b;
20 | return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b;
21 | };
22 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutCirc.js:
--------------------------------------------------------------------------------
1 | // circular easing out - decelerating to zero velocity
2 | Math.easeOutCirc = function (t, b, c, d) {
3 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutCubic.js:
--------------------------------------------------------------------------------
1 | // cubic easing out - decelerating to zero velocity
2 | Math.easeOutCubic = function (t, b, c, d) {
3 | return c*((t=t/d-1)*t*t + 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutElastic.js:
--------------------------------------------------------------------------------
1 | Math.easeOutElastic = function (t, b, c, d) {
2 | var s=1.70158;var p=0;var a=c;
3 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
4 | if (a < Math.abs(c)) { a=c; var s=p/4; }
5 | else var s = p/(2*Math.PI) * Math.asin (c/a);
6 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
7 | };
8 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutExpo.js:
--------------------------------------------------------------------------------
1 | // exponential easing out - decelerating to zero velocity
2 | Math.easeOutExpo = function (t, b, c, d) {
3 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutQuad.js:
--------------------------------------------------------------------------------
1 | // quadratic easing out - decelerating to zero velocity
2 | Math.easeOutQuad = function (t, b, c, d) {
3 | return -c *(t/=d)*(t-2) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutQuart.js:
--------------------------------------------------------------------------------
1 | // quartic easing out - decelerating to zero velocity
2 | Math.easeOutQuart = function (t, b, c, d) {
3 | return -c * ((t=t/d-1)*t*t*t - 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutQuint.js:
--------------------------------------------------------------------------------
1 | // quintic easing out - decelerating to zero velocity
2 | Math.easeOutQuint = function (t, b, c, d) {
3 | return c*((t=t/d-1)*t*t*t*t + 1) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/easing/src/easeOutSine.js:
--------------------------------------------------------------------------------
1 | // sinusoidal easing out - decelerating to zero velocity
2 | Math.easeOutSine = function (t, b, c, d) {
3 | return c * Math.sin(t/d * (Math.PI/2)) + b;
4 | };
5 |
--------------------------------------------------------------------------------
/src/scripts/flatpak/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | flatpak-builder --user --install builddir --install-deps-from=flathub graphics.friction.Friction.json --force-clean
4 |
5 |
--------------------------------------------------------------------------------
/src/scripts/flatpak/flathub.json:
--------------------------------------------------------------------------------
1 | {
2 | "only-arches": ["x86_64"]
3 | }
4 |
--------------------------------------------------------------------------------
/src/scripts/flatpak/package.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | rm -f Friction.flatpak || true
4 | flatpak-builder builddir graphics.friction.Friction.json --force-clean
5 | flatpak build-export export builddir
6 | flatpak build-bundle export Friction.flatpak graphics.friction.Friction
7 |
--------------------------------------------------------------------------------
/src/scripts/flatpak/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | flatpak run -v graphics.friction.Friction
4 |
--------------------------------------------------------------------------------
/src/scripts/git-backup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x
3 |
4 | CWD=`pwd`
5 | DIR=${CWD}/backup
6 | DATE=`date +%Y%m%d%H%M`
7 | URL=https://github.com/friction2d
8 | BACKUP_DIR=${DIR}/friction-git-backup-${DATE}
9 | REPOS="
10 | friction-icon-theme
11 | friction
12 | skia
13 | friction2d.github.io
14 | friction-shader-plugins
15 | friction-sdk
16 | mxe
17 | friction-svgo
18 | friction-unit-tests
19 | gperftools
20 | friction-examples
21 | sfntly
22 | "
23 |
24 | mkdir -p ${BACKUP_DIR}
25 | cd ${BACKUP_DIR}
26 | for repo in ${REPOS}; do
27 | git clone --mirror ${URL}/${repo}.git
28 | done
29 |
--------------------------------------------------------------------------------
/src/scripts/macos_fix_dylib.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 |
21 | #set -e -x
22 |
23 | BASEPATH=`pwd`
24 |
25 | for lib in *.dylib; do
26 | echo "Check (and fix) rpath for ${lib} ..."
27 | DY=`otool -L ${lib} | grep ${BASEPATH}`
28 | for dylib in $DY; do
29 | if [ -f "${dylib}" ]; then
30 | BASE=`basename ${dylib}`
31 | if [ "${BASE}" = "${lib}" ]; then
32 | install_name_tool -id @rpath/${BASE} ${lib}
33 | else
34 | install_name_tool -change ${dylib} @rpath/${BASE} ${lib}
35 | fi
36 | fi
37 | done
38 | done
39 |
--------------------------------------------------------------------------------
/src/scripts/make_ico.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 |
21 | set -e -x
22 |
23 | PNG=`pwd`/src/app/icons/friction.png
24 | ICO=`pwd`/src/app/icons/friction.ico
25 | convert -background transparent ${PNG} -define icon:auto-resize="256,128,96,64,48,32,16" ${ICO}
26 |
27 |
--------------------------------------------------------------------------------
/src/scripts/push_docker.sh:
--------------------------------------------------------------------------------
1 | docker build -t frictiongraphics/friction-vfxplatform-sdk . -f Dockerfile.vfxplatform
2 | docker push frictiongraphics/friction-vfxplatform-sdk
3 |
4 |
--------------------------------------------------------------------------------
/src/scripts/sign_checksums.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | for file in *; do echo "SHA256 Checksum: "; sha256sum $file; echo ""; done | gpg --sign --clear-sign
3 |
--------------------------------------------------------------------------------
/src/scripts/vfxplatform.spec:
--------------------------------------------------------------------------------
1 | Name: friction
2 | Version: __FRICTION_PKG_VERSION__
3 | Release: 1
4 | Summary: Motion graphics and animation
5 | Group: System Environment/Base
6 | License: GPL3
7 | Source0: friction-__FRICTION_VERSION__.tar
8 |
9 | AutoReq: no
10 | %global debug_package %{nil}
11 | %global __provides_exclude_from /opt
12 | %global __os_install_post %{nil}
13 |
14 | %description
15 | Powerful and versatile motion graphics and animation application that allows you to create stunning vector and raster animations for web and video platforms with ease.
16 |
17 | %prep
18 | %setup -n friction-__FRICTION_VERSION__
19 |
20 | %build
21 |
22 | %install
23 |
24 | cp -rfa opt %{buildroot}/
25 | cp -rfa usr %{buildroot}/
26 | rm -rf %{buildroot}/opt/friction/share/doc
27 |
28 | %files
29 | %defattr(-,root,root,-)
30 | /opt/friction
31 | /usr/bin/friction
32 | /usr/share/applications/__APPID__.desktop
33 | /usr/share/metainfo/__APPID__.appdata.xml
34 | /usr/share/mime/packages/__APPID__.xml
35 | /usr/share/icons/hicolor
36 |
37 | %changelog
38 |
39 |
--------------------------------------------------------------------------------
/src/ui/dialogs/dialog.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | #include "dialog.h"
25 |
26 | using namespace Friction::Ui;
27 |
28 | Dialog::Dialog(QWidget *parent)
29 | : QDialog(parent)
30 | {
31 | #ifdef Q_OS_MAC
32 | setWindowFlag(Qt::Tool);
33 | #endif
34 | }
35 |
--------------------------------------------------------------------------------
/src/ui/dialogs/dialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | #ifndef DIALOG_H
25 | #define DIALOG_H
26 |
27 | #include "ui_global.h"
28 |
29 | #include
30 |
31 | namespace Friction
32 | {
33 | namespace Ui
34 | {
35 | class UI_EXPORT Dialog : public QDialog
36 | {
37 | Q_OBJECT
38 | public:
39 | explicit Dialog(QWidget *parent = nullptr);
40 | };
41 | }
42 | }
43 |
44 | #endif // DIALOG_H
45 |
--------------------------------------------------------------------------------
/src/ui/misc/noshortcutaction.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #include "noshortcutaction.h"
27 | #include
28 |
29 | bool NoShortcutAction::event(QEvent *e) {
30 | if(e->type() == QEvent::Shortcut) return true;
31 | else return QAction::event(e);
32 | }
33 |
--------------------------------------------------------------------------------
/src/ui/ui_global.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef UI_GLOBAL_H
27 | #define UI_GLOBAL_H
28 |
29 | #include
30 |
31 | #if defined(UI_LIBRARY)
32 | # define UI_EXPORT Q_DECL_EXPORT
33 | #else
34 | # define UI_EXPORT Q_DECL_IMPORT
35 | #endif
36 |
37 | #endif // UI_GLOBAL_H
38 |
--------------------------------------------------------------------------------
/src/ui/widgets/aboutwidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | #ifndef ABOUTWIDGET_H
25 | #define ABOUTWIDGET_H
26 |
27 | #include "ui_global.h"
28 |
29 | #include
30 |
31 | class UI_EXPORT AboutWidget : public QWidget
32 | {
33 | Q_OBJECT
34 | public:
35 | struct AboutWidgetTab {
36 | QString title;
37 | QString path;
38 | bool html = true;
39 | };
40 | explicit AboutWidget(QWidget *parent = nullptr);
41 |
42 | };
43 |
44 | #endif // ABOUTWIDGET_H
45 |
--------------------------------------------------------------------------------
/src/ui/widgets/editablecombobox.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # Friction - https://friction.graphics
4 | #
5 | # Copyright (c) Ole-André Rodlie and contributors
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation, either version 3 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program. If not, see .
19 | #
20 | # See 'README.md' for more information.
21 | #
22 | */
23 |
24 | // Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner
25 |
26 | #ifndef EDITABLECOMBOBOX_H
27 | #define EDITABLECOMBOBOX_H
28 |
29 | #include "ui_global.h"
30 |
31 | #include
32 |
33 | class UI_EXPORT EditableComboBox : public QComboBox
34 | {
35 | public:
36 | EditableComboBox(QWidget* const parent,
37 | bool clickFocus = false);
38 | };
39 |
40 | #endif // EDITABLECOMBOBOX_H
41 |
--------------------------------------------------------------------------------