Read the individual numeric values and store them in some other data structure, either a JavaScript object(for small amounts of structured data) or a typed array view for large blocks of data.
This function has two overloads: The primary overload takes the WebAssembly binary code, in the form of a typed array or ArrayBuffer, and performs both compilation and instantiation in one step.
As part of the ECMAScript 2015(ES6) compliance, Firefox now throws a TypeError if one of the typed array constructors, including Uint8Array, Int16Array and Float64Array, or ArrayBuffer is called without using the new operator.
A Typed Array is a slab of memory with a typed view into it, much like how arrays work in C. Because a Typed Array is backed by raw memory, the JavaScript engine can pass the memory directly to native libraries without having to painstakingly convert the data to a native representation.
It's not a good idea to use the multi-byte typed array views(Int16Array, Uint16Array, etc.) directly with data fetched via XMLHttpRequest, FileReader, or any other input/output API, because the typed array views use the CPU's native endianness.
However, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using WebSockets, and so forth, it has become clear that there are times when it would be helpful for JavaScript code to be able to quickly and easily manipulate raw binary data in typed arrays.
型付き配列。
Typed Array.
型付き配列ビューは通常の配列のように扱えます。
Typed array views work pretty much like normal arrays..
型付き配列はテキスチャデータを渡すためにも使用されます。
Typed Arrays are also used to pass around texture data.
Uint8ClampedArrayという1つ特別な型付き配列ビューがあります。
There is one special typed array view, the Uint8ClampedArray.
次は、型付き配列を扱うサードパーティライブラリについて見ていきましょう。
Let's move onto looking at third-party libraries for handling Typed Arrays.
引数がなければ、長さゼロの型付き配列を作成します。
Without arguments, creates an zero-length typed array.
型付き配列ビューには複数の異なった型が存在します。
There are several different types of typed array views.
型付き配列を使うためにはArrayBufferとビューを作成する必要があります。
To use Typed Arrays, you need to create an ArrayBuffer and a view to it.
また、WebGLのコンテキストからピクセルデータを読み込むためには型付き配列が必要です。
You also need Typed Arrays to read pixels from the WebGL context.
English
中文
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Bahasa indonesia
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt