Skip to content

A group of objects that are always facing the camera.

License

Notifications You must be signed in to change notification settings

SeregPie/THREE.CameraFacingGroup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THREE.CameraFacingGroup

class THREE.CameraFacingGroup extends THREE.Mesh

A group of objects that are always facing the camera.

setup

npm

npm i @seregpie/three.camera-facing-group

import CameraFacingGroup from '@seregpie/three.camera-facing-group';

browser

<script src="https://unpkg.com/three"></script>
<script src="https://unpkg.com/@seregpie/three.camera-facing-group"></script>

The class is globally available as THREE.CameraFacingGroup.

usage

let geometry = new THREE.CircleGeometry(8, 32);
let material = new THREE.MeshBasicMaterial({color: 0xffff00});
let mesh = new THREE.Mesh(geometry, material);
let group = new THREE.CameraFacingGroup();
group.add(mesh);
scene.add(group);

members

properties

.isCameraFacingGroup = true

Used to check whether this is an instance of CameraFacingGroup.

About

A group of objects that are always facing the camera.

Resources

License

Stars

Watchers

Forks