Phaser v4.0.0 Release Candidate 7 #7268
photonstorm
announced in
Announcements
Replies: 1 comment 2 replies
-
|
Great work on Phaser 4 and this new RC! I'm wondering why v4 is not already the main version / full release? To me it seems it has been looong time in development and quite stable. The main branch (v3) has been dormant for long time which makes Phaser look somewhat dead/dying project by a quick glance. For example, I almost completely skipped Phaser when tried to figure out which game engine to try out for our next game), but then by just coincidence I stumbled upon an article discussing v4 which made me take another look. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version 4.0.0 - Release Candidate 7
New Features
Actions.AddEffectBloomallows you to quickly set up a bloom effect, using several filters, on a target Camera or GameObject.Actions.AddEffectShineallows you to quickly set up a shine effect, using a new Gradient and filters, on a target Camera or GameObject.Actions.AddMaskShapeallows you to quickly add shapes to a target Camera or GameObject as Masks. Blurred edges and inversion are supported.Actions.FitToRegiontransforms an object to fit a region, such as the screen.Display.Color: several helper methods now support modifying an existingColorobject instead of creating a new one.HSLToColorHexStringToColorIntegerToColorObjectToColorRGBStringToColorValueToColorDisplay.Color.Interpolate: an extra interpolation mode is available.HSVWithHSV: new method to interpolate HSV values, in HSV space.ColorWithColorhas new parameters to allow it to operate in HSV space.hsvflag sets it to operate in HSV space.hsvSignflag can force it to interpolate hue either ascending or descending. Default behavior picks the shortest angle.Display.ColorBanddescribes a transition between two colors. Intended for use in gradients.Display.ColorRampdescribes a range of colors using ColorBands. Intended for use in gradients.GameObject#isDestroyedflag helps you avoid errors when accessing an object that might have removed expected properties during destruction.GameObjects.Gradientis a new game object which renders gradients.LINEARBILINEARRADIALCONIC_SYMMETRICCONIC_ASYMMETRICEXTEND: flat colors extend from start and end.TRUNCATE: transparency extends from start and end.SAWTOOTH: gradient starts over every time it completes.TRIANGULAR: gradient reverses direction every time it gets to the end or start.GameObjects.NineSlicehas two new parameters:tileX,tileY, which allow non-corner regions of the NineSlice to tile instead of stretch. Some stretching is still applied to keep the tile count a whole number. Thanks to @skhoroshavin for this contribution!GameObjects.Noiserenders noise patterns.GameObjects.NoiseCell2D,NoiseCell3DandNoiseCell4Dprovide cellular/Worley/Voronoi noise.GameObjects.NoiseSimplex2DandNoiseSimplex3Dprovide simplex noise.Tintis overhauled.tintandsetTint()now purely affect the color settings.tintFillandsetTintFill()are removed.tintModeand new methodsetTintMode()now set the tint fill mode.Phaser.TintModesenumerates valid tint modes.MULTIPLYFILLADDSCREENOVERLAYHARD_LIGHTfoo.setTintFill(color)becomesfoo.setTint(color).setTintMode(Phaser.TintModes.FILL).CombineColorMatrixfilter for remixing alpha and other channels between images.GradientMapfilter for recoloring images using a gradient and their own brightness.Keyfilter for removing or isolating colors.ImageLightfilter for image-based lighting, a soft, highly realistic form of illumination.PanoramaBlurfilter for adjusting images forImageLight.NormalToolsfilter for manipulating normal maps.Quantizefilter for reducing colors and dithering.Vignettefilter returns from Phaser 3.Wipefilter returns from Phaser 3.Math.Hashprovides fast hashes of 1, 2, 3, or 4 dimensional input, using trigonometric or PCG methods.Math.HashCellprovides hashes of 1, 2, 3, or 4 dimensional input, using hash results in a Worley noise field. This produces a continuous but lumpy field.Math.HashSimplexprovides hashes of 1, 2, or 3 dimensional input, using a simplex noise implementation. This produces a continuous, smooth field.Texture#setSourcemethod for updating the source of a texture. Note that, while the source will update, derived values such as object sizes will not. It's advisable to switch between textures of identical size to avoid unexpected transforms.Texture#setDataSourcemethod already existed, but has been changed to be more useful likesetSource.TextureManager#addFlatColormethod for creating a flat texture with custom color, alpha, width, and height. This is intended to act as a temporary stand-in for textures you might not have loaded yet.TextureSource#updateSourcemethod for switching sources directly.Phaser.Types.Textures.TextureSourceandPhaser.Types.Textures.TextureSourceElementtypes to simplify the increasing number of sources for a texture.Fixes
TimeStep#stepLimitFPSto drop fewer frames, running much more smoothly at the target frame rate. Thanks to @flow and @Antriel for discussing the topic.FPSConfig#limitnow clarifies that frame limits are only necessary when artificially slowing the game below the display refresh rate.Shapenot respecting lights even though it had the lighting component.SpriteGPULayercreation time handling getting confused by 0.Container. Thanks to @saintflow47, @tickle-monster and @leemanhopeter for reporting this.ParseXMLBitmapFont. Thanks to @leemanhopeter.DynamicTextureturning black if it initially has a power-of-two resolution and is resized to a non-power-of-two resolution. Now any WebGL texture resize will wrap with REPEAT if it is power of two, or CLAMP_TO_EDGE if not. Thanks to @x-wk for reporting this.TextureManager.addUint8Arraymethod, which got premultiplied alpha wrong and flipY wrong.This discussion was created from the release Phaser v4.0.0 Release Candidate 7.
Beta Was this translation helpful? Give feedback.
All reactions