noop(); pop(); map();

    @viewar/api-plugin-intelligentgraphics

    0.1.4 • Public • Published

    @viewar/api-plugin-intelligentgraphics

    Plugin for viewar-api to import 3d scenes from intelligentgraphics into the ViewAR system.

    For more information about ViewAR, visit our developer portal at portal.viewar.com, or our website.

    Usage

    import viewarApi from 'viewar-api';
    import { IntelligentgraphicsPlugin } from '@viewar/api-plugin-intelligentgraphics';
     
    async function loadPlugin() {
        // Initialize ViewAR API (needs to be done only once per app start).
        await viewarApi.init();
     
        // Register plugin for intelligent graphics model import.
        const plugin = await viewarApi.plugins.register('intelligent graphics plugin', IntelligentgraphicsPlugin, {
            igxr: 'moemax',
            icomServer: 'https://dev2.viewar.com/proxy2.php?url=https://moemax-ar.moemax.com'
        });
     
        // Models from the plugin are added to the model manager and can be retrieved like every other model.
        const modelId = "123lkasdf3";
        const model = viewarApi.modelManager.findModelById(modelId);
     
        // Insert model instance in the same way as a default model.
        const instance = await viewarApi.sceneManager.insertModel(model);
     
        console.log('Current property values', instance.propertyValues);
        console.log('List of properties', instance.properties);
     
        // Update model properties in the same way as a default model.
        await instance.setPropertyValues({"Wood": "152"});
     
    }

    Install

    npm i @viewar/api-plugin-intelligentgraphics

    DownloadsWeekly Downloads

    6

    Version

    0.1.4

    License

    MIT

    Unpacked Size

    866 kB

    Total Files

    4

    Last publish

    Collaborators

    • ak_viewar
    • doubleu23
    • ewajankowska
    • jauntz
    • karl_hofer_1234
    • meixnermarkus
    • nikgraf
    • richardp7