mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
1 line
No EOL
16 KiB
JSON
1 line
No EOL
16 KiB
JSON
{"class":{"name":"Phaser.Tween","extends":"","static":false,"constructor":true,"parameters":[{"name":"object","type":["object"],"help":"Target object will be affected by this tween.","optional":false,"default":null},{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null},{"name":"manager","type":["Phaser.TweenManager"],"help":"The TweenManager responsible for looking after this Tween.","optional":false,"default":null}],"help":"Tween constructor\\nCreate a new <code>Tween<\/code>."},"consts":[],"methods":{"public":[{"name":"chain","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"You can chain tweens together by passing a reference to the chain function. This enables one tween to call another on completion.\\nYou can pass as many tweens as you like to this function, they will each be chained in sequence.","line":557,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"delay","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Sets a delay time before this tween will start.","line":478,"public":true,"protected":false,"private":false,"parameters":[{"name":"amount","type":["number"],"help":"The amount of the delay in ms.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"easing","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Set easing function this tween will use, i.e. Phaser.Easing.Linear.None.","line":528,"public":true,"protected":false,"private":false,"parameters":[{"name":"easing","type":["function"],"help":"The easing function this tween will use, i.e. Phaser.Easing.Linear.None.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"from","static":false,"returns":{"types":["Phaser.Tween"],"help":"This Tween object."},"help":"Sets this tween to be a `from` tween on the properties given. A `from` tween starts at the given value and tweens to the current values.\\nFor example a Sprite with an `x` coordinate of 100 could be tweened from `x: 200` by giving a properties object of `{ x: 200 }`.","line":271,"public":true,"protected":false,"private":false,"parameters":[{"name":"properties","type":["object"],"help":"Properties you want to tween from.","optional":false,"default":null},{"name":"duration","type":["number"],"help":"Duration of this tween in ms.","optional":true,"default":"1000"},{"name":"ease","type":["function"],"help":"Easing function. If not set it will default to Phaser.Easing.Linear.None.","optional":true,"default":"null"},{"name":"autoStart","type":["boolean"],"help":"Whether this tween will start automatically or not.","optional":true,"default":"false"},{"name":"delay","type":["number"],"help":"Delay before this tween will start, defaults to 0 (no delay). Value given is in ms.","optional":true,"default":"0"},{"name":"repeat","type":["number"],"help":"Should the tween automatically restart once complete? If you want it to run forever set as Number.MAX_VALUE. This ignores any chained tweens.","optional":true,"default":"0"},{"name":"yoyo","type":["boolean"],"help":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"generateData","static":false,"returns":{"types":["array"],"help":"An array of tweened values."},"help":"This will generate an array populated with the tweened object values from start to end.\\nIt works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and similar functions.\\nIt ignores delay and repeat counts and any chained tweens. Just one play through of tween data is returned, including yoyo if set.","line":345,"public":true,"protected":false,"private":false,"parameters":[{"name":"frameRate","type":["number"],"help":"The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.","optional":true,"default":"60"},{"name":"data","type":["array"],"help":"If given the generated data will be appended to this array, otherwise a new array will be returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"interpolation","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Set interpolation function the tween will use, by default it uses Phaser.Math.linearInterpolation.\\nAlso available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation.","line":543,"public":true,"protected":false,"private":false,"parameters":[{"name":"interpolation","type":["function"],"help":"The interpolation function to use (Phaser.Math.linearInterpolation by default)","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"loop","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Loop a chain of tweens\\n\\nUsage:\\ngame.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)\\n.to({ y: 300 }, 1000, Phaser.Easing.Linear.None)\\n.to({ x: 0 }, 1000, Phaser.Easing.Linear.None)\\n.to({ y: 0 }, 1000, Phaser.Easing.Linear.None)\\n.loop();","line":576,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"onUpdateCallback","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Sets a callback to be fired each time this tween updates.","line":591,"public":true,"protected":false,"private":false,"parameters":[{"name":"callback","type":["function"],"help":"The callback to invoke each time this tween is updated.","optional":false,"default":null},{"name":"callbackContext","type":["object"],"help":"The context in which to call the onUpdate callback.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"pause","static":false,"returns":null,"help":"Pauses the tween.","line":605,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"repeat","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Sets the number of times this tween will repeat.","line":492,"public":true,"protected":false,"private":false,"parameters":[{"name":"times","type":["number"],"help":"How many times to repeat.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"resume","static":false,"returns":null,"help":"Resumes a paused tween.","line":633,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"start","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Starts the tween running. Can also be called by the autoStart parameter of Tween.to.","line":291,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"stop","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"Stops the tween if running and removes it from the TweenManager. If there are any onComplete callbacks or events they are not dispatched.","line":459,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"to","static":false,"returns":{"types":["Phaser.Tween"],"help":"This Tween object."},"help":"Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given.\\nFor example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.","line":201,"public":true,"protected":false,"private":false,"parameters":[{"name":"properties","type":["object"],"help":"The properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object.","optional":false,"default":null},{"name":"duration","type":["number"],"help":"Duration of this tween in ms.","optional":true,"default":"1000"},{"name":"ease","type":["function"],"help":"Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden at will.","optional":true,"default":"null"},{"name":"autoStart","type":["boolean"],"help":"Whether this tween will start automatically or not.","optional":true,"default":"false"},{"name":"delay","type":["number"],"help":"Delay before this tween will start, defaults to 0 (no delay). Value given is in ms.","optional":true,"default":"0"},{"name":"repeat","type":["number"],"help":"Should the tween automatically restart once complete? If you want it to run forever set as Number.MAX_VALUE. This ignores any chained tweens.","optional":true,"default":"0"},{"name":"yoyo","type":["boolean"],"help":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":{"types":["boolean"],"help":"false if the tween has completed and should be deleted from the manager, otherwise true (still active)."},"help":"Core tween update function called by the TweenManager. Does not need to be invoked directly.","line":671,"public":true,"protected":false,"private":false,"parameters":[{"name":"time","type":["number"],"help":"A timestamp passed in by the TweenManager.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"yoyo","static":false,"returns":{"types":["Phaser.Tween"],"help":"Itself."},"help":"A tween that has yoyo set to true will run through from start to finish, then reverse from finish to start.\\nUsed in combination with repeat you can create endless loops.","line":508,"public":true,"protected":false,"private":false,"parameters":[{"name":"yoyo","type":["boolean"],"help":"Set to true to yoyo this tween.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[{"name":"_pause","static":false,"returns":null,"help":"This is called by the core Game loop. Do not call it directly, instead use Tween.pause.","line":618,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"_resume","static":false,"returns":null,"help":"This is called by the core Game loop. Do not call it directly, instead use Tween.pause.","line":650,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running Game.","line":29,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"isRunning","type":["boolean"],"help":"","inlineHelp":"If the tween is running this is set to true, otherwise false. Tweens that are in a delayed state, waiting to start, are considered as being running.","line":181,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onComplete","type":["Phaser.Signal"],"help":"","inlineHelp":"The onComplete event is fired when the Tween completes. Does not fire if the Tween is set to loop.","line":175,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onLoop","type":["Phaser.Signal"],"help":"","inlineHelp":"The onLoop event is fired if the Tween loops.","line":170,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onStart","type":["Phaser.Signal"],"help":"","inlineHelp":"The onStart event is fired when the Tween begins.","line":165,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"pendingDelete","type":["boolean"],"help":"","inlineHelp":"If this tween is ready to be deleted by the TweenManager.","line":160,"default":"false","public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_chainedTweens","type":["array"],"help":"","inlineHelp":"A private array of chained tweens.","line":113,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_codePaused","type":["boolean"],"help":"","inlineHelp":"Was the Tween paused by code or by Game focus loss?","line":154,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_delayTime","type":["number"],"help":"","inlineHelp":"Private delay counter.","line":88,"default":"0","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_duration","type":["number"],"help":"","inlineHelp":"Private duration counter.","line":60,"default":"1000","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_easingFunction","type":["function"],"help":"","inlineHelp":"The easing function used for the tween.","line":101,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_interpolationFunction","type":["function"],"help":"","inlineHelp":"The interpolation function used for the tween.","line":107,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_manager","type":["Phaser.TweenManager"],"help":"","inlineHelp":"Reference to the TweenManager.","line":35,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_object","type":["object"],"help":"Reference to the target object.","inlineHelp":"","line":24,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onStartCallbackFired","type":["boolean"],"help":"","inlineHelp":"Private flag.","line":120,"default":"false","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onUpdateCallback","type":["function"],"help":"","inlineHelp":"An onUpdate callback.","line":127,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onUpdateCallbackContext","type":["object"],"help":"","inlineHelp":"The context in which to call the onUpdate callback.","line":134,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_paused","type":["boolean"],"help":"","inlineHelp":"Is this Tween paused or not?","line":141,"default":"false","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_pausedTime","type":["number"],"help":"","inlineHelp":"Private pause timer.","line":148,"default":"0","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_repeat","type":["number"],"help":"","inlineHelp":"Private repeat counter.","line":67,"default":"0","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_reversed","type":["boolean"],"help":"","inlineHelp":"Private reversed flag.","line":81,"default":"false","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_startTime","type":["number"],"help":"","inlineHelp":"Private start time counter.","line":95,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_valuesEnd","type":["object"],"help":"","inlineHelp":"Private value object.","line":47,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_valuesStart","type":["object"],"help":"","inlineHelp":"Private value object.","line":41,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_valuesStartRepeat","type":["object"],"help":"","inlineHelp":"Private value object.","line":53,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_yoyo","type":["boolean"],"help":"","inlineHelp":"Private yoyo flag.","line":74,"default":"false","public":false,"protected":false,"private":true,"readOnly":false}]}} |