Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert to this.is* = true * Put back local variables * Update tests * Add missing this.is* property * Update Color.js Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
54 lines (28 sloc)
761 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Material } from './Material.js'; | |
| import { Color } from '../math/Color.js'; | |
| class SpriteMaterial extends Material { | |
| constructor( parameters ) { | |
| super(); | |
| this.isSpriteMaterial = true; | |
| this.type = 'SpriteMaterial'; | |
| this.color = new Color( 0xffffff ); | |
| this.map = null; | |
| this.alphaMap = null; | |
| this.rotation = 0; | |
| this.sizeAttenuation = true; | |
| this.transparent = true; | |
| this.fog = true; | |
| this.setValues( parameters ); | |
| } | |
| copy( source ) { | |
| super.copy( source ); | |
| this.color.copy( source.color ); | |
| this.map = source.map; | |
| this.alphaMap = source.alphaMap; | |
| this.rotation = source.rotation; | |
| this.sizeAttenuation = source.sizeAttenuation; | |
| this.fog = source.fog; | |
| return this; | |
| } | |
| } | |
| export { SpriteMaterial }; |