jsutil

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package jsutil offers utility functions for Wasm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemporaryFloat32Array

func TemporaryFloat32Array(minLength int, data []float32) js.Value

TemporaryFloat32Array returns a Float32Array whose length is at least minLength. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryInt32Array

func TemporaryInt32Array(minLength int, data []int32) js.Value

TemporaryInt32Array returns a Int32Array whose length is at least minLength. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromFloat32Slice

func TemporaryUint8ArrayFromFloat32Slice(minLength int, data []float32) js.Value

TemporaryUint8ArrayFromFloat32Slice returns a Uint8Array whose length is at least minLength from a float32 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromUint16Slice

func TemporaryUint8ArrayFromUint16Slice(minLength int, data []uint16) js.Value

TemporaryUint8ArrayFromUint16Slice returns a Uint8Array whose length is at least minLength from an uint16 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromUint8Slice

func TemporaryUint8ArrayFromUint8Slice(minLength int, data []uint8) js.Value

TemporaryUint8ArrayFromUint8Slice returns a Uint8Array whose length is at least minLength from an uint8 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL