GitXplorerGitXplorer
C

three-dom-elements

public
16 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
1e69a744652a47fbe1280d8ff336266a134c669e

Cleanup build files.

CCodyJasonBennett committed 4 years ago
Unverified
08be9493c4e06c9a141d5ec0ebe2c0fb0b87a1ce

Cleanup build step, minimize bundle size.

CCodyJasonBennett committed 4 years ago
Unverified
16933491a799c299b271efca5139a7db00fc98c1

Bump version.

CCodyJasonBennett committed 4 years ago
Unverified
2e33d4279557ca03f631f36cb0866df9e653bfe7

Updated builds.

CCodyJasonBennett committed 4 years ago
Unverified
bc4aef37e5c001bc39d7a93420729781e8026284

Update example.

CCodyJasonBennett committed 4 years ago
Unverified
ab590b9e786d2315846904de585279f8c6bd9f0a

Optimize rendering behavior, update dependencies, docs.

CCodyJasonBennett committed 4 years ago

README

The README file for this repository.

three-dom-elements npm Minzipped npm License

A lightweight three.js extension to integrate DOM elements into your scene.

Usage

The following projects an iFrame into a threejs scene as a plane. You can use this plane as normal with techniques like raycasting, etc.

View the live demo.

import { DOMContext, DOMElement } from 'three-dom-elements';

// Create a DOM context to draw with
const context = new DOMContext(camera);
context.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(context.domElement);

// Create an element to project
const element = document.createElement('iframe');
element.src = 'https://threejs.org';
element.style.border = 'none';

// Project it
const element = new DOMElement(context, element);
scene.add(element);

Demo preview