vevet 1.4.27 → 2.0.1-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +7 -71
- package/build/cdn/index.js +12 -0
- package/build/cdn/index.js.LICENSE.txt +14 -0
- package/build/cjs/app/Application.js +297 -0
- package/build/cjs/app/events/PageLoad.js +74 -0
- package/build/cjs/app/events/Viewport.js +303 -0
- package/build/cjs/base/Callbacks.js +232 -0
- package/build/cjs/base/Component.js +56 -0
- package/build/cjs/base/Module.js +262 -0
- package/build/cjs/base/MutableProp.js +165 -0
- package/build/cjs/base/Plugin.js +56 -0
- package/build/cjs/components/animation-frame/AnimationFrame.js +183 -0
- package/build/cjs/components/canvas/Ctx2D.js +200 -0
- package/build/cjs/components/canvas/Ctx2DPrerender.js +72 -0
- package/build/cjs/components/cursor/CustomCursor.js +344 -0
- package/build/cjs/components/dragger/Dragger.js +229 -0
- package/build/cjs/components/dragger/DraggerDirection.js +77 -0
- package/build/cjs/components/dragger/DraggerMove.js +84 -0
- package/build/cjs/components/loading/Preloader.js +229 -0
- package/build/cjs/components/loading/ProgressPreloader.js +377 -0
- package/build/cjs/components/page/Page.js +353 -0
- package/build/cjs/components/scroll/custom-scroll/CustomScroll.js +517 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollDragPlugin.js +178 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +138 -0
- package/build/cjs/components/scroll/scrollable/ScrollEventsBase.js +133 -0
- package/build/cjs/components/scroll/scrollable/ScrollView.js +315 -0
- package/build/cjs/components/scroll/scrollbar/Bar.js +315 -0
- package/build/cjs/components/scroll/scrollbar/ScrollBar.js +206 -0
- package/build/cjs/components/scroll/smooth-scroll/SmoothScroll.js +625 -0
- package/build/cjs/components/scroll/types.js +2 -0
- package/build/cjs/components/split-text/SplitText.js +233 -0
- package/build/cjs/components/text/SplitText.js +329 -0
- package/build/cjs/components/timeline/StaticTimeline.js +137 -0
- package/build/cjs/components/timeline/Timeline.js +190 -0
- package/build/cjs/index.js +87 -0
- package/build/cjs/utils/common/index.js +12 -0
- package/build/cjs/utils/common/mergeWithoutArrays.js +19 -0
- package/build/cjs/utils/common/randID.js +11 -0
- package/build/cjs/utils/common/timeoutCallback.js +17 -0
- package/build/cjs/utils/errors.js +8 -0
- package/build/cjs/utils/listeners/index.js +10 -0
- package/build/cjs/utils/listeners/intersectionObserverSupported.js +11 -0
- package/build/cjs/utils/listeners/onScroll.js +47 -0
- package/build/cjs/utils/math/boundVal.js +16 -0
- package/build/cjs/utils/math/index.js +12 -0
- package/build/cjs/utils/math/lerp.js +15 -0
- package/build/cjs/utils/math/scopeProgress.js +25 -0
- package/build/cjs/utils/types/general.js +2 -0
- package/build/cjs/utils/types/utility.js +2 -0
- package/build/es/app/Application.js +210 -0
- package/build/es/app/events/PageLoad.js +47 -0
- package/build/es/app/events/Viewport.js +232 -0
- package/build/es/base/Callbacks.js +205 -0
- package/build/es/base/Component.js +32 -0
- package/build/es/base/Module.js +225 -0
- package/build/es/base/MutableProp.js +152 -0
- package/build/es/base/Plugin.js +31 -0
- package/build/es/components/animation-frame/AnimationFrame.js +145 -0
- package/build/es/components/canvas/Ctx2D.js +133 -0
- package/build/es/components/canvas/Ctx2DPrerender.js +37 -0
- package/build/es/components/cursor/CustomCursor.js +274 -0
- package/build/es/components/dragger/Dragger.js +175 -0
- package/build/es/components/dragger/DraggerDirection.js +42 -0
- package/build/es/components/dragger/DraggerMove.js +56 -0
- package/build/es/components/loading/Preloader.js +164 -0
- package/build/es/components/loading/ProgressPreloader.js +304 -0
- package/build/es/components/page/Page.js +283 -0
- package/build/es/components/scroll/custom-scroll/CustomScroll.js +486 -0
- package/build/es/components/scroll/plugins/SmoothScrollDragPlugin.js +140 -0
- package/build/es/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +109 -0
- package/build/es/components/scroll/scrollable/ScrollEventsBase.js +79 -0
- package/build/es/components/scroll/scrollable/ScrollView.js +264 -0
- package/build/es/components/scroll/scrollbar/Bar.js +262 -0
- package/build/es/components/scroll/scrollbar/ScrollBar.js +152 -0
- package/build/es/components/scroll/smooth-scroll/SmoothScroll.js +519 -0
- package/build/es/components/scroll/types.js +1 -0
- package/build/es/components/split-text/SplitText.js +199 -0
- package/build/es/components/text/SplitText.js +270 -0
- package/build/es/components/timeline/StaticTimeline.js +92 -0
- package/build/es/components/timeline/Timeline.js +141 -0
- package/build/es/index.js +37 -0
- package/build/es/utils/common/index.js +4 -0
- package/build/es/utils/common/mergeWithoutArrays.js +13 -0
- package/build/es/utils/common/randID.js +7 -0
- package/build/es/utils/common/timeoutCallback.js +14 -0
- package/build/es/utils/errors.js +5 -0
- package/build/es/utils/listeners/index.js +3 -0
- package/build/es/utils/listeners/intersectionObserverSupported.js +8 -0
- package/build/es/utils/listeners/onScroll.js +44 -0
- package/build/es/utils/math/boundVal.js +12 -0
- package/build/es/utils/math/index.js +4 -0
- package/build/es/utils/math/lerp.js +11 -0
- package/build/es/utils/math/scopeProgress.js +22 -0
- package/build/es/utils/types/general.js +1 -0
- package/build/es/utils/types/utility.js +1 -0
- package/build/types/app/Application.d.ts +161 -0
- package/build/types/app/Application.d.ts.map +1 -0
- package/build/types/app/events/PageLoad.d.ts +28 -0
- package/build/types/app/events/PageLoad.d.ts.map +1 -0
- package/build/types/app/events/Viewport.d.ts +137 -0
- package/build/types/app/events/Viewport.d.ts.map +1 -0
- package/build/types/base/Callbacks.d.ts +174 -0
- package/build/types/base/Callbacks.d.ts.map +1 -0
- package/build/types/base/Component.d.ts +48 -0
- package/build/types/base/Component.d.ts.map +1 -0
- package/build/types/base/Module.d.ts +179 -0
- package/build/types/base/Module.d.ts.map +1 -0
- package/build/types/base/MutableProp.d.ts +142 -0
- package/build/types/base/MutableProp.d.ts.map +1 -0
- package/build/types/base/Plugin.d.ts +35 -0
- package/build/types/base/Plugin.d.ts.map +1 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts +96 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2D.d.ts +111 -0
- package/build/types/components/canvas/Ctx2D.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts +41 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts.map +1 -0
- package/build/types/components/cursor/CustomCursor.d.ts +181 -0
- package/build/types/components/cursor/CustomCursor.d.ts.map +1 -0
- package/build/types/components/dragger/Dragger.d.ts +120 -0
- package/build/types/components/dragger/Dragger.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerDirection.d.ts +39 -0
- package/build/types/components/dragger/DraggerDirection.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerMove.d.ts +49 -0
- package/build/types/components/dragger/DraggerMove.d.ts.map +1 -0
- package/build/types/components/loading/Preloader.d.ts +107 -0
- package/build/types/components/loading/Preloader.d.ts.map +1 -0
- package/build/types/components/loading/ProgressPreloader.d.ts +166 -0
- package/build/types/components/loading/ProgressPreloader.d.ts.map +1 -0
- package/build/types/components/page/Page.d.ts +126 -0
- package/build/types/components/page/Page.d.ts.map +1 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts +322 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts +97 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts +34 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts +60 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts +140 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts +84 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts +109 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts.map +1 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts +307 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts.map +1 -0
- package/build/types/components/scroll/types.d.ts +11 -0
- package/build/types/components/scroll/types.d.ts.map +1 -0
- package/build/types/components/split-text/SplitText.d.ts +118 -0
- package/build/types/components/split-text/SplitText.d.ts.map +1 -0
- package/build/types/components/text/SplitText.d.ts +118 -0
- package/build/types/components/text/SplitText.d.ts.map +1 -0
- package/build/types/components/timeline/StaticTimeline.d.ts +92 -0
- package/build/types/components/timeline/StaticTimeline.d.ts.map +1 -0
- package/build/types/components/timeline/Timeline.d.ts +101 -0
- package/build/types/components/timeline/Timeline.d.ts.map +1 -0
- package/build/types/index.d.ts +38 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/utils/common/index.d.ts +5 -0
- package/build/types/utils/common/index.d.ts.map +1 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts +6 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts.map +1 -0
- package/build/types/utils/common/randID.d.ts +5 -0
- package/build/types/utils/common/randID.d.ts.map +1 -0
- package/build/types/utils/common/timeoutCallback.d.ts +6 -0
- package/build/types/utils/common/timeoutCallback.d.ts.map +1 -0
- package/build/types/utils/errors.d.ts +3 -0
- package/build/types/utils/errors.d.ts.map +1 -0
- package/build/types/utils/listeners/index.d.ts +4 -0
- package/build/types/utils/listeners/index.d.ts.map +1 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts +2 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts.map +1 -0
- package/build/types/utils/listeners/onScroll.d.ts +10 -0
- package/build/types/utils/listeners/onScroll.d.ts.map +1 -0
- package/build/types/utils/math/boundVal.d.ts +5 -0
- package/build/types/utils/math/boundVal.d.ts.map +1 -0
- package/build/types/utils/math/index.d.ts +5 -0
- package/build/types/utils/math/index.d.ts.map +1 -0
- package/build/types/utils/math/lerp.d.ts +5 -0
- package/build/types/utils/math/lerp.d.ts.map +1 -0
- package/build/types/utils/math/scopeProgress.d.ts +20 -0
- package/build/types/utils/math/scopeProgress.d.ts.map +1 -0
- package/build/types/utils/types/general.d.ts +7 -0
- package/build/types/utils/types/general.d.ts.map +1 -0
- package/build/types/utils/types/utility.d.ts +14 -0
- package/build/types/utils/types/utility.d.ts.map +1 -0
- package/package.json +88 -82
- package/src/cdn/index.js +3 -0
- package/src/sass/base.scss +3 -0
- package/src/sass/components/cursor/_custom-cursor.scss +63 -0
- package/src/sass/components/index.scss +6 -0
- package/src/sass/components/loading/_preloader.scss +15 -0
- package/src/sass/components/scroll/_scrollbar.scss +73 -0
- package/src/sass/components/scroll/_smooth-scroll.scss +17 -0
- package/src/sass/index.scss +3 -0
- package/src/sass/mixins/_scroll.scss +7 -0
- package/{dist/scss → src/sass}/mixins/_transition.scss +8 -4
- package/src/sass/mixins/_viewport.scss +69 -0
- package/src/sass/mixins/index.scss +3 -0
- package/src/ts/app/Application.ts +350 -0
- package/src/ts/app/events/PageLoad.ts +79 -0
- package/src/ts/app/events/Viewport.ts +365 -0
- package/src/ts/base/Callbacks.ts +380 -0
- package/src/ts/base/Component.ts +83 -0
- package/src/ts/base/Module.ts +385 -0
- package/src/ts/base/MutableProp.ts +242 -0
- package/src/ts/base/Plugin.ts +76 -0
- package/src/ts/components/animation-frame/AnimationFrame.ts +264 -0
- package/src/ts/components/canvas/Ctx2D.ts +260 -0
- package/src/ts/components/canvas/Ctx2DPrerender.ts +96 -0
- package/src/ts/components/cursor/CustomCursor.ts +462 -0
- package/src/ts/components/dragger/Dragger.ts +313 -0
- package/src/ts/components/dragger/DraggerDirection.ts +106 -0
- package/src/ts/components/dragger/DraggerMove.ts +114 -0
- package/src/ts/components/loading/Preloader.ts +279 -0
- package/src/ts/components/loading/ProgressPreloader.ts +484 -0
- package/src/ts/components/page/Page.ts +421 -0
- package/src/ts/components/scroll/plugins/SmoothScrollDragPlugin.ts +251 -0
- package/src/ts/components/scroll/plugins/SmoothScrollKeyboardPlugin.ts +166 -0
- package/src/ts/components/scroll/scrollable/ScrollEventsBase.ts +151 -0
- package/src/ts/components/scroll/scrollable/ScrollView.ts +435 -0
- package/src/ts/components/scroll/scrollbar/Bar.ts +364 -0
- package/src/ts/components/scroll/scrollbar/ScrollBar.ts +292 -0
- package/src/ts/components/scroll/smooth-scroll/SmoothScroll.ts +861 -0
- package/src/ts/components/scroll/types.ts +10 -0
- package/src/ts/components/text/SplitText.ts +418 -0
- package/src/ts/components/timeline/StaticTimeline.ts +197 -0
- package/src/ts/components/timeline/Timeline.ts +256 -0
- package/src/ts/index.ts +94 -0
- package/src/ts/utils/common/index.ts +9 -0
- package/src/ts/utils/common/mergeWithoutArrays.ts +20 -0
- package/src/ts/utils/common/randID.ts +9 -0
- package/src/ts/utils/common/timeoutCallback.ts +16 -0
- package/src/ts/utils/errors.ts +6 -0
- package/src/ts/utils/listeners/index.ts +7 -0
- package/src/ts/utils/listeners/intersectionObserverSupported.ts +10 -0
- package/src/ts/utils/listeners/onScroll.ts +56 -0
- package/src/ts/utils/math/boundVal.ts +15 -0
- package/src/ts/utils/math/index.ts +9 -0
- package/src/ts/utils/math/lerp.ts +16 -0
- package/src/ts/utils/math/scopeProgress.ts +23 -0
- package/src/ts/utils/types/general.ts +7 -0
- package/src/ts/utils/types/utility.ts +34 -0
- package/dist/js/AJAXEvent.js +0 -355
- package/dist/js/Application.js +0 -345
- package/dist/js/ColumnsModule.js +0 -392
- package/dist/js/CursorModule.js +0 -390
- package/dist/js/DraggerModule.js +0 -792
- package/dist/js/Event.js +0 -538
- package/dist/js/FilterModule.js +0 -943
- package/dist/js/FormModule.js +0 -706
- package/dist/js/FrameModule.js +0 -229
- package/dist/js/IntervalModule.js +0 -270
- package/dist/js/KeydownModule.js +0 -293
- package/dist/js/LoadEvent.js +0 -106
- package/dist/js/MenuBaseModule.js +0 -292
- package/dist/js/MenuModule.js +0 -265
- package/dist/js/MenuTimelineModule.js +0 -321
- package/dist/js/Module.js +0 -478
- package/dist/js/PageAjaxModule.js +0 -1010
- package/dist/js/PageLoadMediaPlugin.js +0 -285
- package/dist/js/PageModule.js +0 -440
- package/dist/js/PaginationModule.js +0 -961
- package/dist/js/PaginationScrollPlugin.js +0 -209
- package/dist/js/Plugin.js +0 -114
- package/dist/js/PopupModule.js +0 -942
- package/dist/js/PreloaderModule.js +0 -724
- package/dist/js/ResponsiveProp.js +0 -301
- package/dist/js/ScrollAnchorModule.js +0 -554
- package/dist/js/ScrollAnimateModule.js +0 -419
- package/dist/js/ScrollBarPlugin.js +0 -594
- package/dist/js/ScrollDragPlugin.js +0 -396
- package/dist/js/ScrollModule.js +0 -1071
- package/dist/js/ScrollViewModule.js +0 -388
- package/dist/js/SelectModule.js +0 -860
- package/dist/js/SliderCanvasModule.js +0 -733
- package/dist/js/SliderControlsPlugin.js +0 -247
- package/dist/js/SliderCounterPlugin.js +0 -278
- package/dist/js/SliderDotsPlugin.js +0 -270
- package/dist/js/SliderDragSwipePlugin.js +0 -245
- package/dist/js/SliderIntervalPlugin.js +0 -192
- package/dist/js/SliderKeydownPlugin.js +0 -185
- package/dist/js/SliderModule.js +0 -1062
- package/dist/js/SliderWheelPlugin.js +0 -194
- package/dist/js/TextAnimateModule.js +0 -663
- package/dist/js/TextSplitModule.js +0 -785
- package/dist/js/TimelineBaseModule.js +0 -405
- package/dist/js/TimelineModule.js +0 -494
- package/dist/js/URLEvent.js +0 -239
- package/dist/js/ViewportEvent.js +0 -465
- package/dist/js/WheelEventModule.js +0 -295
- package/dist/js/domChildOf.js +0 -46
- package/dist/js/domChildren.js +0 -47
- package/dist/js/domInsertAfter.js +0 -32
- package/dist/js/domRemoveChildren.js +0 -26
- package/dist/js/easing.js +0 -363
- package/dist/js/eventListenerAdd.js +0 -87
- package/dist/js/eventListenerGet.js +0 -49
- package/dist/js/eventListenerRemove.js +0 -36
- package/dist/js/generateId.js +0 -29
- package/dist/js/getBrowserName.js +0 -60
- package/dist/js/getOsName.js +0 -39
- package/dist/js/getVevetProperties.js +0 -22
- package/dist/js/index.js +0 -519
- package/dist/js/mathScopeProgress.js +0 -32
- package/dist/js/mathSpreadScopeProgress.js +0 -35
- package/dist/js/merge.js +0 -33
- package/dist/js/normalizeWheel.js +0 -97
- package/dist/js/text_animate_module_addons/_composite_elementary.js +0 -196
- package/dist/js/text_animate_module_addons/_elementary.js +0 -88
- package/dist/js/timeoutCallback.js +0 -26
- package/dist/js/vevet.js +0 -10
- package/dist/scss/_prefix.scss +0 -1
- package/dist/scss/classes/_clear.scss +0 -5
- package/dist/scss/classes/_col-row.scss +0 -48
- package/dist/scss/classes/_display.scss +0 -65
- package/dist/scss/classes/_document-reset.scss +0 -28
- package/dist/scss/classes/_document.scss +0 -7
- package/dist/scss/classes/_overflow.scss +0 -39
- package/dist/scss/classes/_position.scss +0 -55
- package/dist/scss/classes/_text.scss +0 -24
- package/dist/scss/classes/_transition.scss +0 -22
- package/dist/scss/classes/_wrap.scss +0 -31
- package/dist/scss/classes/index.scss +0 -14
- package/dist/scss/index.scss +0 -3
- package/dist/scss/mixins/_clear.scss +0 -6
- package/dist/scss/mixins/_display.scss +0 -6
- package/dist/scss/mixins/_form.scss +0 -14
- package/dist/scss/mixins/_position.scss +0 -42
- package/dist/scss/mixins/_reset.scss +0 -17
- package/dist/scss/mixins/_responsive.scss +0 -88
- package/dist/scss/mixins/index.scss +0 -7
- package/dist/scss/modules/columns/_settings.scss +0 -1
- package/dist/scss/modules/columns/index.scss +0 -19
- package/dist/scss/modules/cursor/_settings.scss +0 -7
- package/dist/scss/modules/cursor/index.scss +0 -15
- package/dist/scss/modules/form/_settings.scss +0 -15
- package/dist/scss/modules/form/index.scss +0 -57
- package/dist/scss/modules/index.scss +0 -11
- package/dist/scss/modules/menu/_button.scss +0 -58
- package/dist/scss/modules/menu/_menu.scss +0 -25
- package/dist/scss/modules/menu/_settings.scss +0 -23
- package/dist/scss/modules/menu/index.scss +0 -3
- package/dist/scss/modules/pagination/_settings.scss +0 -6
- package/dist/scss/modules/pagination/index.scss +0 -24
- package/dist/scss/modules/popup/_settings.scss +0 -26
- package/dist/scss/modules/popup/index.scss +0 -294
- package/dist/scss/modules/preloader/_settings.scss +0 -3
- package/dist/scss/modules/preloader/index.scss +0 -19
- package/dist/scss/modules/scroll/_settings.scss +0 -22
- package/dist/scss/modules/scroll/index.scss +0 -94
- package/dist/scss/modules/select/_settings.scss +0 -28
- package/dist/scss/modules/select/index.scss +0 -142
- package/dist/scss/modules/slider/_settings.scss +0 -35
- package/dist/scss/modules/slider/index.scss +0 -153
- package/dist/scss/modules/text/_settings.scss +0 -1
- package/dist/scss/modules/text/index.scss +0 -19
- package/dist/types/types.d.ts +0 -18763
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { Component, NComponent } from '../../base/Component';
|
|
2
|
+
import { boundVal } from '../../utils/math';
|
|
3
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export namespace NAnimationFrame {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Static properties
|
|
11
|
+
*/
|
|
12
|
+
export interface StaticProp extends NComponent.StaticProp { }
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Changeable properties
|
|
16
|
+
*/
|
|
17
|
+
export interface ChangeableProp extends NComponent.ChangeableProp {
|
|
18
|
+
/**
|
|
19
|
+
* Frames per second
|
|
20
|
+
* @default 140
|
|
21
|
+
*/
|
|
22
|
+
fps?: number;
|
|
23
|
+
/**
|
|
24
|
+
* If need to start the frame
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
run?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Available callbacks
|
|
32
|
+
*/
|
|
33
|
+
export interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
34
|
+
'frame': {
|
|
35
|
+
fps: number;
|
|
36
|
+
realFPS: number;
|
|
37
|
+
prevFrameDuration: number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Launch an animation frame with a certain FPS
|
|
47
|
+
*/
|
|
48
|
+
export class AnimationFrame <
|
|
49
|
+
StaticProp extends NAnimationFrame.StaticProp = NAnimationFrame.StaticProp,
|
|
50
|
+
ChangeableProp extends NAnimationFrame.ChangeableProp = NAnimationFrame.ChangeableProp,
|
|
51
|
+
CallbacksTypes extends NAnimationFrame.CallbacksTypes = NAnimationFrame.CallbacksTypes,
|
|
52
|
+
> extends Component <
|
|
53
|
+
StaticProp,
|
|
54
|
+
ChangeableProp,
|
|
55
|
+
CallbacksTypes
|
|
56
|
+
> {
|
|
57
|
+
/**
|
|
58
|
+
* If the frame is launched
|
|
59
|
+
*/
|
|
60
|
+
protected _isPlaying: boolean;
|
|
61
|
+
get isPlaying () {
|
|
62
|
+
return this._isPlaying;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The animation frame
|
|
67
|
+
*/
|
|
68
|
+
protected _frame: number | null;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Previous frame segment
|
|
73
|
+
*/
|
|
74
|
+
protected _frameIndex: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Timestamp
|
|
78
|
+
*/
|
|
79
|
+
protected _timeStamp: null | number;
|
|
80
|
+
/**
|
|
81
|
+
* Previous frame duration
|
|
82
|
+
*/
|
|
83
|
+
protected _prevFrameTime: null | number;
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
constructor (
|
|
88
|
+
initialProp?: (StaticProp & ChangeableProp),
|
|
89
|
+
init = true,
|
|
90
|
+
) {
|
|
91
|
+
super(initialProp, false);
|
|
92
|
+
|
|
93
|
+
this._isPlaying = false;
|
|
94
|
+
this._frame = null;
|
|
95
|
+
this._frameIndex = -1;
|
|
96
|
+
this._timeStamp = null;
|
|
97
|
+
this._prevFrameTime = null;
|
|
98
|
+
|
|
99
|
+
if (init) {
|
|
100
|
+
this.init();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get default properties
|
|
106
|
+
*/
|
|
107
|
+
protected _getDefaultProp <
|
|
108
|
+
T extends RequiredModuleProp<StaticProp & ChangeableProp>
|
|
109
|
+
> (): T {
|
|
110
|
+
return {
|
|
111
|
+
...super._getDefaultProp(),
|
|
112
|
+
fps: 140,
|
|
113
|
+
run: false,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Extra constructor
|
|
118
|
+
protected _constructor () {
|
|
119
|
+
super._constructor();
|
|
120
|
+
this._create();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Create the frame
|
|
127
|
+
*/
|
|
128
|
+
protected _create () {
|
|
129
|
+
if (this.prop.run) {
|
|
130
|
+
this.play();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
protected _onPropMutate () {
|
|
135
|
+
this._frameIndex = -1;
|
|
136
|
+
this._timeStamp = null;
|
|
137
|
+
this._prevFrameTime = null;
|
|
138
|
+
if (this.prop.run) {
|
|
139
|
+
this._play();
|
|
140
|
+
} else {
|
|
141
|
+
this._pause();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Launch the animation frame.
|
|
149
|
+
*/
|
|
150
|
+
public play () {
|
|
151
|
+
if (this.destroyed) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (this.prop.run) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.changeProp({
|
|
158
|
+
run: true,
|
|
159
|
+
} as ChangeableProp);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Launch the animation frame.
|
|
164
|
+
*/
|
|
165
|
+
protected _play () {
|
|
166
|
+
// check if already playing
|
|
167
|
+
if (this.isPlaying) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this._isPlaying = true;
|
|
171
|
+
// launch animation
|
|
172
|
+
this._frame = window.requestAnimationFrame(this._animate.bind(this));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Stop the animation frame
|
|
179
|
+
*/
|
|
180
|
+
public pause () {
|
|
181
|
+
if (!this.prop.run) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
this.changeProp({
|
|
185
|
+
run: false,
|
|
186
|
+
} as ChangeableProp);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Stop the animation frame
|
|
191
|
+
*/
|
|
192
|
+
protected _pause () {
|
|
193
|
+
if (!this.isPlaying) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
// cancel animation frame
|
|
197
|
+
if (this._frame) {
|
|
198
|
+
window.cancelAnimationFrame(this._frame);
|
|
199
|
+
this._frame = null;
|
|
200
|
+
}
|
|
201
|
+
// bool
|
|
202
|
+
this._isPlaying = false;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Launch the animation frame.
|
|
209
|
+
*/
|
|
210
|
+
protected _animate (
|
|
211
|
+
timestamp: number,
|
|
212
|
+
) {
|
|
213
|
+
if (!this._isPlaying) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// launch animation
|
|
218
|
+
this._frame = window.requestAnimationFrame(this._animate.bind(this));
|
|
219
|
+
|
|
220
|
+
// update variables
|
|
221
|
+
const currentTime = +new Date();
|
|
222
|
+
if (this._timeStamp == null) {
|
|
223
|
+
this._timeStamp = timestamp;
|
|
224
|
+
}
|
|
225
|
+
if (this._prevFrameTime == null) {
|
|
226
|
+
this._prevFrameTime = currentTime;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// calculate frame index
|
|
230
|
+
const newFrameIndex = Math.floor((timestamp - this._timeStamp) / (1000 / this.prop.fps));
|
|
231
|
+
if (newFrameIndex <= this._frameIndex) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// update frame index
|
|
236
|
+
this._frameIndex = newFrameIndex;
|
|
237
|
+
|
|
238
|
+
// calculate real fps
|
|
239
|
+
const timeDiff = currentTime - this._prevFrameTime;
|
|
240
|
+
const realFPS = boundVal(
|
|
241
|
+
timeDiff === 0 ? 1000 / 60 : Math.floor(1000 / timeDiff),
|
|
242
|
+
[1, Infinity],
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
// launch callbacks
|
|
246
|
+
this.callbacks.tbt('frame', {
|
|
247
|
+
fps: this.prop.fps,
|
|
248
|
+
realFPS,
|
|
249
|
+
prevFrameDuration: currentTime - this._prevFrameTime,
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
this._prevFrameTime = +new Date();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Destroy the animation frame
|
|
259
|
+
*/
|
|
260
|
+
protected _destroy () {
|
|
261
|
+
this.pause();
|
|
262
|
+
super._destroy();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { createElement } from 'vevet-dom';
|
|
2
|
+
import { Component, NComponent } from '../../base/Component';
|
|
3
|
+
import { NViewport } from '../../app/events/Viewport';
|
|
4
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export namespace NCtx2D {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Static properties
|
|
12
|
+
*/
|
|
13
|
+
export interface StaticProp extends NComponent.StaticProp {
|
|
14
|
+
/**
|
|
15
|
+
* The parent element of the canvas. If false, it will be Window.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
container?: false | Element;
|
|
19
|
+
/**
|
|
20
|
+
* Defines if you need to append the canvas element to the parent.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
append?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Update sizes on resize
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
updateOnResize?: boolean | keyof NViewport.CallbacksTypes;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Changeable properties
|
|
33
|
+
*/
|
|
34
|
+
export interface ChangeableProp extends NComponent.ChangeableProp {
|
|
35
|
+
/**
|
|
36
|
+
* The width of the canvas (dpr = 1).
|
|
37
|
+
* If false, the width will be the same as of the parent.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
width?: false | number;
|
|
41
|
+
/**
|
|
42
|
+
* The height of the canvas (dpr = 1).
|
|
43
|
+
* If false, the height will be the same as of the parent.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
height?: false | number;
|
|
47
|
+
/**
|
|
48
|
+
* Device pixel ratio.
|
|
49
|
+
* If false, the value will be calculated automatically.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
dpr?: false | number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Available callbacks
|
|
57
|
+
*/
|
|
58
|
+
export interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
59
|
+
'resize': false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Makes working with canvas easier.
|
|
68
|
+
* It creates an HTML5 Canvas element and its 2d context and can
|
|
69
|
+
* implement automatic resize.
|
|
70
|
+
*/
|
|
71
|
+
export class Ctx2D <
|
|
72
|
+
StaticProp extends NCtx2D.StaticProp = NCtx2D.StaticProp,
|
|
73
|
+
ChangeableProp extends NCtx2D.ChangeableProp = NCtx2D.ChangeableProp,
|
|
74
|
+
CallbacksTypes extends NCtx2D.CallbacksTypes = NCtx2D.CallbacksTypes,
|
|
75
|
+
> extends Component <
|
|
76
|
+
StaticProp,
|
|
77
|
+
ChangeableProp,
|
|
78
|
+
CallbacksTypes
|
|
79
|
+
> {
|
|
80
|
+
/**
|
|
81
|
+
* The parent container of the canvas
|
|
82
|
+
*/
|
|
83
|
+
get container () {
|
|
84
|
+
return this.prop.container;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The Canvas element itself
|
|
89
|
+
*/
|
|
90
|
+
protected _canvas: HTMLCanvasElement;
|
|
91
|
+
get canvas () {
|
|
92
|
+
return this._canvas;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 2D Context
|
|
97
|
+
*/
|
|
98
|
+
protected _ctx: CanvasRenderingContext2D;
|
|
99
|
+
get ctx () {
|
|
100
|
+
return this._ctx;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The width of the canvas
|
|
105
|
+
*/
|
|
106
|
+
protected _width: number;
|
|
107
|
+
get width () {
|
|
108
|
+
return this._width;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Canvas width without DPR
|
|
112
|
+
*/
|
|
113
|
+
get nonDPRWidth () {
|
|
114
|
+
return this.width / this.dpr;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The height of the canvas
|
|
119
|
+
*/
|
|
120
|
+
protected _height: number;
|
|
121
|
+
get height () {
|
|
122
|
+
return this._height;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Canvas height without DPR
|
|
126
|
+
*/
|
|
127
|
+
get nonDPRHeight () {
|
|
128
|
+
return this.height / this.dpr;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Device pixel ratio
|
|
133
|
+
*/
|
|
134
|
+
protected _dpr: number;
|
|
135
|
+
get dpr () {
|
|
136
|
+
return this._dpr;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
constructor (
|
|
142
|
+
initialProp?: (StaticProp & ChangeableProp),
|
|
143
|
+
init = true,
|
|
144
|
+
) {
|
|
145
|
+
super(initialProp, false);
|
|
146
|
+
|
|
147
|
+
// set default values
|
|
148
|
+
this._width = 0;
|
|
149
|
+
this._height = 0;
|
|
150
|
+
this._dpr = 1;
|
|
151
|
+
|
|
152
|
+
// create canvas
|
|
153
|
+
const { append, container } = this.prop;
|
|
154
|
+
const parent = (append && container) ? container as Element : undefined;
|
|
155
|
+
this._canvas = createElement('canvas', {
|
|
156
|
+
parent,
|
|
157
|
+
});
|
|
158
|
+
this._ctx = this._canvas.getContext('2d')!;
|
|
159
|
+
// and resize it for the first time
|
|
160
|
+
this.resize();
|
|
161
|
+
|
|
162
|
+
// initialize the class
|
|
163
|
+
if (init) {
|
|
164
|
+
this.init();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
protected _getDefaultProp <
|
|
169
|
+
T extends RequiredModuleProp<StaticProp & ChangeableProp>
|
|
170
|
+
> (): T {
|
|
171
|
+
return {
|
|
172
|
+
...super._getDefaultProp(),
|
|
173
|
+
container: false,
|
|
174
|
+
append: true,
|
|
175
|
+
updateOnResize: false,
|
|
176
|
+
width: false,
|
|
177
|
+
height: false,
|
|
178
|
+
dpr: false,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Set Module Events
|
|
183
|
+
protected _setEvents () {
|
|
184
|
+
super._setEvents();
|
|
185
|
+
if (this.prop.updateOnResize !== false) {
|
|
186
|
+
const viewportTarget: keyof NViewport.CallbacksTypes = typeof this.prop.updateOnResize === 'boolean' ? '' : this.prop.updateOnResize;
|
|
187
|
+
this.addViewportCallback(viewportTarget, () => {
|
|
188
|
+
this.resize();
|
|
189
|
+
});
|
|
190
|
+
this.resize();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
protected _onPropMutate () {
|
|
195
|
+
super._onPropMutate();
|
|
196
|
+
this.resize();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Resize the canvas
|
|
203
|
+
*/
|
|
204
|
+
public resize () {
|
|
205
|
+
// vars
|
|
206
|
+
const { prop, canvas } = this;
|
|
207
|
+
if (!canvas) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const app = this._app;
|
|
211
|
+
const { viewport } = app;
|
|
212
|
+
|
|
213
|
+
// calculate dpr
|
|
214
|
+
if (typeof prop.dpr === 'number') {
|
|
215
|
+
this._dpr = prop.dpr;
|
|
216
|
+
} else {
|
|
217
|
+
this._dpr = viewport.dpr;
|
|
218
|
+
}
|
|
219
|
+
const dpr = this._dpr;
|
|
220
|
+
|
|
221
|
+
// calculate new width & height
|
|
222
|
+
let newWidth = 0;
|
|
223
|
+
let newHeight = 0;
|
|
224
|
+
if (typeof prop.width === 'number' && typeof prop.height === 'number') {
|
|
225
|
+
newWidth = prop.width;
|
|
226
|
+
newHeight = prop.height;
|
|
227
|
+
} else if (this.container) {
|
|
228
|
+
newWidth = this.container.clientWidth;
|
|
229
|
+
newHeight = this.container.clientHeight;
|
|
230
|
+
} else {
|
|
231
|
+
newWidth = viewport.width;
|
|
232
|
+
newHeight = viewport.height;
|
|
233
|
+
}
|
|
234
|
+
newWidth *= dpr;
|
|
235
|
+
newHeight *= dpr;
|
|
236
|
+
|
|
237
|
+
// update sizes
|
|
238
|
+
this._width = newWidth;
|
|
239
|
+
this._height = newHeight;
|
|
240
|
+
|
|
241
|
+
// apply sizes
|
|
242
|
+
canvas.width = newWidth;
|
|
243
|
+
canvas.height = newHeight;
|
|
244
|
+
|
|
245
|
+
this.callbacks.tbt('resize', false);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Destroy the module
|
|
252
|
+
*/
|
|
253
|
+
protected _destroy () {
|
|
254
|
+
super._destroy();
|
|
255
|
+
|
|
256
|
+
if (this.canvas) {
|
|
257
|
+
this.canvas.remove();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { getPos, BaseProp, PosRule } from 'get-image-pos';
|
|
2
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
3
|
+
import { Ctx2D, NCtx2D } from './Ctx2D';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export namespace NCtx2DPrerender {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Static properties
|
|
11
|
+
*/
|
|
12
|
+
export interface StaticProp extends NCtx2D.StaticProp {
|
|
13
|
+
/**
|
|
14
|
+
* Media element
|
|
15
|
+
*/
|
|
16
|
+
media: BaseProp['source'] | false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Changeable properties
|
|
21
|
+
*/
|
|
22
|
+
export interface ChangeableProp extends NCtx2D.ChangeableProp {
|
|
23
|
+
/**
|
|
24
|
+
* Media position rule
|
|
25
|
+
*/
|
|
26
|
+
posRule?: PosRule;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Available callbacks
|
|
31
|
+
*/
|
|
32
|
+
export interface CallbacksTypes extends NCtx2D.CallbacksTypes {
|
|
33
|
+
'prerender': false
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The class allows you to prerender media for further use with reduced payloads.
|
|
42
|
+
*/
|
|
43
|
+
export class Ctx2DPrerender <
|
|
44
|
+
StaticProp extends NCtx2DPrerender.StaticProp = NCtx2DPrerender.StaticProp,
|
|
45
|
+
ChangeableProp extends NCtx2DPrerender.ChangeableProp = NCtx2DPrerender.ChangeableProp,
|
|
46
|
+
CallbacksTypes extends NCtx2DPrerender.CallbacksTypes = NCtx2DPrerender.CallbacksTypes,
|
|
47
|
+
> extends Ctx2D <
|
|
48
|
+
StaticProp,
|
|
49
|
+
ChangeableProp,
|
|
50
|
+
CallbacksTypes
|
|
51
|
+
> {
|
|
52
|
+
protected _getDefaultProp <
|
|
53
|
+
T extends RequiredModuleProp<StaticProp & ChangeableProp>
|
|
54
|
+
> (): T {
|
|
55
|
+
return {
|
|
56
|
+
...super._getDefaultProp(),
|
|
57
|
+
media: false,
|
|
58
|
+
posRule: 'cover',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Resize the canvas
|
|
64
|
+
*/
|
|
65
|
+
public resize () {
|
|
66
|
+
super.resize();
|
|
67
|
+
this._prerender();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
protected _prerender () {
|
|
71
|
+
// check if media exists
|
|
72
|
+
const { media } = this.prop;
|
|
73
|
+
if (!media) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// get media sizes
|
|
78
|
+
const size = getPos({
|
|
79
|
+
source: media,
|
|
80
|
+
rule: this.prop.posRule,
|
|
81
|
+
scale: 1,
|
|
82
|
+
width: this.width,
|
|
83
|
+
height: this.height,
|
|
84
|
+
});
|
|
85
|
+
this._ctx.clearRect(0, 0, this.width, this.height);
|
|
86
|
+
// render the media
|
|
87
|
+
this._ctx.drawImage(
|
|
88
|
+
media,
|
|
89
|
+
0, 0,
|
|
90
|
+
size.sourceWidth, size.sourceHeight,
|
|
91
|
+
size.x, size.y, size.width, size.height,
|
|
92
|
+
);
|
|
93
|
+
// launch callbacks on prerender
|
|
94
|
+
this.callbacks.tbt('prerender', false);
|
|
95
|
+
}
|
|
96
|
+
}
|