New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@markharrison/markjslaserbeam

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markharrison/markjslaserbeam

A reusable ui system for laserbeam effects.

latest
Source
npmnpm
Version
1.20251104.2
Version published
Maintainers
1
Created
Source

MarkJSLaserbeam

🚀 A lightweight JavaScript library for creating laser beam effects on HTML5 Canvas, designed for web games and interactive applications.

npm version License: MIT

Overview

MarkJSLaserbeam is a lightweight JavaScript library for rendering laser beam effects in web games and interactive applications. Built for performance and easy integration with HTML5 Canvas.

Key Features

• Fast, dependency-free ES Module • Realistic laser beam rendering with customizable color, width, and glow • Designed for game loops and interactive effects • Performance optimized for real-time animation • Works in all modern browsers with Canvas support

Installation

npm install @markharrison/markjslaserbeam --save

Or include markjslaserbeam.js directly in your HTML.

Quick Start

import { MarkJSLaserbeam } from "@markharrison/markjslaserbeam";

const canvas = document.getElementById("myCanvas");
const laser = new MarkJSLaserbeam(canvas);

// Add laser on click
canvas.addEventListener("click", (e) => {
  const rect = canvas.getBoundingClientRect();
  const x = e.clientX - rect.left;
  const y = e.clientY - rect.top;
  laser.fire({
    x1: 100,
    y1: 100,
    x2: x,
    y2: y,
    color: "#FF0000",
    width: 8,
  });
});

// Game loop
function gameLoop(deltaTime) {
  laser.update(deltaTime);
  laser.render();
  requestAnimationFrame(gameLoop);
}
requestAnimationFrame(gameLoop);

Documentation

See laserbeammark.md for detailed developer documentation, API reference, and advanced usage.

Test Application

Open index.html in your browser to explore and test laser beam effects and customization options.

License

MIT License - see LICENSE for details.

Keywords

gamedev

FAQs

Package last updated on 04 Nov 2025

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