
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
a small sprite game engine for typescript, build with stenciljs, ALPHA VERSION
The Sprite Game Package is a collection of web components built with StencilJS, designed for easy and efficient integration of sprite-based graphics into web-based games and animations. This package includes components for displaying individual sprites, animating them, and managing sprite maps.
ALPHA VERSION: This package is currently in alpha and may not be suitable for production use. Please report any issues or bugs you encounter.
tg-sprite
A component that displays a single sprite from a sprite sheet.
src
: String - URL of the sprite image.width
: Number - Width of a single sprite frame.height
: Number - Height of a single sprite frame.scale
: Number - Scale factor for the sprite image.frame
: Number - Initial frame to display.hFrames
: Number - Number of horizontal frames in the sprite sheet.vFrames
: Number - Number of vertical frames in the sprite sheet.vFlip
: Boolean - Whether to flip the sprite image vertically.hFlip
: Boolean - Whether to flip the sprite image horizontally.Here is a basic example of how to use the tg-sprite
component in your application:
<tg-sprite src="path/to/sprite.png" width="32" height="32" hFrames="10" vFrames="10"></tg-sprite>
tg-sprite-animator
A component to animate tg-sprite
using predefined animations.
animations
: Object - A dictionary of animations.play
: String - The key of the animation to play.state
: Enum('running', 'paused') - Controls the playback state.iterationCount
: Enum('infinite', Number) - How many times to play the animation.<tg-sprite-animator animations='{"walk": {"frames": [0,1,2,3,4], "duration": 100}}' play="walk" iterationCount="infinite">
<tg-sprite src="path/to/walking-sprite.png" width="32" height="32" hFrames="5" vFrames="1"></tg-sprite>
</tg-sprite-animator>
tg-sprite-map
A component to manage and display a map of tiles, each potentially an animated sprite.
src
: String - URL of the sprite sheet used for tiles.vFrames
: Number - Number of vertical frames in the tile sheet.hFrames
: Number - Number of horizontal frames in the tile sheet.width
: Number - Width of each tile.height
: Number - Height of each tile.scale
: Number - Scale factor for the tile image.tiles
: Array of ITile
- Array of tile objects to be rendered.<tg-sprite-map src="path/to/tilemap.png" width="32" height="32" hFrames="10" vFrames="10" tiles='[{"x": 0, "y": 0, "frames": [0, 1, 2, 3], "duration": 300}]'>
</tg-sprite-map>
To install the Sprite Game Package, add it to your project using npm:
npm install tg-engine
Refer to the component examples above for how to integrate the sprite components into your application.
Contributions are welcome! Please read our contributing guidelines to get started.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
a small sprite game engine for typescript, build with stenciljs, ALPHA VERSION
The npm package tg-engine receives a total of 3 weekly downloads. As such, tg-engine popularity was classified as not popular.
We found that tg-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.