incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1347079 - in /incubator/flex/trunk: README build.xml frameworks/projects/framework/build.xml frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk frameworks/projects/spark/build.xml
Date Wed, 06 Jun 2012 19:52:14 GMT
Author: aharui
Date: Wed Jun  6 19:52:14 2012
New Revision: 1347079

URL: http://svn.apache.org/viewvc?rev=1347079&view=rev
Log:
Make PixelBender a prerequisite.  Requires new PIXELBENDER_HOME environment variable.  More
details in the README

Added:
    incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk
  (with props)
Modified:
    incubator/flex/trunk/README
    incubator/flex/trunk/build.xml
    incubator/flex/trunk/frameworks/projects/framework/build.xml
    incubator/flex/trunk/frameworks/projects/spark/build.xml

Modified: incubator/flex/trunk/README
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/README?rev=1347079&r1=1347078&r2=1347079&view=diff
==============================================================================
--- incubator/flex/trunk/README (original)
+++ incubator/flex/trunk/README Wed Jun  6 19:52:14 2012
@@ -92,6 +92,8 @@ Install Prerequisites
     
     Adobe Flash Player (*3)                     PLAYERGLOBAL_HOME
     
+    Adobe Pixel Bender Toolkit (*4)             PIXELBENDER_HOME
+    
     ==================================================================================
         
     *1) The Adobe AIR integration kit for Windows can be downloaded from:
@@ -123,6 +125,15 @@ Install Prerequisites
 		version subdirectory). The target-version option controls which PLAYERGLOBAL_HOME
 		subdirectory is used.
 
+    *4) The Adobe Pixel Bender Toolkit for Windows can be downloaded from:
+                http://www.adobe.com/go/pixelbender_toolkit_zip/
+        
+         The Adobe Pixel Bender Toolkit for Mac can be downloaded from:
+            http://www.adobe.com/go/pixelbender_toolkit_dmg/
+        
+        Download the Pixel Bender Toolkit for your platform and install or unzip it.  Set

+	PIXELBENDER_HOME to the absolute path of the AIR SDK directory.
+
 FlashPlayer Configuration
 -------------------------
 

Modified: incubator/flex/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/build.xml?rev=1347079&r1=1347078&r2=1347079&view=diff
==============================================================================
--- incubator/flex/trunk/build.xml (original)
+++ incubator/flex/trunk/build.xml Wed Jun  6 19:52:14 2012
@@ -490,6 +490,7 @@
                 <include name="**"/>
                 <exclude name="**/libs/**"/>
                 <exclude name="**/*.swc"/>
+                <exclude name="**/*.pbj"/>
                 <!--exclude name="test*/**"/-->
                 <exclude name="projects/automation*/**"/>
                 <exclude name="projects/air/**"/>
@@ -520,6 +521,7 @@
             <fileset dir="${basedir}/modules">
                 <include name="**"/>
                 <exclude name="thirdparty/**"/>
+                <exclude name=".metadata/**"/>
                 <exclude name="**/*.jar"/>
                 <exclude name="**/*.vms"/>
                 <exclude name="*/test/**"/>

Modified: incubator/flex/trunk/frameworks/projects/framework/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/framework/build.xml?rev=1347079&r1=1347078&r2=1347079&view=diff
==============================================================================
--- incubator/flex/trunk/frameworks/projects/framework/build.xml (original)
+++ incubator/flex/trunk/frameworks/projects/framework/build.xml Wed Jun  6 19:52:14 2012
@@ -152,7 +152,7 @@
 		<bundler locale="zh_TW"/><!-- Traditional Chinese resources -->
 	</target>
 	
-	<target name="clean" depends="bundles-clean">
+	<target name="clean" depends="bundles-clean, pixelbender-clean">
 		<delete failonerror="false">
 			<fileset dir="${basedir}" >
 				<include name="bundles.properties"/>
@@ -174,7 +174,54 @@
 		</delete>
 	</target>
 	
-	<target name="compile" description="Compiles framework.swc">
+	<target name="pixelbender-clean">
+		<delete failonerror="false">
+			<fileset dir="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses">
+				<include name="**/*.pbj"/>
+			</fileset>
+		</delete>
+	</target>
+
+	<target name="pixelbender-compile">
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Color.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Color.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurn.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurn.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodge.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodge.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Exclusion.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Exclusion.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Hue.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Hue.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Luminosity.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Luminosity.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskFilter.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskFilter.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Saturation.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/Saturation.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbj"
/>
+        </exec>
+	</target>
+
+	<target name="compile" depends="pixelbender-compile" description="Compiles framework.swc">
 		<echo message="Compiling frameworks/libs/framework.swc"/>
 		<!-- Load the <compc> task. We can't do this at the <project> level -->
 		<!-- because targets that run before flexTasks.jar gets built would fail. -->

