Float32Array.hx 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from typedarray.webidl. Do not edit!
  23. package js.lib;
  24. @:native("Float32Array")
  25. extern class Float32Array implements ArrayBufferView implements ArrayAccess<Float> {
  26. static inline var BYTES_PER_ELEMENT : Int = 4;
  27. @:pure
  28. static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Float32Array;
  29. @:pure
  30. static function from( source : Array<Float>, ?mapFn : Float -> Float -> Float, ?thisArg : Dynamic ) : Float32Array;
  31. @:native("BYTES_PER_ELEMENT")
  32. var BYTES_PER_ELEMENT_(default,null) : Int;
  33. var length(default,null) : Int;
  34. var buffer(default,null) : ArrayBuffer;
  35. var byteOffset(default,null) : Int;
  36. var byteLength(default,null) : Int;
  37. /** @throws DOMError */
  38. @:overload( function( length : Int ) : Void {} )
  39. @:overload( function( array : Float32Array ) : Void {} )
  40. @:overload( function( array : Array<Float> ) : Void {} )
  41. function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
  42. @:overload( function( array : Float32Array, ?offset : Int ) : Void {} )
  43. function set( array : Array<Float>, ?offset : Int ) : Void;
  44. function copyWithin( target : Int, start : Int, ?end : Int ) : Float32Array;
  45. function every( callback : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Bool;
  46. function fill( value : Float, ?start : Int, ?end : Int ) : Float32Array;
  47. function filter( callbackfn : Float -> Int -> Float32Array -> Dynamic, ?thisArg : Dynamic ) : Float32Array;
  48. function find( predicate : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
  49. function findIndex( predicate : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Int;
  50. function forEach( callbackfn : Float -> Int -> Float32Array -> Void, ?thisArg : Dynamic ) : Void;
  51. function indexOf( searchElement : Float, ?fromIndex : Int ) : Int;
  52. function join( ?separator : String ) : String;
  53. function lastIndexOf( searchElement : Float, ?fromIndex : Int ) : Int;
  54. function map( callbackfn : Float -> Int -> Float32Array -> Float, ?thisArg : Dynamic ) : Float32Array;
  55. @:overload( function( callbackfn : Float -> Float -> Int -> Float32Array -> Float ) : Int {} )
  56. function reduce( callbackfn : Dynamic -> Float -> Int -> Float32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
  57. @:overload( function( callbackfn : Float -> Float -> Int -> Float32Array -> Float ) : Int {} )
  58. function reduceRight( callbackfn : Dynamic -> Float -> Int -> Float32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
  59. function reverse() : Float32Array;
  60. function slice( ?start : Int, ?end : Int ) : Float32Array;
  61. function some( callbackfn : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Bool;
  62. function sort( ?compareFn : Float -> Float -> Int ) : Float32Array;
  63. function subarray( begin : Int, ?end : Int ) : Float32Array;
  64. }