OpenFL 8.3.0 Release


#1

OpenFL

8.3.0 (06/25/2018)

  • Added tile.blendMode and tilemap.tileBlendModeEnabled
  • Added netStream.dispose() and improved netStream.close() support
  • Improved buffer handling for OpenGL Tilemap rendering
  • Fixed default HTML5 template after Chrome passive event listener change
  • Fixed a regression in rendering of TextFormatAlign.JUSTIFY text
  • Fixed dispatching of Event.ADDED_TO_STAGE on document class in NPM builds
  • Fixed missing loader.contentLoaderInfo.bytes field
  • Fixed using bitmapData.hitTest against another BitmapData object
  • Fixed return value of eventDispatcher.dispatchEvent() when default is prevented
  • Fixed timing issue with multiple texture units in custom OpenGL shaders
  • Fixed MouseEvent.MOUSE_OVER/MouseEvent.MOUSE_OUT to dispatch in each event phase
  • Fixed some issues when using -Dopenfl-power-of-two textures
  • Fixed stage.color to mark rendering as dirty when changed
  • Fixed openfl.net.Socket on HTML5 to allow reading of input later

#2

colorTransform doesn’t work in 8.3.0

this code

				var t = view.transform;
				t.colorTransform = new ColorTransform(...);
				view.transform = t;

in 8.2.2 - work correct
in 8.3.0 - hide the sprite instead apply color


#3

I am not working properly in the 8.3.0 version stage.color=0x0.


#4

What are you seeing instead?


#5

White background, but this only happens in C++ targets, which worked fine in the previous 8.2.0.


#6

Hmm, I can’t reproduce it. Using Lime 6.4 and OpenFL 8.3, the following works:

import openfl.display.Sprite;

class Main extends Sprite {
    
    public function new () {
        
        super ();
        
        stage.color = 0x0;
        
    }
    
}

I also tried putting it on a delay, but it still seems to work properly


#7

@Pasha

This also appears to work:

package;


import openfl.display.Sprite;
import openfl.geom.ColorTransform;


class Main extends Sprite {
	
	
	public function new () {
		
		super ();
		
		var sprite = new Sprite ();
		sprite.graphics.beginFill (0);
		sprite.graphics.drawRect (0, 0, 100, 100);
		sprite.transform.colorTransform = new ColorTransform (0, 0, 0, 1, 255, 0, 0, 0);
		addChild (sprite);
		
	}
	
	
}

#8

I try minimize the problem and this code show the problem (problem with cacheAsBitmap)
in openfl/lime 7.1.1 / 6.1.0 - works fine
in openfl/lime 8.3.0 / 6.4.0 - hide the sprite

class Main extends Sprite {
	
	
	public function new () {
		
		super ();
		
		var sprite_holder = new Sprite ();
		
		var sprite = new Sprite ();
		sprite.graphics.beginFill (0);
		sprite.graphics.drawRect (0, 0, 100, 100);
		sprite_holder.addChild (sprite);
		
		sprite_holder.cacheAsBitmap = true;
		sprite_holder.transform.colorTransform = new ColorTransform (0, 0, 0, 1, 255, 0, 0, 0);
		
		addChild(sprite_holder);
	}
	
	
}

#9

I have a question: Can I use bitmap fonts directly in OpenFL? Is there a relevant example?


#10

Not directly with Openfl, for now, you have to use the Bitmap-font library. But the haxelib repo is outdated. The most recent update can be found here (don’t know if it works): https://github.com/vwr0527/BitmapFont


#11

@Pasha Thanks for the test!

This seems to help, can you give it a try?


#12

A post was split to a new topic: Is assetLibrary.unload() working properly for SWFs?


#13

Hi singmajesty!
It was helpfull but doesn’t solve all problems.
Hidding sprite still happens when objects under mask:

	public function new () {
		
		super ();
		
		var sprite_holder = new Sprite ();
		
		var sprite = new Sprite ();
		sprite.graphics.beginFill (0);
		sprite.graphics.drawRect (0, 0, 100, 100);
		sprite_holder.addChild (sprite);
		
		sprite_holder.cacheAsBitmap = true;
		sprite_holder.transform.colorTransform = new ColorTransform (0, 0, 0, 1, 255, 0, 0, 0);
		
		addChild(sprite_holder);
		
		var msk = new Sprite();
		msk.graphics.beginFill (0);
		msk.graphics.drawRect (0, 0, 200, 200);
		mask = msk;
	}

if no cacheAsBitmap then all ok, and if there is no mask then all ok
but together they doesn’t work


#14

Okay, we’ll try and look into it


#15

Thanks for the sample, this is now fixed on dev.

The primary issue was that cacheAsBitmap in OpenFL 8 now triggers a “child” OpenGL render. Returning back to the “parent” OpenGL renderer was not properly restoring any masks

Before:

After:

Thanks again :slight_smile: