createjs externs
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2cd8f293 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2cd8f293 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2cd8f293 Branch: refs/heads/develop Commit: 2cd8f293e99736ab5a3894d59b1c945d98ebb33d Parents: 0d1497f Author: Alex Harui <[email protected]> Authored: Fri Dec 4 14:53:44 2015 -0800 Committer: Alex Harui <[email protected]> Committed: Fri Dec 4 14:53:44 2015 -0800 ---------------------------------------------------------------------- externs/createjs/build.xml | 201 ++++++++++++++++++++++ externs/createjs/compile-config.xml | 102 +++++++++++ externs/createjs/createjs-compile-config.xml | 122 +++++++++++++ externs/createjs/missing.js | 44 +++++ 4 files changed, 469 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2cd8f293/externs/createjs/build.xml ---------------------------------------------------------------------- diff --git a/externs/createjs/build.xml b/externs/createjs/build.xml new file mode 100644 index 0000000..f840cc8 --- /dev/null +++ b/externs/createjs/build.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" ?> + +<!-- + + 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. + +--> + +<project name="createjs" default="main" basedir="."> + + <property name="createjs.version" value="0.8.0" /> + + <target name="main" depends="download, preprocess" /> + + <target name="download" > + <mkdir dir="${basedir}/in" /> + <get src="https://github.com/CreateJS/EaselJS/archive/${createjs.version}.zip" + dest="${basedir}/in/${createjs.version}.zip" /> + </target> + + <!-- createjs files have certain patterns that fool our compilers. + we process each file to make it look a bit more like what we expect --> + <target name="preprocess" depends="expandzip"> + <antcall target="preprocessfile" > + <param name="file" value="createjs/events/Event.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="createjs/events/EventDispatcher.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="createjs/utils/extend.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="createjs/utils/indexof.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="createjs/utils/promote.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="createjs/utils/Ticker.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Bitmap.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/BitmapText.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Container.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/DisplayObject.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/DOMElement.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Graphics.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/MovieClip.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Shadow.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Shape.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Sprite.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/SpriteContainer.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/SpriteSheet.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/SpriteStage.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Stage.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/display/Text.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/events/MouseEvent.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/AlphaMapFilter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/AlphaMaskFilter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/BlurFilter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/ColorFilter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/ColorMatrix.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/ColorMatrixFilter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/filters/Filter.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/geom/DisplayProps.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/geom/Matrix2D.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/geom/Point.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/geom/Rectangle.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/ui/ButtonHelper.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/ui/Touch.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/utils/SpriteSheetBuilder.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/utils/SpriteSheetUtils.js" /> + </antcall> + <antcall target="preprocessfile" > + <param name="file" value="easeljs/utils/UID.js" /> + </antcall> + <antcall target="preprocessGraphics" /> + <antcall target="preprocessMouseEvent" /> + <antcall target="preprocessMovieClip" /> + </target> + + <target name="expandzip"> + <mkdir dir="${basedir}/externs" /> + <unzip src="${basedir}/in/${createjs.version}.zip" + dest="${basedir}/externs"> + <patternset> + <include name="EaselJS-${createjs.version}/src/**" /> + </patternset> + <cutdirsmapper dirs="2"/> + </unzip> + </target> + + <target name="preprocessfile" > + <basename property="file.base" file="${file}" suffix=".js"/> + <echo>file.base is ${file.base}</echo> + <replace file="${basedir}/externs/${file}" token="this.createjs = this.createjs||{};" value="" /> + <replace file="${basedir}/externs/${file}" token="this.createjs = this.createjs || {};" value="" /> + <replace file="${basedir}/externs/${file}" token="(function() {" value="" /> + <replace file="${basedir}/externs/${file}" token="(function () {" value="" /> + <replace file="${basedir}/externs/${file}" token="setTimeout " value="setTimeout(function() {" /> + <replace file="${basedir}/externs/${file}" token="}());" value="" /> + <replace file="${basedir}/externs/${file}" token="})();" value="" /> + <replace file="${basedir}/externs/${file}" token="@param [time] {Number}" value="@param {Number} time" /> + <replace file="${basedir}/externs/${file}" token="function ${file.base}(" value="createjs.${file.base} = function(" /> + <replaceregexp file="${basedir}/externs/${file}" match="\s"use strict";" replace="" /> + <replaceregexp file="${basedir}/externs/${file}" match="\screatejs.${file.base} = .*;" replace="" /> + <replaceregexp file="${basedir}/externs/${file}" match="var p = createjs.extend.*;" replace="" /> + <replaceregexp file="${basedir}/externs/${file}" match="var p = ${file.base}.prototype;" replace="" /> + <replaceregexp file="${basedir}/externs/${file}" match="var s = ${file.base};" replace="" /> + <replaceregexp file="${basedir}/externs/${file}" match="\sp\." replace="${file.base}.prototype." flags="g"/> + <replaceregexp file="${basedir}/externs/${file}" match="\ss\." replace="${file.base}." flags="g"/> + <replaceregexp file="${basedir}/externs/${file}" match="${file.base}\." replace="createjs.${file.base}." flags="g"/> + <replaceregexp file="${basedir}/externs/${file}" match="\stry [{]\s*Object.defineProperties[(]p, [{]\s*(.*):\s(.*)[}] catch [(]e[)] [{][}]" + replace="createjs.${file.base}.prototype.\1;" flags="gs" /> + <replaceregexp file="${basedir}/externs/${file}" match="\s@extends\s(.*)" replace=" @extends createjs.\1" /> + </target> + + <target name="preprocessGraphics" > + <replaceregexp file="${basedir}/externs/easeljs/display/Graphics.js" match="\s[(]G\..*function[(]ctx[)] [{].*[}];" replace="" flags="gs" /> + </target> + <target name="preprocessMouseEvent" > + <replaceregexp file="${basedir}/externs/easeljs/events/MouseEvent.js" match="createjs.MouseEvent.prototype.localX:.*isTouch;" replace="" flags="gs" /> + </target> + <target name="preprocessMovieClip" > + <replaceregexp file="${basedir}/externs/easeljs/display/MovieClip.js" match="createjs.MovieClip.prototype.labels:.*currentLabel;" replace="" flags="gs" /> + </target> +</project> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2cd8f293/externs/createjs/compile-config.xml ---------------------------------------------------------------------- diff --git a/externs/createjs/compile-config.xml b/externs/createjs/compile-config.xml new file mode 100644 index 0000000..e4b55f6 --- /dev/null +++ b/externs/createjs/compile-config.xml @@ -0,0 +1,102 @@ +<!-- + + 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. + +--> +<flex-config> + + <compiler> + <accessible>true</accessible> + + <!-- + <external-library-path> + <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element> + <path-element>../../libs/framework.swc</path-element> + <path-element>../../libs/mx/mx.swc</path-element> + <path-element>../../libs/osmf.swc</path-element> + <path-element>../../libs/textLayout.swc</path-element> + </external-library-path> + + <keep-as3-metadata> + <name>SkinPart</name> + </keep-as3-metadata> + + <mxml> + <minimum-supported-version>4.0.0</minimum-supported-version> + </mxml> + + <locale/> + + <library-path/> + + <namespaces> + <namespace> + <uri>library://ns.adobe.com/flex/spark</uri> + <manifest>manifest.xml</manifest> + </namespace> + </namespaces> + --> + + <external-library-path> + <path-element>../js/out/bin/js.swc</path-element> + </external-library-path> + + <source-path> + <path-element>out/as/classes</path-element> + <!-- + <path-element>out/as/constants</path-element> + <path-element>out/as/functions</path-element> + <path-element>out/as/interfaces</path-element> + <path-element>out/as/typedefs</path-element> + --> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <include-sources> + <path-element>out/as/classes</path-element> + <!-- + <path-element>out/as/constants</path-element> + <path-element>out/as/functions</path-element> + <path-element>out/as/interfaces</path-element> + <path-element>out/as/typedefs</path-element> + --> + </include-sources> + + <!-- + <include-file> + <name>defaults.css</name> + <path>defaults.css</path> + </include-file> + <include-file> + <name>assets/ErrorIndicator.png</name> + <path>assets/ErrorIndicator.png</path> + </include-file> + <include-file> + <name>assets/RequiredIndicator.png</name> + <path>assets/RequiredIndicator.png</path> + </include-file> + + <include-namespaces> + <uri>library://ns.adobe.com/flex/spark</uri> + </include-namespaces> + + <resource-bundle-list>bundles.properties</resource-bundle-list> + + <target-player>${playerglobal.version}</target-player> + --> +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2cd8f293/externs/createjs/createjs-compile-config.xml ---------------------------------------------------------------------- diff --git a/externs/createjs/createjs-compile-config.xml b/externs/createjs/createjs-compile-config.xml new file mode 100644 index 0000000..f98333c --- /dev/null +++ b/externs/createjs/createjs-compile-config.xml @@ -0,0 +1,122 @@ +<!-- + + 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</name></exclude> 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. + +--> +<flex-config> + + <compiler> + <accessible>true</accessible> + + <!-- + <external-library-path> + <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element> + <path-element>../../libs/framework.swc</path-element> + <path-element>../../libs/mx/mx.swc</path-element> + <path-element>../../libs/osmf.swc</path-element> + <path-element>../../libs/textLayout.swc</path-element> + </external-library-path> + + <keep-as3-metadata> + <name>SkinPart</name> + </keep-as3-metadata> + + <mxml> + <minimum-supported-version>4.0.0</minimum-supported-version> + </mxml> + --> + + <locale/> + + <library-path/> + + <!-- + <namespaces> + <namespace> + <uri>library://ns.adobe.com/flex/spark</uri> + <manifest>manifest.xml</manifest> + </namespace> + </namespaces> + --> + + <source-path> + <path-element>src</path-element> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <external> + <path-element>missing.js</path-element> + <path-element>externs/createjs/events/Event.js</path-element> + <path-element>externs/createjs/events/EventDispatcher.js</path-element> + <path-element>externs/createjs/utils/extend.js</path-element> + <path-element>externs/createjs/utils/indexof.js</path-element> + <path-element>externs/createjs/utils/promote.js</path-element> + <path-element>externs/createjs/utils/Ticker.js</path-element> + <path-element>externs/easeljs/display/Bitmap.js</path-element> + <path-element>externs/easeljs/display/BitmapText.js</path-element> + <path-element>externs/easeljs/display/Container.js</path-element> + <path-element>externs/easeljs/display/DisplayObject.js</path-element> + <path-element>externs/easeljs/display/DOMElement.js</path-element> + <path-element>externs/easeljs/display/Graphics.js</path-element> + <path-element>externs/easeljs/display/MovieClip.js</path-element> + <path-element>externs/easeljs/display/Shadow.js</path-element> + <path-element>externs/easeljs/display/Shape.js</path-element> + <path-element>externs/easeljs/display/Sprite.js</path-element> + <path-element>externs/easeljs/display/SpriteContainer.js</path-element> + <path-element>externs/easeljs/display/SpriteSheet.js</path-element> + <path-element>externs/easeljs/display/SpriteStage.js</path-element> + <path-element>externs/easeljs/display/Stage.js</path-element> + <path-element>externs/easeljs/display/Text.js</path-element> + <path-element>externs/easeljs/events/MouseEvent.js</path-element> + <path-element>externs/easeljs/filters/AlphaMapFilter.js</path-element> + <path-element>externs/easeljs/filters/AlphaMaskFilter.js</path-element> + <path-element>externs/easeljs/filters/BlurFilter.js</path-element> + <path-element>externs/easeljs/filters/ColorFilter.js</path-element> + <path-element>externs/easeljs/filters/ColorMatrix.js</path-element> + <path-element>externs/easeljs/filters/ColorMatrixFilter.js</path-element> + <path-element>externs/easeljs/filters/Filter.js</path-element> + <path-element>externs/easeljs/geom/DisplayProps.js</path-element> + <path-element>externs/easeljs/geom/Matrix2D.js</path-element> + <path-element>externs/easeljs/geom/Point.js</path-element> + <path-element>externs/easeljs/geom/Rectangle.js</path-element> + <path-element>externs/easeljs/ui/ButtonHelper.js</path-element> + <path-element>externs/easeljs/ui/Touch.js</path-element> + <path-element>externs/easeljs/utils/SpriteSheetBuilder.js</path-element> + <path-element>externs/easeljs/utils/SpriteSheetUtils.js</path-element> + <path-element>externs/easeljs/utils/UID.js</path-element> + </external> + + <as-root>out/as</as-root> + + <class-exclude> + <class>MovieClipPlugin</class> + </class-exclude> + + <!-- + <field-exclude> + <class>Window</class> + <field>focus</field> + </field-exclude> + + <exclude> + <class>Array</class> + <name>toSource</name> + </exclude> + --> + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2cd8f293/externs/createjs/missing.js ---------------------------------------------------------------------- diff --git a/externs/createjs/missing.js b/externs/createjs/missing.js new file mode 100644 index 0000000..5b72e6e --- /dev/null +++ b/externs/createjs/missing.js @@ -0,0 +1,44 @@ +/* + * + * 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. + * + */ + + + +/** + * @type {number} + */ +createjs.DisplayObject.prototype.x; + + +/** + * @type {number} + */ +createjs.DisplayObject.prototype.y; + + +/** + * @type {number} + */ +createjs.DisplayObject.prototype.width; + + +/** + * @type {number} + */ +createjs.DisplayObject.prototype.height; +
