openfl / starling

Known as the "Cross-Platform Game Engine", Starling is a popular Stage3D framework for OpenFL and Haxe
Other
236 stars 68 forks source link

Can't initialize in Vector constructor #124

Closed nanhuichen closed 5 years ago

nanhuichen commented 5 years ago

issue in dist/starling.js: RenderState.CULLING_VALUES = new (openfl_Vector().default)(null,null,["none","front","back","frontAndBack"])

and found dist/openfl.js: var vertexData = (openfl__$VectorVector$Impl_$().default)._new(null,null,[width,height,0,1,1,0,height,0,0,1,width,0,0,1,0,0,0,0,0,0.0]);

there are different methods, but starling can't pass values, openfl seems ok.

fixed: RenderState.CULLING_VALUES = (openfl_Vector().default).ofArray(["none","front","back","frontAndBack"]);

nanhuichen commented 5 years ago

fixes from openfl.Vector.hx

var _VectorData = function (length, fixed, array) { if(null == array) array = []; return Object.defineProperties (construct (array, length, fixed), _VectorDataDescriptor); }

see https://github.com/openfl/openfl/pull/2147/files