
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@omnedia/ngx-galaxy
Advanced tools
A simple component library to create mesmerizing galaxy particle background effect.
This library is part of the NGXUI ecosystem.
View all available components at https://ngxui.com
@omnedia/ngx-galaxy
is an Angular library that renders an interactive animated galaxy background using WebGL. It supports mouse interaction, repulsion effects, twinkling stars, and multiple customization options. You can layer content above the galaxy using ng-content
.
ng-content
overlay.npm install @omnedia/ngx-galaxy ogl
Import the NgxGalaxyComponent
in your Angular component or page:
import {NgxGalaxyComponent} from '@omnedia/ngx-galaxy';
@Component({
selector: 'app-home',
standalone: true,
imports: [NgxGalaxyComponent],
templateUrl: './home.component.html'
})
export class HomeComponent {
}
In your template:
<om-galaxy [focal]="[0.5, 0.5]" [mouseInteraction]="true">
<h1>Welcome to the Galaxy</h1>
</om-galaxy>
<canvas>
element using WebGL.<ng-content>
slot allows you to overlay any HTML/UI elements on top of the galaxy.@Input()
bindings.
<om-galaxy
[focal]="[0.5, 0.5]"
[rotation]="[1.0, 0.0]"
[starSpeed]="0.5"
[density]="1"
[hueShift]="140"
[disableAnimation]="false"
[speed]="1.0"
[mouseInteraction]="true"
[glowIntensity]="0.3"
[saturation]="0.0"
[mouseRepulsion]="true"
[twinkleIntensity]="0.3"
[rotationSpeed]="0.1"
[repulsionStrength]="2"
[autoCenterRepulsion]="0"
[transparent]="true"
styleClass="custom-class"
>
<ng-content></ng-content>
</om-galaxy>
focal
— [number, number]
focal point in normalized coordinates. Default: [0.5, 0.5]
rotation
— [number, number]
manual rotation matrix values. Default: [1.0, 0.0]
starSpeed
— Star layer movement speed. Default: 0.5
density
— Star density multiplier. Default: 1
hueShift
— Global hue rotation in degrees. Default: 140
disableAnimation
— Stops animation if true
. Default: false
speed
— Overall animation speed multiplier. Default: 1.0
mouseInteraction
— Enables mouse interaction. Default: true
glowIntensity
— Brightness of star flares. Default: 0.3
saturation
— Color saturation multiplier. Default: 0.0
mouseRepulsion
— Repels stars from mouse position. Default: true
twinkleIntensity
— Amount of star brightness flicker. Default: 0.3
rotationSpeed
— Automatic scene rotation speed. Default: 0.1
repulsionStrength
— Strength of mouse repulsion. Default: 2
autoCenterRepulsion
— Repulsion from the galaxy center. Default: 0
transparent
— Renders background with alpha transparency. Default: true
styleClass
— Custom CSS class for the outer container.
<om-galaxy [hueShift]="200" [density]="1.5" [twinkleIntensity]="0.5">
<div class="headline">
<h2>Explore the Stars</h2>
</div>
</om-galaxy>
SCSS:
om-galaxy .headline {
text-align: center;
color: white;
margin-top: 4rem;
}
The default structure:
<div class="om-galaxy">
<div class="om-galaxy-background"></div>
<div class="content-inside">
<ng-content></ng-content>
</div>
</div>
.om-galaxy-background
has pointer-events: none
so it never blocks interaction with your content.
Contributions are welcome via PR or issue submission.
MIT License
FAQs
A simple component library to create mesmerizing galaxy particle background effect.
We found that @omnedia/ngx-galaxy demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.