{"id":463,"date":"2011-10-14T18:47:23","date_gmt":"2011-10-14T09:47:23","guid":{"rendered":"http:\/\/www.digifie.jp\/blog\/?p=463"},"modified":"2011-10-14T19:45:38","modified_gmt":"2011-10-14T10:45:38","slug":"starling%e3%81%ae%e3%83%91%e3%83%bc%e3%83%86%e3%82%a3%e3%82%af%e3%83%ab%e3%82%92%e3%81%a1%e3%82%87%e3%81%a3%e3%81%a8%e3%81%a0%e3%81%91%e3%81%95%e3%82%8f%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.digifie.jp\/blog\/archives\/463","title":{"rendered":"Starling\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u3061\u3087\u3063\u3068\u3060\u3051\u3055\u308f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=https%3A%2F%2Fwww.digifie.jp%2Fblog%2Farchives%2F463&t=Starling%E3%81%AE%E3%83%91%E3%83%BC%E3%83%86%E3%82%A3%E3%82%AF%E3%83%AB%E3%82%92%E3%81%A1%E3%82%87%E3%81%A3%E3%81%A8%E3%81%A0%E3%81%91%E3%81%95%E3%82%8F%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/www.digifie.jp\/blog\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.digifie.jp\/blog\/archives\/463\" data-text=\"Starling\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u3061\u3087\u3063\u3068\u3060\u3051\u3055\u308f\u3063\u3066\u307f\u305f\" data-via=\"LLC DigiFie\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n<p>FlashPlayer11\u306eStage3D\u4e0a\u3067\u52d5\u4f5c\u3059\u308b2D\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300cStarling\u300d\u306e\u62e1\u5f35\u6a5f\u80fd\u3067\u3042\u308b\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u3061\u3087\u3063\u3068\u3060\u3051\u3055\u308f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u9069\u5f53\u306b\u3044\u3058\u308a\u5012\u3057\u305f\u3060\u3051\u3067\u4e2d\u8eab\u306b\u3064\u3044\u3066\u306f\u3044\u307e\u3072\u3068\u3064\u3088\u304f\u5206\u304b\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3059\u304c\u30011280px \u00d7 720px\u306e\u30b9\u30c6\u30fc\u30b8\u30b5\u30a4\u30ba\u3067\u308260fps\u51fa\u308b\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\nFlash\u306b\u3057\u3066\u306f\u3053\u308a\u3083\u3059\u3054\u3044\uff01\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p><a href=\"http:\/\/www.digifie.jp\/labo\/starling_particle_test\/\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-465\" title=\"Starling Particle\" src=\"http:\/\/www.digifie.jp\/blog\/wp-content\/uploads\/2011\/10\/111014.png\" alt=\"Starling Particle\" width=\"600\" height=\"412\" srcset=\"https:\/\/www.digifie.jp\/blog\/wp-content\/uploads\/2011\/10\/111014.png 600w, https:\/\/www.digifie.jp\/blog\/wp-content\/uploads\/2011\/10\/111014-300x206.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u4e0a\u306e\u753b\u50cf\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068<a href=\"http:\/\/www.digifie.jp\/labo\/starling_particle_test\/\">\u30c7\u30e2<\/a>\u753b\u9762\u304c\u958b\u304d\u307e\u3059\u3002<br \/>\n\u30de\u30a6\u30b9\u30c0\u30a6\u30f3\u3057\u3066\u52d5\u304b\u3059\u3068\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3082\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u4f7f\u7528\u3055\u305b\u3066\u3044\u305f\u3060\u3044\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306f<a href=\"https:\/\/github.com\/PrimaryFeather\/Starling-Extension-Particle-System\">\u3053\u3061\u3089<\/a>\uff08github\uff09<\/p>\n<p>\u3053\u308c\u304f\u3089\u3044\u30b5\u30af\u30b5\u30af\u52d5\u304f\u3068\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3082\u697d\u3057\u3044\u3067\u3059\u3088\u306d\uff01<\/p>\n<p>\u4ee5\u4e0b\u30b3\u30fc\u30c9\u3067\u3059\u3002\uff08\u3068\u3044\u3063\u3066\u3082\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u304b\u3089\u3042\u307e\u308a\u5909\u308f\u3063\u3066\u3044\u307e\u305b\u3093\u2026\uff09<\/p>\n<p>Demo.as \uff08\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u751f\u6210\u3059\u308b\u30af\u30e9\u30b9\uff09<\/p>\n<pre class=\"brush: as3; highlight: [3,4,5]; title: ; notranslate\" title=\"\"> package\r\n{\r\n    import flash.geom.Point;\r\n\r\n    import starling.core.Starling;\r\n    import starling.display.Image;\r\n    import starling.display.Sprite;\r\n    import starling.events.EnterFrameEvent;\r\n    import starling.events.Event;\r\n    import starling.events.Touch;\r\n    import starling.events.TouchEvent;\r\n    import starling.events.TouchPhase;\r\n    import starling.extensions.ParticleDesignerPS;\r\n    import starling.extensions.ParticleSystem;\r\n    import starling.text.TextField;\r\n    import starling.textures.Texture;\r\n    import starling.utils.HAlign;\r\n\r\n    public class Demo extends Sprite\r\n    {\r\n        \/\/ particle designer configurations\r\n\r\n        [Embed(source=&quot;..\/media\/drugs.pex&quot;, mimeType=&quot;application\/octet-stream&quot;)]\r\n        private static const DrugsConfig:Class;\r\n\r\n        [Embed(source=&quot;..\/media\/fire.pex&quot;, mimeType=&quot;application\/octet-stream&quot;)]\r\n        private static const FireConfig:Class;\r\n\r\n        [Embed(source=&quot;..\/media\/sun.pex&quot;, mimeType=&quot;application\/octet-stream&quot;)]\r\n        private static const SunConfig:Class;\r\n\r\n        [Embed(source=&quot;..\/media\/jellyfish.pex&quot;, mimeType=&quot;application\/octet-stream&quot;)]\r\n        private static const JellyfishConfig:Class;\r\n\r\n        \/\/ particle textures\r\n\r\n        [Embed(source = &quot;..\/media\/drugs_particle.png&quot;)]\r\n        private static const DrugsParticle:Class;\r\n\r\n        [Embed(source = &quot;..\/media\/fire_particle.png&quot;)]\r\n        private static const FireParticle:Class;\r\n\r\n        [Embed(source = &quot;..\/media\/sun_particle.png&quot;)]\r\n        private static const SunParticle:Class;\r\n\r\n        [Embed(source = &quot;..\/media\/jellyfish_particle.png&quot;)]\r\n        private static const JellyfishParticle:Class;\r\n\r\n        \/\/ member variables\r\n\r\n        private var mParticleSystem:ParticleSystem;\r\n        private var mFrameLabel:TextField;\r\n        private var mFrameCount:int;\r\n        private var mFrameTime:Number;\r\n\r\n        public function Demo()\r\n        {\r\n            \/\/ create particle system\r\n            \/\/ (change first 2 lines to try out other configurations)\r\n\r\n            var psConfig:XML = XML(new DrugsConfig());\r\n            var psTexture:Texture = Texture.fromBitmap(new DrugsParticle());\r\n\r\n            mParticleSystem = new ParticleDesignerPS(psConfig, psTexture);\r\n            mParticleSystem.emitterX = 1280 * .5;\r\n            mParticleSystem.emitterY = 720 * .5;\r\n            mParticleSystem.start();\r\n            addChild(mParticleSystem);\r\n\r\n            addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);\r\n            addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);\r\n        }\r\n\r\n        private function onAddedToStage(event:Event):void\r\n        {\r\n            stage.addEventListener(TouchEvent.TOUCH, onTouch);\r\n            Starling.juggler.add(mParticleSystem);\r\n        }\r\n\r\n        private function onRemovedFromStage(event:Event):void\r\n        {\r\n            stage.removeEventListener(TouchEvent.TOUCH, onTouch);\r\n            Starling.juggler.remove(mParticleSystem);\r\n        }\r\n\r\n        private function onTouch(event:TouchEvent):void\r\n        {\r\n            var touch:Touch = event.getTouch(stage);\r\n            if (touch &amp;&amp; touch.phase != TouchPhase.HOVER)\r\n            {\r\n                mParticleSystem.emitterX = touch.globalX;\r\n                mParticleSystem.emitterY = touch.globalY;\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>Startup.as\uff08\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30af\u30e9\u30b9\uff09<\/p>\n<pre class=\"brush: as3; highlight: [3,4,5]; title: ; notranslate\" title=\"\"> package\r\n{\r\n    import flash.display.Sprite;\r\n    import flash.display.StageAlign;\r\n    import flash.display.StageScaleMode;\r\n\r\n    import net.hires.debug.Stats;\r\n\r\n    import starling.core.Starling;\r\n\r\n    [SWF(width=&quot;1280&quot;, height=&quot;720&quot;, frameRate=&quot;60&quot;, backgroundColor=&quot;0&quot;)]\r\n    public class Startup extends Sprite\r\n    {\r\n        private var mStarling:Starling;\r\n\r\n        public function Startup()\r\n        {\r\n            stage.scaleMode = StageScaleMode.NO_SCALE;\r\n            stage.align = StageAlign.TOP_LEFT;\r\n\r\n            mStarling = new Starling(Demo, stage);\r\n            mStarling.enableErrorChecking = false;\r\n            mStarling.start();\r\n\r\n\t\t\t\/\/\r\n\t\t\taddChild(new Stats());\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>drugs.pex\uff08\u4eca\u56de\u8a2d\u5b9a\u3092\u3082\u3058\u3083\u3082\u3058\u3083\u3044\u3058\u3063\u305f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff09<br \/>\n&lt;?xml version=&#8221;1.0&#8243;?&gt;<br \/>\n&lt;particleEmitterConfig&gt;<br \/>\n&lt;texture name=&#8221;drugs_particle.png&#8221;\/&gt;<br \/>\n&lt;sourcePosition x=&#8221;160.00&#8243; y=&#8221;211.72&#8243;\/&gt;<br \/>\n&lt;sourcePositionVariance x=&#8221;50.00&#8243; y=&#8221;50.00&#8243;\/&gt;<br \/>\n&lt;speed value=&#8221;500.00&#8243;\/&gt;<br \/>\n&lt;speedVariance value=&#8221;700.00&#8243;\/&gt;<br \/>\n&lt;particleLifeSpan value=&#8221;4.0000&#8243;\/&gt;<br \/>\n&lt;particleLifespanVariance value=&#8221;4.0000&#8243;\/&gt;<br \/>\n&lt;angle value=&#8221;-90.00&#8243;\/&gt;<br \/>\n&lt;angleVariance value=&#8221;14.00&#8243;\/&gt;<br \/>\n&lt;gravity x=&#8221;5.70&#8243; y=&#8221;5.43&#8243;\/&gt;<br \/>\n&lt;radialAcceleration value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;tangentialAcceleration value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;radialAccelVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;tangentialAccelVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;startColor red=&#8221;0.3&#8243; green=&#8221;0.4&#8243; blue=&#8221;0.6&#8243; alpha=&#8221;0.76&#8243;\/&gt;<br \/>\n&lt;startColorVariance red=&#8221;0.2&#8243; green=&#8221;0.3&#8243; blue=&#8221;0.5&#8243; alpha=&#8221;0.08&#8243;\/&gt;<br \/>\n&lt;finishColor red=&#8221;0.2&#8243; green=&#8221;0.4&#8243; blue=&#8221;0.6&#8243; alpha=&#8221;0.57&#8243;\/&gt;<br \/>\n&lt;finishColorVariance red=&#8221;0.1&#8243; green=&#8221;0.3&#8243; blue=&#8221;0.4&#8243; alpha=&#8221;0.2&#8243;\/&gt;<br \/>\n&lt;maxParticles value=&#8221;1000&#8243;\/&gt;<br \/>\n&lt;startParticleSize value=&#8221;80.00&#8243;\/&gt;<br \/>\n&lt;startParticleSizeVariance value=&#8221;60.00&#8243;\/&gt;<br \/>\n&lt;finishParticleSize value=&#8221;1.00&#8243;\/&gt;<br \/>\n&lt;FinishParticleSizeVariance value=&#8221;0.10&#8243;\/&gt;<br \/>\n&lt;duration value=&#8221;-1.00&#8243;\/&gt;<br \/>\n&lt;emitterType value=&#8221;0&#8243;\/&gt;<br \/>\n&lt;maxRadius value=&#8221;100.00&#8243;\/&gt;<br \/>\n&lt;maxRadiusVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;minRadius value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;rotatePerSecond value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;rotatePerSecondVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;blendFuncSource value=&#8221;1&#8243;\/&gt;<br \/>\n&lt;blendFuncDestination value=&#8221;1&#8243;\/&gt;<br \/>\n&lt;rotationStart value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;rotationStartVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;rotationEnd value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;rotationEndVariance value=&#8221;0.00&#8243;\/&gt;<br \/>\n&lt;\/particleEmitterConfig&gt;<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=https%3A%2F%2Fwww.digifie.jp%2Fblog%2Farchives%2F463&t=Starling%E3%81%AE%E3%83%91%E3%83%BC%E3%83%86%E3%82%A3%E3%82%AF%E3%83%AB%E3%82%92%E3%81%A1%E3%82%87%E3%81%A3%E3%81%A8%E3%81%A0%E3%81%91%E3%81%95%E3%82%8F%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/www.digifie.jp\/blog\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.digifie.jp\/blog\/archives\/463\" data-text=\"Starling\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u3061\u3087\u3063\u3068\u3060\u3051\u3055\u308f\u3063\u3066\u307f\u305f\" data-via=\"LLC DigiFie\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>FlashPlayer11\u306eStage3D\u4e0a\u3067\u52d5\u4f5c\u3059\u308b2D\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300cStarling\u300d\u306e\u62e1\u5f35\u6a5f\u80fd\u3067\u3042\u308b\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u3061\u3087\u3063\u3068\u3060\u3051\u3055\u308f\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u9069\u5f53\u306b\u3044\u3058\u308a\u5012\u3057\u305f\u3060\u3051\u3067\u4e2d\u8eab\u306b\u3064\u3044\u3066\u306f\u3044\u307e\u3072\u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/posts\/463"}],"collection":[{"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":6,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/posts\/463\/revisions"}],"predecessor-version":[{"id":469,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/posts\/463\/revisions\/469"}],"wp:attachment":[{"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/media?parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/categories?post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.digifie.jp\/blog\/wp-json\/wp\/v2\/tags?post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}