()
| 66773 | var statIdCounter = 0; |
| 66774 | var AnimationLoop = function() { |
| 66775 | function AnimationLoop1() { |
| 66776 | var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 66777 | (0, _classCallCheckDefault.default)(this, AnimationLoop1); |
| 66778 | var _props$onCreateContex = props.onCreateContext, onCreateContext = _props$onCreateContex === void 0 ? function(opts) { |
| 66779 | return (0, _gltools.createGLContext)(opts); |
| 66780 | } : _props$onCreateContex, _props$onAddHTML = props.onAddHTML, onAddHTML = _props$onAddHTML === void 0 ? null : _props$onAddHTML, _props$onInitialize = props.onInitialize, onInitialize = _props$onInitialize === void 0 ? function() {} : _props$onInitialize, _props$onRender = props.onRender, onRender = _props$onRender === void 0 ? function() {} : _props$onRender, _props$onFinalize = props.onFinalize, onFinalize = _props$onFinalize === void 0 ? function() {} : _props$onFinalize, onError = props.onError, _props$gl = props.gl, gl = _props$gl === void 0 ? null : _props$gl, _props$glOptions = props.glOptions, glOptions = _props$glOptions === void 0 ? {} : _props$glOptions, _props$debug = props.debug, debug = _props$debug === void 0 ? false : _props$debug, _props$createFramebuf = props.createFramebuffer, createFramebuffer = _props$createFramebuf === void 0 ? false : _props$createFramebuf, _props$autoResizeView = props.autoResizeViewport, autoResizeViewport = _props$autoResizeView === void 0 ? true : _props$autoResizeView, _props$autoResizeDraw = props.autoResizeDrawingBuffer, autoResizeDrawingBuffer = _props$autoResizeDraw === void 0 ? true : _props$autoResizeDraw, _props$stats = props.stats, stats = _props$stats === void 0 ? (0, _webgl.lumaStats).get("animation-loop-".concat(statIdCounter++)) : _props$stats; |
| 66781 | var _props$useDevicePixel = props.useDevicePixels, useDevicePixels = _props$useDevicePixel === void 0 ? true : _props$useDevicePixel; |
| 66782 | if ("useDevicePixelRatio" in props) { |
| 66783 | (0, _webgl.log).deprecated("useDevicePixelRatio", "useDevicePixels")(); |
| 66784 | useDevicePixels = props.useDevicePixelRatio; |
| 66785 | } |
| 66786 | this.props = { |
| 66787 | onCreateContext: onCreateContext, |
| 66788 | onAddHTML: onAddHTML, |
| 66789 | onInitialize: onInitialize, |
| 66790 | onRender: onRender, |
| 66791 | onFinalize: onFinalize, |
| 66792 | onError: onError, |
| 66793 | gl: gl, |
| 66794 | glOptions: glOptions, |
| 66795 | debug: debug, |
| 66796 | createFramebuffer: createFramebuffer |
| 66797 | }; |
| 66798 | this.gl = gl; |
| 66799 | this.needsRedraw = null; |
| 66800 | this.timeline = null; |
| 66801 | this.stats = stats; |
| 66802 | this.cpuTime = this.stats.get("CPU Time"); |
| 66803 | this.gpuTime = this.stats.get("GPU Time"); |
| 66804 | this.frameRate = this.stats.get("Frame Rate"); |
| 66805 | this._initialized = false; |
| 66806 | this._running = false; |
| 66807 | this._animationFrameId = null; |
| 66808 | this._nextFramePromise = null; |
| 66809 | this._resolveNextFrame = null; |
| 66810 | this._cpuStartTime = 0; |
| 66811 | this.setProps({ |
| 66812 | autoResizeViewport: autoResizeViewport, |
| 66813 | autoResizeDrawingBuffer: autoResizeDrawingBuffer, |
| 66814 | useDevicePixels: useDevicePixels |
| 66815 | }); |
| 66816 | this.start = this.start.bind(this); |
| 66817 | this.stop = this.stop.bind(this); |
| 66818 | this._pageLoadPromise = null; |
| 66819 | this._onMousemove = this._onMousemove.bind(this); |
| 66820 | this._onMouseleave = this._onMouseleave.bind(this); |
| 66821 | } |
| 66822 | (0, _createClassDefault.default)(AnimationLoop1, [ |
| 66823 | { |
| 66824 | key: "delete", |
nothing calls this directly
no test coverage detected