How to use draco3dgltf - 1 common examples

To help you get started, we’ve selected a few draco3dgltf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AnalyticalGraphicsInc / gltf-vscode / src / dataUriTextDocumentContentProvider.ts View on Github external
import * as vscode from 'vscode';
import * as Url from 'url';
import * as fs from 'fs';
import * as querystring from 'querystring';
import * as draco3dgltf from 'draco3dgltf';
import { getBuffer } from 'gltf-import-export';
import { sprintf } from 'sprintf-js';
import { getFromJsonPointer, btoa, atob, getAccessorData, AccessorTypeToNumComponents, getAccessorElement } from './utilities';
import { GLTF2 } from './GLTF2';
const decoderModule = draco3dgltf.createDecoderModule({});

interface QueryDataUri {
    viewColumn?: string,
    previewHtml?: string,
}

export class DataUriTextDocumentContentProvider implements vscode.TextDocumentContentProvider {
    private _onDidChange = new vscode.EventEmitter();
    private _context: vscode.ExtensionContext;

    public UriPrefix = 'gltf-dataUri:';

    constructor(context: vscode.ExtensionContext) {
        this._context = context;
    }

draco3dgltf

This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.

Apache-2.0
Latest version published 10 months ago

Package Health Score

85 / 100
Full package analysis

Popular draco3dgltf functions