Flash compile fix, format update

This commit is contained in:
Joshua Granick
2019-03-11 15:30:36 -07:00
parent 54a52c9b81
commit b9bdf3479b
81 changed files with 467 additions and 233 deletions

View File

@@ -1,12 +1,13 @@
package lime.utils;
#if (js && !doc_gen) @:forward
#if (js && !doc_gen)
@:forward
abstract Int16Array(js.html.Int16Array) from js.html.Int16Array to js.html.Int16Array
{
public inline static var BYTES_PER_ELEMENT:Int = 2;
@:generic
public inline function new<T>(?elements:Int, ?array:Array<T>, #if openfl ? vector : openfl.Vector<Int>, #end?view:ArrayBufferView, ?buffer:ArrayBuffer,
public inline function new<T>(?elements:Int, ?array:Array<T>, #if openfl ?vector:openfl.Vector<Int>, #end?view:ArrayBufferView, ?buffer:ArrayBuffer,
?byteoffset:Int = 0, ?len:Null<Int>)
{
if (elements != null)
@@ -66,7 +67,9 @@ abstract Int16Array(js.html.Int16Array) from js.html.Int16Array to js.html.Int16
inline function toString()
return this != null ? 'Int16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
} #else import lime.utils.ArrayBufferView;
}
#else
import lime.utils.ArrayBufferView;
@:forward
abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
@@ -76,7 +79,7 @@ abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
public var length(get, never):Int;
@:generic
public inline function new<T>(?elements:Int, ?buffer:ArrayBuffer, ?array:Array<T>, #if openfl ? vector : openfl.Vector<Int>, #end?view:ArrayBufferView,
public inline function new<T>(?elements:Int, ?buffer:ArrayBuffer, ?array:Array<T>, #if openfl ?vector:openfl.Vector<Int>, #end?view:ArrayBufferView,
?byteoffset:Int = 0, ?len:Null<Int>)
{
if (elements != null)
@@ -141,4 +144,5 @@ abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
inline function toString()
return this != null ? 'Int16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
} #end // !js
}
#end // !js