- Preparing search index...
- The search index is not available
feng3d
Constructors
constructor
- new Color4(r?: number, g?: number, b?: number, a?: number): Color4
-
Parameters
-
r: number = 1
-
g: number = 1
-
b: number = 1
-
a: number = 1
Properties
__class__
__class__: "Color4"
Methods
equals
- equals(object: Color4, precision?: number): boolean
-
Parameters
-
-
precision: number = mathUtil.PRECISION
Returns boolean
fromUnit
- fromUnit(color: number): Color4
-
fromUnit24
- fromUnit24(color: number, a?: number): Color4
-
Parameters
-
color: number
-
a: number = 1
multiplyNumber
- multiplyNumber(scale: number): Color4
-
random
- random(randomAlpha?: boolean): Color4
-
Parameters
-
randomAlpha: boolean = false
setTo
- setTo(r: number, g: number, b: number, a?: number): Color4
-
Parameters
-
r: number
-
g: number
-
b: number
-
a: number = 1
toArray
- toArray(array?: number[], offset?: number): number[]
-
Parameters
-
array: number[] = []
-
offset: number = 0
Returns number[]
toHexString
- toHexString(): string
-
Returns string
toInt
- toInt(): number
-
Returns number
toRGBA
- toRGBA(): string
-
Returns string
toString
- toString(): string
-
Returns string
Static
fromUnit
- fromUnit(color: number): Color4
-
Static
fromUnit24
- fromUnit24(color: number, a?: number): Color4
-
Parameters
-
color: number
-
a: number = 1
颜色(包含透明度)