2019-08-24 15:07:28 +00:00
|
|
|
<!-- enve - 2D animations software -->
|
2020-01-02 19:46:10 +00:00
|
|
|
<!-- Copyright (C) 2016-2020 Maurycy Liebner -->
|
2019-08-24 15:07:28 +00:00
|
|
|
|
|
|
|
<!-- This program is free software: you can redistribute it and/or modify -->
|
|
|
|
<!-- it under the terms of the GNU General Public License as published by -->
|
|
|
|
<!-- the Free Software Foundation, either version 3 of the License, or -->
|
|
|
|
<!-- (at your option) any later version. -->
|
|
|
|
|
|
|
|
<!-- This program is distributed in the hope that it will be useful, -->
|
|
|
|
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
|
|
|
|
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
|
|
|
|
<!-- GNU General Public License for more details. -->
|
|
|
|
|
|
|
|
<!-- You should have received a copy of the GNU General Public License -->
|
|
|
|
<!-- along with this program. If not, see <http://www.gnu.org/licenses/>. -->
|
|
|
|
|
2020-05-18 19:21:43 +00:00
|
|
|
<ShaderEffect name="Explode" menuPath="Examples">
|
2020-03-02 22:43:08 +00:00
|
|
|
<Properties>
|
2020-05-18 20:09:10 +00:00
|
|
|
<Property name="displacement" type="vec2" min="0" max="999" step="1" ini="10" resolutionScaled="true" influenceScaled="true"/>
|
2020-03-02 22:43:08 +00:00
|
|
|
<Property name="steps" type="int" min="1" max="99" step="1" ini="1" glValue="true"/>
|
|
|
|
<Property name="directions" type="int" min="1" max="99" step="1" ini="6" glValue="true"/>
|
|
|
|
</Properties>
|
2019-08-12 10:25:38 +00:00
|
|
|
|
2020-03-02 22:43:08 +00:00
|
|
|
<Script>
|
|
|
|
<Calculate>
|
|
|
|
var hDispl = displacement[0];
|
|
|
|
var vDispl = displacement[1];
|
|
|
|
var widthWithMargin = 2*hDispl + _eRect[2];
|
|
|
|
var heightWithMargin = 2*vDispl + _eRect[3];
|
|
|
|
extern displScaled = [hDispl/widthWithMargin, vDispl/heightWithMargin];
|
|
|
|
</Calculate>
|
|
|
|
</Script>
|
|
|
|
|
|
|
|
<glValues>
|
|
|
|
<glValue name="displacementXY" type="vec2" value="displScaled"/>
|
|
|
|
</glValues>
|
2019-08-12 10:25:38 +00:00
|
|
|
|
2020-02-25 19:31:45 +00:00
|
|
|
<Margin value="displacement"/>
|
2019-08-31 19:42:36 +00:00
|
|
|
</ShaderEffect>
|