mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Correct texture type. Fix #5199
This commit is contained in:
parent
1484e205f8
commit
dea68135fd
19 changed files with 28 additions and 28 deletions
|
@ -64,7 +64,7 @@
|
|||
|
||||
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
||||
|
||||
@samme @SanderVanhove @SirJosh3917 @mooreInteractive @A-312 @lozzajp @mikewesthad
|
||||
@samme @SanderVanhove @SirJosh3917 @mooreInteractive @A-312 @lozzajp @mikewesthad @j-waters
|
||||
|
||||
## Version 3.23 - Ginro - 27th April 2020
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ var ImageRender = require('./ImageRender');
|
|||
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var Image = new Class({
|
||||
|
|
|
@ -17,7 +17,7 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Image} The Game Object that was created.
|
||||
|
|
|
@ -38,7 +38,7 @@ var NOOP = require('../../utils/NOOP');
|
|||
* @param {number[]} uv - An array containing the uv data for this Mesh.
|
||||
* @param {number[]} colors - An array containing the color data for this Mesh.
|
||||
* @param {number[]} alphas - An array containing the alpha data for this Mesh.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var Mesh = new Class({
|
||||
|
@ -137,7 +137,7 @@ var Mesh = new Class({
|
|||
|
||||
/**
|
||||
* Fill or additive mode used when blending the color values?
|
||||
*
|
||||
*
|
||||
* @name Phaser.GameObjects.Mesh#tintFill
|
||||
* @type {boolean}
|
||||
* @default false
|
||||
|
@ -154,7 +154,7 @@ var Mesh = new Class({
|
|||
/**
|
||||
* This method is left intentionally empty and does not do anything.
|
||||
* It is retained to allow a Mesh or Quad to be added to a Container.
|
||||
*
|
||||
*
|
||||
* @method Phaser.GameObjects.Mesh#setAlpha
|
||||
* @since 3.17.0
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
* @param {number[]} uv - An array containing the uv data for this Mesh.
|
||||
* @param {number[]} colors - An array containing the color data for this Mesh.
|
||||
* @param {number[]} alphas - An array containing the alpha data for this Mesh.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Mesh} The Game Object that was created.
|
||||
|
|
|
@ -15,7 +15,7 @@ var ParticleEmitterManager = require('./ParticleEmitterManager');
|
|||
* @method Phaser.GameObjects.GameObjectFactory#particles
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer|object)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
* @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.
|
||||
*
|
||||
|
|
|
@ -26,14 +26,14 @@ var Sprite = require('../sprite/Sprite');
|
|||
* @memberof Phaser.GameObjects
|
||||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
*
|
||||
* @extends Phaser.GameObjects.Components.PathFollower
|
||||
*
|
||||
* @param {Phaser.Scene} scene - The Scene to which this PathFollower belongs.
|
||||
* @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var PathFollower = new Class({
|
||||
|
|
|
@ -18,7 +18,7 @@ var PathFollower = require('./PathFollower');
|
|||
* @param {Phaser.Curves.Path} path - The Path this PathFollower is connected to.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.GameObjects.PathFollower} The Game Object that was created.
|
||||
|
|
|
@ -27,7 +27,7 @@ var Mesh = require('../mesh/Mesh');
|
|||
* @param {Phaser.Scene} scene - The Scene to which this Quad belongs.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var Quad = new Class({
|
||||
|
|
|
@ -18,9 +18,9 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
*
|
||||
* @return {Phaser.GameObjects.Quad} The Game Object that was created.
|
||||
*/
|
||||
if (typeof WEBGL_RENDERER)
|
||||
|
@ -32,9 +32,9 @@ if (typeof WEBGL_RENDERER)
|
|||
}
|
||||
|
||||
// When registering a factory function 'this' refers to the GameObjectFactory context.
|
||||
//
|
||||
//
|
||||
// There are several properties available to use:
|
||||
//
|
||||
//
|
||||
// this.scene - a reference to the Scene that owns the GameObjectFactory
|
||||
// this.displayList - a reference to the Display List the Scene owns
|
||||
// this.updateList - a reference to the Update List the Scene owns
|
||||
|
|
|
@ -18,7 +18,7 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
* @param {Phaser.Types.Math.Vector2Like[]} [points] - An array containing the vertices data for this Rope. If none is provided a simple quad is created. See `setPoints` to set this post-creation.
|
||||
* @param {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)?
|
||||
|
|
|
@ -45,7 +45,7 @@ var SpriteRender = require('./SpriteRender');
|
|||
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var Sprite = new Class({
|
||||
|
|
|
@ -17,7 +17,7 @@ var Sprite = require('./Sprite');
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Sprite} The Game Object that was created.
|
||||
|
|
|
@ -19,7 +19,7 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.
|
||||
* @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.GameObjects.TileSprite} The Game Object that was created.
|
||||
|
|
|
@ -50,7 +50,7 @@ var Image = require('../../gameobjects/image/Image');
|
|||
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var ArcadeImage = new Class({
|
||||
|
|
|
@ -51,7 +51,7 @@ var Sprite = require('../../gameobjects/sprite/Sprite');
|
|||
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*/
|
||||
var ArcadeSprite = new Class({
|
||||
|
|
|
@ -123,7 +123,7 @@ var Factory = new Class({
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.Types.Physics.Arcade.ImageWithStaticBody} The Image object that was created.
|
||||
|
@ -147,7 +147,7 @@ var Factory = new Class({
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.Types.Physics.Arcade.ImageWithDynamicBody} The Image object that was created.
|
||||
|
@ -171,7 +171,7 @@ var Factory = new Class({
|
|||
*
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
*
|
||||
* @return {Phaser.Types.Physics.Arcade.SpriteWithStaticBody} The Sprite object that was created.
|
||||
|
|
|
@ -15,7 +15,7 @@ var Vector2 = require('../../math/Vector2');
|
|||
/**
|
||||
* @classdesc
|
||||
* A Matter Physics Image Game Object.
|
||||
*
|
||||
*
|
||||
* An Image is a light-weight Game Object useful for the display of static images in your game,
|
||||
* such as logos, backgrounds, scenery or other non-animated elements. Images can have input
|
||||
* events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
|
||||
|
@ -56,7 +56,7 @@ var Vector2 = require('../../math/Vector2');
|
|||
* @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
* @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation.
|
||||
*/
|
||||
|
|
|
@ -60,7 +60,7 @@ var Vector2 = require('../../math/Vector2');
|
|||
* @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
* @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue