
info.laht.threekt.materials.SpriteMaterial.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Port of the three.js 3D javascript library for Kotlin/JVM
The newest version!
package info.laht.threekt.materials
import info.laht.threekt.math.Color
import info.laht.threekt.textures.Texture
class SpriteMaterial : Material(), MaterialWithSizeAttenuation, MaterialWithColor {
override val color = Color(0xffffff)
override var map: Texture? = null
var rotation = 0f
override var sizeAttenuation = true
init {
lights = false
transparent = true
}
override fun clone(): SpriteMaterial {
return SpriteMaterial().copy(this)
}
fun copy(source: SpriteMaterial): SpriteMaterial {
super.copy(source)
this.color.copy(source.color)
this.map = source.map
this.rotation = source.rotation
this.sizeAttenuation = source.sizeAttenuation
return this
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy