UNPKG

playcanvas

Version:

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

33 lines (32 loc) 1.49 kB
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); import { Color } from "../../../core/math/color.js"; import { Vec4 } from "../../../core/math/vec4.js"; import { BUTTON_TRANSITION_MODE_TINT } from "./constants.js"; class ButtonComponentData { constructor() { __publicField(this, "enabled", true); __publicField(this, "active", true); /** @type {Entity|null} */ __publicField(this, "imageEntity", null); __publicField(this, "hitPadding", new Vec4()); __publicField(this, "transitionMode", BUTTON_TRANSITION_MODE_TINT); __publicField(this, "hoverTint", new Color(0.75, 0.75, 0.75)); __publicField(this, "pressedTint", new Color(0.5, 0.5, 0.5)); __publicField(this, "inactiveTint", new Color(0.25, 0.25, 0.25)); __publicField(this, "fadeDuration", 0); /** @type {Asset|null} */ __publicField(this, "hoverSpriteAsset", null); __publicField(this, "hoverSpriteFrame", 0); /** @type {Asset|null} */ __publicField(this, "pressedSpriteAsset", null); __publicField(this, "pressedSpriteFrame", 0); /** @type {Asset|null} */ __publicField(this, "inactiveSpriteAsset", null); __publicField(this, "inactiveSpriteFrame", 0); } } export { ButtonComponentData };