UNPKG

react-three

Version:

Construct three.js scenes using React

21 lines (17 loc) 559 B
import * as THREE from 'three'; import { createTHREEComponent } from '../../Utils'; import THREEObject3DMixin from '../../mixins/THREEObject3DMixin'; var THREESprite = createTHREEComponent( 'Sprite', THREEObject3DMixin, { createTHREEObject: function() { return new THREE.Sprite(); }, applySpecificTHREEProps: function(oldProps, newProps) { this.transferTHREEObject3DPropsByName(oldProps, newProps, ['material']); } } ); export default THREESprite;