1.3.0 • Published 8 months ago

unity-to-json-threejs-parser v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

unity-to-json-threejs-parser

Node.js and browser package to parser unity-to-json files into THREE.js instances


npm package Build Status Issues Code Coverage Commitizen Friendly Semantic Release

Install

npm install unity-to-json-threejs-parser
yarn add unity-to-json-threejs-parser

Usage

import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import unityScene from './unity-scene.json'; // generated using unity-to-json

const parseUnityJsonToThreejs = createUnityJsonToThreeJsParser({
    THREE,
    GLTFLoader
});
const instances = await parseUnityJsonToThreejs('MyScene', unityContext);

instance.forEach(threejsItem => {
    if (threejsItem instanceof THREE.Group) {
        // add to scene
        // scene.add(threeJsGroup)
    }
})
1.3.0

8 months ago

1.2.0

8 months ago

1.1.0

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago