Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alt1/base

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alt1/base

The base library for Alt1 apps to communicate with the Alt1 API. For intellisense based IDE's it will also add intellisense declarations for the global `alt1` object inside the Alt1 browser.

  • 0.0.16
  • npm
  • Socket score

Version published
Weekly downloads
101
increased by5.21%
Maintainers
1
Weekly downloads
 
Created
Source

Alt1lib

The base library for Alt1 apps to communicate with the Alt1 API. For intellisense based IDE's it will also add intellisense declarations for the global alt1 object inside the Alt1 browser.

Installation

npm i @alt1/base -s

Usage

import * as a1lib from "@alt1/base";

// Captures a 400x400 rectangle starting at position 100,100 from the top-left of the game area
// imgref now contains a reference to the image (in this case still in Alt1 memory)
var imgref = a1lib.capture(100,100,400,400);

// Retrieve our raw pixel data so we can directly read it
var imagebuffer = imgref.toData();

// Show the image by adding it to the DOM (for debugging)
imagebuffer.show();

FAQs

Package last updated on 09 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc