
info.laht.threekt.materials.PointsMaterial.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 PointsMaterial : Material(), MaterialWithMorphTargets, MaterialWithSizeAttenuation, MaterialWithColor {
override val color = Color(0xffffff)
var size = 1f
override var sizeAttenuation = true
override var map: Texture? = null
override var morphTargets = false
init {
lights = false
}
override fun clone(): PointsMaterial {
return PointsMaterial().copy(this)
}
fun copy(source: PointsMaterial): PointsMaterial {
super.copy(source)
this.color.copy(source.color)
this.map = source.map
this.size = source.size
this.sizeAttenuation = source.sizeAttenuation
this.morphTargets = source.morphTargets
return this
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy