├── .codeclimate.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .haxerc ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── build.hxml ├── checkstyle.json ├── extraParams.hxml ├── haxe_libraries ├── actuate.hxml ├── build-tool.hxml ├── chxdoc.hxml ├── formatter.hxml ├── msignal.hxml ├── nape-haxe4.hxml └── perf.js.hxml ├── haxelib.json ├── install.hxml ├── libs ├── dragonBones.js ├── dragonBones.min.js ├── dragonBonesPixi.js ├── dragonBonesPixi.min.js ├── perf.min.js ├── pixi-extras-filters.min.js ├── pixi-spine.js ├── pixi-spine.js.map ├── pixi-tilemap.min.js ├── pixi.js ├── pixi.js.map ├── pixi.map ├── pixi.min.js ├── pixi.min.js.map └── pixi.min.map ├── logo.png ├── package.json ├── samples ├── assets │ ├── alphamask │ │ ├── bkg.jpg │ │ ├── cells.png │ │ └── flowerTop.png │ ├── audio │ │ ├── loop.mp3 │ │ ├── sound1.wav │ │ ├── sound2.wav │ │ ├── sound3.wav │ │ └── sound4.wav │ ├── basics │ │ └── bunny.png │ ├── bunnymark │ │ ├── bunny.png │ │ ├── bunny1.png │ │ ├── bunny2.png │ │ ├── bunny3.png │ │ ├── bunny4.png │ │ ├── bunny5.png │ │ ├── bunnys.png │ │ └── logo.png │ ├── dragonbones │ │ ├── AnimationBaseTest │ │ │ ├── AnimationBaseTest.json │ │ │ ├── texture.json │ │ │ └── texture.png │ │ ├── CoreElement │ │ │ ├── CoreElement.json │ │ │ ├── CoreElement_texture_1.json │ │ │ └── CoreElement_texture_1.png │ │ ├── DragonBoy │ │ │ ├── DragonBoy.json │ │ │ ├── DragonBoy_texture_1.json │ │ │ └── DragonBoy_texture_1.png │ │ ├── Knight │ │ │ ├── Knight.json │ │ │ ├── Knight_texture_1.json │ │ │ └── Knight_texture_1.png │ │ ├── ReplaceSlotDisplay │ │ │ ├── ReplaceSlotDisplay.json │ │ │ ├── texture.json │ │ │ ├── texture.png │ │ │ └── textureReplace.png │ │ └── Ubbie │ │ │ ├── Ubbie.json │ │ │ ├── texture.json │ │ │ └── texture.png │ ├── filters │ │ ├── BGrotate.jpg │ │ ├── LightRotate1.png │ │ ├── LightRotate2.png │ │ ├── SceneRotate.jpg │ │ ├── depth_blur_BG.jpg │ │ ├── depth_blur_dudes.jpg │ │ ├── depth_blur_moby.jpg │ │ └── panda.png │ ├── fonts │ │ ├── desyrel.png │ │ ├── desyrel.ttf │ │ └── desyrel.xml │ ├── graphics │ │ ├── spinObj_01.png │ │ ├── spinObj_02.png │ │ ├── spinObj_03.png │ │ ├── spinObj_04.png │ │ ├── spinObj_05.png │ │ ├── spinObj_06.png │ │ ├── spinObj_07.png │ │ └── spinObj_08.png │ ├── loader │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 19.png │ │ ├── 2.png │ │ ├── 20.png │ │ ├── 21.png │ │ ├── 22.png │ │ ├── 23.png │ │ ├── 24.png │ │ ├── 25.png │ │ ├── 26.png │ │ ├── 27.png │ │ ├── 28.png │ │ ├── 29.png │ │ ├── 3.png │ │ ├── 30.png │ │ ├── 31.png │ │ ├── 32.png │ │ ├── 33.png │ │ ├── 34.png │ │ ├── 35.png │ │ ├── 36.png │ │ ├── 37.png │ │ ├── 38.png │ │ ├── 39.png │ │ ├── 4.png │ │ ├── 40.png │ │ ├── 41.png │ │ ├── 42.png │ │ ├── 43.png │ │ ├── 44.png │ │ ├── 45.png │ │ ├── 46.png │ │ ├── 47.png │ │ ├── 48.png │ │ ├── 49.png │ │ ├── 5.png │ │ ├── 50.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ ├── movieclip │ │ ├── SpriteSheet.json │ │ ├── SpriteSheet.png │ │ └── tp │ │ │ ├── SpriteSheet.tps │ │ │ └── explosion │ │ │ ├── Explosion_Sequence_A 1.png │ │ │ ├── Explosion_Sequence_A 10.png │ │ │ ├── Explosion_Sequence_A 11.png │ │ │ ├── Explosion_Sequence_A 12.png │ │ │ ├── Explosion_Sequence_A 13.png │ │ │ ├── Explosion_Sequence_A 14.png │ │ │ ├── Explosion_Sequence_A 15.png │ │ │ ├── Explosion_Sequence_A 16.png │ │ │ ├── Explosion_Sequence_A 17.png │ │ │ ├── Explosion_Sequence_A 18.png │ │ │ ├── Explosion_Sequence_A 19.png │ │ │ ├── Explosion_Sequence_A 2.png │ │ │ ├── Explosion_Sequence_A 20.png │ │ │ ├── Explosion_Sequence_A 21.png │ │ │ ├── Explosion_Sequence_A 22.png │ │ │ ├── Explosion_Sequence_A 23.png │ │ │ ├── Explosion_Sequence_A 24.png │ │ │ ├── Explosion_Sequence_A 25.png │ │ │ ├── Explosion_Sequence_A 26.png │ │ │ ├── Explosion_Sequence_A 27.png │ │ │ ├── Explosion_Sequence_A 3.png │ │ │ ├── Explosion_Sequence_A 4.png │ │ │ ├── Explosion_Sequence_A 5.png │ │ │ ├── Explosion_Sequence_A 6.png │ │ │ ├── Explosion_Sequence_A 7.png │ │ │ ├── Explosion_Sequence_A 8.png │ │ │ └── Explosion_Sequence_A 9.png │ ├── nape │ │ └── ball.png │ ├── particles │ │ ├── p_blow.json │ │ └── particle.png │ ├── rendertexture │ │ ├── spinObj_01.png │ │ ├── spinObj_02.png │ │ ├── spinObj_03.png │ │ ├── spinObj_04.png │ │ ├── spinObj_05.png │ │ ├── spinObj_06.png │ │ ├── spinObj_07.png │ │ └── spinObj_08.png │ ├── retina │ │ ├── img@1.5x.jpg │ │ ├── img@1x.jpg │ │ ├── img@2x.jpg │ │ └── img@3x.jpg │ ├── rope │ │ └── snake.png │ ├── spine │ │ ├── Pixie.atlas │ │ ├── Pixie.json │ │ ├── Pixie.png │ │ ├── dragon.atlas │ │ ├── dragon.json │ │ ├── dragon.png │ │ ├── dragon2.png │ │ ├── goblins.atlas │ │ ├── goblins.json │ │ ├── goblins.png │ │ ├── iP4_BGtile.jpg │ │ ├── iP4_ground.png │ │ ├── spineboy.atlas │ │ ├── spineboy.json │ │ └── spineboy.png │ ├── spritesheet │ │ ├── SpriteSheet.json │ │ ├── SpriteSheet.png │ │ ├── fighter.json │ │ ├── fighter.png │ │ └── tp │ │ │ ├── SpriteSheet.tps │ │ │ ├── eggHead.png │ │ │ ├── flowerTop.png │ │ │ ├── helmlok.png │ │ │ └── skully.png │ ├── stream │ │ └── play.png │ ├── tilemap │ │ ├── atlas.json │ │ ├── atlas.png │ │ └── button.png │ ├── tiling │ │ └── p2.jpeg │ └── video │ │ ├── test.mp4 │ │ └── test.webm └── src │ ├── alphamask │ └── Main.hx │ ├── animatedsprite │ └── Main.hx │ ├── basics │ └── Main.hx │ ├── bitmapfont │ └── Main.hx │ ├── bunnymark │ ├── Bunny.hx │ └── Main.hx │ ├── core │ ├── AssetLoader.hx │ ├── AudioAsset.hx │ └── MultipackParser.hx │ ├── devicedetection │ └── Main.hx │ ├── deviceinfo │ └── Main.hx │ ├── dragging │ ├── Bunny.hx │ └── Main.hx │ ├── dragonbones │ └── Main.hx │ ├── events │ └── Main.hx │ ├── filters │ ├── blur │ │ └── Main.hx │ ├── colormatrix │ │ └── Main.hx │ └── glow │ │ └── Main.hx │ ├── graphics │ └── Main.hx │ ├── loader │ └── Main.hx │ ├── mask │ └── Main.hx │ ├── mesh │ └── Main.hx │ ├── nape │ └── Main.hx │ ├── retina │ └── Main.hx │ ├── rope │ └── Main.hx │ ├── scaletest │ └── Main.hx │ ├── spine │ └── Main.hx │ ├── spritesheet │ └── Main.hx │ ├── stream │ └── Main.hx │ ├── text │ └── Main.hx │ ├── textureswap │ └── Main.hx │ ├── tilemap │ └── Main.hx │ ├── tiling │ └── Main.hx │ ├── video │ └── Main.hx │ └── webglinfo │ └── Main.hx └── src └── pixi ├── Quad.hx ├── QuadUv.hx ├── accessibility └── AccessibilityManager.hx ├── core ├── Application.hx ├── Pixi.hx ├── RenderOptions.hx ├── Settings.hx ├── Shader.hx ├── display │ ├── Bounds.hx │ ├── Container.hx │ ├── DisplayObject.hx │ └── Transform.hx ├── graphics │ ├── BatchGeometry.hx │ ├── FillStyle.hx │ ├── Graphics.hx │ ├── GraphicsData.hx │ ├── GraphicsGeometry.hx │ └── LineStyle.hx ├── math │ ├── Matrix.hx │ ├── ObservablePoint.hx │ ├── Point.hx │ └── shapes │ │ ├── Circle.hx │ │ ├── Ellipse.hx │ │ ├── Polygon.hx │ │ ├── Rectangle.hx │ │ ├── RoundedRectangle.hx │ │ └── Shape.hx ├── renderers │ ├── AbstractRenderer.hx │ ├── BasePrepare.hx │ ├── RendererPlugins.hx │ ├── canvas │ │ ├── CanvasRenderer.hx │ │ └── utils │ │ │ ├── CanvasGraphics.hx │ │ │ ├── CanvasMaskManager.hx │ │ │ ├── CanvasPrepare.hx │ │ │ ├── CanvasRenderTarget.hx │ │ │ └── CanvasUtils.hx │ ├── systems │ │ ├── BatchSystem.hx │ │ ├── ContextSystem.hx │ │ ├── FilterSystem.hx │ │ ├── FrameBufferSystem.hx │ │ ├── GeometrySystem.hx │ │ ├── MaskSystem.hx │ │ ├── ProjectionSystem.hx │ │ ├── RenderTextureSystem.hx │ │ ├── ShaderSystem.hx │ │ ├── StateSystem.hx │ │ ├── StencilSystem.hx │ │ ├── System.hx │ │ ├── TextureGCSystem.hx │ │ └── TextureSystem.hx │ └── webgl │ │ ├── AbstractBatchRenderer.hx │ │ ├── Attribute.hx │ │ ├── Buffer.hx │ │ ├── GLTexture.hx │ │ ├── Program.hx │ │ ├── Renderer.hx │ │ ├── State.hx │ │ ├── UniformGroup.hx │ │ ├── ViewableBuffer.hx │ │ ├── extract │ │ └── Extract.hx │ │ ├── filters │ │ └── Filter.hx │ │ ├── managers │ │ ├── BlendModeManager.hx │ │ ├── MaskManager.hx │ │ ├── ShaderManager.hx │ │ └── WebGLManager.hx │ │ └── utils │ │ ├── BatchShaderGenerator.hx │ │ ├── ObjectRenderer.hx │ │ ├── RenderTarget.hx │ │ └── WebGLPrepare.hx ├── sprites │ └── Sprite.hx ├── text │ ├── DefaultStyle.hx │ ├── Text.hx │ ├── TextMetrics.hx │ └── TextStyle.hx ├── textures │ ├── BaseRenderTexture.hx │ ├── BaseTexture.hx │ ├── FrameBuffer.hx │ ├── RenderTexture.hx │ ├── Spritesheet.hx │ ├── Texture.hx │ ├── TextureMatrix.hx │ ├── TextureUvs.hx │ └── VideoBaseTexture.hx ├── ticker │ └── Ticker.hx └── utils │ └── Utils.hx ├── extras ├── AnimatedSprite.hx ├── BitmapText.hx └── TilingSprite.hx ├── filters ├── alpha │ └── AlphaFilter.hx ├── blur │ ├── BlurFilter.hx │ ├── BlurXFilter.hx │ ├── BlurYFilter.hx │ └── SmartBlurFilter.hx ├── colormatrix │ └── ColorMatrixFilter.hx ├── displacement │ └── DisplacementFilter.hx ├── extras │ ├── BulgePinchFilter.hx │ ├── ColorReplaceFilter.hx │ ├── GlowFilter.hx │ ├── OutlineFilter.hx │ └── SimpleLightmapFilter.hx ├── fxaa │ └── FXAAFilter.hx ├── godray │ └── GodrayFilter.hx ├── gray │ └── GrayFilter.hx ├── noise │ └── NoiseFilter.hx ├── spritemask │ └── SpriteMaskFilter.hx └── twist │ └── TwistFilter.hx ├── interaction ├── EventEmitter.hx ├── InteractionData.hx ├── InteractionEvent.hx ├── InteractionManager.hx └── InteractiveTarget.hx ├── loaders ├── Loader.hx ├── LoaderOptions.hx ├── Resource.hx └── ResourceLoader.hx ├── mesh ├── Geometry.hx ├── Mesh.hx ├── MeshMaterial.hx ├── NineSlicePlane.hx ├── Plane.hx ├── Rope.hx └── SimpleMesh.hx ├── particles └── ParticleContainer.hx ├── plugins ├── dragonbones │ ├── animation │ │ ├── Animation.hx │ │ ├── AnimationState.hx │ │ ├── IAnimateble.hx │ │ └── WorldClock.hx │ ├── armature │ │ ├── Armature.hx │ │ ├── Bone.hx │ │ ├── Slot.hx │ │ └── TransformObject.hx │ ├── core │ │ ├── BaseObject.hx │ │ └── DragonBones.hx │ ├── event │ │ └── EventObject.hx │ ├── factory │ │ └── BaseFactory.hx │ ├── geom │ │ ├── ColorTransform.hx │ │ ├── Matrix.hx │ │ ├── Point.hx │ │ ├── Rectangle.hx │ │ └── Transform.hx │ ├── model │ │ ├── AnimationConfig.hx │ │ ├── AnimationData.hx │ │ ├── ArmatureData.hx │ │ ├── BoneData.hx │ │ ├── BoundingBoxData.hx │ │ ├── CustomData.hx │ │ ├── DragonBonesData.hx │ │ └── SlotData.hx │ ├── pixi │ │ ├── PixiArmatureDisplay.hx │ │ ├── PixiFactory.hx │ │ ├── PixiSlot.hx │ │ └── PixiTextureAtlasData.hx │ └── texture │ │ └── TextureAtlasData.hx └── spine │ ├── Spine.hx │ └── core │ ├── Animation.hx │ ├── AnimationState.hx │ ├── AnimationStateData.hx │ ├── AnimationStateListener2.hx │ ├── AtlasAttachmentLoader.hx │ ├── AttachmentLoader.hx │ ├── Bone.hx │ ├── BoneData.hx │ ├── Color.hx │ ├── ConstraintData.hx │ ├── Disposable.hx │ ├── Event.hx │ ├── EventData.hx │ ├── EventQueue.hx │ ├── IkConstraint.hx │ ├── IkConstraintData.hx │ ├── IntSet.hx │ ├── MixBlend.hx │ ├── MixDirection.hx │ ├── MixPose.hx │ ├── PathConstraint.hx │ ├── PathConstraintData.hx │ ├── Pool.hx │ ├── Skeleton.hx │ ├── SkeletonData.hx │ ├── SkeletonJson.hx │ ├── Skin.hx │ ├── Slot.hx │ ├── SlotData.hx │ ├── TextureAtlas.hx │ ├── TextureRegion.hx │ ├── Timeline.hx │ ├── TrackEntry.hx │ ├── TransformConstraint.hx │ ├── TransformConstraintData.hx │ ├── TransformMode.hx │ ├── Updatable.hx │ ├── Vector2.hx │ ├── attachments │ ├── Attachment.hx │ ├── PathAttachment.hx │ └── VertexAttachment.hx │ └── utils │ └── Color.hx ├── resources ├── ArrayResource.hx ├── BaseImageResource.hx ├── BufferResource.hx ├── CanvasResource.hx ├── CubeResource.hx ├── DepthResource.hx ├── ImageBitmapResource.hx ├── ImageResource.hx ├── Resource.hx ├── ResourcePackage.hx ├── SVGResource.hx └── VideoResource.hx └── tilemap ├── CanvasTileRenderer.hx ├── CompositeRectTileLayer.hx ├── GraphicsLayer.hx ├── RectTileLayer.hx ├── RectTileShader.hx ├── SquareTileShader.hx ├── TileRenderer.hx └── ZLayer.hx /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | engines: 2 | haxe-checkstyle: 3 | enabled: true 4 | 5 | exclude_paths: 6 | - libs/**/* 7 | 8 | ratings: 9 | paths: 10 | - "**.hx" 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs. 2 | # More information at http://EditorConfig.org 3 | root = true 4 | 5 | [*] 6 | indent_style = tab 7 | indent_size = 4 8 | insert_final_newline = false 9 | trim_trailing_whitespace = true 10 | 11 | [*.hx] 12 | end_of_line = lf -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | $ cat .gitattributes 2 | *.js linguist-language=Haxe -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs.xml 2 | node_modules/ 3 | samples/output/ 4 | .haxelib/ 5 | Pixi5.hxproj 6 | bin/ 7 | -------------------------------------------------------------------------------- /.haxerc: -------------------------------------------------------------------------------- 1 | { 2 | "version": "4.0.5", 3 | "resolveLibs": "scoped" 4 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | git: 2 | depth: 1 3 | 4 | language: haxe 5 | 6 | haxe: 7 | - "4.0.5" 8 | 9 | hxml: 10 | - install.hxml 11 | - build.hxml 12 | 13 | sudo: false 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Adi Reddy Mora 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /extraParams.hxml: -------------------------------------------------------------------------------- 1 | -lib perf.js -------------------------------------------------------------------------------- /haxe_libraries/actuate.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/actuate#1.8.9" into actuate/1.8.9/haxelib 2 | -cp ${HAXE_LIBCACHE}/actuate/1.8.9/haxelib/src 3 | -D actuate=1.8.9 4 | -------------------------------------------------------------------------------- /haxe_libraries/build-tool.hxml: -------------------------------------------------------------------------------- 1 | -D build-tool=0.1.0 2 | -cp ${SCOPE_DIR}/source/library/build-tool/ 3 | ${SCOPE_DIR}/source/library/build-tool/extraparams.hxml -------------------------------------------------------------------------------- /haxe_libraries/chxdoc.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/chxdoc#1.3.0" into chxdoc/1.3.0/haxelib 2 | # @run: haxelib run-dir chxdoc ${HAXE_LIBCACHE}/chxdoc/1.3.0/haxelib 3 | -cp ${HAXE_LIBCACHE}/chxdoc/1.3.0/haxelib/ 4 | -D chxdoc=1.3.0 5 | -------------------------------------------------------------------------------- /haxe_libraries/formatter.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/formatter#1.9.2" into formatter/1.9.2/haxelib 2 | # @run: haxelib run-dir formatter ${HAXE_LIBCACHE}/formatter/1.9.2/haxelib 3 | -cp ${HAXE_LIBCACHE}/formatter/1.9.2/haxelib/src 4 | -D formatter=1.9.2 5 | -------------------------------------------------------------------------------- /haxe_libraries/msignal.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/msignal#1.2.5" into msignal/1.2.5/haxelib 2 | -cp ${HAXE_LIBCACHE}/msignal/1.2.5/haxelib/ 3 | -D msignal=1.2.5 4 | -------------------------------------------------------------------------------- /haxe_libraries/nape-haxe4.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/nape-haxe4#2.0.21" into nape-haxe4/2.0.21/haxelib 2 | -cp ${HAXE_LIBCACHE}/nape-haxe4/2.0.21/haxelib/ 3 | -D nape-haxe4=2.0.21 4 | -------------------------------------------------------------------------------- /haxe_libraries/perf.js.hxml: -------------------------------------------------------------------------------- 1 | # @install: lix --silent download "haxelib:/perf.js#1.1.8" into perf.js/1.1.8/haxelib 2 | -cp ${HAXE_LIBCACHE}/perf.js/1.1.8/haxelib/src 3 | -D perf.js=1.1.8 4 | -------------------------------------------------------------------------------- /haxelib.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixijs", 3 | "license": "MIT", 4 | "classPath": "src", 5 | "tags": [ 6 | "js", 7 | "haxe", 8 | "pixi", 9 | "pixi.js", 10 | "pixijs", 11 | "extern", 12 | "web" 13 | ], 14 | "description": "Externs of pixi.js v5.x for Haxe", 15 | "contributors": [ 16 | "pixijs", 17 | "adireddy", 18 | "markknol" 19 | ], 20 | "releasenote": "updated to latest pixi version", 21 | "version": "5.1.2", 22 | "url": "https://github.com/pixijs/pixi-haxe", 23 | "dependencies": { 24 | "perf.js": "" 25 | } 26 | } -------------------------------------------------------------------------------- /install.hxml: -------------------------------------------------------------------------------- 1 | -cmd haxelib newrepo 2 | -cmd haxelib install perf.js || true 3 | -cmd haxelib install nape-haxe4 || true 4 | -cmd haxelib install msignal || true 5 | -cmd haxelib install actuate || true 6 | -cmd haxelib install chxdoc || true -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/logo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixijs", 3 | "version": "v5.2.1", 4 | "description": "Externs of pixi.js v5.x for Haxe", 5 | "author": "Adi Reddy Mora", 6 | "license": "MIT", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/markknol/pixi-haxe" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/markknol/pixi-haxe/issues" 13 | }, 14 | "keywords": [ 15 | "js", 16 | "haxe", 17 | "pixi", 18 | "pixi.js", 19 | "pixijs", 20 | "extern", 21 | "web", 22 | "library" 23 | ], 24 | "scripts": { 25 | "lix": "lix", 26 | "format": "haxelib run formatter -s src/pixi", 27 | "haxelib": "haxelib", 28 | "haxe": "haxe" 29 | }, 30 | "devDependencies": { 31 | "lix": "latest" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /samples/assets/alphamask/bkg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/alphamask/bkg.jpg -------------------------------------------------------------------------------- /samples/assets/alphamask/cells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/alphamask/cells.png -------------------------------------------------------------------------------- /samples/assets/alphamask/flowerTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/alphamask/flowerTop.png -------------------------------------------------------------------------------- /samples/assets/audio/loop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/audio/loop.mp3 -------------------------------------------------------------------------------- /samples/assets/audio/sound1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/audio/sound1.wav -------------------------------------------------------------------------------- /samples/assets/audio/sound2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/audio/sound2.wav -------------------------------------------------------------------------------- /samples/assets/audio/sound3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/audio/sound3.wav -------------------------------------------------------------------------------- /samples/assets/audio/sound4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/audio/sound4.wav -------------------------------------------------------------------------------- /samples/assets/basics/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/basics/bunny.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny1.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny2.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny3.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny4.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunny5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunny5.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/bunnys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/bunnys.png -------------------------------------------------------------------------------- /samples/assets/bunnymark/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/bunnymark/logo.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/AnimationBaseTest/texture.json: -------------------------------------------------------------------------------- 1 | {"imagePath":"texture.png","name":"AnimationBaseTest","SubTexture":[{"width":600,"y":7,"height":4,"name":"_texture/track","x":73},{"width":600,"y":1,"height":4,"name":"_texture/bar","x":73},{"width":88,"y":1,"height":30,"name":"_texture/thrmb","x":675},{"width":70,"y":1,"height":60,"name":"_texture/_diamond","x":1}]} -------------------------------------------------------------------------------- /samples/assets/dragonbones/AnimationBaseTest/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/AnimationBaseTest/texture.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/CoreElement/CoreElement_texture_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/CoreElement/CoreElement_texture_1.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/DragonBoy/DragonBoy_texture_1.json: -------------------------------------------------------------------------------- 1 | {"name":"DragonBoy","imagePath":"DragonBoy_texture_1.png","SubTexture":[{"name":"DragonBoyFolder/head","x":2,"y":2,"width":85,"height":98},{"name":"DragonBoyFolder/body","x":89,"y":2,"width":59,"height":87},{"name":"DragonBoyFolder/tail","x":150,"y":2,"width":54,"height":70},{"name":"DragonBoyFolder/tailM","x":206,"y":2,"width":28,"height":52},{"name":"DragonBoyFolder/armUpperL","x":206,"y":56,"width":28,"height":22},{"name":"DragonBoyFolder/legR","x":150,"y":74,"width":45,"height":58},{"name":"DragonBoyFolder/hair","x":197,"y":80,"width":31,"height":71},{"name":"DragonBoyFolder/clothes2","x":89,"y":91,"width":52,"height":44},{"name":"DragonBoyFolder/clothes3","x":2,"y":102,"width":52,"height":44},{"name":"DragonBoyFolder/handL","x":56,"y":102,"width":24,"height":20},{"name":"DragonBoyFolder/handR","x":56,"y":124,"width":25,"height":15},{"name":"DragonBoyFolder/clothes4","x":143,"y":134,"width":52,"height":44},{"name":"DragonBoyFolder/clothes1","x":83,"y":137,"width":52,"height":44},{"name":"DragonBoyFolder/armR","x":56,"y":141,"width":12,"height":20},{"name":"DragonBoyFolder/eye","x":70,"y":141,"width":9,"height":15},{"name":"DragonBoyFolder/legL","x":2,"y":148,"width":51,"height":45},{"name":"DragonBoyFolder/beardR","x":197,"y":153,"width":34,"height":9},{"name":"DragonBoyFolder/armL","x":55,"y":163,"width":12,"height":20},{"name":"DragonBoyFolder/beardL","x":197,"y":164,"width":30,"height":9},{"name":"DragonBoyFolder/armUpperR","x":137,"y":180,"width":40,"height":24}]} -------------------------------------------------------------------------------- /samples/assets/dragonbones/DragonBoy/DragonBoy_texture_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/DragonBoy/DragonBoy_texture_1.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/Knight/Knight_texture_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/Knight/Knight_texture_1.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/ReplaceSlotDisplay/texture.json: -------------------------------------------------------------------------------- 1 | {"SubTexture":[{"width":60,"y":32,"height":60,"name":"display0001","x":817},{"width":270,"y":385,"height":160,"name":"display0005","x":1},{"width":270,"y":385,"height":160,"name":"display0009","x":273},{"width":203,"y":1,"height":29,"name":"weapon_1004_1","x":817},{"width":270,"y":193,"height":190,"name":"display0004","x":1},{"width":270,"y":1,"height":190,"name":"display0008","x":273},{"width":240,"y":193,"height":160,"name":"display0010","x":757},{"width":240,"y":193,"height":190,"name":"display0003","x":515},{"width":270,"y":1,"height":190,"name":"display0002","x":1},{"width":270,"y":1,"height":190,"name":"display0006","x":545},{"width":240,"y":193,"height":190,"name":"display0007","x":273}],"name":"ReplaceSlotDisplay","imagePath":"texture.png"} -------------------------------------------------------------------------------- /samples/assets/dragonbones/ReplaceSlotDisplay/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/ReplaceSlotDisplay/texture.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/ReplaceSlotDisplay/textureReplace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/ReplaceSlotDisplay/textureReplace.png -------------------------------------------------------------------------------- /samples/assets/dragonbones/Ubbie/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/dragonbones/Ubbie/texture.png -------------------------------------------------------------------------------- /samples/assets/filters/BGrotate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/BGrotate.jpg -------------------------------------------------------------------------------- /samples/assets/filters/LightRotate1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/LightRotate1.png -------------------------------------------------------------------------------- /samples/assets/filters/LightRotate2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/LightRotate2.png -------------------------------------------------------------------------------- /samples/assets/filters/SceneRotate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/SceneRotate.jpg -------------------------------------------------------------------------------- /samples/assets/filters/depth_blur_BG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/depth_blur_BG.jpg -------------------------------------------------------------------------------- /samples/assets/filters/depth_blur_dudes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/depth_blur_dudes.jpg -------------------------------------------------------------------------------- /samples/assets/filters/depth_blur_moby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/depth_blur_moby.jpg -------------------------------------------------------------------------------- /samples/assets/filters/panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/filters/panda.png -------------------------------------------------------------------------------- /samples/assets/fonts/desyrel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/fonts/desyrel.png -------------------------------------------------------------------------------- /samples/assets/fonts/desyrel.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/fonts/desyrel.ttf -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_01.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_02.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_03.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_04.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_05.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_06.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_07.png -------------------------------------------------------------------------------- /samples/assets/graphics/spinObj_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/graphics/spinObj_08.png -------------------------------------------------------------------------------- /samples/assets/loader/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/1.png -------------------------------------------------------------------------------- /samples/assets/loader/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/10.png -------------------------------------------------------------------------------- /samples/assets/loader/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/11.png -------------------------------------------------------------------------------- /samples/assets/loader/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/12.png -------------------------------------------------------------------------------- /samples/assets/loader/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/13.png -------------------------------------------------------------------------------- /samples/assets/loader/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/14.png -------------------------------------------------------------------------------- /samples/assets/loader/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/15.png -------------------------------------------------------------------------------- /samples/assets/loader/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/16.png -------------------------------------------------------------------------------- /samples/assets/loader/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/17.png -------------------------------------------------------------------------------- /samples/assets/loader/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/18.png -------------------------------------------------------------------------------- /samples/assets/loader/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/19.png -------------------------------------------------------------------------------- /samples/assets/loader/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/2.png -------------------------------------------------------------------------------- /samples/assets/loader/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/20.png -------------------------------------------------------------------------------- /samples/assets/loader/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/21.png -------------------------------------------------------------------------------- /samples/assets/loader/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/22.png -------------------------------------------------------------------------------- /samples/assets/loader/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/23.png -------------------------------------------------------------------------------- /samples/assets/loader/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/24.png -------------------------------------------------------------------------------- /samples/assets/loader/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/25.png -------------------------------------------------------------------------------- /samples/assets/loader/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/26.png -------------------------------------------------------------------------------- /samples/assets/loader/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/27.png -------------------------------------------------------------------------------- /samples/assets/loader/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/28.png -------------------------------------------------------------------------------- /samples/assets/loader/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/29.png -------------------------------------------------------------------------------- /samples/assets/loader/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/3.png -------------------------------------------------------------------------------- /samples/assets/loader/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/30.png -------------------------------------------------------------------------------- /samples/assets/loader/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/31.png -------------------------------------------------------------------------------- /samples/assets/loader/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/32.png -------------------------------------------------------------------------------- /samples/assets/loader/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/33.png -------------------------------------------------------------------------------- /samples/assets/loader/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/34.png -------------------------------------------------------------------------------- /samples/assets/loader/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/35.png -------------------------------------------------------------------------------- /samples/assets/loader/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/36.png -------------------------------------------------------------------------------- /samples/assets/loader/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/37.png -------------------------------------------------------------------------------- /samples/assets/loader/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/38.png -------------------------------------------------------------------------------- /samples/assets/loader/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/39.png -------------------------------------------------------------------------------- /samples/assets/loader/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/4.png -------------------------------------------------------------------------------- /samples/assets/loader/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/40.png -------------------------------------------------------------------------------- /samples/assets/loader/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/41.png -------------------------------------------------------------------------------- /samples/assets/loader/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/42.png -------------------------------------------------------------------------------- /samples/assets/loader/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/43.png -------------------------------------------------------------------------------- /samples/assets/loader/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/44.png -------------------------------------------------------------------------------- /samples/assets/loader/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/45.png -------------------------------------------------------------------------------- /samples/assets/loader/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/46.png -------------------------------------------------------------------------------- /samples/assets/loader/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/47.png -------------------------------------------------------------------------------- /samples/assets/loader/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/48.png -------------------------------------------------------------------------------- /samples/assets/loader/49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/49.png -------------------------------------------------------------------------------- /samples/assets/loader/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/5.png -------------------------------------------------------------------------------- /samples/assets/loader/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/50.png -------------------------------------------------------------------------------- /samples/assets/loader/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/6.png -------------------------------------------------------------------------------- /samples/assets/loader/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/7.png -------------------------------------------------------------------------------- /samples/assets/loader/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/8.png -------------------------------------------------------------------------------- /samples/assets/loader/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/loader/9.png -------------------------------------------------------------------------------- /samples/assets/movieclip/SpriteSheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/SpriteSheet.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/SpriteSheet.tps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/SpriteSheet.tps -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 1.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 10.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 11.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 12.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 13.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 14.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 15.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 16.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 17.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 18.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 19.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 2.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 20.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 21.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 22.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 23.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 24.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 25.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 26.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 27.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 3.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 4.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 5.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 6.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 7.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 8.png -------------------------------------------------------------------------------- /samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/movieclip/tp/explosion/Explosion_Sequence_A 9.png -------------------------------------------------------------------------------- /samples/assets/nape/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/nape/ball.png -------------------------------------------------------------------------------- /samples/assets/particles/p_blow.json: -------------------------------------------------------------------------------- 1 | { 2 | "alpha": { 3 | "start": 0.41, 4 | "end": 0.24 5 | }, 6 | "scale": { 7 | "start": 1.5, 8 | "end": 0.3, 9 | "minimumScaleMultiplier": 1 10 | }, 11 | "color": { 12 | "start": "#ffffff", 13 | "end": "#000000" 14 | }, 15 | "speed": { 16 | "start": 500, 17 | "end": 100 18 | }, 19 | "acceleration": { 20 | "x": 0, 21 | "y": 0 22 | }, 23 | "startRotation": { 24 | "min": 0, 25 | "max": 0 26 | }, 27 | "rotationSpeed": { 28 | "min": 0, 29 | "max": 0 30 | }, 31 | "lifetime": { 32 | "min": 1.9, 33 | "max": 1.9 34 | }, 35 | "blendMode": "screen", 36 | "frequency": 0.3, 37 | "emitterLifetime": 0.5, 38 | "maxParticles": 60, 39 | "pos": { 40 | "x": 0, 41 | "y": 0 42 | }, 43 | "addAtBack": false, 44 | "spawnType": "burst", 45 | "particlesPerWave": 30, 46 | "particleSpacing": 30, 47 | "angleStart": 45 48 | } 49 | -------------------------------------------------------------------------------- /samples/assets/particles/particle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/particles/particle.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_01.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_02.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_03.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_04.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_05.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_06.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_07.png -------------------------------------------------------------------------------- /samples/assets/rendertexture/spinObj_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rendertexture/spinObj_08.png -------------------------------------------------------------------------------- /samples/assets/retina/img@1.5x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/retina/img@1.5x.jpg -------------------------------------------------------------------------------- /samples/assets/retina/img@1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/retina/img@1x.jpg -------------------------------------------------------------------------------- /samples/assets/retina/img@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/retina/img@2x.jpg -------------------------------------------------------------------------------- /samples/assets/retina/img@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/retina/img@3x.jpg -------------------------------------------------------------------------------- /samples/assets/rope/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/rope/snake.png -------------------------------------------------------------------------------- /samples/assets/spine/Pixie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/Pixie.png -------------------------------------------------------------------------------- /samples/assets/spine/dragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/dragon.png -------------------------------------------------------------------------------- /samples/assets/spine/dragon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/dragon2.png -------------------------------------------------------------------------------- /samples/assets/spine/goblins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/goblins.png -------------------------------------------------------------------------------- /samples/assets/spine/iP4_BGtile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/iP4_BGtile.jpg -------------------------------------------------------------------------------- /samples/assets/spine/iP4_ground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/iP4_ground.png -------------------------------------------------------------------------------- /samples/assets/spine/spineboy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spine/spineboy.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/SpriteSheet.json: -------------------------------------------------------------------------------- 1 | {"frames": { 2 | 3 | "eggHead.png": 4 | { 5 | "frame": {"x":2,"y":169,"w":142,"h":157}, 6 | "rotated": false, 7 | "trimmed": false, 8 | "spriteSourceSize": {"x":0,"y":0,"w":142,"h":157}, 9 | "sourceSize": {"w":142,"h":157} 10 | }, 11 | "flowerTop.png": 12 | { 13 | "frame": {"x":2,"y":328,"w":119,"h":181}, 14 | "rotated": false, 15 | "trimmed": false, 16 | "spriteSourceSize": {"x":0,"y":0,"w":119,"h":181}, 17 | "sourceSize": {"w":119,"h":181} 18 | }, 19 | "helmlok.png": 20 | { 21 | "frame": {"x":123,"y":328,"w":123,"h":177}, 22 | "rotated": false, 23 | "trimmed": false, 24 | "spriteSourceSize": {"x":0,"y":0,"w":123,"h":177}, 25 | "sourceSize": {"w":123,"h":177} 26 | }, 27 | "skully.png": 28 | { 29 | "frame": {"x":2,"y":2,"w":155,"h":165}, 30 | "rotated": false, 31 | "trimmed": false, 32 | "spriteSourceSize": {"x":0,"y":0,"w":155,"h":165}, 33 | "sourceSize": {"w":155,"h":165} 34 | }}, 35 | "meta": { 36 | "app": "http://www.texturepacker.com", 37 | "version": "1.0", 38 | "image": "SpriteSheet.png", 39 | "format": "RGBA8888", 40 | "size": {"w":256,"h":512}, 41 | "scale": "1", 42 | "smartupdate": "$TexturePacker:SmartUpdate:9e3e5afd01ea8e418afabfbdcd724485$" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /samples/assets/spritesheet/SpriteSheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/SpriteSheet.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/fighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/fighter.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/tp/SpriteSheet.tps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/tp/SpriteSheet.tps -------------------------------------------------------------------------------- /samples/assets/spritesheet/tp/eggHead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/tp/eggHead.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/tp/flowerTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/tp/flowerTop.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/tp/helmlok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/tp/helmlok.png -------------------------------------------------------------------------------- /samples/assets/spritesheet/tp/skully.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/spritesheet/tp/skully.png -------------------------------------------------------------------------------- /samples/assets/stream/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/stream/play.png -------------------------------------------------------------------------------- /samples/assets/tilemap/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/tilemap/atlas.png -------------------------------------------------------------------------------- /samples/assets/tilemap/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/tilemap/button.png -------------------------------------------------------------------------------- /samples/assets/tiling/p2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/tiling/p2.jpeg -------------------------------------------------------------------------------- /samples/assets/video/test.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/video/test.mp4 -------------------------------------------------------------------------------- /samples/assets/video/test.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixijs-userland/pixi-haxe/ac78b5d708eae77bab3803c4f35df782ff7448df/samples/assets/video/test.webm -------------------------------------------------------------------------------- /samples/src/alphamask/Main.hx: -------------------------------------------------------------------------------- 1 | package alphamask; 2 | 3 | import pixi.core.math.Point; 4 | import pixi.core.sprites.Sprite; 5 | import pixi.core.Application; 6 | 7 | class Main extends Application { 8 | 9 | var _bg:Sprite; 10 | var _cells:Sprite; 11 | var _mask:Sprite; 12 | var _target:Point; 13 | 14 | public function new() { 15 | super(); 16 | _init(); 17 | } 18 | 19 | function _init() { 20 | ticker.add(function(delta){ 21 | _onUpdate(delta); 22 | }); 23 | super.start(); 24 | 25 | _bg = Sprite.from("assets/alphamask/bkg.jpg"); 26 | 27 | stage.addChild(_bg); 28 | 29 | _cells = Sprite.from("assets/alphamask/cells.png"); 30 | _cells.scale.set(1.5); 31 | 32 | _mask = Sprite.from("assets/alphamask/flowerTop.png"); 33 | _mask.anchor.set(0.5); 34 | _mask.position.set(310, 190); 35 | 36 | _cells.mask = _mask; 37 | 38 | stage.addChild(_mask); 39 | stage.addChild(_cells); 40 | 41 | _target = new Point(); 42 | _reset(); 43 | } 44 | 45 | function _reset() { 46 | _target.x = Math.floor(Math.random() * 550); 47 | _target.y = Math.floor(Math.random() * 300); 48 | } 49 | 50 | function _onUpdate(elapsedTime:Float) { 51 | _mask.position.x += (_target.x - _mask.x) * 0.1; 52 | _mask.position.y += (_target.y - _mask.y) * 0.1; 53 | if (Math.abs(_mask.x - _target.x) < 1) _reset(); 54 | } 55 | 56 | static function main() { 57 | new Main(); 58 | } 59 | } -------------------------------------------------------------------------------- /samples/src/animatedsprite/Main.hx: -------------------------------------------------------------------------------- 1 | package animatedsprite; 2 | 3 | import pixi.extras.AnimatedSprite; 4 | import pixi.loaders.Loader; 5 | import pixi.core.Application; 6 | import pixi.core.textures.Texture; 7 | import js.Browser; 8 | 9 | class Main extends Application { 10 | 11 | public function new() { 12 | var options:ApplicationOptions = { 13 | backgroundColor: 0xFFFFFF 14 | }; 15 | super(options); 16 | _init(); 17 | } 18 | 19 | function _init() { 20 | super.start(); 21 | 22 | var mcloader:Loader = new Loader(); 23 | mcloader.add("mc", "assets/movieclip/SpriteSheet.json"); 24 | mcloader.load(_onLoaded); 25 | } 26 | 27 | function _onLoaded() { 28 | var explosionTextures = []; 29 | 30 | var texture:Texture; 31 | for (i in 0 ... 26) { 32 | texture = Texture.from("Explosion_Sequence_A " + (i + 1) + ".png"); 33 | explosionTextures.push(texture); 34 | } 35 | 36 | var explosion:AnimatedSprite; 37 | for (i in 0 ... 80) { 38 | explosion = new AnimatedSprite(explosionTextures); 39 | explosion.position.x = Math.random() * Browser.window.innerWidth; 40 | explosion.position.y = Math.random() * Browser.window.innerHeight; 41 | explosion.anchor.set(0.5, 0.5); 42 | 43 | explosion.rotation = Math.random() * Math.PI; 44 | explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; 45 | 46 | explosion.gotoAndPlay(Std.random(27)); 47 | explosion.animationSpeed = 0.8; 48 | 49 | stage.addChild(explosion); 50 | } 51 | } 52 | 53 | static function main() { 54 | new Main(); 55 | } 56 | } -------------------------------------------------------------------------------- /samples/src/basics/Main.hx: -------------------------------------------------------------------------------- 1 | package basics; 2 | 3 | import pixi.core.Application; 4 | import pixi.core.graphics.Graphics; 5 | import pixi.core.textures.Texture; 6 | import pixi.core.sprites.Sprite; 7 | import js.Browser; 8 | 9 | class Main extends Application { 10 | 11 | var _bunny:Sprite; 12 | var _graphic:Graphics; 13 | 14 | public function new() { 15 | 16 | var options:ApplicationOptions = { 17 | width: Browser.window.innerWidth, 18 | height: Browser.window.innerHeight, 19 | backgroundColor: 0x006666, 20 | transparent: true, 21 | antialias: false, 22 | }; 23 | 24 | super(options); 25 | ticker.add(function(delta){ 26 | _animate(delta); 27 | }); 28 | 29 | _bunny = new Sprite(Texture.from("assets/basics/bunny.png")); 30 | _bunny.anchor.set(0.5); 31 | _bunny.position.set(400, 300); 32 | 33 | _graphic = new Graphics(); 34 | _graphic.beginFill(0xFF0000, 0.4); 35 | _graphic.drawRect(200, 150, 400, 300); 36 | _graphic.endFill(); 37 | 38 | stage.addChild(_graphic); 39 | stage.addChild(_bunny); 40 | Browser.document.body.appendChild(view); 41 | } 42 | 43 | function _animate(e:Float) { 44 | _bunny.rotation += 0.1; 45 | } 46 | 47 | static function main() { 48 | new Main(); 49 | } 50 | } -------------------------------------------------------------------------------- /samples/src/bitmapfont/Main.hx: -------------------------------------------------------------------------------- 1 | package bitmapfont; 2 | 3 | import pixi.loaders.Loader; 4 | import pixi.extras.BitmapText; 5 | import pixi.core.Application; 6 | import js.Browser; 7 | 8 | class Main extends Application { 9 | 10 | public function new() { 11 | var options:ApplicationOptions = { 12 | autoDensity: true, 13 | backgroundColor: 0x003366 14 | }; 15 | super(options); 16 | _init(); 17 | } 18 | 19 | function _init() { 20 | super.start(); 21 | 22 | var fontloader:Loader = new Loader(); 23 | fontloader.add("font", "./assets/fonts/desyrel.xml"); 24 | fontloader.load(_onLoaded); 25 | } 26 | 27 | function _onLoaded() { 28 | var bitmapFontText = new BitmapText("bitmap fonts are\n now supported!", {font: "60px Desyrel"}); 29 | bitmapFontText.position.x = (Browser.window.innerWidth - bitmapFontText.width) / 2; 30 | bitmapFontText.position.y = (Browser.window.innerHeight - bitmapFontText.height) / 2; 31 | stage.addChild(bitmapFontText); 32 | } 33 | 34 | static function main() { 35 | new Main(); 36 | } 37 | } -------------------------------------------------------------------------------- /samples/src/bunnymark/Bunny.hx: -------------------------------------------------------------------------------- 1 | package bunnymark; 2 | 3 | import pixi.core.textures.Texture; 4 | import pixi.core.sprites.Sprite; 5 | 6 | class Bunny extends Sprite { 7 | 8 | public var speedX(default, default):Float; 9 | public var speedY(default, default):Float; 10 | public var scaleSpeed(default, default):Float; 11 | public var rotationSpeed(default, default):Float; 12 | 13 | public function new(texture:Texture) { 14 | super(texture); 15 | } 16 | } -------------------------------------------------------------------------------- /samples/src/core/AudioAsset.hx: -------------------------------------------------------------------------------- 1 | package core; 2 | 3 | import js.html.Audio; 4 | 5 | class AudioAsset { 6 | 7 | public var mute:Bool; 8 | public var loop(default, set):Bool; 9 | 10 | var _src:Audio; 11 | 12 | public function new(src:Audio) { 13 | _src = src; 14 | mute = false; 15 | loop = false; 16 | } 17 | 18 | public function play() { 19 | if (!mute) _src.play(); 20 | } 21 | 22 | public function stop() { 23 | _src.pause(); 24 | } 25 | 26 | function set_loop(val:Bool):Bool { 27 | _src.loop = val; 28 | return loop = val; 29 | } 30 | } -------------------------------------------------------------------------------- /samples/src/deviceinfo/Main.hx: -------------------------------------------------------------------------------- 1 | package deviceinfo; 2 | 3 | import pixi.core.display.Container; 4 | import pixi.core.text.Text; 5 | import pixi.core.Application; 6 | import js.Browser; 7 | 8 | class Main extends Application { 9 | 10 | var _info:Container; 11 | 12 | var _rendererType:Array; 13 | 14 | public function new() { 15 | super({backgroundColor: 0x003366}); 16 | _init(); 17 | } 18 | 19 | function _init() { 20 | super.start(); 21 | 22 | _info = new Container(); 23 | stage.addChild(_info); 24 | 25 | var txt = new Text("", {fill: "#FFFFFF"}); 26 | txt.text = "Resolution: \t\t" + Browser.window.innerWidth + " x " + Browser.window.innerHeight; 27 | _info.addChild(txt); 28 | 29 | txt = new Text("", {fill: "#FFFFFF"}); 30 | txt.text = "Pixel Ratio: \t\t" + Browser.window.devicePixelRatio; 31 | txt.y = 40; 32 | _info.addChild(txt); 33 | 34 | txt = new Text("", {fill: "#FFFFFF"}); 35 | txt.text = "Renderer: \t\t\t\t\t" + switch (renderer.type) 36 | { 37 | case UNKNOWN: "Unknown"; 38 | case WEBGL: "WebGL"; 39 | case CANVAS: "Canvas"; 40 | }; 41 | txt.y = 80; 42 | _info.addChild(txt); 43 | 44 | _info.position.x = (Browser.window.innerWidth - _info.width) / 2; 45 | _info.position.y = (Browser.window.innerHeight - _info.height) / 2; 46 | } 47 | 48 | static function main() { 49 | new Main(); 50 | } 51 | } -------------------------------------------------------------------------------- /samples/src/dragging/Bunny.hx: -------------------------------------------------------------------------------- 1 | package dragging; 2 | 3 | import pixi.interaction.InteractionData; 4 | import pixi.core.textures.Texture; 5 | import pixi.core.sprites.Sprite; 6 | 7 | class Bunny extends Sprite { 8 | 9 | public var data:InteractionData; 10 | public var dragging:Bool; 11 | 12 | public function new(texture:Texture) { 13 | super(texture); 14 | } 15 | } -------------------------------------------------------------------------------- /samples/src/events/Main.hx: -------------------------------------------------------------------------------- 1 | package events; 2 | 3 | import pixi.core.text.DefaultStyle; 4 | import pixi.interaction.InteractionEvent; 5 | import pixi.core.text.Text; 6 | import pixi.core.Application; 7 | import pixi.core.textures.Texture; 8 | import pixi.core.sprites.Sprite; 9 | 10 | class Main extends Application { 11 | 12 | var _img:Sprite; 13 | var _label:Text; 14 | 15 | public function new() { 16 | super({backgroundColor: 0xFFFFFF}); 17 | _init(); 18 | } 19 | 20 | function _init() { 21 | super.start(); 22 | _img = new Sprite(Texture.from("assets/basics/bunny.png")); 23 | _img.position.set(400, 300); 24 | _img.interactive = true; 25 | _img.scale.set(4); 26 | _img.anchor.set(0.5); 27 | _img.on("mouseover", _onEvent); 28 | _img.on("mouseout", _onEvent); 29 | _img.on("touchstart", _onEvent); 30 | _img.tap = _onEvent; 31 | _img.click = _onEvent; 32 | 33 | stage.addChild(_img); 34 | 35 | var style:DefaultStyle = {}; 36 | style.fill = "#000000"; 37 | style.fontSize = 12; 38 | style.fontFamily = "Courier"; 39 | 40 | _label = new Text("EVENTS", style); 41 | _label.position.set(0, 0); 42 | stage.addChild(_label); 43 | 44 | ticker.add(function(delta){ 45 | _onUpdate(delta); 46 | }); 47 | } 48 | 49 | function _onUpdate(t:Float):Void{ 50 | _img.rotation += 0.1; 51 | } 52 | 53 | function _onEvent(target:InteractionEvent) { 54 | _label.text = target.type; 55 | } 56 | 57 | static function main() { 58 | new Main(); 59 | } 60 | } -------------------------------------------------------------------------------- /samples/src/filters/glow/Main.hx: -------------------------------------------------------------------------------- 1 | package filters.glow; 2 | 3 | import js.Browser; 4 | import pixi.core.display.Container; 5 | import pixi.core.sprites.Sprite; 6 | import pixi.filters.blur.BlurFilter; 7 | import pixi.core.Application; 8 | import pixi.filters.extras.GlowFilter; 9 | 10 | class Main extends Application { 11 | 12 | var _container:Container; 13 | var _littleRobot:Sprite; 14 | 15 | var _blurFilter1:BlurFilter; 16 | var _blurFilter2:BlurFilter; 17 | 18 | var _count:Float; 19 | 20 | public function new() { 21 | super({backgroundColor: 0xFFFFFF}); 22 | _init(); 23 | 24 | _container = new Container(); 25 | stage.addChild(_container); 26 | _container.position.set(Browser.window.innerWidth / 2, Browser.window.innerHeight / 2); 27 | 28 | _littleRobot = Sprite.from("assets/filters/depth_blur_moby.jpg"); 29 | _littleRobot.anchor.set(0.5); 30 | _container.addChild(_littleRobot); 31 | 32 | _littleRobot.filters = [new GlowFilter(15, 2, 1, 0xFF0000, 0.5)]; 33 | } 34 | 35 | function _init() { 36 | ticker.add(function(delta){ 37 | _onUpdate(delta); 38 | }); 39 | super.start(); 40 | } 41 | 42 | function _onUpdate(elapsedTime:Float) { 43 | _count += 0.01; 44 | } 45 | 46 | static function main() { 47 | new Main(); 48 | } 49 | } -------------------------------------------------------------------------------- /samples/src/mask/Main.hx: -------------------------------------------------------------------------------- 1 | package mask; 2 | 3 | import pixi.core.graphics.Graphics; 4 | import pixi.core.math.Point; 5 | import pixi.core.sprites.Sprite; 6 | import pixi.core.Application; 7 | 8 | class Main extends Application { 9 | 10 | var _bg:Sprite; 11 | var _cells:Sprite; 12 | var _mask:Graphics; 13 | var _target:Point; 14 | 15 | public function new() { 16 | super(); 17 | _init(); 18 | } 19 | 20 | function _init() { 21 | ticker.add(function(delta){ 22 | _onUpdate(delta); 23 | }); 24 | super.start(); 25 | 26 | _bg = Sprite.from("assets/alphamask/bkg.jpg"); 27 | 28 | stage.addChild(_bg); 29 | 30 | _cells = Sprite.from("assets/alphamask/cells.png"); 31 | _cells.scale.set(1.5); 32 | 33 | _mask = new Graphics(); 34 | _mask.clear(); 35 | _mask.beginFill(0x000000); 36 | _mask.drawRect(100, 100, 300, 200); 37 | _mask.endFill(); 38 | _mask.cacheAsBitmap = true; 39 | 40 | _cells.mask = _mask; 41 | 42 | stage.addChild(_cells); 43 | stage.addChild(_mask); 44 | 45 | _target = new Point(); 46 | _reset(); 47 | } 48 | 49 | function _reset() { 50 | _target.x = Math.floor(Math.random() * 550); 51 | _target.y = Math.floor(Math.random() * 300); 52 | } 53 | 54 | function _onUpdate(elapsedTime:Float) { 55 | _mask.position.x += (_target.x - _mask.x) * 0.1; 56 | _mask.position.y += (_target.y - _mask.y) * 0.1; 57 | if (Math.abs(_mask.x - _target.x) < 1) _reset(); 58 | } 59 | 60 | static function main() { 61 | new Main(); 62 | } 63 | } -------------------------------------------------------------------------------- /samples/src/mesh/Main.hx: -------------------------------------------------------------------------------- 1 | package mesh; 2 | 3 | import pixi.core.graphics.Graphics; 4 | import pixi.mesh.Rope; 5 | import pixi.core.Application; 6 | import pixi.core.math.Point; 7 | import pixi.core.textures.Texture; 8 | 9 | class Main extends Application { 10 | 11 | private var count:Float=0; 12 | private var ropeLength:Int=45; 13 | private var points:Array=[]; 14 | private var strip:Rope=null; 15 | private var g:Graphics; 16 | 17 | public function new() { 18 | super(); 19 | _init(); 20 | } 21 | 22 | function _init() { 23 | 24 | for(i in 0...25){ 25 | points.push(new Point(i*ropeLength,0)); 26 | } 27 | strip=new Rope(Texture.from('assets/snake.png'), points); 28 | strip.x=-40; 29 | strip.y=300; 30 | stage.addChild(strip); 31 | 32 | g=new Graphics(); 33 | g.x=strip.x; 34 | g.y=strip.y; 35 | stage.addChild(g); 36 | 37 | ticker.add(function(delta){ 38 | _onUpdate(delta); 39 | }); 40 | super.start(); 41 | } 42 | 43 | function _onUpdate(elapsedTime:Float):Void { 44 | count+=0.1; 45 | for(i in 0...points.length){ 46 | points[i].y=Math.sin((i*0.5)+count)*30; 47 | points[i].x=i*ropeLength+Math.cos((i*0.3)+count)*20; 48 | } 49 | renderPoints(); 50 | } 51 | 52 | private function renderPoints():Void{ 53 | g.clear(); 54 | g.lineStyle(2, 0xffc2c2); 55 | g.moveTo(points[0].x, points[0].y); 56 | 57 | for (i in 1...points.length) { 58 | g.lineTo(points[i].x, points[i].y); 59 | } 60 | 61 | for (i in 1...points.length) { 62 | g.beginFill(0xff0022); 63 | g.drawCircle(points[i].x, points[i].y, 10); 64 | g.endFill(); 65 | } 66 | } 67 | 68 | static function main() { 69 | new Main(); 70 | } 71 | } -------------------------------------------------------------------------------- /samples/src/retina/Main.hx: -------------------------------------------------------------------------------- 1 | package retina; 2 | 3 | import pixi.core.Application.ApplicationOptions; 4 | import pixi.core.Pixi; 5 | import pixi.core.text.DefaultStyle; 6 | import pixi.core.text.Text; 7 | import pixi.core.Application; 8 | import pixi.core.textures.Texture; 9 | import pixi.core.sprites.Sprite; 10 | import js.Browser; 11 | 12 | class Main extends Application { 13 | 14 | var _img:Sprite; 15 | var _label:Text; 16 | 17 | public function new() { 18 | var options:ApplicationOptions = { 19 | backgroundColor: 0xFFFFFF, 20 | autoDensity: true 21 | }; 22 | super(options); 23 | _init(); 24 | } 25 | 26 | function _init() { 27 | super.start(); 28 | 29 | var imgPath:String = "assets/retina/img" + _getResolutionStr() + ".jpg"; 30 | _img = new Sprite(Texture.from(imgPath)); 31 | _img.anchor.set(0.5); 32 | _img.name = "img"; 33 | _img.position.set(Browser.window.innerWidth / 2, Browser.window.innerHeight / 2); 34 | stage.addChild(_img); 35 | 36 | var style:DefaultStyle = {}; 37 | style.fill = 0xF78181; 38 | style.fontSize = 12; 39 | style.fontFamily = "Courier"; 40 | 41 | _label = new Text(imgPath, style); 42 | _label.position.set(0, 0); 43 | stage.addChild(_label); 44 | } 45 | 46 | function _getPixelRatio():Float { 47 | if (Browser.window.devicePixelRatio <= 1 || (Browser.window.devicePixelRatio > 1 && Browser.window.devicePixelRatio < 1.5)) return 1; 48 | else if (Browser.window.devicePixelRatio >= 1.5 && Browser.window.devicePixelRatio < 2) return 1.5; 49 | else if (Browser.window.devicePixelRatio >= 2 && Browser.window.devicePixelRatio < 3) return 2; 50 | else return 3; 51 | } 52 | 53 | function _getResolutionStr():String { 54 | return "@" + _getPixelRatio() + "x"; 55 | } 56 | 57 | static function main() { 58 | new Main(); 59 | } 60 | } -------------------------------------------------------------------------------- /samples/src/rope/Main.hx: -------------------------------------------------------------------------------- 1 | package rope; 2 | 3 | import pixi.mesh.Rope; 4 | import pixi.core.display.Container; 5 | import pixi.core.math.Point; 6 | import pixi.core.Application; 7 | import pixi.core.textures.Texture; 8 | 9 | class Main extends Application { 10 | 11 | var _count:Float; 12 | var _points:Array; 13 | var _length:Float; 14 | 15 | public function new() { 16 | super({backgroundColor: 0xFFFFFF}); 17 | _init(); 18 | } 19 | 20 | function _init() { 21 | ticker.add(function(delta){ 22 | _onUpdate(delta); 23 | }); 24 | super.start(); 25 | 26 | _count = 0; 27 | _points = []; 28 | _length = 918 / 20; 29 | 30 | for (i in 0 ... 20) { 31 | var segSize = _length; 32 | _points.push(new Point(i * _length, 0)); 33 | }; 34 | 35 | var strip = new Rope(Texture.from("assets/snake/snake.png"), _points); 36 | strip.x = -918 / 2; 37 | 38 | var snakeContainer:Container = new Container(); 39 | snakeContainer.position.x = screen.width / 2; 40 | snakeContainer.position.y = screen.height / 2; 41 | 42 | snakeContainer.scale.x = screen.width / 1100; 43 | stage.addChild(snakeContainer); 44 | 45 | snakeContainer.addChild(strip); 46 | } 47 | 48 | function _onUpdate(elapsedTime:Float) { 49 | _count += 0.1; 50 | 51 | for (i in 0 ... _points.length) { 52 | _points[i].y = Math.sin(i * 0.5 + _count) * 30; 53 | _points[i].x = i * _length + Math.cos(i * 0.3 + _count) * 20; 54 | } 55 | } 56 | 57 | static function main() { 58 | new Main(); 59 | } 60 | } -------------------------------------------------------------------------------- /samples/src/spine/Main.hx: -------------------------------------------------------------------------------- 1 | package spine; 2 | 3 | import pixi.loaders.Loader; 4 | import pixi.plugins.spine.Spine; 5 | import pixi.core.Application; 6 | 7 | class Main extends Application { 8 | 9 | var _loader:Loader; 10 | var _spine:Spine; 11 | 12 | public function new() { 13 | var options:ApplicationOptions = { 14 | backgroundColor: 0x00FF66 15 | }; 16 | super(options); 17 | super.start(); 18 | 19 | stage.interactive = true; 20 | var assetsToLoader:Array = []; 21 | 22 | _loader = new Loader(); 23 | _loader.add("spineboy", "assets/spine/data/spineboy.json"); 24 | _loader.load(onAssetsLoaded); 25 | } 26 | 27 | function onAssetsLoaded() { 28 | _spine = new Spine(Reflect.field(_loader.resources, "spineboy").spineData); 29 | 30 | _spine.position.set(renderer.width / 2, renderer.height); 31 | 32 | _spine.scale.set(1.5); 33 | 34 | _spine.stateData.setMix("walk", "jump", 0.2); 35 | _spine.stateData.setMix("jump", "walk", 0.4); 36 | 37 | _spine.state.setAnimation(0, "walk", true); 38 | 39 | stage.addChild(_spine); 40 | 41 | stage.on("click", _stageOnClick); 42 | stage.on("tap", _stageOnClick); 43 | } 44 | 45 | function _stageOnClick() { 46 | _spine.state.setAnimation(0, "jump", false); 47 | _spine.state.addAnimation(0, "walk", true, 0); 48 | } 49 | 50 | static function main() { 51 | new Main(); 52 | } 53 | } -------------------------------------------------------------------------------- /samples/src/text/Main.hx: -------------------------------------------------------------------------------- 1 | package text; 2 | 3 | import pixi.core.text.DefaultStyle; 4 | import pixi.core.text.Text; 5 | import pixi.core.Application; 6 | 7 | class Main extends Application { 8 | 9 | var _label1:Text; 10 | var _label2:Text; 11 | var _label3:Text; 12 | 13 | public function new() { 14 | super({backgroundColor: 0xFFFFFF}); 15 | _init(); 16 | } 17 | 18 | function _init() { 19 | super.start(); 20 | 21 | var style1:DefaultStyle = {}; 22 | style1.fill = 0xF78181; 23 | style1.fontSize = 18; 24 | style1.fontFamily = "Courier"; 25 | _label1 = new Text("TEXT 1", style1); 26 | _label1.position.set(0, 0); 27 | stage.addChild(_label1); 28 | 29 | var style2 = { 30 | fontSize:52 31 | }; 32 | _label2 = new Text("TEXT 2"); 33 | _label2.style.fill ="#99ff33"; 34 | _label2.position.set(0, 80); 35 | stage.addChild(_label2); 36 | 37 | var style3 = { 38 | fontSize:"52px" 39 | }; 40 | _label3 = new Text("TEXT 3"); 41 | _label3.style = style3; 42 | _label3.position.set(0, 160); 43 | stage.addChild(_label3); 44 | } 45 | 46 | static function main() { 47 | new Main(); 48 | } 49 | } -------------------------------------------------------------------------------- /samples/src/textureswap/Main.hx: -------------------------------------------------------------------------------- 1 | package textureswap; 2 | 3 | import js.Browser; 4 | import pixi.core.Application.ApplicationOptions; 5 | import pixi.core.sprites.Sprite; 6 | import pixi.core.textures.Texture; 7 | import pixi.interaction.InteractionEvent; 8 | import pixi.core.Application; 9 | 10 | class Main extends Application { 11 | 12 | var _texture1:Texture; 13 | var _texture2:Texture; 14 | 15 | var _bunny:Sprite; 16 | var _swap:Bool; 17 | 18 | public function new() { 19 | var options:ApplicationOptions = { 20 | backgroundColor: 0xE0E6F8 21 | }; 22 | super(); 23 | _init(); 24 | } 25 | 26 | function _init() { 27 | ticker.add(function(delta){ 28 | _onUpdate(delta); 29 | }); 30 | super.start(); 31 | 32 | _swap = false; 33 | _texture1 = Texture.from("assets/bunnymark/bunny2.png"); 34 | _texture2 = Texture.from("assets/bunnymark/bunny4.png"); 35 | 36 | _bunny = new Sprite(_texture1); 37 | _bunny.anchor.set(0.5); 38 | _bunny.scale.set(3); 39 | _bunny.position.set(Browser.window.innerWidth / 2, Browser.window.innerHeight / 2); 40 | _bunny.interactive = true; 41 | _bunny.on("click", _onClick); 42 | _bunny.on("tap", _onClick); 43 | stage.addChild(_bunny); 44 | } 45 | 46 | function _onClick(target:InteractionEvent) { 47 | _swap = !_swap; 48 | _bunny.texture = (_swap) ? _texture2 : _texture1; 49 | } 50 | 51 | function _onUpdate(elapsedTime:Float) { 52 | _bunny.rotation += 0.1; 53 | } 54 | 55 | static function main() { 56 | new Main(); 57 | } 58 | } -------------------------------------------------------------------------------- /samples/src/tiling/Main.hx: -------------------------------------------------------------------------------- 1 | package tiling; 2 | 3 | import pixi.core.Application.ApplicationOptions; 4 | import pixi.core.textures.Texture; 5 | import pixi.extras.TilingSprite; 6 | import pixi.core.Application; 7 | 8 | class Main extends Application { 9 | 10 | var _tilingSprite:TilingSprite; 11 | var _count:Float; 12 | 13 | public function new() { 14 | var options:ApplicationOptions = { 15 | backgroundColor: 0x97C56E 16 | }; 17 | super(options); 18 | _init(); 19 | } 20 | 21 | function _init() { 22 | ticker.add(function(delta){ 23 | _onUpdate(delta); 24 | }); 25 | super.start(); 26 | 27 | var texture = Texture.from("assets/tiling/p2.jpeg"); 28 | _tilingSprite = new TilingSprite(texture, screen.width, screen.height); 29 | 30 | stage.addChild(_tilingSprite); 31 | 32 | _count = 0; 33 | } 34 | 35 | function _onUpdate(elapsedTime:Float) { 36 | _count += 0.005; 37 | _tilingSprite.tileScale.x = 2 + Math.sin(_count); 38 | _tilingSprite.tileScale.y = 2 + Math.cos(_count); 39 | 40 | _tilingSprite.tilePosition.x += 1; 41 | _tilingSprite.tilePosition.y += 1; 42 | } 43 | 44 | static function main() { 45 | new Main(); 46 | } 47 | } -------------------------------------------------------------------------------- /samples/src/video/Main.hx: -------------------------------------------------------------------------------- 1 | package video; 2 | 3 | import js.html.VideoElement; 4 | import js.Browser; 5 | import pixi.core.sprites.Sprite; 6 | import pixi.core.display.Container; 7 | import pixi.core.textures.Texture; 8 | import pixi.core.Application; 9 | 10 | class Main extends Application { 11 | 12 | var _vidTexture:Texture; 13 | var _vidSprite:Sprite; 14 | var _vidElement:VideoElement; 15 | 16 | public function new() { 17 | var options:ApplicationOptions = { 18 | backgroundColor: 0xE0E6F8, 19 | width: Browser.window.innerWidth, 20 | height: Browser.window.innerHeight 21 | }; 22 | super(options); 23 | _init(); 24 | } 25 | 26 | function _init() { 27 | super.start(); 28 | 29 | _vidTexture = Texture.from("assets/video/test.mp4"); 30 | _vidSprite = new Sprite(_vidTexture); 31 | stage.addChild(_vidSprite); 32 | } 33 | 34 | static function main() { 35 | new Main(); 36 | } 37 | } -------------------------------------------------------------------------------- /src/pixi/Quad.hx: -------------------------------------------------------------------------------- 1 | package pixi; 2 | 3 | @:native("PIXI.Quad") 4 | extern class Quad { 5 | /** 6 | * Helper class to create a quad 7 | */ 8 | public function new(); 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/QuadUv.hx: -------------------------------------------------------------------------------- 1 | package pixi; 2 | 3 | import haxe.io.Float32Array; 4 | import js.lib.Float32Array; 5 | import pixi.core.math.shapes.Rectangle; 6 | import pixi.mesh.Geometry; 7 | 8 | @:native("PIXI.QuadUv") 9 | extern class QuadUv extends Geometry { 10 | /** 11 | * Helper class to create a quad with uvs like in v4 12 | */ 13 | public function new(); 14 | 15 | /** 16 | * The Uvs of the quad 17 | */ 18 | var uvs:Float32Array; 19 | 20 | /** 21 | * An array of vertices 22 | */ 23 | var vertices:Float32Array; 24 | 25 | /** 26 | * legacy upload method, just marks buffers dirty 27 | * @return Returns itself. 28 | */ 29 | function invalidate():QuadUv; 30 | 31 | /** 32 | * Maps two Rectangle to the quad. 33 | * @param targetTextureFrame the first rectangle 34 | * @param destinationFrame the second rectangle 35 | * @return Returns itself. 36 | */ 37 | function map(targetTextureFrame:Rectangle, destinationFrame:Rectangle):Quad; 38 | } 39 | -------------------------------------------------------------------------------- /src/pixi/accessibility/AccessibilityManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.accessibility; 2 | 3 | import haxe.extern.EitherType; 4 | import pixi.core.math.shapes.Rectangle; 5 | import pixi.core.renderers.AbstractRenderer; 6 | 7 | @:native("PIXI.accessibility.AccessibilityManager") 8 | extern class AccessibilityManager { 9 | /** 10 | * The Accessibility manager reacreates the ability to tab and and have content read by screen 11 | * readers. This is very important as it can possibly help people with disabilities access pixi 12 | * content. 13 | * 14 | * Much like interaction any DisplayObject can be made accessible. This manager will map the 15 | * events as if the mouse was being used, minimizing the efferot required to implement. 16 | * 17 | * @class 18 | * @memberof PIXI 19 | */ 20 | function new(renderer:AbstractRenderer); 21 | 22 | /** 23 | * Setting this to true will visually show the divs 24 | * 25 | * @type {Bool} 26 | */ 27 | var debug:Bool; 28 | 29 | /** 30 | * A flag 31 | */ 32 | var isActive(default, null):Bool; 33 | 34 | /** 35 | * A flag 36 | */ 37 | var isMobileAccessibility(default, null):Bool; 38 | 39 | /** 40 | * The renderer this accessibility manager works for. 41 | * 42 | * @member {AbstractRenderer} 43 | */ 44 | var renderer:AbstractRenderer; 45 | 46 | /** 47 | * Adjust the hit area based on the bounds of a display object 48 | * @param hitArea Bounds of the child 49 | */ 50 | function capHitArea(hitArea:Rectangle):Void; 51 | 52 | /** 53 | * Destroys the accessibility manager 54 | * 55 | */ 56 | function destroy():Void; 57 | } 58 | -------------------------------------------------------------------------------- /src/pixi/core/Shader.hx: -------------------------------------------------------------------------------- 1 | package pixi.core; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | @:native("PIXI.Shader") 6 | extern class Shader { 7 | /** 8 | * Wrapper class, webGL Shader for Pixi. 9 | * Adds precision string if vertexSrc or fragmentSrc have no mention of it. 10 | * 11 | * @class 12 | * @extends GLShader 13 | * @memberof PIXI 14 | * @param gl {WebGLRenderingContext} The current WebGL rendering context 15 | * @param vertexSrc {String|Array} The vertex shader source as an array of strings. 16 | * @param fragmentSrc {String|Array} The fragment shader source as an array of strings. 17 | * @param {object} [attributeLocations] - A key value pair showing which location eact attribute should sit. e.g. {position:0, uvs:1}. 18 | * @param {String} [precision] - The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'. 19 | */ 20 | function new(gl:Dynamic, vertexSrc:EitherType>, framentSrc:EitherType>, ?attributeLocations:Dynamic, 21 | ?precision:String); 22 | 23 | /** 24 | * 25 | * @param src {String|Array} 26 | * @return {String|Array} 27 | */ 28 | function checkPrecision(src:EitherType>):EitherType>; 29 | 30 | /** 31 | * Uses this shader 32 | */ 33 | function bind():Void; 34 | 35 | /** 36 | * Destroys this shader 37 | */ 38 | function destroy():Void; 39 | 40 | var gl:Dynamic; 41 | var program:Dynamic; 42 | var attributes:Dynamic; 43 | var uniforms:Dynamic; 44 | } 45 | -------------------------------------------------------------------------------- /src/pixi/core/graphics/BatchGeometry.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.graphics; 2 | 3 | import pixi.core.Pixi.BlendModes; 4 | import pixi.core.Pixi.ScaleModes; 5 | import pixi.core.display.Container; 6 | import pixi.core.math.Point; 7 | import pixi.core.math.Matrix; 8 | import pixi.core.math.shapes.Circle; 9 | import pixi.core.math.shapes.Ellipse; 10 | import pixi.core.math.shapes.Polygon; 11 | import pixi.core.math.shapes.Rectangle; 12 | import pixi.core.renderers.webgl.Buffer; 13 | import pixi.core.textures.Texture; 14 | 15 | @:native("PIXI.BatchGeometry") 16 | extern class BatchGeometry extends Container { 17 | function new(?_static:Bool = false); 18 | 19 | /** 20 | * Buffer used for position, color, texture IDs 21 | */ 22 | private var _buffer:Buffer; 23 | 24 | /** 25 | * Index buffer data 26 | */ 27 | private var _indexBuffer:Buffer; 28 | } 29 | -------------------------------------------------------------------------------- /src/pixi/core/graphics/FillStyle.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.graphics; 2 | 3 | import pixi.core.Pixi.BlendModes; 4 | import pixi.core.Pixi.ScaleModes; 5 | import pixi.core.display.Container; 6 | import pixi.core.math.Point; 7 | import pixi.core.math.Matrix; 8 | import pixi.core.math.shapes.Circle; 9 | import pixi.core.math.shapes.Ellipse; 10 | import pixi.core.math.shapes.Polygon; 11 | import pixi.core.math.shapes.Rectangle; 12 | import pixi.core.textures.Texture; 13 | 14 | @:native("PIXI.FillStyle") 15 | extern class FillStyle { 16 | /** 17 | * Fill style object for Graphics. 18 | */ 19 | function new(); 20 | 21 | /** 22 | * The alpha value used when filling the Graphics object. 23 | */ 24 | var alpha:Float; 25 | 26 | /** 27 | * If the current fill is visible. 28 | */ 29 | var visible:Bool; 30 | 31 | /** 32 | * The hex color value used when coloring the Graphics object. 33 | */ 34 | var color:Int; 35 | 36 | /** 37 | * The transform applied to the texture. 38 | */ 39 | var matrix:String; 40 | 41 | /** 42 | * The texture to be used for the fill. 43 | */ 44 | var texture:String; 45 | 46 | /** 47 | * Clones the object 48 | * @return the clone 49 | */ 50 | function clone():FillStyle; 51 | 52 | /** 53 | * Destroy and don't use after this 54 | */ 55 | function destroy():Void; 56 | 57 | /** 58 | * Reset 59 | */ 60 | function reset():Void; 61 | } 62 | -------------------------------------------------------------------------------- /src/pixi/core/graphics/LineStyle.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.graphics; 2 | 3 | import pixi.core.Pixi.BlendModes; 4 | import pixi.core.Pixi.ScaleModes; 5 | import pixi.core.display.Container; 6 | import pixi.core.math.Point; 7 | import pixi.core.math.Matrix; 8 | import pixi.core.math.shapes.Circle; 9 | import pixi.core.math.shapes.Ellipse; 10 | import pixi.core.math.shapes.Polygon; 11 | import pixi.core.math.shapes.Rectangle; 12 | import pixi.core.textures.Texture; 13 | 14 | @:native("PIXI.LineStyle") 15 | extern class LineStyle extends FillStyle { 16 | /** 17 | * Fill style object for Graphics. 18 | */ 19 | function new(); 20 | 21 | /** 22 | * The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner). 23 | */ 24 | var alignment:Float; 25 | 26 | /** 27 | * If true the lines will be draw using LINES instead of TRIANGLE_STRIP 28 | */ 29 | var native:Bool; 30 | 31 | /** 32 | * The width (thickness) of any lines drawn. 33 | */ 34 | var width:Float; 35 | } 36 | -------------------------------------------------------------------------------- /src/pixi/core/math/Point.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math; 2 | 3 | @:native("PIXI.Point") 4 | extern class Point { 5 | /** 6 | * The Point object represents a location in a two-dimensional coordinate system, where x represents 7 | * the horizontal axis and y represents the vertical axis. 8 | * 9 | * @class 10 | * @namespace PIXI 11 | * @param [x=0] {number} position of the point on the x axis 12 | * @param [y=0] {number} position of the point on the y axis 13 | */ 14 | function new(?x:Float, ?y:Float); 15 | 16 | /** 17 | * Copies x and y from the given point 18 | * 19 | * @param {Point} The point to copy from 20 | * @return {Point} Returns itself. 21 | */ 22 | function copyFrom(p:Point):Point; 23 | 24 | /** 25 | * Copies x and y into the given point 26 | * 27 | * @param {Point} p - The point to copy. 28 | * @return {Point} Given point with values updated 29 | */ 30 | function copyTo(p:Point):Point; 31 | 32 | /** 33 | * Returns true if the given point is equal to this point 34 | * 35 | * @method copy 36 | * @param {Point} the point to compare 37 | * @return {Bool} the result of the comparison 38 | */ 39 | function equals(p:Point):Bool; 40 | 41 | /** 42 | * Sets the point to a new x and y position. 43 | * If y is ommited, both x and y will be set to x. 44 | * 45 | * @method set 46 | * @param [x=0] {Float} position of the point on the x axis 47 | * @param [y=0] {Float} position of the point on the y axis 48 | */ 49 | function set(?x:Float, ?y:Float):Void; 50 | 51 | /** 52 | * @property x 53 | * @type Float 54 | * @default 0 55 | */ 56 | var x:Float; 57 | 58 | /** 59 | * @property y 60 | * @type Float 61 | * @default 0 62 | */ 63 | var y:Float; 64 | } 65 | -------------------------------------------------------------------------------- /src/pixi/core/math/shapes/Circle.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math.shapes; 2 | 3 | @:native("PIXI.Circle") 4 | extern class Circle extends Shape { 5 | /** 6 | * The Circle object can be used to specify a hit area for displayObjects 7 | * 8 | * @class Circle 9 | * @constructor 10 | * @param x {Float} The X coordinate of the center of this circle 11 | * @param y {Float} The Y coordinate of the center of this circle 12 | * @param radius {Float} The radius of the circle 13 | */ 14 | function new(x:Float, y:Float, radius:Float):Void; 15 | 16 | /** 17 | * Creates a clone of this Circle instance 18 | * 19 | * @method clone 20 | * @return {Circle} a copy of the circle 21 | */ 22 | function clone():Circle; 23 | 24 | /** 25 | * Returns the framing rectangle of the circle as a PIXI.Rectangle object 26 | * 27 | * @method getBounds 28 | * @return {Rectangle} the framing rectangle 29 | */ 30 | function getBounds():Rectangle; 31 | 32 | /** 33 | * @property x 34 | * @type Float 35 | * @default 0 36 | */ 37 | var x:Float; 38 | 39 | /** 40 | * @property y 41 | * @type Float 42 | * @default 0 43 | */ 44 | var y:Float; 45 | 46 | /** 47 | * @property radius 48 | * @type Float 49 | * @default 0 50 | */ 51 | var radius:Float; 52 | } 53 | -------------------------------------------------------------------------------- /src/pixi/core/math/shapes/Ellipse.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math.shapes; 2 | 3 | @:native("PIXI.Ellipse") 4 | extern class Ellipse extends Shape { 5 | /** 6 | * The Ellipse object can be used to specify a hit area for displayObjects 7 | * 8 | * @class Ellipse 9 | * @constructor 10 | * @param x {Float} The X coordinate of the center of the ellipse 11 | * @param y {Float} The Y coordinate of the center of the ellipse 12 | * @param width {Float} The half width of this ellipse 13 | * @param height {Float} The half height of this ellipse 14 | */ 15 | function new(x:Float, y:Float, width:Float, height:Float):Void; 16 | 17 | /** 18 | * Creates a clone of this Ellipse instance 19 | * 20 | * @method clone 21 | * @return {Ellipse} a copy of the ellipse 22 | */ 23 | function clone():Ellipse; 24 | 25 | /** 26 | * Returns the framing rectangle of the circle as a PIXI.Rectangle object 27 | * 28 | * @method getBounds 29 | * @return {Rectangle} the framing rectangle 30 | */ 31 | function getBounds():Rectangle; 32 | 33 | /** 34 | * @property x 35 | * @type Float 36 | * @default 0 37 | */ 38 | var x:Float; 39 | 40 | /** 41 | * @property y 42 | * @type Float 43 | * @default 0 44 | */ 45 | var y:Float; 46 | 47 | /** 48 | * @property width 49 | * @type Float 50 | * @default 0 51 | */ 52 | var width:Float; 53 | 54 | /** 55 | * @property height 56 | * @type Float 57 | * @default 0 58 | */ 59 | var height:Float; 60 | } 61 | -------------------------------------------------------------------------------- /src/pixi/core/math/shapes/Polygon.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math.shapes; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | @:native("PIXI.Polygon") 6 | extern class Polygon extends Shape { 7 | /** 8 | * @param {PIXI.Point[]|number[]} points - This can be an array of Points 9 | * that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or 10 | * the arguments passed can be all the points of the polygon e.g. 11 | * `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat 12 | * x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers. 13 | */ 14 | function new(points:EitherType, Array>):Void; 15 | 16 | /** 17 | * Creates a clone of this polygon 18 | * 19 | * @method clone 20 | * @return {Polygon} a copy of the polygon 21 | */ 22 | function clone():Polygon; 23 | 24 | /** 25 | * An array of the points of this polygon 26 | * @property points 27 | * @type Array 28 | * 29 | */ 30 | var points:Array; 31 | } 32 | -------------------------------------------------------------------------------- /src/pixi/core/math/shapes/RoundedRectangle.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math.shapes; 2 | 3 | @:native("PIXI.RoundedRectangle") 4 | extern class RoundedRectangle extends Shape { 5 | /** 6 | * The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height. 7 | * 8 | * @class RoundedRectangle 9 | * @constructor 10 | * @param x {Number} The X coordinate of the upper-left corner of the rounded rectangle 11 | * @param y {Number} The Y coordinate of the upper-left corner of the rounded rectangle 12 | * @param width {Number} The overall width of this rounded rectangle 13 | * @param height {Number} The overall height of this rounded rectangle 14 | * @param radius {Number} The overall radius of this corners of this rounded rectangle 15 | */ 16 | function new(x:Float, y:Float, width:Float, height:Float, radius:Float):Void; 17 | 18 | /** 19 | * Creates a clone of this Rounded Rectangle 20 | * 21 | * @method clone 22 | * @return {RoundedRectangle} a copy of the rounded rectangle 23 | */ 24 | function clone():RoundedRectangle; 25 | 26 | /** 27 | * @property x 28 | * @type Float 29 | * @default 0 30 | */ 31 | var x:Float; 32 | 33 | /** 34 | * @property y 35 | * @type Float 36 | * @default 0 37 | */ 38 | var y:Float; 39 | 40 | /** 41 | * @property width 42 | * @type Float 43 | * @default 0 44 | */ 45 | var width:Float; 46 | 47 | /** 48 | * @property height 49 | * @type Float 50 | * @default 0 51 | */ 52 | var height:Float; 53 | 54 | /** 55 | * @property radius 56 | * @type Float 57 | * @default 20 58 | */ 59 | var radius:Float; 60 | } 61 | -------------------------------------------------------------------------------- /src/pixi/core/math/shapes/Shape.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.math.shapes; 2 | 3 | import pixi.core.Pixi.Shapes; 4 | 5 | extern class Shape { 6 | /** 7 | * Defines the type of the shape to avoid instanceof (Std.is) checks 8 | */ 9 | var type:Shapes; 10 | 11 | /** 12 | * Checks whether the x and y coordinates passed to this function are contained within this Shape 13 | * 14 | * @method contains 15 | * @param x {Float} The X coordinate of the point to test 16 | * @param y {Float} The Y coordinate of the point to test 17 | * @return {Bool} Whether the x/y coords are within this Rectangle 18 | */ 19 | function contains(x:Float, y:Float):Bool; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/RendererPlugins.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers; 2 | 3 | import pixi.accessibility.AccessibilityManager; 4 | import pixi.core.renderers.webgl.extract.Extract; 5 | import pixi.interaction.InteractionManager; 6 | 7 | /** 8 | * Collection of installed plugins. 9 | * These are included by default in PIXI, but can be excluded by creating a custom build. 10 | * Consult the README for more information about creating custom builds and excluding plugins. 11 | */ 12 | extern class RendererPlugins implements Dynamic { 13 | /** 14 | * Support tabbing interactive elements. 15 | */ 16 | public var accessibility:AccessibilityManager; 17 | 18 | /** 19 | * Extract image data from renderer. 20 | */ 21 | public var extract:Extract; 22 | 23 | /** 24 | * Handles mouse, touch and pointer events. 25 | */ 26 | public var interaction:InteractionManager; 27 | 28 | /** 29 | * Pre-render display objects. 30 | */ 31 | public var prepare:BasePrepare; 32 | } 33 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/canvas/utils/CanvasGraphics.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.canvas.utils; 2 | 3 | import js.html.CanvasRenderingContext2D; 4 | import pixi.core.graphics.Graphics; 5 | 6 | @:native("PIXI.CanvasGraphics") 7 | extern class CanvasGraphics { 8 | /* 9 | * Renders a Graphics object to a canvas. 10 | * 11 | * @param graphics {Graphics} the actual graphics object to render 12 | * @param context {CanvasRenderingContext2D} the 2d drawing method of the canvas 13 | */ 14 | static function renderGraphics(graphics:Graphics, context:CanvasRenderingContext2D):Void; 15 | } 16 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/canvas/utils/CanvasMaskManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.canvas.utils; 2 | 3 | import pixi.core.renderers.webgl.Renderer; 4 | 5 | @:native("PIXI.CanvasMaskManager") 6 | extern class CanvasMaskManager { 7 | function new(); 8 | 9 | /** 10 | * This method adds it to the current stack of masks. 11 | * 12 | * @param maskData {object} the maskData that will be pushed 13 | * @param renderer {Renderer|CanvasRenderer} The renderer context to use. 14 | */ 15 | @:overload(function(maskData:Dynamic, renderer:Renderer):Void {}) 16 | function pushMask(maskData:Dynamic, renderer:CanvasRenderer):Void; 17 | 18 | /** 19 | * Restores the current drawing context to the state it was before the mask was applied. 20 | * 21 | * @param renderer {Renderer|CanvasRenderer} The renderer context to use. 22 | */ 23 | @:overload(function(renderer:Renderer):Void {}) 24 | function popMask(renderer:CanvasRenderer):Void; 25 | } 26 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/canvas/utils/CanvasPrepare.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.canvas.utils; 2 | 3 | import pixi.core.renderers.canvas.CanvasRenderer; 4 | 5 | /** 6 | * The prepare manager provides functionality to upload content to the GPU. 7 | * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare 8 | */ 9 | @:native("PIXI.prepare.CanvasPrepare") 10 | extern class CanvasPrepare extends BasePrepare {} 11 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/systems/BatchSystem.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.systems; 2 | 3 | import js.html.webgl.RenderingContext; 4 | import pixi.core.Pixi.BlendModes; 5 | import pixi.core.display.DisplayObject; 6 | import pixi.core.math.Matrix; 7 | import pixi.core.math.shapes.Rectangle; 8 | import pixi.core.renderers.webgl.Renderer; 9 | import pixi.core.renderers.webgl.State; 10 | import pixi.core.renderers.webgl.UniformGroup; 11 | import pixi.core.renderers.webgl.filters.Filter; 12 | import pixi.core.renderers.webgl.utils.ObjectRenderer; 13 | import pixi.core.sprites.Sprite; 14 | import pixi.core.textures.RenderTexture; 15 | 16 | @:native("PIXI.systems.BatchSystem") 17 | extern class BatchSystem extends System { 18 | /** 19 | * The currently active ObjectRenderer. 20 | */ 21 | var currentRenderer:ObjectRenderer; 22 | 23 | /** 24 | * An empty renderer. 25 | */ 26 | var emptyRenderer:ObjectRenderer; 27 | 28 | /** 29 | * System plugin to the renderer to manage batching. 30 | * @param renderer The renderer this manager works for. 31 | */ 32 | function new(renderer:Renderer); 33 | 34 | /** 35 | * This should be called if you wish to do some custom rendering It will basically render anything that may be batched up such as sprites 36 | */ 37 | function flush():Void; 38 | 39 | /** 40 | * Reset the system to an empty renderer 41 | */ 42 | function reset():Void; 43 | 44 | /** 45 | * Changes the current renderer to the one given in parameter 46 | * @param objectRenderer The object renderer to use. 47 | */ 48 | function setObjectRenderer(objectRenderer:ObjectRenderer):Void; 49 | } 50 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/systems/StencilSystem.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.systems; 2 | 3 | import pixi.core.graphics.Graphics; 4 | import pixi.core.renderers.webgl.Renderer; 5 | import pixi.core.renderers.systems.System; 6 | 7 | @:native("PIXI.systems.StencilSystem") 8 | extern class StencilSystem extends System { 9 | /** 10 | * System plugin to the renderer to manage stencils (used for masks). 11 | * @param renderer 12 | */ 13 | function new(renderer:Renderer); 14 | 15 | /** 16 | * The mask stack 17 | */ 18 | var stencilMaskStack:Array; 19 | 20 | /** 21 | * Removes the last mask from the stencil stack. 22 | */ 23 | function popStencil():Void; 24 | 25 | /** 26 | * Applies the Mask and adds it to the current stencil stack. 27 | * @param graphics The mask 28 | */ 29 | function pushStencil(graphics:Graphics):Void; 30 | 31 | /** 32 | * Changes the mask stack that is used by this System. 33 | * @param stencilMaskStack 34 | */ 35 | function setMaskStack(stencilMaskStack:Array):Void; 36 | } 37 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/systems/System.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.systems; 2 | 3 | import haxe.ds.ObjectMap; 4 | import pixi.Quad; 5 | import pixi.QuadUv; 6 | import pixi.core.display.DisplayObject; 7 | import pixi.core.math.Matrix; 8 | import pixi.core.math.shapes.Rectangle; 9 | import pixi.core.renderers.webgl.Renderer; 10 | import pixi.core.renderers.webgl.UniformGroup; 11 | import pixi.core.renderers.webgl.filters.Filter; 12 | import pixi.core.sprites.Sprite; 13 | import pixi.core.textures.RenderTexture; 14 | 15 | @:native("PIXI.System") 16 | extern class System { 17 | /** 18 | * System is a base class used for extending systems used by the PIXI.Renderer 19 | * @param renderer The renderer this manager works for. 20 | */ 21 | function new(renderer:Renderer); 22 | 23 | /** 24 | * The renderer this manager works for. 25 | */ 26 | var renderer:Renderer; 27 | 28 | /** 29 | * Generic destroy methods to be overridden by the subclass 30 | */ 31 | function destroy():Void; 32 | } 33 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/systems/TextureGCSystem.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.systems; 2 | 3 | import pixi.core.Pixi.GCModes; 4 | import pixi.core.display.DisplayObject; 5 | import pixi.core.renderers.webgl.Renderer; 6 | 7 | @:native("PIXI.systems.TextureGCSystem") 8 | extern class TextureGCSystem extends System { 9 | /** 10 | * Check count 11 | */ 12 | var checkCount(default, null):Int; 13 | 14 | /** 15 | * Maximum number of item to check 16 | */ 17 | var checkCountMax:Int; 18 | 19 | /** 20 | * Count 21 | */ 22 | var count(default, null):Int; 23 | 24 | /** 25 | * Maximum idle time, in seconds 26 | */ 27 | var maxIdle:Float; 28 | 29 | /** 30 | * Current garabage collection mode 31 | */ 32 | var mode:GCModes; 33 | 34 | /** 35 | * System plugin to the renderer to manage texture garbage collection on the GPU, ensuring that it does not get clogged up with textures that are no longer being used. 36 | * @param renderer The renderer this system works for 37 | */ 38 | function new(renderer:Renderer); 39 | 40 | /** 41 | * Checks to see when the last time a texture was used if the texture has not been used for a specified amount of time it will be removed from the GPU 42 | */ 43 | function postrender():Void; 44 | 45 | /** 46 | * Checks to see when the last time a texture was used if the texture has not been used for a specified amount of time it will be removed from the GPU 47 | */ 48 | function run():Void; 49 | 50 | /** 51 | * Removes all the textures within the specified displayObject and its children from the GPU 52 | * @param displayObject the displayObject to remove the textures from. 53 | */ 54 | function unload(displayObject:DisplayObject):Void; 55 | } 56 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/Buffer.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl; 2 | 3 | import haxe.extern.EitherType; 4 | import js.lib.Float32Array; 5 | 6 | @:native("PIXI.Buffer") 7 | extern class Buffer { 8 | /** 9 | * A wrapper for data so that it can be used and uploaded by WebGL 10 | * 11 | * @param data {Array} the data to store in the buffer. 12 | * @param [_static=true] {Bool} true for static buffer 13 | * @param [index=false] {Bool} true for index buffer 14 | */ 15 | function new(data:EitherType, Array>, ?_static:Bool, ?index:Bool); 16 | 17 | /** 18 | * 19 | * @param data {Array} the data to store in the buffer. 20 | * @return {Buffer} A new Buffer based on the data provided. 21 | */ 22 | function from(data:EitherType, Array>):Buffer; 23 | 24 | /** 25 | * Destroys the buffer 26 | */ 27 | function destroy():Void; 28 | 29 | /** 30 | * Disposes WebGL resources that are connected to this geometry 31 | */ 32 | function dispose():Void; 33 | 34 | /** 35 | * flags this buffer as requiring an upload to the GPU 36 | * @param data {Array} the data to update in the buffer. 37 | */ 38 | function update(data:EitherType, Array>):Void; 39 | } 40 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/GLTexture.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl; 2 | 3 | @:native("PIXI.RenderTarget") 4 | extern class GLTexture { 5 | function new(); 6 | 7 | /** 8 | * Texture contents dirty flag 9 | */ 10 | private var dirtyId:Int; 11 | 12 | /** 13 | * Texture style dirty flag 14 | */ 15 | private var dirtyStyleId:Int; 16 | 17 | /** 18 | * Height of texture that was used in texImage2D 19 | */ 20 | var height:Float; 21 | 22 | /** 23 | * Type copied from baseTexture 24 | */ 25 | var internalFormat:Int; 26 | 27 | /** 28 | * Whether mip levels has to be generated 29 | */ 30 | var mipmap:Bool; 31 | 32 | /** 33 | * The WebGL texture 34 | */ 35 | var texture:js.html.webgl.Texture; 36 | 37 | /** 38 | * Type copied from baseTexture 39 | */ 40 | var type:Int; 41 | 42 | /** 43 | * Width of texture that was used in texImage2D 44 | */ 45 | var width:Float; 46 | 47 | /** 48 | * WrapMode copied from baseTexture 49 | */ 50 | var wrapMode:Int; 51 | } 52 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/Program.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl; 2 | 3 | import haxe.extern.EitherType; 4 | import js.lib.Float32Array; 5 | 6 | @:native("PIXI.Program") 7 | extern class Program { 8 | /** 9 | * Helper class to create a shader program. 10 | * @param vertextSrc The source of the vertex shader. 11 | * @param fragmentSrc The source of the fragment shader. 12 | * @param name Name for shader 13 | */ 14 | function new(?vertextSrc:String, ?fragmentSrc:String, ?name:String); 15 | 16 | static var defaultFragmentSrc:String; 17 | static var defaultVertexSrc:String; 18 | 19 | var fragmentSrc:String; 20 | var vertexSrc:String; 21 | 22 | /** 23 | * A short hand function to create a program based of a vertex and fragment shader this method will also check to see if there is a cached program. 24 | * @param vertexSrc {String} The source of the vertex shader. 25 | * @param fragmentSrc {String} The source of the fragment shader. 26 | * @param uniforms {Dynamic} Custom uniforms to use to augment the built-in ones. 27 | * @return {Program} an shiny new Pixi shader! 28 | */ 29 | function from(?vertexSrc:String, ?fragmentSrc:String, ?uniforms:Dynamic):Program; 30 | 31 | /** 32 | * Extracts the data for a buy creating a small test program or reading the src directly. 33 | * @param vertexSrc {String} The source of the vertex shader. 34 | * @param fragmentSrc {String} The source of the fragment shader. 35 | */ 36 | private function extractData(vertexSrc:String, fragmentSrc:String):Void; 37 | } 38 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/State.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl; 2 | 3 | @:native("PIXI.State") 4 | extern class State { 5 | /** 6 | * This is a WebGL state, and is is passed The WebGL StateManager. 7 | * Each mesh rendered may require WebGL to be in a different state. For example you may want different blend mode or to enable polygon offsets 8 | */ 9 | function new(); 10 | 11 | /** 12 | * Activates blending of the computed fragment color values 13 | */ 14 | var blend:Bool; 15 | 16 | /** 17 | * The blend mode to be applied when this state is set. Apply a value of PIXI.BLEND_MODES.NORMAL to reset the blend mode. Setting this mode to anything other than NO_BLEND will automatically switch blending on.´ 18 | */ 19 | var blendMode:Int; 20 | 21 | /** 22 | * Specifies whether or not front or back-facing polygons can be culled. 23 | */ 24 | var clockwiseFrontFace:Bool; 25 | 26 | /** 27 | * Activates culling of polygons. 28 | */ 29 | var culling:Bool; 30 | 31 | /** 32 | * Activates depth comparisons and updates to the depth buffer. 33 | */ 34 | var depthTest:Bool; 35 | 36 | /** 37 | * Activates adding an offset to depth values of polygon's fragments 38 | */ 39 | var offsets:Bool; 40 | 41 | /** 42 | * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill. 43 | */ 44 | var polygonOffset:Float; 45 | } 46 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/UniformGroup.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl; 2 | 3 | @:native("PIXI.UniformGroup") 4 | extern class UniformGroup { 5 | /** 6 | * Uniform group holds uniform map and some ID's for work 7 | * @param uniforms Custom uniforms to use to augment the built-in ones. 8 | * @param _static Uniforms wont be changed after creation 9 | */ 10 | public function new(?uniforms:Dynamic, ?_static:Bool); 11 | 12 | /** 13 | * dirty version 14 | */ 15 | private var dirtyId:Float; 16 | 17 | /** 18 | * Its a group and not a single uniforms. Default: true 19 | */ 20 | var group(default, null):Bool; 21 | 22 | /** 23 | * unique id 24 | */ 25 | private var id:Float; 26 | 27 | /** 28 | * Uniforms wont be changed after creation 29 | */ 30 | @:native('static') var isStatic:Bool; 31 | 32 | /** 33 | * uniform values 34 | */ 35 | var uniforms:Dynamic; 36 | } 37 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/managers/BlendModeManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.managers; 2 | 3 | import pixi.core.Pixi.BlendModes; 4 | 5 | extern class BlendModeManager extends WebGLManager { 6 | /** 7 | * @class 8 | * @memberof PIXI 9 | * @extends WebGlManager 10 | * @param renderer {Renderer} The renderer this manager works for. 11 | */ 12 | function new(renderer:Renderer); 13 | 14 | /** 15 | * Sets-up the given blendMode from WebGL's point of view. 16 | * 17 | * @param blendMode {number} the blendMode, should be a Pixi const, such as BlendModes.ADD 18 | */ 19 | function setBlendMode(blendMode:BlendModes):Void; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/managers/MaskManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.managers; 2 | 3 | extern class MaskManager extends WebGLManager { 4 | /** 5 | * @class 6 | * @memberof PIXI 7 | * @param renderer {Renderer} The renderer this manager works for. 8 | */ 9 | function new(renderer:Renderer); 10 | 11 | /** 12 | * Applies the Mask and adds it to the current filter stack. 13 | * 14 | * @param graphics {Graphics} 15 | * @param webGLData {any[]} 16 | */ 17 | function pushMask(target:Dynamic, maskData:Dynamic):Void; 18 | 19 | /** 20 | * Removes the last mask from the mask stack and doesn't return it. 21 | * 22 | * @param target {RenderTarget} 23 | * @param maskData {any[]} 24 | */ 25 | function popMask(target:Dynamic, maskData:Dynamic):Void; 26 | 27 | /** 28 | * Applies the Mask and adds it to the current filter stack. 29 | * 30 | * @param target {RenderTarget} 31 | * @param maskData {any[]} 32 | */ 33 | function pushSpriteMask(target:Dynamic, maskData:Dynamic):Void; 34 | 35 | /** 36 | * Removes the last filter from the filter stack and doesn't return it. 37 | * 38 | */ 39 | function popSpriteMask():Void; 40 | 41 | /** 42 | * Applies the Mask and adds it to the current filter stack. 43 | * 44 | * @param target {RenderTarget} 45 | * @param maskData {any[]} 46 | */ 47 | function pushStencilMask(target:Dynamic, maskData:Dynamic):Void; 48 | 49 | /** 50 | * Removes the last filter from the filter stack and doesn't return it. 51 | * @param target {RenderTarget} 52 | * @param maskData {any[]} 53 | */ 54 | function popStencilMask(target:Dynamic, maskData:Dynamic):Void; 55 | } 56 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/managers/ShaderManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.managers; 2 | 3 | extern class ShaderManager extends WebGLManager { 4 | /** 5 | * @class 6 | * @memberof PIXI 7 | * @extends WebGLManager 8 | * @param renderer {Renderer} The renderer this manager works for. 9 | */ 10 | function new(renderer:Renderer); 11 | 12 | /** 13 | * @member {number} 14 | */ 15 | var maxAttibs:Int; 16 | 17 | /** 18 | * @member {any[]} 19 | */ 20 | var attribState:Array; 21 | 22 | /** 23 | * @member {any[]} 24 | */ 25 | var tempAttribState:Array; 26 | 27 | /** 28 | * @member {any[]} 29 | */ 30 | var stack:Array; 31 | 32 | /** 33 | * Takes the attributes given in parameters and uploads them. 34 | * 35 | * @param attribs {Array} attribs 36 | */ 37 | function setAttribs(attribs:Array):Void; 38 | 39 | /** 40 | * Sets the current shader. 41 | * 42 | * @param shader {Shader} the shader to upload 43 | */ 44 | function setShader(shader:Dynamic):Void; 45 | } 46 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/managers/WebGLManager.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.managers; 2 | 3 | import pixi.core.renderers.webgl.Renderer; 4 | 5 | extern class WebGLManager { 6 | /** 7 | * @class 8 | * @memberof PIXI 9 | * @param renderer {Renderer} The renderer this manager works for. 10 | */ 11 | function new(renderer:Renderer); 12 | 13 | /** 14 | * Generic method called when there is a WebGL context change. 15 | * 16 | */ 17 | function onContextChange():Void; 18 | 19 | /** 20 | * Generic destroy methods to be overridden by the subclass 21 | * 22 | */ 23 | function destroy():Void; 24 | } 25 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/utils/BatchShaderGenerator.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.utils; 2 | 3 | extern class BatchShaderGenerator { 4 | /** 5 | * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer 6 | */ 7 | function new(vertexSrc:String, fragTemplate:String); 8 | 9 | /** 10 | * Reference to the fragement shader template. Must contain "%count%" and "%forloop%". 11 | */ 12 | var fragTemplate:String; 13 | 14 | /** 15 | * Reference to the vertex shader source. 16 | */ 17 | var vertexSrc:String; 18 | } 19 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/utils/ObjectRenderer.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.utils; 2 | 3 | import pixi.core.display.DisplayObject; 4 | import pixi.core.renderers.webgl.Renderer; 5 | import pixi.core.renderers.webgl.managers.WebGLManager; 6 | 7 | extern class ObjectRenderer extends WebGLManager { 8 | /** 9 | * Base for a common object renderer that can be used as a system renderer plugin. 10 | * 11 | * @class 12 | * @extends PIXI.WebGLManager 13 | * @memberof PIXI 14 | * @param renderer {PIXI.Renderer} The renderer this object renderer works for. 15 | */ 16 | function new(renderer:Renderer); 17 | 18 | /** 19 | * Starts the renderer and sets the shader 20 | * 21 | */ 22 | function start():Void; 23 | 24 | /** 25 | * Stops the renderer 26 | * 27 | */ 28 | function stop():Void; 29 | 30 | /** 31 | * Stub method for rendering content and emptying the current batch. 32 | * 33 | */ 34 | function flush():Void; 35 | 36 | /** 37 | * Renders an object 38 | * 39 | * @param object {PIXI.DisplayObject} The object to render. 40 | */ 41 | function render(object:DisplayObject):Void; 42 | } 43 | -------------------------------------------------------------------------------- /src/pixi/core/renderers/webgl/utils/WebGLPrepare.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.renderers.webgl.utils; 2 | 3 | import pixi.core.renderers.BasePrepare; 4 | import pixi.core.renderers.webgl.Renderer; 5 | 6 | /** 7 | * The prepare manager provides functionality to upload content to the GPU. 8 | * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare 9 | */ 10 | @:native("PIXI.prepare.WebGLPrepare") 11 | extern class WebGLPrepare extends BasePrepare {} 12 | -------------------------------------------------------------------------------- /src/pixi/core/text/DefaultStyle.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.text; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | typedef DefaultStyle = { 6 | @:optional var align:String; // left 7 | @:optional var breakWords:Bool; // false 8 | @:optional var dropShadow:Bool; // false 9 | @:optional var dropShadowAlpha:Float; // 1 10 | @:optional var dropShadowAngle:Float; // Math.PI / 6 11 | @:optional var dropShadowBlur:Float; // 0 12 | @:optional var dropShadowColor:String; // #000000 13 | @:optional var dropShadowDistance:Float; // 5 14 | @:optional var fill:Dynamic; // black 15 | @:optional var fillGradientType:Int; // Pixi.TEXT_GRADIENT.LINEAR_VERTICAL 16 | @:optional var fillGradientStops:Array; // [] 17 | @:optional var fontFamily:EitherType>; // Arial 18 | @:optional var fontSize:EitherType; // 26 19 | @:optional var fontStyle:String; // normal 20 | @:optional var fontVariant:String; // normal 21 | @:optional var fontWeight:String; // normal 22 | @:optional var letterSpacing:Float; // 0 23 | @:optional var lineHeight:Float; // 0 24 | @:optional var lineJoin:String; // miter 25 | @:optional var miterLimit:Float; // 10 26 | @:optional var padding:Float; // 0 27 | @:optional var stroke:EitherType; // black 28 | @:optional var strokeThickness:Float; // 0 29 | @:optional var trim:Bool; // false 30 | @:optional var textBaseline:String; // alphabetic 31 | @:optional var whiteSpace:Bool; // false 32 | @:optional var wordWrap:Bool; // false 33 | @:optional var wordWrapWidth:Float; // 100 34 | @:optional var leading:Float; // 0 35 | } 36 | -------------------------------------------------------------------------------- /src/pixi/core/textures/FrameBuffer.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.textures; 2 | 3 | @:native("PIXI.FrameBuffer") 4 | extern class FrameBuffer { 5 | /** 6 | * Reference to the colorTexture. 7 | */ 8 | var colorTexture(default, null):Array; 9 | 10 | /** 11 | * Frame buffer used by the BaseRenderTexture 12 | * @param width Width of the frame buffer 13 | * @param height height of the frame buffer 14 | */ 15 | public function new(width:Float, height:Float); 16 | 17 | /** 18 | * Add texture to the colorTexture array 19 | * @param index Index of the array to add the texture to 20 | * @param texture Texture to add to the array 21 | */ 22 | function addColorTexture(?index:Int, ?texture:Texture):Void; 23 | 24 | /** 25 | * Add a depth texture to the frame buffer 26 | * @param texture Texture to add 27 | */ 28 | function addDepthTexture(?texture:Texture):Void; 29 | 30 | /** 31 | * disposes WebGL resources that are connected to this geometry 32 | */ 33 | function dispose():Void; 34 | 35 | /** 36 | * Enable depth on the frame buffer 37 | */ 38 | function enableDepth():Void; 39 | 40 | /** 41 | * Enable stencil on the frame buffer 42 | */ 43 | function enableStencil():Void; 44 | 45 | /** 46 | * Resize the frame buffer 47 | * @param width Width of the frame buffer to resize to 48 | * @param height Height of the frame buffer to resize to 49 | */ 50 | function resize(width:Float, height:Float):Void; 51 | } 52 | -------------------------------------------------------------------------------- /src/pixi/core/textures/TextureUvs.hx: -------------------------------------------------------------------------------- 1 | package pixi.core.textures; 2 | 3 | import pixi.core.math.shapes.Rectangle; 4 | 5 | @:native("PIXI.TextureUvs") 6 | extern class TextureUvs { 7 | /** 8 | * A standard object to store the Uvs of a texture 9 | * 10 | * @class 11 | * @private 12 | * @memberof PIXI 13 | */ 14 | function new(); 15 | 16 | /** 17 | * Sets the texture Uvs based on the given frame information. 18 | * 19 | * @private 20 | * @param {Rectangle} frame - The frame of the texture 21 | * @param {Rectangle} baseFrame - The base frame of the texture 22 | * @param {Float} rotate - Rotation of frame, see {@link PIXI.GroupD8} 23 | */ 24 | function set(frame:Rectangle, baseFrame:Rectangle, rotate:Float):Void; 25 | } 26 | -------------------------------------------------------------------------------- /src/pixi/filters/alpha/AlphaFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.alpha; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.AlphaFilter") 6 | extern class AlphaFilter extends Filter { 7 | /** 8 | * Simplest filter - applies alpha 9 | * 10 | * Use this instead of Container's alpha property to avoid visual layering of individual elements. 11 | * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains. 12 | * If elements are not opaque, they will blend with each other anyway. 13 | * 14 | * Very handy if you want to use common features of all filters: 15 | * 16 | * 1. Assign a blendMode to this filter, blend all elements inside display object with background. 17 | * 18 | * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter. 19 | * 20 | * @class 21 | * @extends PIXI.Filter 22 | * @memberof PIXI.filters 23 | */ 24 | /** 25 | * @param {Float} [alpha=1] Amount of alpha from 0 to 1, where 0 is transparent 26 | */ 27 | function new(?alpha:Float); 28 | 29 | /** 30 | * Coefficient for alpha multiplication 31 | * 32 | * @member {Float} 33 | * @default 1 34 | */ 35 | var alpha:Float; 36 | } 37 | -------------------------------------------------------------------------------- /src/pixi/filters/blur/BlurFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.blur; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.BlurFilter") 6 | extern class BlurFilter extends Filter { 7 | /** 8 | * The BlurFilter applies a Gaussian blur to an object. 9 | * The strength of the blur can be set for x- and y-axis separately. 10 | * 11 | * @class 12 | * @extends AbstractFilter 13 | * @memberof PIXI.filters 14 | */ 15 | function new(); 16 | 17 | /** 18 | * Sets the number of passes for blur. More passes means higher quaility bluring. 19 | * 20 | * @member {Int} 21 | * @memberof BlurYFilter# 22 | * @default 1 23 | */ 24 | var passes:Int; 25 | 26 | /** 27 | * Sets the strength of both the blurX and blurY properties simultaneously 28 | * 29 | * @member {Float} 30 | * @memberOf BlurFilter# 31 | * @default 2 32 | */ 33 | var blur:Float; 34 | 35 | /** 36 | * Sets the strength of the blurX property 37 | * 38 | * @member {Float} 39 | * @memberOf BlurFilter# 40 | * @default 2 41 | */ 42 | var blurX:Float; 43 | 44 | /** 45 | * Sets the strength of the blurY property 46 | * 47 | * @member {Float} 48 | * @memberOf BlurFilter# 49 | * @default 2 50 | */ 51 | var blurY:Float; 52 | } 53 | -------------------------------------------------------------------------------- /src/pixi/filters/blur/BlurXFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.blur; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.BlurXFilter") 6 | extern class BlurXFilter extends Filter { 7 | /** 8 | * The BlurXFilter applies a horizontal Gaussian blur to an object. 9 | * 10 | * @class 11 | * @extends AbstractFilter 12 | * @memberof PIXI.filters 13 | */ 14 | function new(); 15 | 16 | /** 17 | * Sets the number of passes for blur. More passes means higher quaility bluring. 18 | * 19 | * @member {Int} 20 | * @memberof BlurXFilter# 21 | * @default 1 22 | */ 23 | var passes:Int; 24 | 25 | /** 26 | * Sets the strength for blur. 27 | * 28 | * @member {Float} 29 | * @memberof BlurYFilter# 30 | * @default 4 31 | */ 32 | var strendth:Float; 33 | 34 | /** 35 | * Sets the strength of both the blur. 36 | * 37 | * @member {Float} 38 | * @memberof BlurXFilter# 39 | * @default 2 40 | */ 41 | var blur:Float; 42 | } 43 | -------------------------------------------------------------------------------- /src/pixi/filters/blur/BlurYFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.blur; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.BlurYFilter") 6 | extern class BlurYFilter extends Filter { 7 | /** 8 | * TheBlurYFilter applies a vertical Gaussian blur to an object. 9 | * 10 | * @class 11 | * @extends AbstractFilter 12 | * @memberof PIXI.filters 13 | */ 14 | function new(); 15 | 16 | /** 17 | * Sets the number of passes for blur. More passes means higher quaility bluring. 18 | * 19 | * @member {Int} 20 | * @memberof BlurYFilter# 21 | * @default 1 22 | */ 23 | var passes:Int; 24 | 25 | /** 26 | * Sets the strength of both the blur. 27 | * 28 | * @member {Float} 29 | * @memberof BlurYFilter# 30 | * @default 2 31 | */ 32 | var blur:Float; 33 | } 34 | -------------------------------------------------------------------------------- /src/pixi/filters/blur/SmartBlurFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.blur; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.SmartBlurFilter") 6 | extern class SmartBlurFilter extends Filter { 7 | /** 8 | * A Smart Blur Filter. 9 | * 10 | * @class 11 | * @extends AbstractFilter 12 | * @memberof PIXI.filters 13 | */ 14 | function new(); 15 | } 16 | -------------------------------------------------------------------------------- /src/pixi/filters/displacement/DisplacementFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.displacement; 2 | 3 | import pixi.core.math.Point; 4 | import pixi.core.textures.Texture; 5 | import pixi.core.sprites.Sprite; 6 | import pixi.core.renderers.webgl.filters.Filter; 7 | 8 | @:native("PIXI.filters.DisplacementFilter") 9 | extern class DisplacementFilter extends Filter { 10 | /** 11 | * The DisplacementFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 12 | * You can use this filter to apply all manor of crazy warping effects 13 | * Currently the r property of the texture is used to offset the x and the g property of the texture is used to offset the y. 14 | * 15 | * @class 16 | * @extends Filter 17 | * @memberof PIXI.filters 18 | * @param sprite {Sprite} the sprite used for the displacement map. (make sure its added to the scene!) 19 | */ 20 | function new(sprite:Sprite, ?scale:Float); 21 | 22 | /** 23 | * The texture used for the displacement map. Must be power of 2 sized texture. 24 | * 25 | * @member {Texture} 26 | * @memberof PIXI.filters.DisplacementFilter# 27 | */ 28 | var map:Texture; 29 | 30 | /** 31 | * The scale of the displacement. 32 | */ 33 | var scale:Point; 34 | } 35 | -------------------------------------------------------------------------------- /src/pixi/filters/extras/BulgePinchFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.extras; 2 | 3 | import pixi.core.math.Point; 4 | 5 | @:native("PIXI.filters.BulgePinchFilter") 6 | extern class BulgePinchFilter { 7 | /** 8 | * @author Julien CLEREL @JuloxRox 9 | * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/warp/bulgepinch.js by Evan Wallace : http://madebyevan.com/ 10 | */ 11 | /** 12 | * @filter Bulge / Pinch 13 | * @description Bulges or pinches the image in a circle. 14 | * @param center The x and y coordinates of the center of the circle of effect. 15 | * @param radius The radius of the circle of effect. 16 | * @param strength -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge) 17 | * 18 | * @class BulgePinchFilter 19 | * @extends AbstractFilter 20 | * @constructor 21 | */ 22 | function new(); 23 | 24 | /** 25 | * The radius of the circle of effect. 26 | * 27 | * @property radius 28 | * @type Float 29 | */ 30 | var radius:Float; 31 | 32 | /** 33 | * The strength of the effect. -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge) 34 | * 35 | * @property strength 36 | * @type Float 37 | */ 38 | var strength:Float; 39 | 40 | /** 41 | * The x and y coordinates of the center of the circle of effect. 42 | * 43 | * @property center 44 | * @type Point 45 | */ 46 | var center:Point; 47 | } 48 | -------------------------------------------------------------------------------- /src/pixi/filters/extras/ColorReplaceFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.extras; 2 | 3 | import js.lib.Float32Array; 4 | 5 | @:native("PIXI.filters.ColorReplaceFilter") 6 | extern class ColorReplaceFilter { 7 | /** 8 | * ColorReplaceFilter, originally by mishaa, updated by timetocode 9 | * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966 10 | * 11 | * @class 12 | * @param originalColor {Float32Array} The color that will be changed, as a 3 component RGB e.g. new Float32Array(1.0, 1.0, 1.0) 13 | * @param newColor {Float32Array} The resulting color, as a 3 component RGB e.g. new Float32Array(1.0, 0.5, 1.0) 14 | * @param epsilon {Float} Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive) 15 | * 16 | * @example 17 | * // replaces true red with true blue 18 | * someSprite.shader = new ColorReplaceFilter( 19 | * new Float32Array([1, 0, 0]), 20 | * new Float32Array([0, 0, 1]), 21 | * 0.001 22 | * ); 23 | * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215 24 | * someOtherSprite.shader = new ColorReplaceFilter( 25 | * new Float32Array([220/255.0, 220/255.0, 220/255.0]), 26 | * new Float32Array([225/255.0, 200/255.0, 215/255.0]), 27 | * 0.001 28 | * ); 29 | * 30 | */ 31 | function new(originalColor:Float32Array, newColor:Float32Array, epsilon:Float); 32 | 33 | var originalColor:Dynamic; 34 | var newColor:Dynamic; 35 | var epsilon:Float; 36 | } 37 | -------------------------------------------------------------------------------- /src/pixi/filters/extras/GlowFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.extras; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.GlowFilter") 6 | extern class GlowFilter extends Filter { 7 | /** 8 | * GlowFilter, originally by mishaa 9 | * http://www.html5gamedevs.com/topic/12756-glow-filter/?hl=mishaa#entry73578 10 | * http://codepen.io/mishaa/pen/raKzrm 11 | * 12 | * @class 13 | * @param distance {Float} The distance of the glow. Make it 2 times more for resolution=2. It cant be changed after filter creation 14 | * @param outerStrength {Float} The strength of the glow outward from the edge of the sprite. 15 | * @param innerStrength {Float} The strength of the glow inward from the edge of the sprite. 16 | * @param color {Int} The color of the glow. 17 | * @param quality {Float} A number between 0 and 1 that describes the quality of the glow. 18 | * 19 | * @example 20 | * someSprite.filters = [ 21 | * new GlowFilter(15, 2, 1, 0xFF0000, 0.5) 22 | * ]; 23 | */ 24 | function new(distance:Float, outerStrength:Float, innerStrength:Float, color:Int, quality:Float); 25 | 26 | var color:Int; 27 | var outerStrength:Float; 28 | var innerStrength:Float; 29 | } 30 | -------------------------------------------------------------------------------- /src/pixi/filters/extras/OutlineFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.extras; 2 | 3 | @:native("PIXI.filters.OutlineFilter") 4 | extern class OutlineFilter { 5 | /** 6 | * OutlineFilter, originally by mishaa 7 | * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966 8 | * http://codepen.io/mishaa/pen/emGNRB 9 | * 10 | * @class 11 | * @param thickness {Float} The tickness of the outline. Make it 2 times more for resolution 2 12 | * @param color {Int} The color of the glow. 13 | * 14 | * @example 15 | * someSprite.shader = new OutlineFilter(9, 0xFF0000); 16 | */ 17 | function new(thickness:Float, color:Int); 18 | 19 | var color:Array; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/filters/extras/SimpleLightmapFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.extras; 2 | 3 | import js.lib.Float32Array; 4 | import pixi.core.renderers.webgl.filters.Filter; 5 | import pixi.core.textures.Texture; 6 | 7 | @:native("PIXI.filters.SimpleLightmapFilter") 8 | extern class SimpleLightmapFilter extends Filter { 9 | /** 10 | * SimpleLightmap, originally by Oza94 11 | * http://www.html5gamedevs.com/topic/20027-pixijs-simple-lightmapping/ 12 | * http://codepen.io/Oza94/pen/EPoRxj 13 | * 14 | * @class 15 | * @param lightmapTexture {Texture} a texture where your lightmap is rendered 16 | * @param ambientColor {Array} An RGBA array of the ambient color 17 | * @param [resolution] {Array} An array for X/Y resolution 18 | * 19 | * @example 20 | * var lightmapTex = new PIXI.RenderTexture(renderer, 400, 300); 21 | * 22 | * // ... render lightmap on lightmapTex 23 | * 24 | * stageContainer.filters = [ 25 | * new SimpleLightmapFilter(lightmapTex, [0.3, 0.3, 0.7, 0.5], [1.0, 1.0]) 26 | * ]; 27 | */ 28 | function new(lightmapTexture:Texture, ambientColor:Array, ?resolution:Array); 29 | 30 | var texture:Texture; 31 | var color:Float32Array; 32 | } 33 | -------------------------------------------------------------------------------- /src/pixi/filters/fxaa/FXAAFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.fxaa; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.FXAAFilter") 6 | extern class FXAAFilter extends Filter { 7 | /** 8 | * An ASCII filter. 9 | * 10 | * @class 11 | * @extends PIXI.AbstractFilter 12 | * @memberof PIXI.filters 13 | */ 14 | function new(); 15 | } 16 | -------------------------------------------------------------------------------- /src/pixi/filters/godray/GodrayFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.godray; 2 | 3 | import pixi.core.math.Point; 4 | import pixi.core.renderers.webgl.filters.Filter; 5 | 6 | @:native("PIXI.filters.GodrayFilter") 7 | extern class GodrayFilter extends Filter { 8 | /** 9 | * This filter applies a twist effect making display objects appear twisted in the given direction. 10 | * 11 | * @class 12 | * @extends Filter 13 | * @memberof PIXI.filters 14 | */ 15 | function new(); 16 | 17 | /** 18 | * This point describes the the offset of the twist. 19 | * 20 | * @member {Point} 21 | * @memberof PIXI.filters.GodrayFilter# 22 | */ 23 | var offset:Point; 24 | 25 | /** 26 | * This radius of the twist. 27 | * 28 | * @member {Float} 29 | * @memberof PIXI.filters.GodrayFilter# 30 | */ 31 | var radius:Float; 32 | 33 | /** 34 | * This angle of the twist. 35 | * 36 | * @member {Float} 37 | * @memberof PIXI.filters.GodrayFilter# 38 | */ 39 | var angle:Float; 40 | } 41 | -------------------------------------------------------------------------------- /src/pixi/filters/gray/GrayFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.gray; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.GrayFilter") 6 | extern class GrayFilter extends Filter { 7 | /** 8 | * This filter applies a pixelate effect making display objects appear 'blocky'. 9 | * 10 | * @class 11 | * @extends PIXI.AbstractFilter 12 | * @memberof PIXI.filters 13 | */ 14 | function new(); 15 | 16 | /** 17 | * The strength of the gray. 1 will make the object black and white, 0 will make the object its normal color. 18 | * 19 | * @member {number} 20 | * @memberof GrayFilter# 21 | */ 22 | var gray:Float; 23 | } 24 | -------------------------------------------------------------------------------- /src/pixi/filters/noise/NoiseFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.noise; 2 | 3 | import pixi.core.renderers.webgl.filters.Filter; 4 | 5 | @:native("PIXI.filters.NoiseFilter") 6 | extern class NoiseFilter extends Filter { 7 | /** 8 | * @author Vico @vicocotea 9 | * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js 10 | */ 11 | /** 12 | * A Noise effect filter. 13 | * 14 | * @class 15 | * @extends PIXI.Filter 16 | * @memberof PIXI.filters 17 | */ 18 | /** 19 | * @param {Float} noise - The noise intensity, should be a normalized value in the range [0, 1]. 20 | * @param {Float} seed - A random seed for the noise generation. Default is `Math.random()`. 21 | */ 22 | function new(?noise:Float, ?seed:Float); 23 | 24 | /** 25 | * The amount of noise to apply, this value should be in the range (0, 1]. 26 | * 27 | * @member {Float} 28 | * @default 0.5 29 | */ 30 | var noise:Float; 31 | 32 | /** 33 | * A seed value to apply to the random noise generation. `Math.random()` is a good value to use. 34 | * 35 | * @member {Float} 36 | */ 37 | var seed:Float; 38 | } 39 | -------------------------------------------------------------------------------- /src/pixi/filters/spritemask/SpriteMaskFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.spritemask; 2 | 3 | import pixi.core.math.Matrix; 4 | import pixi.core.renderers.webgl.filters.Filter; 5 | import pixi.core.sprites.Sprite; 6 | 7 | @:native("PIXI.SpriteMaskFilter") 8 | extern class SpriteMaskFilter extends Filter { 9 | /** 10 | * Mask matrix 11 | */ 12 | var maskMatrix:Matrix; 13 | 14 | /** 15 | * Sprite Mask 16 | */ 17 | var maskSprite:Sprite; 18 | 19 | /** 20 | * This handles a Sprite acting as a mask, as opposed to a Graphic. WebGL only. 21 | * @param sprite the target sprite 22 | */ 23 | function new(sprite:Sprite); 24 | } 25 | -------------------------------------------------------------------------------- /src/pixi/filters/twist/TwistFilter.hx: -------------------------------------------------------------------------------- 1 | package pixi.filters.twist; 2 | 3 | import pixi.core.math.Point; 4 | import pixi.core.renderers.webgl.filters.Filter; 5 | 6 | @:native("PIXI.filters.TwistFilter") 7 | extern class TwistFilter extends Filter { 8 | /** 9 | * This filter applies a twist effect making display objects appear twisted in the given direction. 10 | * 11 | * @class 12 | * @extends PIXI.AbstractFilter 13 | * @memberof PIXI.filters 14 | */ 15 | function new(); 16 | 17 | /** 18 | * This point describes the the offset of the twist. 19 | * 20 | * @member {Point} 21 | * @memberof TwistFilter# 22 | */ 23 | var offset:Point; 24 | 25 | /** 26 | * This radius of the twist. 27 | * 28 | * @member {number} 29 | * @memberof TwistFilter# 30 | */ 31 | var radius:Float; 32 | 33 | /** 34 | * This angle of the twist. 35 | * 36 | * @member {number} 37 | * @memberof TwistFilter# 38 | */ 39 | var angle:Float; 40 | } 41 | -------------------------------------------------------------------------------- /src/pixi/interaction/InteractionEvent.hx: -------------------------------------------------------------------------------- 1 | package pixi.interaction; 2 | 3 | import pixi.core.display.DisplayObject; 4 | import pixi.interaction.InteractionData; 5 | 6 | @:native("PIXI.interaction.InteractionEvent") 7 | extern class InteractionEvent { 8 | /** 9 | * Event class that mimics native DOM events. 10 | * 11 | * @class 12 | * @memberof PIXI.interaction 13 | */ 14 | function new(); 15 | 16 | /** 17 | * Whether this event will continue propagating in the tree 18 | * 19 | * @member {Bool} 20 | */ 21 | var stopped:Bool; 22 | 23 | /** 24 | * The object which caused this event to be dispatched. 25 | * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}. 26 | * 27 | * @member {DisplayObject} 28 | */ 29 | var target:DisplayObject; 30 | 31 | /** 32 | * The object whose event listener’s callback is currently being invoked. 33 | * 34 | * @member {DisplayObject} 35 | */ 36 | var currentTarget:DisplayObject; 37 | 38 | /* 39 | * Type of the event 40 | * 41 | * @member {String} 42 | */ 43 | var type:String; 44 | 45 | /* 46 | * InteractionData related to this event 47 | * 48 | * @member {InteractionData} 49 | */ 50 | var data:InteractionData; 51 | 52 | /** 53 | * Prevents event from reaching any objects other than the current object. 54 | * 55 | */ 56 | function stopPropagation():Void; 57 | } 58 | -------------------------------------------------------------------------------- /src/pixi/loaders/Loader.hx: -------------------------------------------------------------------------------- 1 | package pixi.loaders; 2 | 3 | @:native("PIXI.Loader") 4 | extern class Loader extends ResourceLoader { 5 | /** 6 | * 7 | * The new loader, extends Resource Loader by Chad Engler : https://github.com/englercj/resource-loader 8 | * 9 | * ```js 10 | * var loader = new Loader(); 11 | * 12 | * loader.add('spineboy',"data/spineboy.json"); 13 | * 14 | * loader.once('complete',onAssetsLoaded); 15 | * 16 | * loader.load(); 17 | * ``` 18 | * 19 | * @class 20 | * @extends ResourceLoader 21 | * @memberof PIXI.loaders 22 | * 23 | * @param [baseUrl=''] {String} The base url for all resources loaded by this loader. 24 | * @param [concurrency=10] {Int} The number of resources to load concurrently. 25 | */ 26 | function new(?baseUrl:String, ?concurrency:Int); 27 | } 28 | -------------------------------------------------------------------------------- /src/pixi/loaders/LoaderOptions.hx: -------------------------------------------------------------------------------- 1 | package pixi.loaders; 2 | 3 | typedef LoaderOptions = { 4 | @:optional var crossOrigin:Dynamic; 5 | @:optional var loadType:Int; 6 | @:optional var xhrType:String; 7 | @:optional var parentResource:Resource; 8 | @:optional var metadata:LoaderMetadata; 9 | } 10 | 11 | typedef LoaderMetadata = { 12 | @:optional var loadElement:Dynamic; 13 | @:optional var skipSource:Bool; 14 | } 15 | -------------------------------------------------------------------------------- /src/pixi/mesh/MeshMaterial.hx: -------------------------------------------------------------------------------- 1 | package pixi.mesh; 2 | 3 | import pixi.core.renderers.canvas.CanvasRenderer; 4 | import pixi.core.renderers.webgl.Attribute; 5 | import pixi.core.renderers.webgl.Buffer; 6 | import pixi.core.renderers.webgl.Program; 7 | import pixi.core.textures.Texture; 8 | import pixi.core.textures.TextureMatrix; 9 | 10 | @:native("PIXI.MeshMaterial") 11 | extern class MeshMaterial { 12 | /** 13 | * Slightly opinionated default shader for PixiJS 2D objects. 14 | * @param uSampler {Texture} 15 | * @param options {Dynamic} 16 | */ 17 | function new(uSampler:Texture, ?options:MeshOptions); 18 | 19 | /** 20 | * This gets automatically set by the object using this. 21 | */ 22 | var alpha:Float; 23 | 24 | /** 25 | * true if shader can be batch with the renderer's batch system. 26 | */ 27 | var batchable:Bool; 28 | 29 | /** 30 | * Renderer plugin for batching 31 | */ 32 | var pluginName:String; 33 | 34 | /** 35 | * Reference to the texture being rendered. 36 | */ 37 | var texture:Texture; 38 | 39 | /** 40 | * Multiply tint for the material. 41 | */ 42 | var tint:Int; 43 | 44 | /** 45 | * TextureMatrix instance for this Mesh, used to track Texture changes 46 | */ 47 | var uvMatrix(default, null):TextureMatrix; 48 | 49 | /** 50 | * Renders the mesh using the Canvas renderer 51 | * @param renderer {CanvasRenderer} The canvas renderer. 52 | * @param mesh {Mesh} Mesh to render. 53 | */ 54 | private function render(renderer:CanvasRenderer, mesh:Mesh):Void; 55 | 56 | /** 57 | * Gets called automatically by the Mesh. Intended to be overridden for custom MeshMaterial objects. 58 | */ 59 | function update():Void; 60 | } 61 | 62 | typedef MeshOptions = { 63 | ?alpha:Float, 64 | ?tint:Int, 65 | ?pluginName:String, 66 | ?program:Dynamic, 67 | ?uniforms:Dynamic 68 | } 69 | -------------------------------------------------------------------------------- /src/pixi/mesh/Plane.hx: -------------------------------------------------------------------------------- 1 | package pixi.mesh; 2 | 3 | import pixi.core.textures.Texture; 4 | 5 | @:native("PIXI.SimplePlane") 6 | extern class Plane extends Mesh { 7 | /** 8 | * The Plane allows you to draw a texture across several points and them manipulate these points 9 | * 10 | *```js 11 | * for (i in 0 ... 20) { 12 | * points.push(new Point(i * 50, 0)); 13 | * }; 14 | * var Plane = new Plane(Texture.fromImage("snake.png"), points); 15 | * ``` 16 | * 17 | * @class 18 | * @extends PIXI.Mesh 19 | * @memberof PIXI 20 | * @param {Texture} texture - The texture to use on the Plane. 21 | * @param {Int} verticesX - The number of vertices in the x-axis 22 | * @param {Int} verticesY - The number of vertices in the y-axis 23 | * 24 | */ 25 | function new(texture:Texture, verticesX:Int, verticesY:Int); 26 | 27 | var verticesX:Int; 28 | var verticesY:Int; 29 | } 30 | -------------------------------------------------------------------------------- /src/pixi/mesh/Rope.hx: -------------------------------------------------------------------------------- 1 | package pixi.mesh; 2 | 3 | import js.html.Uint16Array; 4 | import js.html.Float32Array; 5 | import pixi.core.math.Point; 6 | import pixi.core.textures.Texture; 7 | 8 | @:native("PIXI.SimpleRope") 9 | extern class Rope extends Mesh { 10 | /** 11 | * The rope allows you to draw a texture across several points and them manipulate these points 12 | * 13 | *```js 14 | * for (i in 0 ... 20) { 15 | * points.push(new Point(i * 50, 0)); 16 | * }; 17 | * var rope = new Rope(PIXI.Texture.fromImage("snake.png"), points); 18 | * ``` 19 | * 20 | * @class 21 | * @extends Mesh 22 | * @memberof PIXI.mesh 23 | * @param {Texture} texture - The texture to use on the rope. 24 | * @param {Array} points - An array of {Point} objects to construct var rope. 25 | * 26 | */ 27 | function new(texture:Texture, ?points:Array); 28 | 29 | /* 30 | * @member {Array} An array of points that determine the rope 31 | */ 32 | var points:Array; 33 | 34 | /* 35 | * @member {Array} An array containing the color components 36 | */ 37 | var colors:Array; 38 | 39 | /** 40 | * refreshes vertices on every updateTransform 41 | * @member {boolean} 42 | * @default true 43 | */ 44 | var autoUpdate:Bool; 45 | } 46 | -------------------------------------------------------------------------------- /src/pixi/mesh/SimpleMesh.hx: -------------------------------------------------------------------------------- 1 | package pixi.mesh; 2 | 3 | import js.lib.Float32Array; 4 | import js.lib.Uint16Array; 5 | import pixi.core.textures.Texture; 6 | 7 | @:native("PIXI.SimpleMesh") 8 | extern class SimpleMesh extends Mesh { 9 | /** 10 | * Base mesh class 11 | * @class 12 | * @extends Container 13 | * @memberof PIXI.mesh 14 | * @param texture {Texture} The texture to use 15 | * @param [vertices] {Float32Array} if you want to specify the vertices 16 | * @param [uvs] {Float32Array} if you want to specify the uvs 17 | * @param [indices] {Int16Array} if you want to specify the indices 18 | * @param [drawMode] {Int} the drawMode, can be any of the Mesh.DRAW_MODES consts 19 | */ 20 | function new(texture:Texture, ?vertices:Float32Array, ?uvs:Float32Array, ?indices:Uint16Array, ?drawMode:Int); 21 | 22 | /** 23 | * Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other. To set the global default, set PIXI.settings.MESH_CANVAS_PADDING 24 | */ 25 | var canvasPadding:Float; 26 | } 27 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/animation/Animation.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.animation; 2 | 3 | import pixi.plugins.dragonbones.model.AnimationConfig; 4 | import pixi.plugins.dragonbones.core.DragonBones.AnimationFadeOutMode; 5 | import pixi.plugins.dragonbones.core.BaseObject; 6 | 7 | @:native("dragonBones.Animation") 8 | extern class Animation extends BaseObject { 9 | var timeScale:Float; 10 | 11 | function reset():Void; 12 | 13 | function stop(animationName:String):Void; 14 | 15 | function playConfig(animationConfig:AnimationConfig):AnimationState; 16 | 17 | function fadeIn(animationName:String, ?fadeInTime:Float, ?playTimes:Float, ?layer:Float, ?group:String = null, 18 | ?fadeOutMode:AnimationFadeOutMode):AnimationState; 19 | 20 | function play(?animationName:String, ?playTimes:Float):AnimationState; 21 | 22 | function gotoAndPlayByTime(animationName:String, ?time:Float, ?playTimes:Float):AnimationState; 23 | 24 | function gotoAndPlayByFrame(animationName:String, ?frame:Float, ?playTimes:Float):AnimationState; 25 | 26 | function gotoAndPlayByProgress(animationName:String, ?progress:Float, ?playTimes:Float):AnimationState; 27 | 28 | function gotoAndStopByTime(animationName:String, ?time:Float):AnimationState; 29 | 30 | function gotoAndStopByFrame(animationName:String, ?frame:Float):AnimationState; 31 | 32 | function gotoAndStopByProgress(animationName:String, ?progress:Float):AnimationState; 33 | 34 | function getState(animationName:String):AnimationState; 35 | 36 | function hasAnimation(animationName:String):Bool; 37 | 38 | var isPlaying:Bool; 39 | var isCompleted:Bool; 40 | var lastAnimationName:String; 41 | var lastAnimationState:AnimationState; 42 | var animationConfig:AnimationConfig; 43 | var animationNames:Array; 44 | var animations:Dynamic; 45 | } 46 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/animation/AnimationState.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.animation; 2 | 3 | import pixi.plugins.dragonbones.model.AnimationData; 4 | 5 | @:native("dragonBones.AnimationState") 6 | extern class AnimationState { 7 | var dragonBones:Bool; 8 | var additiveBlending:Bool; 9 | var actionEnabled:Bool; 10 | var playTimes:Float; 11 | var timeScale:Float; 12 | var weight:Float; 13 | var autoFadeOutTime:Float; 14 | 15 | function addBoneMask(name:String, ?recursive:Bool):Void; 16 | function removeBoneMask(name:String, ?recursive:Bool):Void; 17 | function removeAllBoneMask():Void; 18 | 19 | var layer:Float; 20 | var group:String; 21 | var name:String; 22 | var animationData:AnimationData; 23 | var isCompleted:Bool; 24 | var currentPlayTimes:Float; 25 | var totalTime:Float; 26 | var currentTime:Float; 27 | } 28 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/animation/IAnimateble.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.animation; 2 | 3 | @:native("dragonBones.IAnimateble") 4 | extern interface IAnimateble { 5 | function advanceTime(passedTime:Float):Void; 6 | var clock:WorldClock; 7 | } 8 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/animation/WorldClock.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.animation; 2 | 3 | @:native("dragonBones.WorldClock") 4 | extern class WorldClock implements IAnimateble { 5 | function new(); 6 | 7 | var time:Float; 8 | var timeScale:Float; 9 | var clock:WorldClock; 10 | 11 | function advanceTime(passedTime:Float):Void; 12 | 13 | function contains(value:IAnimateble):Bool; 14 | function add(value:IAnimateble):Void; 15 | function remove(value:IAnimateble):Void; 16 | function clear():Void; 17 | } 18 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/armature/Armature.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.armature; 2 | 3 | import pixi.plugins.dragonbones.animation.WorldClock; 4 | import pixi.plugins.dragonbones.animation.Animation; 5 | import pixi.plugins.dragonbones.model.ArmatureData; 6 | import pixi.plugins.dragonbones.core.BaseObject; 7 | 8 | @:native("dragonBones.Armature") 9 | extern class Armature extends BaseObject { 10 | var inheritAnimation:Bool; 11 | var userData:Dynamic; 12 | var name:String; 13 | var armatureData:ArmatureData; 14 | var animation:Animation; 15 | var display:Dynamic; 16 | var parent:Slot; 17 | var cacheFrameRate:Float; 18 | var clock:WorldClock; 19 | var replacedTexture:Dynamic; 20 | 21 | function dispose():Void; 22 | 23 | function advanceTime(passedTime:Float):Void; 24 | function invalidUpdate(?boneName:String, ?updateSlotDisplay:Bool):Void; 25 | function containsPoint(x:Float, y:Float):Slot; 26 | function intersectsSegment(xA:Float, yA:Float, xB:Float, yB:Float, ?intersectionPointA:{x:Float, y:Float}, ?intersectionPointB:{x:Float, y:Float}, 27 | ?normalRadians:{x:Float, y:Float}):Slot; 28 | function getBone(name:String):Bone; 29 | function getBoneByDisplay(display:Dynamic):Bone; 30 | 31 | function getSlot(name:String):Slot; 32 | function replaceTexture(texture:Dynamic):Void; 33 | function getBones():Array; 34 | function getSlots():Array; 35 | } 36 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/armature/Bone.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.armature; 2 | 3 | @:native("dragonBones.Bone") 4 | extern class Bone extends TransformObject { 5 | function invalidUpdate():Void; 6 | function contains(child:TransformObject):Bool; 7 | function getBones():Array; 8 | function getSlots():Array; 9 | 10 | var visible:Bool; 11 | } 12 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/armature/Slot.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.armature; 2 | 3 | import pixi.plugins.dragonbones.model.BoundingBoxData; 4 | 5 | @:native("dragonBones.Slot") 6 | extern class Slot extends TransformObject { 7 | var displayController:String; 8 | 9 | function containsPoint(x:Float, y:Float):Bool; 10 | function intersectsSegment(xA:Float, yA:Float, xB:Float, yB:Float, ?intersectionPointA:{x:Float, y:Float}, ?intersectionPointB:{x:Float, y:Float}, 11 | ?normalRadians:{x:Float, y:Float}):Float; 12 | 13 | function invalidUpdate():Void; 14 | 15 | var boundingBoxData:BoundingBoxData; 16 | var displayIndex:Float; 17 | var displayList:Array; 18 | var display:Dynamic; 19 | var childArmature:Armature; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/armature/TransformObject.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.armature; 2 | 3 | import pixi.plugins.dragonbones.geom.Transform; 4 | import pixi.plugins.dragonbones.geom.Matrix; 5 | import pixi.plugins.dragonbones.core.BaseObject; 6 | 7 | @:native("dragonBones.TransformObject") 8 | extern class TransformObject extends BaseObject { 9 | var name:String; 10 | var globalTransformMatrix:Matrix; 11 | var global:Transform; 12 | var offset:Transform; 13 | var origin:Transform; 14 | var userData:Dynamic; 15 | 16 | var armature:Armature; 17 | var parent:Bone; 18 | } 19 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/core/BaseObject.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.core; 2 | 3 | @:native("dragonBones.BaseObject") 4 | extern class BaseObject { 5 | static function setMaxCount(objectConstructor:BaseObject, maxCount:Int):Void; 6 | static function clearPool(?objectConstructor:BaseObject):Void; 7 | static function borrowObject(?objectConstructor:BaseObject):BaseObject; 8 | 9 | var hashCode:Int; 10 | } 11 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/core/DragonBones.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.core; 2 | 3 | @:native("dragonBones.DragonBones") 4 | extern class DragonBones {} 5 | 6 | @:native("dragonBones.DragonBones.BoundingBoxType") 7 | extern enum BoundingBoxType { 8 | None; 9 | Rectangle; 10 | Ellipse; 11 | Polygon; 12 | } 13 | 14 | @:native("dragonBones.DragonBones.AnimationFadeOutMode") 15 | extern enum AnimationFadeOutMode { 16 | None; 17 | SameLayer; 18 | SameGroup; 19 | SameLayerAndGroup; 20 | All; 21 | } 22 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/event/EventObject.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.event; 2 | 3 | import pixi.plugins.dragonbones.model.CustomData; 4 | import pixi.plugins.dragonbones.armature.Armature; 5 | import pixi.plugins.dragonbones.armature.Slot; 6 | import pixi.plugins.dragonbones.armature.Bone; 7 | import pixi.plugins.dragonbones.core.BaseObject; 8 | 9 | @:native("dragonBones.EventObject") 10 | extern class EventObject extends BaseObject { 11 | static var START:String; 12 | static var LOOP_COMPLETE:String; 13 | static var COMPLETE:String; 14 | static var FADE_IN:String; 15 | static var FADE_IN_COMPLETE:String; 16 | static var FADE_OUT:String; 17 | static var FADE_OUT_COMPLETE:String; 18 | static var FRAME_EVENT:String; 19 | static var SOUND_EVENT:String; 20 | 21 | var type:String; 22 | var name:String; 23 | var frame:Dynamic; 24 | var data:CustomData; 25 | var armature:Armature; 26 | var bone:Bone; 27 | var slot:Slot; 28 | var animationState:Dynamic; 29 | } 30 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/factory/BaseFactory.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.factory; 2 | 3 | import pixi.plugins.dragonbones.armature.Slot; 4 | import pixi.plugins.dragonbones.armature.Armature; 5 | import pixi.plugins.dragonbones.texture.TextureAtlasData; 6 | import pixi.plugins.dragonbones.model.DragonBonesData; 7 | 8 | @:native("dragonBones.BaseFactory") 9 | extern class BaseFactory { 10 | function new(); 11 | 12 | var autoSearch:Bool; 13 | 14 | function parseDragonBonesData(rawData:Dynamic, ?name:String, ?scale:Float):DragonBonesData; 15 | function parseTextureAtlasData(rawData:Dynamic, textureAtlas:Dynamic, ?name:String, ?scale:Float):TextureAtlasData; 16 | function getDragonBonesData(name:String):DragonBonesData; 17 | function addDragonBonesData(data:DragonBonesData, ?name:String):Void; 18 | function removeDragonBonesData(name:String, ?disposeData:Bool):Void; 19 | function getTextureAtlasData(name:String):Array; 20 | function addTextureAtlasData(data:TextureAtlasData, ?name:String):Void; 21 | function removeTextureAtlasData(name:String, ?disposeData:Bool):Void; 22 | function clear(?disposeData:Bool):Void; 23 | function buildArmature(armatureName:String, ?dragonBonesName:String, ?skinName:String, ?textureAtlasName:String):Armature; 24 | function copyAnimationsToArmature(toArmature:Armature, fromArmatreName:String, ?fromSkinName:String, ?fromDragonBonesDataName:String, 25 | ?replaceOriginalAnimation:Bool):Bool; 26 | function replaceSlotDisplay(dragonBonesName:String, armatureName:String, slotName:String, displayName:String, slot:Slot, ?displayIndex:Float):Void; 27 | function replaceSlotDisplayList(dragonBonesName:String, armatureName:String, slotName:String, slot:Slot):Void; 28 | } 29 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/geom/ColorTransform.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.geom; 2 | 3 | @:native("dragonBones.ColorTransform") 4 | extern class ColorTransform { 5 | function new(alphaMultiplier:Float, redMultiplier:Float, greenMultiplier:Float, blueMultiplier:Float, alphaOffset:Float, redOffset:Float, 6 | greenOffset:Float, blueOffset:Float); 7 | 8 | var alphaMultiplier:Float; 9 | var redMultiplier:Float; 10 | var greenMultiplier:Float; 11 | var blueMultiplier:Float; 12 | var alphaOffset:Float; 13 | var redOffset:Float; 14 | var greenOffset:Float; 15 | var blueOffset:Float; 16 | 17 | function copyFrom(value:ColorTransform):Void; 18 | function identity():Void; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/geom/Matrix.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.geom; 2 | 3 | @:native("dragonBones.Matrix") 4 | extern class Matrix { 5 | function new(a:Float, b:Float, c:Float, d:Float, tx:Float, ty:Float); 6 | 7 | var a:Float; 8 | var b:Float; 9 | var c:Float; 10 | var d:Float; 11 | var tx:Float; 12 | var ty:Float; 13 | 14 | function copyFrom(value:Matrix):Matrix; 15 | function identity():Matrix; 16 | function concat(value:Matrix):Matrix; 17 | function invert():Matrix; 18 | function transformPoint(x:Float, y:Float, result:{x:Float, y:Float}, ?delta:Bool):Void; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/geom/Point.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.geom; 2 | 3 | @:native("dragonBones.Point") 4 | extern class Point { 5 | function new(x:Float, y:Float); 6 | 7 | var x:Float; 8 | var y:Float; 9 | 10 | function copyFrom(value:Point):Void; 11 | function clear():Void; 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/geom/Rectangle.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.geom; 2 | 3 | @:native("dragonBones.Rectangle") 4 | extern class Rectangle { 5 | function new(x:Float, y:Float, width:Float, height:Float); 6 | 7 | var x:Float; 8 | var y:Float; 9 | var width:Float; 10 | var height:Float; 11 | 12 | function copyFrom(value:Rectangle):Void; 13 | function clear():Void; 14 | } 15 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/geom/Transform.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.geom; 2 | 3 | @:native("dragonBones.Transform") 4 | extern class Transform { 5 | function new(x:Float, y:Float, skewX:Float, skewY:Float, scaleX:Float, scaleY:Float); 6 | 7 | var x:Float; 8 | var y:Float; 9 | var skewX:Float; 10 | var skewY:Float; 11 | var scaleX:Float; 12 | var scaleY:Float; 13 | var rotation:Float; 14 | 15 | function fromMatrix(matrix:Matrix):Transform; 16 | function toMatrix(matrix:Matrix):Transform; 17 | } 18 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/AnimationConfig.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.DragonBones.AnimationFadeOutMode; 4 | import pixi.plugins.dragonbones.core.BaseObject; 5 | 6 | @:native("dragonBones.AnimationConfig") 7 | extern class AnimationConfig extends BaseObject { 8 | var pauseFadeOut:Bool; 9 | var fadeOutMode:AnimationFadeOutMode; 10 | var fadeOutTime:Float; 11 | var fadeOutEasing:Float; 12 | var additiveBlending:Bool; 13 | var displayControl:Bool; 14 | var pauseFadeIn:Bool; 15 | var actionEnabled:Bool; 16 | var playTimes:Float; 17 | var layer:Float; 18 | var position:Float; 19 | var duration:Float; 20 | var timeScale:Float; 21 | var fadeInTime:Float; 22 | var autoFadeOutTime:Float; 23 | var fadeInEasing:Float; 24 | var weight:Float; 25 | var name:String; 26 | var animationName:String; 27 | var group:String; 28 | var boneMask:Array; 29 | var animationNames:Array; 30 | } 31 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/AnimationData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | @:native("dragonBones.AnimationData") 4 | extern class AnimationData { 5 | function new(); 6 | 7 | var frameCount:Int; 8 | var playTimes:Int; 9 | var duration:Float; 10 | var fadeInTime:Float; 11 | var name:String; 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/ArmatureData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.ArmatureData") 6 | extern class ArmatureData extends BaseObject { 7 | var frameRate:Float; 8 | var name:String; 9 | var bones:Dynamic; 10 | var animations:Dynamic; 11 | var parent:DragonBonesData; 12 | 13 | function getBone(name:String):BoneData; 14 | function getSlot(name:String):SlotData; 15 | function getAnimation(name:String):AnimationData; 16 | 17 | var animationNames:Array; 18 | var defaultAnimation:AnimationData; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/BoneData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.BoneData") 6 | extern class BoneData extends BaseObject { 7 | var name:String; 8 | var parent:BoneData; 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/BoundingBoxData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.DragonBones.BoundingBoxType; 4 | import pixi.plugins.dragonbones.core.BaseObject; 5 | 6 | @:native("dragonBones.BoundingBoxData") 7 | extern class BoundingBoxData extends BaseObject { 8 | var type:BoundingBoxType; 9 | var color:Int; 10 | var vertices:Array; 11 | 12 | function containsPoint(pX:Float, pY:Float):Bool; 13 | function intersectsSegment(xA:Float, yA:Float, xB:Float, yB:Float, ?intersectionPointA:{x:Float, y:Float}, ?intersectionPointB:{x:Float, y:Float}, 14 | ?normalRadians:{x:Float, y:Float}):Float; 15 | } 16 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/CustomData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.CustomData") 6 | extern class CustomData extends BaseObject { 7 | var ints:Array; 8 | var floats:Array; 9 | var strings:Array; 10 | 11 | function getInt(?index:Int):Int; 12 | function getFloat(?index:Int):Float; 13 | function getString(?index:Int):String; 14 | } 15 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/DragonBonesData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.DragonBonesData") 6 | extern class DragonBonesData extends BaseObject { 7 | var autoSearch:Bool; 8 | var frameRate:Float; 9 | var version:String; 10 | var name:String; 11 | var armatures:Dynamic; 12 | 13 | function getArmature(name:String):ArmatureData; 14 | 15 | var armatureNames:Array; 16 | } 17 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/model/SlotData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.model; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.SlotData") 6 | extern class SlotData extends BaseObject { 7 | var name:String; 8 | var parent:BoneData; 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/pixi/PixiArmatureDisplay.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.pixi; 2 | 3 | import pixi.plugins.dragonbones.animation.Animation; 4 | import pixi.plugins.dragonbones.armature.Armature; 5 | import pixi.plugins.dragonbones.event.EventObject; 6 | import pixi.core.display.Container; 7 | 8 | @:native("dragonBones.PixiArmatureDisplay") 9 | extern class PixiArmatureDisplay extends Container { 10 | function hasEvent(type:String):Bool; 11 | 12 | function addEvent(type:String, listener:EventObject->Void, target:Dynamic):Void; 13 | 14 | function removeEvent(type:String, listener:EventObject->Void, target:Dynamic):Void; 15 | 16 | function dispose(?disposeProxy:Bool):Void; 17 | 18 | var armature:Armature; 19 | var animation:Animation; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/pixi/PixiFactory.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.pixi; 2 | 3 | import pixi.plugins.dragonbones.animation.WorldClock; 4 | import pixi.plugins.dragonbones.factory.BaseFactory; 5 | import pixi.core.sprites.Sprite; 6 | 7 | @:native("dragonBones.PixiFactory") 8 | extern class PixiFactory extends BaseFactory { 9 | static var factory:PixiFactory; 10 | static var clock:WorldClock; 11 | 12 | var soundEventManater:PixiArmatureDisplay; 13 | 14 | function new(?dataParser:Dynamic); 15 | 16 | function buildArmatureDisplay(armatureName:String, ?dragonBonesName:String, ?skinName:String, ?textureAtlasName:String):PixiArmatureDisplay; 17 | 18 | function getTextureDisplay(textureName:String, ?dragonBonesName:String):Sprite; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/pixi/PixiSlot.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.pixi; 2 | 3 | import pixi.plugins.dragonbones.armature.Slot; 4 | 5 | @:native("dragonBones.PixiSlot") 6 | extern class PixiSlot extends Slot {} 7 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/pixi/PixiTextureAtlasData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.pixi; 2 | 3 | import pixi.core.textures.BaseTexture; 4 | import pixi.plugins.dragonbones.texture.TextureAtlasData; 5 | 6 | @:native("dragonBones.PixiTextureAtlasData") 7 | extern class PixiTextureAtlasData extends TextureAtlasData { 8 | var texture:BaseTexture; 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/dragonbones/texture/TextureAtlasData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.dragonbones.texture; 2 | 3 | import pixi.plugins.dragonbones.core.BaseObject; 4 | 5 | @:native("dragonBones.TextureAtlasData") 6 | extern class TextureAtlasData extends BaseObject { 7 | function new(); 8 | 9 | var autoSearch:Bool; 10 | var scale:Float; 11 | var name:String; 12 | var imagePath:String; 13 | } 14 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Animation.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.Animation") 4 | extern class Animation { 5 | public var name:String; 6 | public var timelines:Array; 7 | public var timelineIds:Array; 8 | public var duration:Float; 9 | 10 | public function new(name:String, timelines:Array, duration:Float); 11 | public function hasTimeline(id:Float):Bool; 12 | public function apply(skeleton:Skeleton, lastTime:Float, time:Float, loop:Bool, events:Array, alpha:Float, blend:MixBlend, 13 | direction:MixDirection):Void; 14 | 15 | public static function binarySearch(values:Array, target:Float, ?step:Float):Float; 16 | public static function linearSearch(values:Array, target:Float, step:Float):Float; 17 | } 18 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/AnimationStateData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.AnimationStateData") 4 | extern class AnimationStateData { 5 | function new(skeletonData:Dynamic); 6 | 7 | var defaultMix:Float; 8 | function setMix(fromName:String, toName:String, duration:Float):Void; 9 | function setMixByName(fromName:String, toName:String, duration:Float):Void; 10 | 11 | function setMixWith(from:Dynamic, to:Dynamic, duration:Float):Void; 12 | 13 | function getMix(from:Dynamic, to:Dynamic):Dynamic; 14 | } 15 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/AnimationStateListener2.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.plugins.spine.core.Event; 4 | 5 | typedef AnimationStateListener2 = { 6 | @:optional function start(entry:TrackEntry):Void; 7 | @:optional function interrupt(entry:TrackEntry):Void; 8 | @:optional function end(entry:TrackEntry):Void; 9 | @:optional function dispose(entry:TrackEntry):Void; 10 | @:optional function complete(entry:TrackEntry):Void; 11 | @:optional function event(entry:TrackEntry, event:Event):Void; 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/AtlasAttachmentLoader.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.AtlasAttachmentLoader") 4 | extern class AtlasAttachmentLoader implements AttachmentLoader { 5 | function new(atlas:TextureAtlas):Void; 6 | } 7 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/AttachmentLoader.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | interface AttachmentLoader {} 4 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Bone.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.core.math.Matrix; 4 | import pixi.plugins.dragonbones.model.BoneData; 5 | 6 | @:native("PIXI.spine.core.Bone") 7 | extern class Bone { 8 | static var yDown:Bool; 9 | 10 | var matrix:Matrix; 11 | var worldX(default, never):Float; 12 | var worldY(default, never):Float; 13 | var data:BoneData; 14 | var skeleton:Skeleton; 15 | var parent:Bone; 16 | var children:Array; 17 | var x:Float; 18 | var y:Float; 19 | var rotation:Float; 20 | var scaleX:Float; 21 | var scaleY:Float; 22 | var shearX:Float; 23 | var shearY:Float; 24 | var ax:Float; 25 | var ay:Float; 26 | var arotation:Float; 27 | var ascaleX:Float; 28 | var ascaleY:Float; 29 | var ashearX:Float; 30 | var ashearY:Float; 31 | var appliedValid:Bool; 32 | var sorted:Bool; 33 | var active:Bool; 34 | 35 | function new(data:BoneData, skeleton:Skeleton, parent:Bone); 36 | function isActive():Bool; 37 | function update():Void; 38 | function updateWorldTransform():Void; 39 | function updateWorldTransformWith(x:Float, y:Float, rotation:Float, scaleX:Float, scaleY:Float, shearX:Float, shearY:Float):Void; 40 | function setToSetupPose():Void; 41 | function getWorldRotationX():Float; 42 | function getWorldRotationY():Float; 43 | function getWorldScaleX():Float; 44 | function getWorldScaleY():Float; 45 | function updateAppliedTransform():Void; 46 | function worldToLocal(world:Vector2):Vector2; 47 | function localToWorld(local:Vector2):Vector2; 48 | function worldToLocalRotation(worldRotation:Float):Float; 49 | function localToWorldRotation(localRotation:Float):Float; 50 | function rotateWorld(degrees:Float):Void; 51 | } 52 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/BoneData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.BoneData") 4 | extern class BoneData { 5 | var index:Int; 6 | var name:String; 7 | var parent:BoneData; 8 | var length:Int; 9 | var x:Float; 10 | var y:Float; 11 | var rotation:Float; 12 | var scaleX:Float; 13 | var scaleY:Float; 14 | var shearX:Float; 15 | var shearY:Float; 16 | var transformMode:TransformMode; 17 | var skinRequired:Bool; 18 | var color:Color; 19 | 20 | function new(index:Int, name:String, parent:BoneData); 21 | } 22 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Color.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.Color") 4 | extern class Color { 5 | var r:Float; 6 | var g:Float; 7 | var b:Float; 8 | var a:Float; 9 | static final WHITE:Color; 10 | static final RED:Color; 11 | static final GREEN:Color; 12 | static final BLUE:Color; 13 | static final MAGENTA:Color; 14 | 15 | function new(?r:Float, ?g:Float, ?b:Float, ?a:Float); 16 | 17 | function set(r:Float, g:Float, b:Float, a:Float):Color; 18 | function setFromColor(c:Color):Color; 19 | function setFromString(hex:String):Color; 20 | function add(r:Float, g:Float, b:Float, a:Float):Color; 21 | function clamp():Color; 22 | 23 | static function rgba8888ToColor(color:Color, value:Float):Void; 24 | static function rgb888ToColor(color:Color, value:Float):Void; 25 | } 26 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/ConstraintData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.ConstraintData") 4 | extern class ConstraintData { 5 | var name:String; 6 | var order:Float; 7 | var skinRequired:Bool; 8 | function new(name:String, order:Float, skinRequired:Bool); 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Disposable.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | interface Disposable { 4 | function dispose():Void; 5 | } 6 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Event.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.Event") 4 | extern class Event { 5 | var data:EventData; 6 | var intValue:Int; 7 | var floatValue:Float; 8 | var stringValue:String; 9 | var time:Float; 10 | 11 | function new(time:Float, data:EventData); 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/EventData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.EventData") 4 | extern class EventData { 5 | var name:String; 6 | var intValue:Int; 7 | var floatValue:Float; 8 | var stringValue:String; 9 | 10 | function new(name:String); 11 | } 12 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/EventQueue.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.EventQueue") 4 | extern class EventQueue { 5 | var objects:Array; 6 | var drainDisabled:Bool; 7 | var animState:AnimationState; 8 | function new(animState:AnimationState); 9 | function start(entry:TrackEntry):Void; 10 | function interrupt(entry:TrackEntry):Void; 11 | function end(entry:TrackEntry):Void; 12 | function dispose(entry:TrackEntry):Void; 13 | function complete(entry:TrackEntry):Void; 14 | function event(entry:TrackEntry, event:Event):Void; 15 | function deprecateStuff():Bool; 16 | function drain():Void; 17 | function clear():Void; 18 | } 19 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/IkConstraint.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.IkConstraint") 4 | extern class IkConstraint implements Updatable { 5 | var data:IkConstraintData; 6 | var bones:Array; 7 | var target:Bone; 8 | var bendDirection:Float; 9 | var compress:Bool; 10 | var stretch:Bool; 11 | var mix:Float; 12 | var softness:Float; 13 | var active:Bool; 14 | function new(data:IkConstraintData, skeleton:Skeleton); 15 | function isActive():Bool; 16 | function apply():Void; 17 | function update():Void; 18 | function apply1(bone:Bone, targetX:Float, targetY:Float, compress:Bool, stretch:Bool, uniform:Bool, alpha:Float):Void; 19 | function apply2(parent:Bone, child:Bone, targetX:Float, targetY:Float, bendDir:Float, stretch:Bool, softness:Float, alpha:Float):Void; 20 | } 21 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/IkConstraintData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.IkConstraintData") 4 | extern class IkConstraintData { 5 | var name:String; 6 | var order:Int; 7 | var bones:Array; 8 | var target:BoneData; 9 | var bendDirection:Int; 10 | var mix:Float; 11 | 12 | function new(name:String); 13 | } 14 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/IntSet.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | extern class IntSet { 4 | public var array:Array; 5 | public function add(value:Int):Bool; 6 | public function contains(value:Int):Bool; 7 | public function remove(value:Int):Bool; 8 | public function clear():Void; 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/MixBlend.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | enum abstract MixBlend(Int) { 4 | var Setup = 0; 5 | var First = 1; 6 | var Replace = 2; 7 | var Add = 3; 8 | } 9 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/MixDirection.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | enum abstract MixDirection(Int) { 4 | var mixIn = 0; 5 | var mixOut = 1; 6 | } 7 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/MixPose.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | extern class MixPose {} 4 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/PathConstraint.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.plugins.spine.core.attachments.PathAttachment; 4 | 5 | @:native("PIXI.spine.core.PathConstraint") 6 | extern class PathConstraint implements Updatable { 7 | static var NONE:Float; 8 | static var BEFORE:Float; 9 | static var AFTER:Float; 10 | static var epsilon:Float; 11 | var data:PathConstraintData; 12 | var bones:Array; 13 | var target:Slot; 14 | var position:Float; 15 | var spacing:Float; 16 | var rotateMix:Float; 17 | var translateMix:Float; 18 | var spaces:Array; 19 | var positions:Array; 20 | var world:Array; 21 | var curves:Array; 22 | var lengths:Array; 23 | var segments:Array; 24 | var active:Bool; 25 | function new(data:PathConstraintData, skeleton:Skeleton); 26 | function isActive():Bool; 27 | function apply():Void; 28 | function update():Void; 29 | function computeWorldPositions(path:PathAttachment, spacesCount:Float, tangents:Bool, percentPosition:Bool, percentSpacing:Bool):Array; 30 | function addBeforePosition(p:Float, temp:Array, i:Float, out:Array, o:Float):Void; 31 | function addAfterPosition(p:Float, temp:Array, i:Float, out:Array, o:Float):Void; 32 | function addCurvePosition(p:Float, x1:Float, y1:Float, cx1:Float, cy1:Float, cx2:Float, cy2:Float, x2:Float, y2:Float, out:Array, o:Float, 33 | tangents:Bool):Void; 34 | } 35 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/PathConstraintData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.PathConstraintData") 4 | extern class PathConstraintData { 5 | var name:String; 6 | var order:Int; 7 | var bones:Array; 8 | var target:BoneData; 9 | var positionMode:PositionMode; 10 | var spacingMode:SpacingMode; 11 | var rotateMode:RotateMode; 12 | var shearMix:Float; 13 | var offsetRotation:Float; 14 | var position:Float; 15 | var spacing:Float; 16 | var rotateMix:Float; 17 | var translateMix:Float; 18 | 19 | function new(name:String); 20 | } 21 | 22 | enum abstract PositionMode(Int) { 23 | var Fixed = 0; 24 | var Percent; 25 | } 26 | 27 | enum abstract SpacingMode(Int) { 28 | var Length = 0; 29 | var Fixed; 30 | var Percent; 31 | } 32 | 33 | enum abstract RotateMode(Int) { 34 | var Tangent = 0; 35 | var Chain; 36 | var ChainScale; 37 | } 38 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Pool.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.Pool") 4 | extern class Pool { 5 | private var items:Array; 6 | private var instantiator:Void->T; 7 | function new(instantiator:Void->T); 8 | function obtain():T; 9 | function free(item:T):Void; 10 | function freeAll(items:Array):Void; 11 | function clear():Void; 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/SkeletonData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.SkeletonData") 4 | extern class SkeletonData { 5 | var name:String; 6 | var bones:Array; 7 | var slots:Array; 8 | var skins:Array; 9 | var defaultSkin:Skin; 10 | var events:Array; 11 | var animations:Array; 12 | var ikConstraints:Array; 13 | var transformConstraints:Array; 14 | var pathConstraints:Array; 15 | 16 | var x:Float; 17 | var y:Float; 18 | var width:Float; 19 | var height:Float; 20 | var version:String; 21 | var hash:String; 22 | 23 | var fps:Float; 24 | var imagesPath:String; 25 | var audioPath:String; 26 | 27 | function new(); 28 | 29 | function findBone(boneName:String):Bone; 30 | function findBoneIndex(boneName:String):Int; 31 | function findSlot(slotName:String):Slot; 32 | function findSlotIndex(slotName:String):Int; 33 | function findSkin(skinName:String):Skin; 34 | function findEvent(eventDataName:String):Event; 35 | function findAnimation(animationName:String):Animation; 36 | function findIkConstraint(constraintName:String):IkConstraintData; 37 | function findTransformConstraint(constraintName:String):TransformConstraintData; 38 | function findPathConstraint(constraintName:String):PathConstraintData; 39 | function findPathConstraintIndex(pathConstraintName:String):Int; 40 | } 41 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/SkeletonJson.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | @:native("PIXI.spine.core.SkeletonJson") 6 | extern class SkeletonJson { 7 | function new(attachementsLoader:AttachmentLoader):Void; 8 | 9 | var scale:Float; 10 | 11 | function readSkeletonData(json:EitherType):SkeletonData; 12 | } 13 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Skin.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.plugins.spine.core.attachments.Attachment; 4 | 5 | @:native("PIXI.spine.core.Skin") 6 | extern class Skin { 7 | var attachments:Array; 8 | var bones:Array; 9 | var constraints:Array; 10 | function new(name:String); 11 | function setAttachment(slotIndex:Float, name:String, attachment:Attachment):Void; 12 | function addSkin(skin:Skin):Void; 13 | function copySkin(skin:Skin):Void; 14 | function getAttachment(slotIndex:Float, name:String):Attachment; 15 | function removeAttachment(slotIndex:Float, name:String):Void; 16 | function getAttachments():Array; 17 | function getAttachmentsForSlot(slotIndex:Float, attachments:Array):Void; 18 | function clear():Void; 19 | function attachAll(skeleton:Skeleton, oldSkin:Skin):Void; 20 | } 21 | 22 | @:native("PIXI.spine.core.SkinEntry") 23 | extern class SkinEntry { 24 | var slotIndex:Float; 25 | var name:String; 26 | var attachment:Attachment; 27 | function new(slotIndex:Float, name:String, attachment:Attachment); 28 | } 29 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Slot.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import haxe.DynamicAccess; 4 | import pixi.core.display.DisplayObject; 5 | import pixi.plugins.spine.core.attachments.Attachment; 6 | 7 | @:native("PIXI.spine.core.Slot") 8 | extern class Slot { 9 | var currentMesh:Dynamic; 10 | var currentSprite:Dynamic; 11 | var currentGraphics:Dynamic; 12 | var clippingContainer:Dynamic; 13 | var meshes:Dynamic; 14 | var currentMeshName:String; 15 | var sprites:DynamicAccess; 16 | var currentSpriteName:String; 17 | var blendMode:Float; 18 | // var tempRegion: TextureRegion; 19 | var tempAttachment:Attachment; 20 | var data:SlotData; 21 | var bone:Bone; 22 | var color:Color; 23 | var darkColor:Color; 24 | var attachment:Attachment; 25 | var attachmentTime:Float; // ? 26 | var attachmentVertices:Array; 27 | function new(data:SlotData, bone:Bone):Void; 28 | function getAttachment():Attachment; 29 | function setAttachment(attachment:Attachment):Void; 30 | function setAttachmentTime(time:Float):Void; 31 | function getAttachmentTime():Float; 32 | function setToSetupPose():Void; 33 | } 34 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/SlotData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.core.Pixi.BlendModes; 4 | import pixi.plugins.spine.core.utils.Color; 5 | 6 | @:native("PIXI.spine.core.SlotData") 7 | extern class SlotData { 8 | var index:Int; 9 | var name:String; 10 | var boneData:BoneData; 11 | var color:Color; 12 | var attachmentName:String; 13 | var blendMode:BlendModes; 14 | 15 | function new(index:Int, name:String, boneData:BoneData); 16 | } 17 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TextureAtlas.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.core.textures.BaseTexture; 4 | import pixi.core.textures.Texture; 5 | 6 | @:native("PIXI.spine.core.TextureAtlas") 7 | extern class TextureAtlas implements Disposable { 8 | var pages:Array; 9 | var regions:Array; 10 | function new(?atlasText:String, textureLoader:String->(BaseTexture->Void)->Void, ?callback:TextureAtlas->Void); 11 | 12 | function addTexture(name:String, texture:Texture):TextureAtlasRegion; 13 | function addTextureHash(textures:Dynamic, stripExtension:Bool):Void; 14 | function addSpineAtlas(?atlasText:String, textureLoader:String->(BaseTexture->Void)->Void, ?callback:TextureAtlas->Void):Void; 15 | // private load(atlasText, textureLoader, callback); 16 | function findRegion(name:String):TextureAtlasRegion; 17 | function dispose():Void; 18 | } 19 | 20 | @:native("PIXI.spine.core.TextureAtlasPage") 21 | extern class TextureAtlasPage { 22 | var name:String; 23 | // var minFilter: TextureFilter; 24 | // var magFilter: TextureFilter; 25 | // var uWrap: TextureWrap; 26 | // var vWrap: TextureWrap; 27 | var baseTexture:BaseTexture; 28 | var width:Int; 29 | var height:Int; 30 | function setFilters():Void; 31 | } 32 | 33 | @:native("PIXI.spine.core.TextureAtlasRegion") 34 | extern class TextureAtlasRegion extends TextureRegion { 35 | var page:TextureAtlasPage; 36 | var name:String; 37 | var index:Int; 38 | } 39 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TextureRegion.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | import pixi.core.math.shapes.Rectangle; 4 | import pixi.core.textures.Texture; 5 | 6 | @:native("PIXI.spine.core.TextureRegion") 7 | extern class TextureRegion { 8 | var texture:Texture; 9 | var size:Rectangle; 10 | var width:Float; 11 | var height:Float; 12 | var u:Float; 13 | var v:Float; 14 | var u2:Float; 15 | var v2:Float; 16 | var offsetX:Float; 17 | var offsetY:Float; 18 | var pixiOffsetY:Float; 19 | var spineOffsetY:Float; 20 | var originalWidth:Float; 21 | var originalHeight:Float; 22 | var x:Float; 23 | var y:Float; 24 | var rotate:Bool; 25 | } 26 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TrackEntry.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.TrackEntry") 4 | extern class TrackEntry { 5 | var animation:Animation; 6 | var next:TrackEntry; 7 | var mixingFrom:TrackEntry; 8 | var mixingTo:TrackEntry; 9 | var listener:AnimationStateListener2; 10 | var trackIndex:Float; 11 | var loop:Bool; 12 | var holdPrevious:Bool; 13 | var eventThreshold:Float; 14 | var attachmentThreshold:Float; 15 | var drawOrderThreshold:Float; 16 | var animationStart:Float; 17 | var animationEnd:Float; 18 | var animationLast:Float; 19 | var nextAnimationLast:Float; 20 | var delay:Float; 21 | var trackTime:Float; 22 | var trackLast:Float; 23 | var nextTrackLast:Float; 24 | var trackEnd:Float; 25 | var timeScale:Float; 26 | var alpha:Float; 27 | var mixTime:Float; 28 | var mixDuration:Float; 29 | var interruptAlpha:Float; 30 | var totalAlpha:Float; 31 | var mixBlend:MixBlend; 32 | var timelineMode:Array; 33 | var timelineHoldMix:Array; 34 | var timelinesRotation:Array; 35 | function reset():Void; 36 | function getAnimationTime():Float; 37 | function setAnimationLast(animationLast:Float):Void; 38 | function isComplete():Bool; 39 | function resetRotationDirections():Void; 40 | } 41 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TransformConstraint.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.TransformConstraint") 4 | extern class TransformConstraint implements Updatable { 5 | var data:TransformConstraintData; 6 | var bones:Array; 7 | var target:Bone; 8 | var rotateMix:Float; 9 | var translateMix:Float; 10 | var scaleMix:Float; 11 | var shearMix:Float; 12 | var temp:Vector2; 13 | var active:Bool; 14 | function new(data:TransformConstraintData, skeleton:Skeleton); 15 | function isActive():Bool; 16 | function apply():Void; 17 | function update():Void; 18 | function applyAbsoluteWorld():Void; 19 | function applyRelativeWorld():Void; 20 | function applyAbsoluteLocal():Void; 21 | function applyRelativeLocal():Void; 22 | } 23 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TransformConstraintData.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.TransformConstraintData") 4 | extern class TransformConstraintData { 5 | var name:String; 6 | var order:Int; 7 | var bones:Array; 8 | var target:BoneData; 9 | var rotateMix:Float; 10 | var translateMix:Float; 11 | var scaleMix:Float; 12 | var shearMix:Float; 13 | var offsetRotation:Float; 14 | var offsetX:Float; 15 | var offsetY:Float; 16 | var offsetScaleX:Float; 17 | var offsetScaleY:Float; 18 | var offsetShearY:Float; 19 | 20 | function new(name:String); 21 | } 22 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/TransformMode.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | enum abstract TransformMode(Int) { 4 | var Normal = 0; 5 | var OnlyTranslation = 1; 6 | var NoRotationOrReflection = 2; 7 | var NoScale = 3; 8 | var NoScaleOrReflection = 4; 9 | } -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Updatable.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | interface Updatable { 4 | function update():Void; 5 | } 6 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/Vector2.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core; 2 | 3 | @:native("PIXI.spine.core.Vector2") 4 | extern class Vector2 { 5 | var x:Float; 6 | var y:Float; 7 | function new(?x:Float, ?y:Float); 8 | function set(x:Float, y:Float):Vector2; 9 | function length():Float; 10 | function normalize():Vector2; 11 | } 12 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/attachments/Attachment.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core.attachments; 2 | 3 | @:native("PIXI.spine.core.Attachment") 4 | extern class Attachment { 5 | var name:String; 6 | function new(name:String); 7 | 8 | function copy():Attachment; 9 | } 10 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/attachments/PathAttachment.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core.attachments; 2 | 3 | @:native("PIXI.spine.core.PathAttachment") 4 | extern class PathAttachment extends VertexAttachment { 5 | var lengths:Array; 6 | var closed:Bool; 7 | var constantSpeed:Bool; 8 | var color:Color; 9 | function new(name:String); 10 | } 11 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/attachments/VertexAttachment.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core.attachments; 2 | 3 | @:native("PIXI.spine.core.VertexAttachment") 4 | extern class VertexAttachment extends Attachment { 5 | // private static var nextID; 6 | var id:Float; 7 | var bones:Array; 8 | var vertices:Array; 9 | var worldVerticesLength:Float; 10 | var deformAttachment:VertexAttachment; 11 | function new(name:String); 12 | function computeWorldVerticesOld(slot:Slot, worldVertices:Array):Void; 13 | function computeWorldVertices(slot:Slot, start:Float, count:Float, worldVertices:Array, offset:Float, stride:Float):Void; 14 | function copyTo(attachment:VertexAttachment):Void; 15 | } 16 | -------------------------------------------------------------------------------- /src/pixi/plugins/spine/core/utils/Color.hx: -------------------------------------------------------------------------------- 1 | package pixi.plugins.spine.core.utils; 2 | 3 | @:native("PIXI.spine.core.Color") 4 | extern class Color { 5 | static var WHITE:Color; 6 | static var RED:Color; 7 | static var GREEN:Color; 8 | static var BLUE:Color; 9 | static var MAGENTA:Color; 10 | 11 | function new(?r:Int, ?g:Int, ?b:Int, ?a:Int); 12 | 13 | function set(r:Int, g:Int, b:Int, a:Int):Color; 14 | function setFromColor(c:Color):Color; 15 | function setFromString(hex:String):Color; 16 | function add(r:Int, g:Int, b:Int, a:Int):Color; 17 | function clamp():Void; 18 | } 19 | -------------------------------------------------------------------------------- /src/pixi/resources/ArrayResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | import pixi.core.textures.BaseTexture; 5 | 6 | @:native("PIXI.resources.ArrayResource") 7 | extern class ArrayResource extends Resource { 8 | /** 9 | * Base resource class for textures that manages validation and uploading, depending on its type. 10 | * Uploading of a base texture to the GPU is required. 11 | * @param width Width of the resource 12 | * @param height Height of the resource 13 | */ 14 | function new(source:EitherType>, ?options:ArrayResourceOptions); 15 | 16 | /** 17 | * Dirty IDs for each part 18 | */ 19 | var itemDirtyIds(default, null):Array; 20 | 21 | /** 22 | * Collection of resources. 23 | */ 24 | var items(default, null):Array; 25 | 26 | /** 27 | * Number of elements in array 28 | */ 29 | var length(default, null):Int; 30 | 31 | /** 32 | * Set a resource by ID 33 | * @param resource PIXI.resources.Resource 34 | * @param index Zero-based index of resource to set 35 | * @return Instance for chaining 36 | */ 37 | function addResourceAt(resource:Resource, index:Int):ArrayResource; 38 | } 39 | 40 | typedef ArrayResourceOptions = { 41 | ?width:Float, 42 | ?height:Float 43 | } 44 | -------------------------------------------------------------------------------- /src/pixi/resources/BaseImageResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | import js.Promise; 5 | import js.html.HtmlElement; 6 | import pixi.core.renderers.webgl.GLTexture; 7 | import pixi.core.renderers.webgl.Renderer; 8 | import pixi.core.textures.BaseTexture; 9 | 10 | @:native("PIXI.resources.BaseImageResource") 11 | extern class BaseImageResource extends Resource { 12 | /** 13 | * Base for all the image/canvas resources 14 | * @param source Types: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement 15 | */ 16 | function new(source:Dynamic); 17 | 18 | /** 19 | * The source element 20 | */ 21 | var source:Dynamic; 22 | 23 | /** 24 | * Set cross origin based detecting the url and the crossorigin 25 | * @param element Element to apply crossOrigin 26 | * @param url URL to check 27 | * @param crossorigin Cross origin value to use 28 | */ 29 | static function crossOrigin(element:HtmlElement, url:String, ?crossorigin:EitherType = true):Void; 30 | } 31 | -------------------------------------------------------------------------------- /src/pixi/resources/BufferResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import js.lib.Float32Array; 4 | import js.lib.Uint32Array; 5 | import js.lib.Uint8Array; 6 | 7 | @:native("PIXI.resources.BufferResource") 8 | extern class BufferResource extends Resource { 9 | /** 10 | * Buffer resource with data of typed array 11 | * @param source Source buffer 12 | * @param options Options 13 | */ 14 | @:overload(function(source:Array, ?options:BufferResourceOptions):Void {}) 15 | @:overload(function(source:Array, ?options:BufferResourceOptions):Void {}) 16 | function new(source:Array, ?options:BufferResourceOptions); 17 | 18 | /** 19 | * Source array Cannot be ClampedUint8Array because it cant be uploaded to WebGL 20 | * Types: Float32Array | Uint8Array | Uint32Array 21 | */ 22 | var data:Dynamic; 23 | 24 | /** 25 | * Used to auto-detect the type of resource. 26 | * @param source The source object 27 | * @return true if successfull detection 28 | */ 29 | static function test(source:Dynamic):Bool; 30 | } 31 | 32 | typedef BufferResourceOptions = { 33 | ?width:Float, 34 | ?height:Float 35 | } 36 | -------------------------------------------------------------------------------- /src/pixi/resources/CanvasResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import js.html.CanvasElement; 4 | 5 | @:native("PIXI.resources.CanvasResource") 6 | extern class CanvasResource extends BaseImageResource { 7 | /** 8 | * Resource type for HTMLCanvasElement. 9 | * @param source Canvas element to use 10 | */ 11 | function new(source:CanvasElement); 12 | 13 | /** 14 | * 15 | * @param source The source object. Types: HTMLCanvasElement | OffscreenCanvas 16 | * @return true if source is HTMLCanvasElement or OffscreenCanvas 17 | */ 18 | static function test(source:Dynamic):Bool; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/resources/CubeResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | @:native("PIXI.resources.CubeResource") 6 | extern class CubeResource extends ArrayResource { 7 | /** 8 | * Resource for a CubeTexture which contains six resources. 9 | * @param source Collection of URLs or resources to use as the sides of the cube. 10 | */ 11 | function new(?source:Array>, ?options:CubeResourceOptions); 12 | 13 | /** 14 | * Number of texture sides to store for CubeResources. Default: 6 15 | */ 16 | static var SIDES:Int; 17 | } 18 | 19 | typedef CubeResourceOptions = { 20 | width:Float, 21 | height:Float 22 | } 23 | -------------------------------------------------------------------------------- /src/pixi/resources/DepthResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | @:native("PIXI.resources.DepthResource") 4 | extern class DepthResource extends BufferResource {} 5 | -------------------------------------------------------------------------------- /src/pixi/resources/ImageBitmapResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import js.html.ImageBitmap; 4 | 5 | @:native("PIXI.resources.ImageBitmapResource") 6 | extern class ImageBitmapResource extends BaseImageResource { 7 | /** 8 | * Resource type for ImageBitmap. 9 | * @param source Image element to use 10 | */ 11 | function new(source:ImageBitmap); 12 | 13 | /** 14 | * 15 | * @param source The source object. Type: ImageBitmap 16 | * @return true if source is ImageBitmap 17 | */ 18 | static function test(source:ImageBitmap):Bool; 19 | } 20 | -------------------------------------------------------------------------------- /src/pixi/resources/ImageResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | import js.lib.Promise; 5 | import js.html.ImageBitmap; 6 | import js.html.ImageElement; 7 | 8 | @:native("PIXI.resources.ImageResource") 9 | extern class ImageResource extends BaseImageResource { 10 | /** 11 | * Resource type for HTMLImageElement. 12 | * @param source Image element to use 13 | * @param options options for this Resource 14 | */ 15 | function new(source:EitherType, options:ImageResourceOptions); 16 | 17 | /** 18 | * The ImageBitmap element created for HTMLImageElement 19 | */ 20 | var bitmap:ImageBitmap; 21 | 22 | /** 23 | * If capable, convert the image using createImageBitmap API 24 | */ 25 | var createBitmap:Bool; 26 | 27 | /** 28 | * If the image should be disposed after upload 29 | */ 30 | var preserveBitmap:Bool; 31 | 32 | /** 33 | * URL of the image source 34 | */ 35 | var url:String; 36 | 37 | /** 38 | * Called when we need to convert image into BitmapImage. Can be called multiple times, real promise is cached inside. 39 | * @return cached promise to fill that bitmap 40 | */ 41 | function process():Promise; 42 | } 43 | 44 | typedef ImageResourceOptions = { 45 | autoLoad:Bool, 46 | createBitmap:Bool, 47 | crossorigin:Bool, 48 | premultiplyAlpha:Bool 49 | } 50 | -------------------------------------------------------------------------------- /src/pixi/resources/ResourcePackage.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | 5 | @:native("PIXI.resources") 6 | extern class ResourcesPackage { 7 | /** 8 | * Collection of installed resource types, class must extend PIXI.resources.Resource. 9 | */ 10 | static var INSTALLED:Array; 11 | 12 | /** 13 | * Create a resource element from a single source element. This auto-detects which type of resource to create. 14 | * All resources that are auto-detectable must have a static test method and a constructor with the arguments (source, options?). 15 | * Currently, the supported resources for auto-detection include: 16 | * @param source 17 | * @param option 18 | * @return The created resource. 19 | */ 20 | static function autoDetectResource(source:EitherType, options:ResourcesPackageOptions):Resource; 21 | } 22 | 23 | typedef ResourcesPackageOptions = { 24 | width:Float, 25 | height:Float, 26 | autoLoad:Bool, 27 | scale:Float, 28 | createBitmap:Bool, 29 | crossorigin:Bool, 30 | autoPlay:Bool, 31 | updateFPS:Float 32 | } 33 | -------------------------------------------------------------------------------- /src/pixi/resources/SVGResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | import haxe.extern.EitherType; 4 | import js.lib.RegExp; 5 | import pixi.core.Pixi.ISize; 6 | 7 | @:native("PIXI.resources.SVGResource") 8 | extern class SVGResource extends BaseImageResource { 9 | /** 10 | * Resource type for SVG elements and graphics. 11 | * @param source Base64 encoded SVG element or URL for SVG file. 12 | * @param options options for this Resource 13 | */ 14 | function new(source:String, options:SVGResourceOptions); 15 | 16 | static var SVG_SIZE:EitherType; 17 | 18 | /** 19 | * A height override for rasterization on load 20 | */ 21 | var _overrideHeight(default, null):Float; 22 | 23 | /** 24 | * A width override for rasterization on load 25 | */ 26 | var _overrideWidth(default, null):Float; 27 | 28 | /** 29 | * The source scale to apply when rasterizing on load 30 | */ 31 | var scale(default, null):Float; 32 | 33 | /** 34 | * Get size from an svg string using regexp. 35 | * @param svgString 36 | * @return the size of the svg graphic 37 | */ 38 | static function getSize(svgString:String):ISize; 39 | 40 | /** 41 | * Used to auto-detect the type of resource. 42 | * @param source The source object 43 | * @param extension The extension of source, if set 44 | * @return true if svg 45 | */ 46 | static function test(source:Dynamic, extension:String):Bool; 47 | } 48 | 49 | typedef SVGResourceOptions = { 50 | scale:Float, 51 | width:Float, 52 | height:Float, 53 | autoLoad:Bool 54 | } 55 | -------------------------------------------------------------------------------- /src/pixi/resources/VideoResource.hx: -------------------------------------------------------------------------------- 1 | package pixi.resources; 2 | 3 | @:native("PIXI.resources.VideoResource") 4 | extern class VideoResource extends BaseImageResource { 5 | /** 6 | * Resource type for HTMLVideoElement. 7 | * @param source Video element to use. Types: HTMLVideoElement | object | string | Array.<(string|object)> 8 | * @param options Options to use 9 | */ 10 | function new(source:Dynamic, options:VideoResourceOptions); 11 | 12 | /** 13 | * List of common video file extensions supported by VideoResource. 14 | */ 15 | static var TYPES(default, null):Array; 16 | 17 | /** 18 | * When set to true will automatically play videos used by this texture once they are loaded. If false, it will not modify the playing state. 19 | */ 20 | var autoPlay:Bool; 21 | 22 | /** 23 | * Should the base texture automatically update itself, set to true by default 24 | */ 25 | var autoUpdate:Bool; 26 | 27 | /** 28 | * How many times a second to update the texture from the video. Leave at 0 to update at every render. A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient. 29 | */ 30 | var updateFPS:Float; 31 | 32 | /** 33 | * Used to auto-detect the type of resource. 34 | * @param source The source object 35 | * @param extension The extension of source, if set 36 | * @return true true if video source 37 | */ 38 | static function test(source:Dynamic, extension:String):Bool; 39 | } 40 | 41 | typedef VideoResourceOptions = { 42 | autoLoad:Bool, 43 | autoPlay:Bool, 44 | updateFPS:Float, 45 | crossorigin:Bool 46 | } 47 | -------------------------------------------------------------------------------- /src/pixi/tilemap/CanvasTileRenderer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.renderers.canvas.CanvasRenderer; 4 | 5 | extern class CanvasTileRenderer { 6 | public function new(renderer:CanvasRenderer); 7 | 8 | var renderer:CanvasRenderer; 9 | 10 | var tileAnim:Array; 11 | } 12 | -------------------------------------------------------------------------------- /src/pixi/tilemap/CompositeRectTileLayer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.display.Container; 4 | import pixi.core.renderers.canvas.CanvasRenderer; 5 | import pixi.core.renderers.webgl.Renderer; 6 | import pixi.core.textures.Texture; 7 | 8 | @:native("PIXI.tilemap.CompositeRectTileLayer") 9 | extern class CompositeRectTileLayer extends Container { 10 | function new(); 11 | 12 | var useSquare:Bool; 13 | 14 | var modificationMarker:Int; 15 | 16 | /// can be initialized multiple times 17 | function initialize(zIndex:Float, bitmaps:Array, useSquare:Bool):Void; 18 | 19 | function setBitmaps(bitmaps:Array):Void; 20 | 21 | function clear():Void; 22 | 23 | function addRect(num:Int, u:Float, v:Float, x:Float, y:Float, tileWidth:Int, tileHeight:Int):Void; 24 | 25 | function addFrame(texture:Dynamic, x:Float, y:Float):Bool; 26 | 27 | function renderCanvas(renderer:CanvasRenderer):Void; 28 | 29 | function render(renderer:Renderer):Void; 30 | 31 | function isModified(anim:Bool):Bool; 32 | 33 | function clearModify():Void; 34 | } 35 | -------------------------------------------------------------------------------- /src/pixi/tilemap/GraphicsLayer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.graphics.Graphics; 4 | import pixi.core.renderers.canvas.CanvasRenderer; 5 | import pixi.core.renderers.webgl.Renderer; 6 | 7 | extern class GraphicsLayer extends Graphics { 8 | function new(zIndex:Float); 9 | 10 | function renderCanvas(renderer:CanvasRenderer):Void; 11 | 12 | function render(renderer:Renderer):Void; 13 | 14 | function isModified(anim:Bool):Bool; 15 | 16 | function clearModify():Void; 17 | } 18 | -------------------------------------------------------------------------------- /src/pixi/tilemap/RectTileLayer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.display.DisplayObject; 4 | import pixi.core.renderers.canvas.CanvasRenderer; 5 | import pixi.core.renderers.webgl.Renderer; 6 | import pixi.core.textures.Texture; 7 | 8 | extern class RectTileLayer extends DisplayObject { 9 | function new(zIndex:Float, texture:Texture); 10 | 11 | var pointsBuf:Array; 12 | 13 | var modificationMarker:Int; 14 | 15 | var hasAnim:Bool; 16 | 17 | function initialize(zIndex:Float, texture:Texture):Void; 18 | 19 | function clear():Void; 20 | 21 | function renderCanvas(renderer:CanvasRenderer):Void; 22 | 23 | function addRect(u:Float, v:Float, x:Float, y:Float, tileWidth:Int, tileHeight:Int, animX:Float, animY:Float):Void; 24 | 25 | function render(renderer:Renderer, useSquare:Bool):Void; 26 | } 27 | -------------------------------------------------------------------------------- /src/pixi/tilemap/RectTileShader.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.Shader; 4 | import pixi.core.renderers.webgl.Renderer; 5 | 6 | extern class RectTileShader extends Shader { 7 | function new(gl:Renderer); 8 | 9 | var vertSize:Int; 10 | 11 | var vertPerQuad:Int; 12 | 13 | var stride:Int; 14 | 15 | function createVao(renderer:Renderer, vb:Dynamic):Dynamic; 16 | } 17 | -------------------------------------------------------------------------------- /src/pixi/tilemap/SquareTileShader.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.Shader; 4 | import pixi.core.renderers.webgl.Renderer; 5 | 6 | extern class SquareTileShader extends Shader { 7 | function new(gl:Renderer); 8 | 9 | var vertSize:Int; 10 | 11 | var vertPerQuad:Int; 12 | 13 | var stride:Int; 14 | 15 | function createVao(renderer:Renderer, vb:Dynamic):Dynamic; 16 | } 17 | -------------------------------------------------------------------------------- /src/pixi/tilemap/TileRenderer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import js.lib.Uint16Array; 4 | import pixi.core.Shader; 5 | import pixi.core.renderers.webgl.Renderer; 6 | import pixi.core.renderers.webgl.utils.ObjectRenderer; 7 | 8 | extern class TileRenderer extends ObjectRenderer { 9 | /** 10 | * The default vertex shader source 11 | * 12 | * @static 13 | * @constant 14 | */ 15 | function new(renderer:Renderer); 16 | 17 | var vbs:Dynamic; 18 | 19 | var lastTimeCheck:Float; 20 | 21 | var tileAnim:Array; 22 | 23 | var indices:Uint16Array; 24 | 25 | var rectShader:RectTileShader; 26 | 27 | var squareShader:SquareTileShader; 28 | 29 | var indexBuffer:Dynamic; 30 | 31 | function checkLeaks():Void; 32 | 33 | function getVb():Dynamic; 34 | 35 | function createVb(useSquare:Bool):Dynamic; 36 | 37 | function removeVb(id:Int):Void; 38 | 39 | function getShader(useSquare:Bool):Shader; 40 | } 41 | -------------------------------------------------------------------------------- /src/pixi/tilemap/ZLayer.hx: -------------------------------------------------------------------------------- 1 | package pixi.tilemap; 2 | 3 | import pixi.core.display.Container; 4 | import pixi.core.renderers.canvas.CanvasRenderer; 5 | 6 | extern class ZLayer extends Container { 7 | function new(); 8 | 9 | var tilemap:Dynamic; 10 | 11 | function initialize(tilemap:Dynamic, zIndex:Int):Void; 12 | 13 | function clear():Void; 14 | 15 | function cacheIfDirty():Void; 16 | 17 | function renderCanvas(renderer:CanvasRenderer):Void; 18 | } 19 | --------------------------------------------------------------------------------