0.0.2 • Published 3 years ago
@threadizer/three v0.0.2
Threadizer / Three
Execute ThreeJS code within a worker (or main thread as fallback).
Install
The project is published on npm
npm install @theadizer/core
Quick start
import ThreeThread from "@threadizer/core";
// ...
const subthread = new ThreeThread(()=>{
console.log("Executed within a Worker");
});
Class
The class extends @threadizer/core.
Application
thread.loadTexture(
THREE,
path)
The current TextureLoader
of ThreeJS isnt worker-ready so that method use DataTexture
to create a Texture
.
THREE
: (Library) The whole ThreeJS library (import * as THREE from "three";
).path
: (String) The path to the the image.