Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
vite-plugin-excalibur-hmr
Advanced tools
Readme
Adds scene hot reloading to Excalibur.js games.
This does not support hot reloading of actors, only scenes. When you make a change that affects a scene it will reload it without restarting the game.
It's mainly a proof-of-concept, but so there's probably issues, but it should work well enough for most cases.
npm install -d vite-plugin-excalibur-hmr
import { defineConfig } from "vite"
import hmr from "vite-plugin-excalibur-hmr"
export default defineConfig({
plugins: [hmr()],
})
import hot from "vite-plugin-excalibur-hmr/hot"
const engine = new ex.Engine({
// ...
})
if (import.meta.env.DEV) {
hot(engine)
}
In order for Scenes to be hot-reloadable, they must a default export in a file that is either under a scenes
directory or ends with a .scene.ts
or .scene.js
extension.
Example:
// src/scenes/level1.ts or src/level1.scene.ts
import { Scene } from "excalibur"
export default class Level1 extends Scene {
// ...
}
Whenever changes are made to the scene or any of its imported modules the scene will be hot reloaded in the engine. If that scene is currently active then it will restart.
FAQs
Adds Scene hot module reloading to Excalibur
The npm package vite-plugin-excalibur-hmr receives a total of 12 weekly downloads. As such, vite-plugin-excalibur-hmr popularity was classified as not popular.
We found that vite-plugin-excalibur-hmr 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.