npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@thingjs/xplugin-core

v0.2.6

Published

xplugin核心组件包,完成插件生命周期配置实现

Downloads

1

Readme

@thingjs/xplugin-core

xplugin-core

xplugin-core is the Core Component for ThingJS-X Plug-in Development

Install

Using npm:

$ npm i -g npm
$ npm install --save @thingjs/xplugin-core

Usage


    //方式一:

    /**
     * 引入系统插件
     * 
     * @date 2022.07.27
     * @copyright uino 2022
     * @version Revision
     * @class CorePlugin
     * @constructor
     * @property readonly name 获取资源(插件)名称
     * @property readonly uri 获取资源(插件)包路径
     * @property readonly config 获取资源(插件)配置项信息
     * @property readonly app 获取3D操作类库
     * @property readonly map 获取3D.地图操作类库
     * @property readonly THINGX 获取ThingJS-X 操作类库 API
     * @method setName::设置插件名称
     * @method onInstall::生命周期函数,插件安装完成载入执行
     * @method onBeforeInit::系统初始化前载入
     * @method onInited::系统初始化完成载入
     * @method onBeforeLoad::场景加载前载入
     * @method onBeforeLoadEarth::地球场景加载前载入
     * @method onEarthLoaded::地球场景加载完成载入
     * @method onBeforeLoadCampus::园区场景加载前载入
     * @method onCampusLoaded::园区场景加载完成载入
     * @method onLoaded::场景加载完成后载入
     * 
     * */
    import CorePlugin 
        from "@thingjs/xplugin-core/dist/plugin/core/CorePlugin";
    export default class extends CorePlugin {
        constructor() {
            super();
        }
        //... 完成其插件能力相关功能
    }

    /**
     * 引入扩展插件
     * 
     * @date 2022.07.27
     * @copyright uino 2022
     * @version Revision
     * @class ExpandPlugin
     * @constructor
     * @property readonly name 获取资源(插件)名称
     * @property readonly uri 获取资源(插件)包路径
     * @property readonly config 获取资源(插件)配置项信息
     * @property readonly app 获取3D操作类库
     * @property readonly map 获取3D.地图操作类库 
     * @property readonly THINGX 获取ThingJS-X 操作类库 API
     * @property readonly readonly viewName 获取资源UI组件定义名称
     * @method setName::设置插件名称
     * @method onInstall::生命周期函数,插件安装完成载入执行
     * 
     * */
    import ExpandPlugin 
        from "@thingjs/xplugin-core/dist/plugin/expand/ExpandPlugin";
    import IndexVue from './index.vue';//插件可支持vue ui组件,创建引入即可
    export default class extends ExpandPlugin {
        constructor() {
            super(IndexVue);
        }
         //... 完成其插件能力相关功能
    };

    /**
     * 引入面板插件
     * 
     * @date 2022.07.27
     * @copyright uino 2022
     * @version Revision
     * @class PanelPlugin
     * @constructor
     * @property readonly name 获取资源(插件)名称
     * @property readonly uri 获取资源(插件)包路径
     * @property readonly config 获取资源(插件)配置项信息
     * @property readonly app 获取3D操作类库
     * @property readonly map 获取3D.地图操作类库 
     * @property readonly THINGX 获取ThingJS-X 操作类库 API
     * @property readonly viewName 获取资源UI组件定义名称
     * @method setName::设置插件名称
     * @method onInstall::生命周期函数,插件安装完成载入执行
     * @method onInited::面板插件初始化完成后载入
     * @method onActivate::面板插件被激活完成后
     * @method onDeactivate::面板插件切换取消激活完成后载入
     * @method onLevelChange::层级切换完成后载入
     * 
     * */
    import PanelPlugin 
        from "@thingjs/xplugin-core/dist/plugin/panel/PanelPlugin";
    import IndexVue from './index.vue'//插件可支持vue ui组件,创建引入即可    
    export default class extends PanelPlugin {

        constructor() {
            super(IndexVue);
        }
         //... 完成其插件能力相关功能
    };

    /**
     * 引入场景图层插件
     * 
     * @date 2022.07.27
     * @copyright uino 2022
     * @version Revision
     * @class LayerPlugin
     * @constructor
     * @property readonly name 获取资源(插件)名称
     * @property readonly uri 获取资源(插件)包路径
     * @property readonly config 获取资源(插件)配置项信息
     * @property readonly app 获取3D操作类库
     * @property readonly map 获取3D.地图操作类库 
     * @property readonly THINGX 获取ThingJS-X 操作类库 API
     * @property readonly viewName 获取资源UI组件定义名称
     * @method onInited ::场景图层插件初始化完成后载入
     * @method onActivate ::场景图层插件被激活完成后
     * @method onDeactivate ::场景图层插件切换取消激活完成后载入
     * @method onLevelChange ::层级切换完成后载入
     * 
     * */
    import LayerPlugin 
        from "@thingjs/xplugin-core/dist/plugin/layer/LayerPlugin";
    import IndexVue from './index.vue'//插件可支持vue ui组件,创建引入即可
    export default class extends LayerPlugin {
        constructor() {
            super(IndexVue);
        }
        //... 完成其插件能力相关功能
    };

    /**
     * 引入场景控制插件
     * 
     * @date 2022.07.27
     * @copyright uino 2022
     * @version Revision
     * @class ControlPlugin
     * @constructor
     * @property readonly name 获取资源(插件)名称
     * @property readonly uri 获取资源(插件)包路径
     * @property readonly config 获取资源(插件)配置项信息
     * @property readonly app 获取3D操作类库
     * @property readonly map 获取3D.地图操作类库 
     * @property readonly THINGX 获取ThingJS-X 操作类库 API
     * @method onInited ::场景控制插件初始化完成后载入
     * @method onActivate ::场景控制插件被激活完成后
     * @method onDeactivate ::场景控制插件切换取消激活完成后载入
     * @method onLevelChange ::层级切换完成后载入
     * @method setActivateImage ::设置激活态按钮背景图片
     * @method setDeactivateImage ::设置非激活态按钮背景图片
     * 
     * */
    import ControlPlugin 
        from "@thingjs/xplugin-core/dist/plugin/control/ControlPlugin";
    export default class extends ControlPlugin {
        constructor() {
            super();
        }
    }
  

   /**
    * 或方式二有选择性方式引入
    * */
    import {
        CorePlugin,
        ExpandPlugin, PanelPlugin,
        LayerPlugin, ControlPlugin,
    } from "@thingjs/xplugin-core/index";

    //... 选择性引入,完成其相关能力
   

Documentation

xplugin-core for ThingJS-X docs

   @thingjs/xplugin-core  是用于构建 ThingJS-X(零代码平台) 
   插件开发的核心插件 JavaScript 库,该函数库涵括了ThingJS-X 插件包括不限于
   系统插件、扩展插件、面板插件、场景图层插件、场景控制插件等
   同时使用Vue 框架及生态 并提供了一套声明式的、组件化的编程模型
   帮助你高效地开发 ThingJS-X 相关能力插件

Full Docs