UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

24 lines (23 loc) 660 B
import { Color } from "../../../core/math/color.js"; import { Vec4 } from "../../../core/math/vec4.js"; import { BUTTON_TRANSITION_MODE_TINT } from "./constants.js"; class ButtonComponentData { enabled = true; active = true; imageEntity = null; hitPadding = new Vec4(); transitionMode = BUTTON_TRANSITION_MODE_TINT; hoverTint = new Color(0.75, 0.75, 0.75); pressedTint = new Color(0.5, 0.5, 0.5); inactiveTint = new Color(0.25, 0.25, 0.25); fadeDuration = 0; hoverSpriteAsset = null; hoverSpriteFrame = 0; pressedSpriteAsset = null; pressedSpriteFrame = 0; inactiveSpriteAsset = null; inactiveSpriteFrame = 0; } export { ButtonComponentData };