three-shared-scene
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

three-shared-scene

Quick start

npm install three-shared-scene

On the frontend:

import * as THREE from "three";
import {
    SharedScene,
    SharedSceneWrapper
} from "three-shared-scene";

const sharedScene = new SharedScene();

// treat like you would a THREE.Scene object
const scene = new SharedSceneWrapper(sharedScene);

On the backend you can load an existing THREE.js scene from a file using the fs nodejs module:

const scene = new SharedScene();

const sceneJson = JSON.parse(fs.readFileSync('tests/test-scenes/basic.json', 'utf8'));

scene.fromJSON(testScene);

Usage with WebWorkers

import * as THREE from "three";
import {SharedScene} from "three-shared-scene";


const scene = new THREE.Scene();
const sharedScene = new SharedScene(scene, {});

Readme

Keywords

none

Package Sidebar

Install

npm i three-shared-scene

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

15.2 kB

Total Files

21

Last publish

Collaborators

  • addyvan