import { TWEEN } from '@uino/base-thing';
/**
* The node user data type.
* @enum {String}
* @readonly
* @private
*/
const NodeUserDataType = {
/**
* The node's inherit type of bounding box.
* @private
*/
BoundingBoxInheritType: '_BoundingBoxInheritType_',
};
/**
* @typedef {Object} MouseEventData
* @property {String} type The event type in lowercase.
* @property {Boolean} altKey Check whether press alt key.
* @property {Boolean} ctrlKey Check whether press control key.
* @property {Boolean} shiftKey Check whether press shift key.
* @property {Number} deltaX The delta-x of mouse cursor in pixel.
* @property {Number} deltaY The delta-y of mouse cursor in pixel.
* @property {Number} x The x position of mouse cursor in pixel.
* @property {Number} y The y position of mouse cursor in pixel.
* @property {THING.BaseObject} object The picked object(could be null).
* @property {Array<Number>} pickedPosition The picked position in world space.
* @property {Array<Number>} normal The normal direction in world space.
* @public
*/
/**
* The event type.
* @enum {String}
* @readonly
* @public
*/
const EventType = {
// #region System
/**
* When application quit.
*/
AppQuit: 'AppQuit',
/**
* When application be setted as current.
*/
AppEnter: 'AppEnter',
/**
* When application be setted as not current.
*/
AppLeave: 'AppLeave',
/**
* When update.
*/
Update: 'Update',
/**
* When application focus in.
*/
FocusIn: 'FocusIn',
/**
* When application focus out.
*/
FocusOut: 'FocusOut',
/**
* When application resize.
*/
Resize: 'Resize',
/**
* When mouse enter object.
*/
MouseEnter: 'MouseEnter',
/**
* When mouse leave object.
*/
MouseLeave: 'MouseLeave',
/**
* When mouse move.
*/
MouseMove: 'MouseMove',
/**
* When mouse button up.
*/
MouseUp: 'MouseUp',
/**
* When mouse button down.
*/
MouseDown: 'MouseDown',
/**
* When mouse wheel rolling.
*/
Wheel: 'Wheel',
/**
* When touch end.
*/
Click: 'Click',
/**
* When double touch end.
*/
DBLClick: 'DBLClick',
/**
* When key down.
*/
KeyDown: 'KeyDown',
/**
* When key up.
*/
KeyUp: 'KeyUp',
/**
* When key is pressing.
*/
KeyPress: 'KeyPress',
/**
* When drop file(s) into application container.
*/
DropFiles: 'DropFiles',
/**
* When enter state.
* @private
*/
EnterState: 'EnterState',
/**
* When leave state.
* @private
*/
LeaveState: 'LeaveState',
// #endregion
// #region Level
/**
* When register level action for level component at the first time
*/
RegisterLevelAction: 'RegisterLevelAction',
/**
* Before leave object level.
*/
BeforeLeaveLevel: 'BeforeLeaveLevel',
/**
* Leave object level.
*/
LeaveLevel: 'LeaveLevel',
/**
* After leave object level.
*/
AfterLeaveLevel: 'AfterLeaveLevel',
/**
* Before enter object level.
*/
BeforeEnterLevel: 'BeforeEnterLevel',
/**
* Enter object level.
*/
EnterLevel: 'EnterLevel',
/**
* After enter object level.
*/
AfterEnterLevel: 'AfterEnterLevel',
/**
* Complete object level entering.
*/
CompleteEnterLevel: 'CompleteEnterLevel',
// #endregion
// #region Collider
/**
* When enter(hit) object's collider(just only once before leave collider).
*/
ColliderEnter: 'ColliderEnter',
/**
* When leave object's collider.
*/
ColliderLeave: 'ColliderLeave',
// #endregion
// #region Object
/**
* When create object event.
*/
Create: 'Create',
/**
* When load object resource event.
*/
Load: 'Load',
/**
* When loading object resources.
*/
Progress: 'Progress',
/**
* When load object resouces failed.
*/
Error: 'Error',
/**
* When before destroy object event.
* @private
*/
BeforeDestroy: 'Destroy',
/**
* When destroy object event.
*/
Destroy: 'Destroy',
/**
* When after destroy object event.
* @private
*/
AfterDestroy: 'Destroy',
/**
* When before add child into object.
*/
BeforeAddChild: 'BeforeAddChild',
/**
* When after add child into object.
*/
AfterAddChild: 'AfterAddChild',
/**
* When before remove child from object.
*/
BeforeRemoveChild: 'BeforeRemoveChild',
/**
* When after remove child from object.
*/
AfterRemoveChild: 'AfterRemoveChild',
/**
* When object start to fly.
*/
StartFlying: 'StartFlying',
/**
* When object is flying.
*/
Flying: 'Flying',
/**
* When object stop to fly.
*/
StopFlying: 'StopFlying',
/**
* When object finish to fly.
*/
CompleteFlying: 'CompleteFlying',
/**
* When object active attribute changed.
*/
ActiveChange: 'ActiveChange',
/**
* When object visible attribute changed.
*/
VisibleChange: 'VisibleChange',
/**
* When object stop to play animation.
*/
StopAnimation: 'StopAnimation',
/**
* When object start to play animation.
*/
PlayAnimation: 'PlayAnimation',
/**
* When object change attributes.
*/
ChangeAttributes: 'ChangeAttributes',
// #endregion
// #region Camera
/**
* When camera enable viewport.
*/
EnableViewport: 'EnableViewport',
/**
* When camera is ready to start changing.
*/
CameraChangePreStart: 'CameraChangePreStart',
/**
* When camera starts to change.
*/
CameraChangeStart: 'CameraChangeStart',
/**
* When camera is changing.
*/
CameraChange: 'CameraChange',
/**
* When camera is ready to end change.
*/
CameraChangePreEnd: 'CameraChangePreEnd',
/**
* When camera ends changing.
*/
CameraChangeEnd: 'CameraChangeEnd',
/**
* When camera start to capture screen.
* @private
*/
BeforeCameraCapture: 'BeforeCameraCapture',
/**
* When camera finish to capture screen.
* @private
*/
AfterCameraCapture: 'AfterCameraCapture',
/**
* when before load resolvers in sceneloader
*/
BeforeLoadResolvers: 'BeforeLoadResolvers',
// #endregion
};
/**
* @typedef {Object} Linear
* @property {Function} None
* @public
*/
/**
* @typedef {Object} Quadratic
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Cubic
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Quartic
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Quintic
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Sinusoidal
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Exponential
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Circular
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Elastic
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Back
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} Bounce
* @property {Function} In
* @property {Function} Out
* @property {Function} InOut
* @public
*/
/**
* @typedef {Object} LerpType
* @example http://sole.github.io/tween.js/examples/03_graphs.html
* @property {Linear} Linear
* @property {Quadratic} Quadratic
* @property {Cubic} Cubic
* @property {Quartic} Quartic
* @property {Quintic} Quintic
* @property {Sinusoidal} Sinusoidal
* @property {Exponential} Exponential
* @property {Circular} Circular
* @property {Elastic} Elastic
* @property {Back} Back
* @property {Bounce} Bounce
* @public
*/
const LerpType = {
Linear: {
None: TWEEN.Easing.Linear.None,
},
Quadratic: {
In: TWEEN.Easing.Quadratic.In,
Out: TWEEN.Easing.Quadratic.Out,
InOut: TWEEN.Easing.Quadratic.InOut,
},
Cubic: {
In: TWEEN.Easing.Cubic.In,
Out: TWEEN.Easing.Cubic.Out,
InOut: TWEEN.Easing.Cubic.InOut,
},
Quartic: {
In: TWEEN.Easing.Quartic.In,
Out: TWEEN.Easing.Quartic.Out,
InOut: TWEEN.Easing.Quartic.InOut,
},
Quintic: {
In: TWEEN.Easing.Quintic.In,
Out: TWEEN.Easing.Quintic.Out,
InOut: TWEEN.Easing.Quintic.InOut,
},
Sinusoidal: {
In: TWEEN.Easing.Sinusoidal.In,
Out: TWEEN.Easing.Sinusoidal.Out,
InOut: TWEEN.Easing.Sinusoidal.InOut,
},
Exponential: {
In: TWEEN.Easing.Exponential.In,
Out: TWEEN.Easing.Exponential.Out,
InOut: TWEEN.Easing.Exponential.InOut,
},
Circular: {
In: TWEEN.Easing.Circular.In,
Out: TWEEN.Easing.Circular.Out,
InOut: TWEEN.Easing.Circular.InOut,
},
Elastic: {
In: TWEEN.Easing.Elastic.In,
Out: TWEEN.Easing.Elastic.Out,
InOut: TWEEN.Easing.Elastic.InOut,
},
Back: {
In: TWEEN.Easing.Back.In,
Out: TWEEN.Easing.Back.Out,
InOut: TWEEN.Easing.Back.InOut,
},
Bounce: {
In: TWEEN.Easing.Bounce.In,
Out: TWEEN.Easing.Bounce.Out,
InOut: TWEEN.Easing.Bounce.InOut,
},
};
/**
* The loop type.
* @enum {String}
* @readonly
* @public
*/
const LoopType = {
/**
* The value(s) change in repeat loop mode.
*/
Repeat: 'Repeat',
/**
* The value(s) change in ping-pong loop mode.
*/
PingPong: 'PingPong',
};
/**
* The mouse button type.
* @enum {String}
* @readonly
* @public
*/
const MouseButtonType = {
/**
* Invalid mouse button type.
*/
None: 'None',
/**
* The mouse left button type.
*/
Left: 'Left',
/**
* The mouse middle button type.
*/
Middle: 'Middle',
/**
* The mouse right button type.
*/
Right: 'Right'
};
/**
* The space type.
* @enum {String}
* @readonly
* @public
*/
const SpaceType = {
/**
* Base on self space.
*/
Self: 'Self',
/**
* Base on local space.
*/
Local: 'Local',
/**
* Base on world space.
*/
World: 'World'
};
/**
* The code type.
* @enum {String}
* @readonly
* @public
*/
const CodeType = {
Escape: "Escape",
Digit1: "Digit1",
Digit2: "Digit2",
Digit3: "Digit3",
Digit4: "Digit4",
Digit5: "Digit5",
Digit6: "Digit6",
Digit7: "Digit7",
Digit8: "Digit8",
Digit9: "Digit9",
Digit0: "Digit0",
Minus: "Minus",
Equal: "Equal",
Backspace: "Backspace",
Tab: "Tab",
KeyQ: "KeyQ",
KeyW: "KeyW",
KeyE: "KeyE",
KeyR: "KeyR",
KeyT: "KeyT",
KeyY: "KeyY",
KeyU: "KeyU",
KeyI: "KeyI",
KeyO: "KeyO",
KeyP: "KeyP",
BracketLeft: "BracketLeft",
BracketRight: "BracketRight",
Enter: "Enter",
ControlLeft: "ControlLeft",
KeyA: "KeyA",
KeyS: "KeyS",
KeyD: "KeyD",
KeyF: "KeyF",
KeyG: "KeyG",
KeyH: "KeyH",
KeyJ: "KeyJ",
KeyK: "KeyK",
KeyL: "KeyL",
Semicolon: "Semicolon",
Quote: "Quote",
Backquote: "Backquote",
ShiftLeft: "ShiftLeft",
Backslash: "Backslash",
KeyZ: "KeyZ",
KeyX: "KeyX",
KeyC: "KeyC",
KeyV: "KeyV",
KeyB: "KeyB",
KeyN: "KeyN",
KeyM: "KeyM",
Comma: "Comma",
Period: "Period",
Slash: "Slash",
ShiftRight: "ShiftRight",
NumpadMultiply: "NumpadMultiply",
AltLeft: "AltLeft",
Space: "Space",
CapsLock: "CapsLock",
F1: "F1",
F2: "F2",
F3: "F3",
F4: "F4",
F5: "F5",
F6: "F6",
F7: "F7",
F8: "F8",
F9: "F9",
F10: "F10",
Pause: "Pause",
ScrollLock: "ScrollLock",
Numpad7: "Numpad7",
Numpad8: "Numpad8",
Numpad9: "Numpad9",
NumpadSubtract: "NumpadSubtract",
Numpad4: "Numpad4",
Numpad5: "Numpad5",
Numpad6: "Numpad6",
NumpadAdd: "NumpadAdd",
Numpad1: "Numpad1",
Numpad2: "Numpad2",
Numpad3: "Numpad3",
Numpad0: "Numpad0",
NumpadDecimal: "NumpadDecimal",
F11: "F11",
F12: "F12",
F13: "F13",
F14: "F14",
F15: "F15",
F16: "F16",
F17: "F17",
F18: "F18",
F19: "F19",
F20: "F20",
F21: "F21",
F22: "F22",
F23: "F23",
F24: "F24",
NumpadComma: "NumpadComma",
NumpadEnter: "NumpadEnter",
ControlRight: "ControlRight",
BrowserHome: "BrowserHome",
NumpadDivide: "NumpadDivide",
PrintScreen: "PrintScreen",
AltRight: "AltRight",
NumLock: "NumLock",
Home: "Home",
ArrowUp: "ArrowUp",
PageUp: "PageUp",
ArrowLeft: "ArrowLeft",
ArrowRight: "ArrowRight",
End: "End",
ArrowDown: "ArrowDown",
PageDown: "PageDown",
Insert: "Insert",
Delete: "Delete"
};
const KeyCodeType = {
Backspace: 8,
Tab: 9,
Enter: 13,
Shift: 16,
Ctrl: 17,
Alt: 18,
Pause: 19,
Capslock: 20,
Escape: 27,
Space: 32,
PageUp: 33,
PageDown: 34,
End: 35,
Home: 36,
Left: 37,
Up: 38,
Right: 39,
Down: 40,
Insert: 45,
Delete: 46,
Key0: 48,
Key1: 49,
Key2: 50,
Key3: 51,
Key4: 52,
Key5: 53,
Key6: 54,
Key7: 55,
Key8: 56,
Key9: 57,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
Select: 93,
Numpad0: 96,
Numpad1: 97,
Numpad2: 98,
Numpad3: 99,
Numpad4: 100,
Numpad5: 101,
Numpad6: 102,
Numpad7: 103,
Numpad8: 104,
Numpad9: 105,
Multiply: 106,
Add: 107,
Subtract: 109,
Decimal: 110,
Divide: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123,
Numlock: 144,
Scrolllock: 145,
Semicolon: 186,
EqualSign: 187,
Comma: 188,
Dash: 189,
Period: 190,
ForwardSlash: 191,
GraveAccent: 192,
OpenBracket: 219,
BackSlash: 220,
CloseBraket: 221,
SingleQuote: 222,
};
/**
* The rotation orders type.
* @enum {String}
* @readonly
* @private
*/
const RotationOrdersType = {
/**
* XYZ
* @private
*/
XYZ: 'XYZ',
/**
* YZX
* @private
*/
YZX: 'YZX',
/**
* ZXY
* @private
*/
ZXY: 'ZXY',
/**
* XZY
* @private
*/
XZY: 'XZY',
/**
* YXZ
* @private
*/
YXZ: 'YXZ',
/**
* ZYX
* @private
*/
ZYX: 'ZYX'
};
/**
* The axis type.
* @enum {String}
* @readonly
* @public
*/
const AxisType = {
/** X-Axis */
X: 'X',
/** Y-Axis */
Y: 'Y',
/** Z-Axis */
Z: 'Z',
};
/**
* The projection type.
* @enum {String}
* @readonly
* @public
*/
const ProjectionType = {
/** Orthographic */
Orthographic: 'Orthographic',
/** Perspective */
Perspective: 'Perspective',
};
/**
* The view mode.
* @enum {String}
* @readonly
* @public
*/
const ViewMode = {
/** Top */
Top: 'Top',
/** Bottom */
Bottom: 'Bottom',
/** Left */
Left: 'Left',
/** Right */
Right: 'Right',
/** Front */
Front: 'Front',
/** Back */
Back: 'Back',
};
/**
* The view mode type.
* @deprecated 2.7
* @private
*/
const ViewModeType = ViewMode;
/**
* The align type.
* @enum {String}
* @readonly
* @public
*/
const AlignType = {
/**
* Center alignment.
* @private
*/
Center: 'Center',
/**
* Left alignment.
* @private
*/
Left: 'Left',
/**
* Top alignment.
* @private
*/
Top: 'Top',
/**
* Top-Left alignment.
* @private
*/
TopLeft: 'TopLeft',
/**
* Top-Right alignment.
* @private
*/
TopRight: 'TopRight',
/**
* Right alignment.
* @private
*/
Right: 'Right',
/**
* Bottom alignment.
* @private
*/
Bottom: 'Bottom',
/**
* Bottom-Left alignment.
* @private
*/
BottomLeft: 'BottomLeft',
/**
* Bottom-Right alignment.
* @private
*/
BottomRight: 'BottomRight',
}
/**
* The side type.
* @enum {String}
* @readonly
* @public
*/
const SideType = {
/** Draw front side only */
Front: 'Front',
/** Draw back side only */
Back: 'Back',
/** Draw front and back sides */
Double: 'Double',
};
/**
* The render type.
* @enum {String}
* @readonly
* @public
*/
const RenderType = {
/** Sprite */
Sprite: 'Sprite',
/** Plane */
Plane: 'Plane',
};
/**
* The pivot mode.
* @enum {String}
* @readonly
* @public
*/
const PivotMode = {
/** Auto */
Auto: 'Auto',
/** Location */
Location: 'Location',
};
/**
* The pivot mode type.
* @deprecated 2.7
* @private
*/
const PivotModeType = PivotMode;
/**
* The pick type.
* @enum {String}
* @readonly
*/
const PickType = {
/** Raycaster */
Raycaster: 'Raycaster',
/** GPU */
GPU: 'GPU',
GPUFast: 'GPUFast',
};
/**
* The pick mode.
* @enum {String}
* @readonly
*/
const PickMode = {
/** Mesh */
Mesh: 'Mesh',
/** BoundingBox */
BoundingBox: 'BoundingBox',
};
/**
* The fog type.
* @enum {String}
* @readonly
* @private
*/
const FogType = {
/**
* To linearly increase the density of fog at a certain distance from the camera.
* @private
*/
Linear: 'Linear',
/**
* Use exponential squared fog.
* @private
*/
Exp2: 'Exp2',
};
/**
* The play state.
* @enum {String}
* @readonly
* @public
*/
const PlayState = {
/**
* It's ready.
*/
Ready: 'Ready',
/**
* It's playing.
*/
Playing: 'Playing',
/**
* It had paused.
*/
Paused: 'Paused',
/**
* It had stopped.
*/
Stopped: 'Stopped',
/**
* It had finished.
*/
Finished: 'Finished',
};
/**
* The play state type.
* @deprecated 2.7
* @private
*/
const PlayStateType = PlayState;
/**
* The animation direction type.
* @enum {String}
* @readonly
* @public
*/
const AnimationDirectionType = {
/**
* Play in normal mode.
*/
Normal: 'Normal',
/**
* Play in reverse mode.
*/
Reverse: 'Reverse',
};
/**
* The inheritance type.
* @enum {String}
* @readonly
* @public
*/
const InheritType = {
/**
* The object would process action normally(process it then pass to children).
*/
Normal: 'Normal',
/**
* The object would process action but do not pass to children
*/
Break: 'Break',
/**
* The object would skip action but keep passing to children.
*/
Jump: 'Jump',
/**
* The object would break action and do not pass to children
*/
Stop: 'Stop',
}
const InheritActionType = InheritType;
/**
* The box helper mode type.
* @enum {String}
* @readonly
* @public
*/
const BoxHelperModeType = {
/** All */
All: 'All',
/** Root */
Root: 'Root',
/** Bodies */
Bodies: 'Bodies',
}
/**
* The blending type.
* @enum {String}
* @readonly
* @public
*/
const BlendingType = {
/**
* Disable blending.
*/
No: 'NoBlending',
/**
* Normal blending.
* color(RGB) = (sourceColor * 1) + (destinationColor * (1 - srcAlpha))
* color(A) = (sourceAlpha * 1) + (destinationAlpha * (1 - srcAlpha))
*/
Normal: 'NormalBlending',
/**
* Additive blending.
* color(RGBA) = (sourceColor * 1) + (destinationColor * 1).
*/
Additive: 'AdditiveBlending',
/**
* Subtractive blending.
* color(RGB) = destinationColor * (1 - srcAlpha)
* color(A) = destinationAlpha * 1
*/
Subtractive: 'SubtractiveBlending',
/**
* Multiply blending.
* color(RGB) = destinationColor * sourceColor
* color(A) = destinationAlpha * sourceAlpha
*/
Multiply: 'MultiplyBlending',
};
/**
* The UV mode.
* @enum {String}
* @readonly
* @public
*/
const UVMode = {
/**
* Fill UV as tile(s) repeatly.
*/
Tile: 'Tile',
/**
* Fill UV as stretch image mode.
*/
Stretch: 'Stretch',
};
/**
* The UV mode type.
* @deprecated 2.7
* @private
*/
const UVModeType = UVMode;
/**
* The image slot type.
* @enum {String}
* @readonly
* @public
*/
const ImageSlotType = {
/** Map */
Map: 'Map',
/** EnvMap */
EnvMap: 'EnvMap',
/** AlphaMap */
AlphaMap: 'AlphaMap',
/** EmissiveMap */
EmissiveMap: 'EmissiveMap',
/** NormalMap */
NormalMap: 'NormalMap',
/** ColorMapping */
ColorMapping: 'ColorMapping',
/** AOMap(An Ambient Occlusion Map) */
AOMap: 'AOMap',
};
/**
* The texture element encoding type.
* @enum {String}
* @readonly
* @public
*/
const TexelEncodingType = {
LINEAR: "LINEAR",
SRGB: "SRGB",
RGBE: "RGBE",
RGBM7: "RGBM7",
RGBM16: "RGBM16",
RGBD: "RGBD",
GAMMA: "GAMMA"
}
/**
* The image color format type.
* @enum {String}
* @readonly
* @public
*/
const ImageColorFormat = {
/**
* Red, Green, Blue(RGB) color format.
*/
RGB: 'RGB',
/**
* Alpha, Red, Green, Blue(RGBA) color format.
*/
RGBA: 'RGBA',
BC7_M6_OPAQUE_ONLY: 'BC7_M6_OPAQUE_ONLY',
};
/**
* The image compression type.
* @enum {String}
* @readonly
* @private
*/
const ImageCompressionType = {
/**
* ETC1
* @private
*/
ETC1: 'ETC1',
/**
* ETC2
* @private
*/
ETC2: 'ETC2',
/**
* BC1
* @private
*/
BC1: 'BC1',
/**
* BC3
* @private
*/
BC3: 'BC3',
/**
* BC4
* @private
*/
BC4: 'BC4',
/**
* BC5
* @private
*/
BC5: 'BC5',
/**
* BC7_M6_OPAQUE_ONLY
* @private
*/
BC7_M6_OPAQUE_ONLY: 'BC7_M6_OPAQUE_ONLY',
/**
* BC7_M5
* @private
*/
BC7_M5: 'BC7_M5',
/**
* PVRTC1_4_RGB
* @private
*/
PVRTC1_4_RGB: 'PVRTC1_4_RGB',
/**
* PVRTC1_4_RGBA
* @private
*/
PVRTC1_4_RGBA: 'PVRTC1_4_RGBA',
/**
* ASTC_4x4
* @private
*/
ASTC_4x4: 'ASTC_4x4',
/**
* ATC_RGB
* @private
*/
ATC_RGB: 'ATC_RGB',
/**
* ATC_RGBA_INTERPOLATED_ALPHA
* @private
*/
ATC_RGBA_INTERPOLATED_ALPHA: 'ATC_RGBA_INTERPOLATED_ALPHA',
/**
* RGBA32
* @private
*/
RGBA32: 'RGBA32',
/**
* RGB565
* @private
*/
RGB565: 'RGB565',
/**
* BGR565
* @private
*/
BGR565: 'BGR565',
/**
* RGBA4444
* @private
*/
RGBA4444: 'RGBA4444',
};
/**
* The image wrap type.
* @enum {String}
* @readonly
* @public
*/
const ImageWrapType = {
/**
* Image fill in repeat mode.
*/
Repeat: 'Repeat',
/**
* Image use edge to repeat.
*/
ClampToEdge: 'ClampToEdge',
/**
* Image fill in repeat/mirror one by one mode.
*/
MirroredRepeat: 'MirroredRepeat',
};
/**
* The image mapping type.
* @enum {String}
* @readonly
* @public
*/
const ImageMappingType = {
/**
* Image texture map normally.
*/
UV: 'UV',
/**
* CubeReflection
* @private
*/
CubeReflection: 'CubeReflection',
/**
* CubeRefraction
* @private
*/
CubeRefraction: 'CubeRefraction',
/**
* Use the single one env map to show image, like sky box etc.
*/
EquirectangularReflection: 'EquirectangularReflection',
/**
* EquirectangularRefraction
* @private
*/
EquirectangularRefraction: 'EquirectangularRefraction',
};
/**
* The image filter type.
* @enum {String}
* @readonly
* @public
*/
const ImageFilterType = {
/**
* Use the value of the texture element that is nearest to the specified texture coordinates.
*/
NearestFilter: 'NearestFilter',
/**
* Chooses the mipmap that most closely matches the size of the pixel being textured and uses the NearestFilter.
*/
NearestMipmapNearestFilter: 'NearestMipmapNearestFilter',
/**
* Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the NearestFilter.
*/
NearestMipmapLinearFilter: 'NearestMipmapLinearFilter',
/**
* Use the weighted average of the four texture elements that are closest to the specified texture coordinates.
*/
LinearFilter: 'LinearFilter',
/**
* Chooses the mipmap that most closely matches the size of the pixel being textured and uses the LinearFilter.
*/
LinearMipmapNearestFilter: 'LinearMipmapNearestFilter',
/**
* Chooses the two mipmaps that most closely matches the size of the pixel being textured and uses the LinearFilter.
*/
LinearMipmapLinearFilter: 'LinearMipmapLinearFilter'
};
/**
* The shadow quality type.
* @enum {Number}
* @readonly
* @public
*/
const ShadowQualityType = {
/**
* 512x512 shadow texture size.
*/
Low: 512,
/**
* 1024x1024 shadow texture size.
*/
Medium: 1024,
/**
* 2048x2048 shadow texture size.
*/
High: 2048,
/**
* 4096x4096 shadow texture size.
*/
Ultra: 4096
};
/**
* The light sphere mode type.
* @enum {String}
* @readonly
* @private
*/
const LightSphereModeType = {
/**
* Get bounding box of binding object each frame in runtime.
* @private
*/
Dynamic: 'Dynamic',
/**
* Get bounding box of binding object each frame in binding time(just once).
* @private
*/
Static: 'Static'
};
/**
* The action queue type.
* @enum {String}
* @readonly
* @public
*/
const ActionQueueType = {
/**
* The actions of entering object level.
*/
EnterLevel: 'EnterLevel',
};
/**
* The collider type.
* @enum {String}
* @readonly
* @public
*/
const ColliderType = {
/**
* Use bounding box to check collider.
*/
Box: 'Box',
/**
* Use bounding sphere to check collider.
*/
Sphere: 'Sphere',
};
/**
* The resource type.
* @enum {String}
* @readonly
* @private
*/
const ResourceType = {
/**
* It's auto-detect resource type.
* @private
*/
AutoDetect: 'AutoDetect',
/**
* It's non-encrypted resource type.
* @private
*/
NonEncrypted: 'NonEncrypted',
/**
* It's encrypted resource type.
* @private
*/
Encrypted: 'Encrypted',
};
/**
* The scene resource type.
* @enum {String}
* @readonly
* @private
*/
const SceneResourceType = {
/**
* The scene resource is object(s) in tree format.
* @private
*/
Object: 'Object',
/**
* The scene resource is object(s) in layout format.
* @private
*/
Layout: 'Layout',
};
/**
* The empty resource type.
* @enum {String}
* @readonly
* @private
*/
const Empty = {
/**
* The empty image texture resource
* @private
*/
ImageTexture: 'EmptyImageTexture',
/**
* The empty texture resource
* @private
*/
Texture: 'EmptyTexture',
};
/**
* The font weight.
* @enum {String}
* @readonly
*/
const FontWeight = {
/**
* Normal.
* @private
*/
Normal: 'Normal',
/**
* Bold.
* @private
*/
Bold: 'Bold',
/**
* Bolder.
* @private
*/
Bolder: 'Bolder',
/**
* Lighter.
* @private
*/
Lighter: 'Lighter',
}
/**
* The relationship direction type.
* @enum {String}
* @readonly
* @public
*/
const RelationshipDirection = {
/** Out source -> target */
Out: 'Out',
/** In target -> source */
In: "In",
/** InOut */
InOut: 'InOut',
/** NONE */
None: 'None',
}
/**
* The filter result type.
* @enum {String}
* @readonly
*/
const FilterResultType = {
Pass: 'Pass',
Fail: 'Fail',
Ignore: 'Ignore'
};
/**
* The action type.
* @enum {String}
* @readonly
* @private
*/
const ActionType = {
/**
* create object.
* @private
*/
CreateObject: 'CreateObject',
/**
* camera flyTo.
* @private
*/
CameraFlyTo: 'CameraFlyTo',
/**
* object set color.
* @private
*/
ObjectSetColor: 'ObjectSetColor',
}
/**
* The image encoding type.
* @enum {String}
* @readonly
* @public
*/
const ImageEncodingType = {
'LINEAR': 'LINEAR',
'SRGB': 'SRGB',
'RGBE': 'RGBE',
'RGBM7': 'RGBM7',
'RGBM16': 'RGBM16',
'RGBD': 'RGBD',
'GAMMA': 'GAMMA'
};
export {
Empty,
NodeUserDataType,
EventType,
LerpType,
LoopType,
MouseButtonType,
SpaceType,
CodeType,
KeyCodeType,
RotationOrdersType,
AxisType,
ProjectionType,
ViewMode,
ViewModeType,
AlignType,
SideType,
RenderType,
PivotMode,
PivotModeType,
PickType,
PickMode,
FogType,
PlayState,
PlayStateType,
AnimationDirectionType,
InheritType,
InheritActionType,
BoxHelperModeType,
BlendingType,
UVMode,
UVModeType,
ImageSlotType,
TexelEncodingType,
ImageColorFormat,
ImageCompressionType,
ImageWrapType,
ImageMappingType,
ImageFilterType,
ShadowQualityType,
LightSphereModeType,
ActionQueueType,
ColliderType,
ResourceType,
SceneResourceType,
FontWeight,
RelationshipDirection,
FilterResultType,
ActionType,
ImageEncodingType,
}