Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/assets/create-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function createScript(filename: string, text: string) {
// tokenize filename
const tokens = [];
const name = filename.slice(0, -3);
const str = name.replace(/([^A-Z])([A-Z][^A-Z])/g, '$1 $2').replace(/([A-Z0-9]{2,})/g, ' $1');
const str = name.replace(/([A-Z0-9])/g, ' $1');
const parts = str.split(/([\s\-_.])/);

// filter valid tokens
Expand Down Expand Up @@ -118,7 +118,7 @@ export class ${className} extends Script {

/**
* Called for enabled (running state) scripts on each tick.
*
*
* @param {number} dt - The delta time in seconds since the last frame.
*/
update(dt) {
Expand Down Expand Up @@ -148,7 +148,7 @@ export class ${className} extends Script {

/**
* Called for enabled (running state) scripts on each tick.
*
*
* @param {number} dt - The delta time in seconds since the last frame.
*/
update(dt: number): void {
Expand Down