Skip to content

3.2.3

Choose a tag to compare

@dakln dakln released this 08 Dec 02:48
· 14 commits to master since this release

πŸ”§ Changes

[!IMPORTANT] You don't need to assign classes to SDK or C3 variables in global scope, Lost automatically adds assignment at build >time, making the addon files much cleaner. But note that you must use for example export type { <className> } for the file to be >detected as used and compiled into Javascript.
New Plugin bare bones
New Drawing Plugin bare bones
New Behavior bare bones

  • Added new Editor folder for editing editor Instance.ts and Type.ts classes.
  • The lost.config.ts config file must use defineConfig method from library.
  • Added new field for 'plugin' addon type
pluginType: 'object' | 'world' /** 'world' for drawing plugins */

For drawing plugin you should set pluginType to world
lost.config.ts

import { defineConfig } from 'jsr:@lost-c3/[email protected]';

export default defineConfig<'plugin'>({
    type: 'plugin',
    pluginType: 'object',
    // deprecated?: boolean;
    // minConstructVersion?: string;
    // canBeBundled?: boolean;
    isSingleGlobal: true,
    objectName: 'LostPlugin',

    addonId: 'LostPluginId',
    category: 'general',
    addonName: 'Lost plugin for Construct 3',
    addonDescription: 'My awesome addon was made with Lost',
    version: '1.0.0.0',
    author: 'lostinmind.',
    docsUrl: 'https://myaddon.com/docs',
    helpUrl: {
        EN: 'https://myaddon.com/help/en'
    },
    websiteUrl: 'https://myaddon.com'
})
  • The addon.ts config file must use defineAddon method from library.

addon.ts

import { defineAddon, Plugin } from 'jsr:@lost-c3/[email protected]';
import config from './lost.config.ts';

export default defineAddon(
    new Plugin<EditorInstance, EditorType>(config)
)

πŸ“ New features

  • Added drawing plugin support (also added new fields in config for drawing plugins)
  • Added behavior addon support
  • Now you can use types of your EditorInstance and EditorType in new Plugin<EditorInstance, EditorType> and new Behavior<EditorInstance>. It will automatically detect your editor instance class type for using it in Property.Link or Property.Info plugin property type for example

πŸš€ Improvements

  • Increased addon build time