Added: incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk?rev=1347079&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk
(added)
+++ incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk
Wed Jun  6 19:52:14 2012
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+<languageVersion : 1.0;>
+kernel FxTwist
+<   namespace : "flex";
+    vendor : "Adobe";
+    version : 1;
+    description : "Twisty Effect";
+>
+{ 
+
+    input image4 src0;
+    input image4 from;
+    input image4 to;
+    output pixel4 dst;
+    
+    parameter float progress<
+        minValue: 0.00;
+        maxValue: 1.00;
+        defaultValue: 0.0;
+    >;
+    
+    parameter float width<
+        minValue: 0.0;
+        maxValue: 1024.0;
+        defaultValue: 180.0;
+    >;
+    
+    parameter float height<
+        minValue: 0.00;
+        maxValue: 1024.0;
+        defaultValue: 275.0;
+    >;
+    
+    void
+    evaluatePixel()
+    {
+        
+        // Common initialization
+        float2 outCoord = outCoord();
+        pixel4 color1 = sampleNearest(src0, outCoord);
+
+        const float _height = 2.0;
+        const float scale = 1.0 + _height;
+        float start = progress * scale - _height;
+        float end   = start + _height;
+        
+        
+        float yfrac = outCoord.y / height;
+        float angle = (yfrac - start) / (end - start);
+        float _width = cos(angle * 3.141592653589); 
+        
+        if (yfrac < start) {
+            dst = sampleLinear(to, outCoord());
+        }
+        
+        else if (yfrac > end) {
+            dst = sampleLinear(from, outCoord());
+        }
+        else {
+        if (_width > 0.0) {
+        
+            float xstep  = (65536.0 / _width);
+            float xval   = 0.0;
+            float startx = (width - width * _width) / 2.0;
+            float xcount = startx;
+            
+            float sampleWidth = (width * 65536.0) / (xstep);
+            
+            if (outCoord.x < startx) 
+                dst = float4(0.0,0.0,0.0,0.0);
+            else if (outCoord.x < (startx + sampleWidth)) {
+                float perc = (outCoord.x - startx) / sampleWidth;
+                dst = sampleLinear(to, float2(width * perc, outCoord.y)); 
+            }
+            else
+                dst = float4(0.0,0.0,0.0,0.0);  
+        }
+        
+        else if (_width < 0.0) {
+            float xstep  = (65536.0 / -_width);
+            float xval   = 0.0;
+            float startx = (width + width * _width) / 2.0;
+            float xcount = startx;
+            float sampleWidth = (width * 65536.0) / (xstep);
+            
+            if (outCoord.x < startx) 
+                dst = float4(0.0,0.0,0.0,0.0);
+            else if (outCoord.x < (startx + sampleWidth)) {
+                float perc = (outCoord.x - startx) / sampleWidth;   
+                dst = sampleLinear(from, float2( width * perc, outCoord.y)); 
+            }
+            else
+                dst = float4(0.0,0.0,0.0,0.0); 
+        }
+        
+        }
+
+    }
+}

Propchange: incubator/flex/trunk/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/trunk/frameworks/projects/spark/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/projects/spark/build.xml?rev=1347079&r1=1347078&r2=1347079&view=diff
==============================================================================
--- incubator/flex/trunk/frameworks/projects/spark/build.xml (original)
+++ incubator/flex/trunk/frameworks/projects/spark/build.xml Wed Jun  6 19:52:14 2012
@@ -153,7 +153,7 @@
 		<bundler locale="zh_TW"/><!-- Traditional Chinese resources -->
 	</target>
 		
-	<target name="clean" depends="bundles-clean">
+	<target name="clean" depends="bundles-clean, pixelbender-clean">
 		<delete failonerror="false">
 			<fileset dir="${basedir}" >
 				<include name="bundles.properties"/>
@@ -179,12 +179,50 @@
 		</delete>
 	</target>
 	
+	<target name="pixelbender-clean">
+		<delete failonerror="false">
+			<fileset dir="${FLEX_HOME}/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets">
+				<include name="**/*.pbj"/>
+			</fileset>
+			<fileset dir="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects">
+				<include name="**/*.pbj"/>
+			</fileset>
+		</delete>
+	</target>
+
+	<target name="pixelbender-compile">
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/CrossFade.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/CrossFade.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeDown.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeDown.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeUp.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeUp.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeLeft.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeLeft.pbj"
/>
+        </exec>
+        <exec executable="${env.PIXELBENDER_HOME}/pbutil">
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeRight.pbk"
/>
+            <arg value="${FLEX_HOME}/frameworks/projects/spark/src/spark/effects/WipeRight.pbj"
/>
+        </exec>
+	</target>
+
 	
 	<target name="prepare" description="Copies manifests to project directories so the IDE
can find them">
 		<copy file="${FLEX_HOME}/frameworks/spark-manifest.xml" tofile="${basedir}/manifest.xml"
overwrite="true"/>
 	</target>
 	
-	<target name="compile" depends="prepare" description="Compiles spark.swc">
+	<target name="compile" depends="prepare, pixelbender-compile" description="Compiles spark.swc">
 		<echo file="${FLEX_HOME}/frameworks/version.properties" append="false">build=${build.number}</echo>
 		<echo message="Compiling frameworks/libs/spark.swc"/>
 



Mime
View raw message