Physics2DPlugin3加载后会跳转gsap官网解决

因工作需要使用Physics2DPlugin3库,目标效果
加载他里面的在线js,使用效果正常,但是几秒会跳转官网,我们app内部、浏览器都会这样。
于是研究js代码,发现里面有setTimeout跳转。
在这里插入图片描述

删掉就好了
分享我改好的文件:

/** !* Physics2DPlugin 3.12.3* https://greensock.com** @license Copyright 2023, GreenSock. All rights reserved.* *** DO NOT DEPLOY THIS FILE **** This is a trial version that only works locally and on domains like codepen.io and codesandbox.io.* Loading it on an unauthorized domain violates the license and will cause a redirect.* Get the unrestricted file by joining Club GreenSock at https://greensock.com/club* @author: Jack Doyle, jack@greensock.com*/
/* eslint-disable */
!(function (n, e) {'object' == typeof exports && 'undefined' != typeof module? e(exports): 'function' == typeof define && define.amd? define(['exports'], e): e(((n = n || self).window = n.window || {}))
})(this, function (e) {'use strict'function j() {return (r ||('undefined' != typeof window &&(r = window.gsap) &&r.registerPlugin &&r))}function k(n) {return Math.round(1e4 * n) / 1e4}function n() {return String.fromCharCode.apply(null, arguments)}function s(n) {;(r = n || j()),d ||((a = r.utils.getUnit),(u = r.core.getStyleSaver),(y = r.core.reverting || function () {}),(d = 1))}function t(n, e, t, i, s) {var o = n._gsap,r = o.get(n, e);(this.p = e),(this.set = o.set(n, e)),(this.s = this.val = parseFloat(r)),(this.u = a(r) || 0),(this.vel = t || 0),(this.v = this.vel / s),i || 0 === i? ((this.acc = i), (this.a = this.acc / (s * s))): (this.acc = this.a = 0)}var r,d,a,u,y,v = Math.PI / 180,c = 'Physics2DPlugin',l = n(103, 114, 101, 101, 110, 115, 111, 99, 107, 46, 99, 111, 109),p = n(103, 115, 97, 112, 46, 99, 111, 109),f = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}:?\d*$/,i =(function (e) {var t = 'undefined' != typeof window,i =0 ===(t ? window.location.href : '').indexOf(n(102, 105, 108, 101, 58, 47, 47)) ||-1 !== e.indexOf(n(108, 111, 99, 97, 108, 104, 111, 115, 116)) ||f.test(e),s = [l,p,n(99, 111, 100, 101, 112, 101, 110, 46, 105, 111),n(99,111,100,101,112,101,110,46,112,108,117,109,98,105,110,103),n(99, 111, 100, 101, 112, 101, 110, 46, 100, 101, 118),n(99, 111, 100, 101, 112, 101, 110, 46, 97, 112, 112),n(99,111,100,101,112,101,110,46,119,101,98,115,105,116,101),n(112, 101, 110, 115, 46, 99, 108, 111, 117, 100),n(99, 115, 115, 45, 116, 114, 105, 99, 107, 115, 46, 99, 111, 109),n(99, 100, 112, 110, 46, 105, 111),n(112, 101, 110, 115, 46, 105, 111),n(103, 97, 110, 110, 111, 110, 46, 116, 118),n(99, 111, 100, 101, 99, 97, 110, 121, 111, 110, 46, 110, 101, 116),n(116,104,101,109,101,102,111,114,101,115,116,46,110,101,116),n(99, 101, 114, 101, 98, 114, 97, 120, 46, 99, 111, 46, 117, 107),n(116, 121, 109, 112, 97, 110, 117, 115, 46, 110, 101, 116),n(116, 119, 101, 101, 110, 109, 97, 120, 46, 99, 111, 109),n(112, 108, 110, 107, 114, 46, 99, 111),n(104, 111, 116, 106, 97, 114, 46, 99, 111, 109),n(119, 101, 98, 112, 97, 99, 107, 98, 105, 110, 46, 99, 111, 109),n(97, 114, 99, 104, 105, 118, 101, 46, 111, 114, 103),n(99, 111, 100, 101, 115, 97, 110, 100, 98, 111, 120, 46, 105, 111),n(99, 115, 98, 46, 97, 112, 112),n(115, 116, 97, 99, 107, 98, 108, 105, 116, 122, 46, 99, 111, 109),n(115, 116, 97, 99, 107, 98, 108, 105, 116, 122, 46, 105, 111),n(99, 111, 100, 105, 101, 114, 46, 105, 111),n(109,111,116,105,111,110,116,114,105,99,107,115,46,99,111,109),n(115,116,97,99,107,111,118,101,114,102,108,111,119,46,99,111,109),n(115,116,97,99,107,101,120,99,104,97,110,103,101,46,99,111,109),n(115,116,117,100,105,111,102,114,101,105,103,104,116,46,99,111,109),n(119,101,98,99,111,110,116,97,105,110,101,114,46,105,111),n(106, 115, 102, 105, 100, 100, 108, 101, 46, 110, 101, 116),],o = s.lengthfor (setTimeout(function checkWarn() {if (t)if ('loading' === document.readyState ||'interactive' === document.readyState)document.addEventListener('readystatechange', checkWarn)else {document.removeEventListener('readystatechange', checkWarn)var e = 'object' == typeof r ? r : t && window.gsapt &&window.console &&!window._gsapWarned &&'object' == typeof e &&!1 !== e.config().trialWarn &&(console.log(n(37, 99, 87, 97, 114, 110, 105, 110, 103),n(102,111,110,116,45,115,105,122,101,58,51,48,112,120,59,99,111,108,111,114,58,114,101,100,59)),console.log(n(65,32,116,114,105,97,108,32,118,101,114,115,105,111,110,32,111,102,32) +c +n(32,105,115,32,108,111,97,100,101,100,32,116,104,97,116,32,111,110,108,121,32,119,111,114,107,115,32,108,111,99,97,108,108,121,32,97,110,100,32,111,110,32,100,111,109,97,105,110,115,32,108,105,107,101,32,99,111,100,101,112,101,110,46,105,111,32,97,110,100,32,99,111,100,101,115,97,110,100,98,111,120,46,105,111,46,32,42,42,42,32,68,79,32,78,79,84,32,68,69,80,76,79,89,32,84,72,73,83,32,70,73,76,69,32,42,42,42,32,76,111,97,100,105,110,103,32,105,116,32,111,110,32,97,110,32,117,110,97,117,116,104,111,114,105,122,101,100,32,115,105,116,101,32,118,105,111,108,97,116,101,115,32,116,104,101,32,108,105,99,101,110,115,101,32,97,110,100,32,119,105,108,108,32,99,97,117,115,101,32,97,32,114,101,100,105,114,101,99,116,46,32,80,108,101,97,115,101,32,106,111,105,110,32,67,108,117,98,32,71,114,101,101,110,83,111,99,107,32,116,111,32,103,101,116,32,102,117,108,108,32,97,99,99,101,115,115,32,116,111,32,116,104,101,32,98,111,110,117,115,32,112,108,117,103,105,110,115,32,116,104,97,116,32,98,111,111,115,116,32,121,111,117,114,32,97,110,105,109,97,116,105,111,110,32,115,117,112,101,114,112,111,119,101,114,115,46,32,68,105,115,97,98,108,101,32,116,104,105,115,32,119,97,114,110,105,110,103,32,119,105,116,104,32,103,115,97,112,46,99,111,110,102,105,103,40,123,116,114,105,97,108,87,97,114,110,58,32,102,97,108,115,101,125,41,59)),console.log(n(37,99,71,101,116,32,117,110,114,101,115,116,114,105,99,116,101,100,32,102,105,108,101,115,32,97,116,32,104,116,116,112,115,58,47,47,103,114,101,101,110,115,111,99,107,46,99,111,109,47,99,108,117,98),n(102,111,110,116,45,115,105,122,101,58,49,54,112,120,59,99,111,108,111,114,58,35,52,101,57,56,49,53)),(window._gsapWarned = 1))}}, 50);-1 < --o;)if (-1 !== e.indexOf(s[o])) returni},{version: '3.12.3',name: 'physics2D',register: s,init: function init(n, e, i) {d || s()var o = this,r = +e.angle || 0,a = +e.velocity || 0,c = +e.acceleration || 0,l = e.xProp || 'x',p = e.yProp || 'y',f =e.accelerationAngle || 0 === e.accelerationAngle? +e.accelerationAngle: r;(o.styles =u &&u(n,e.xProp && 'x' !== e.xProp ? e.xProp + ',' + e.yProp : 'transform')),(o.target = n),(o.tween = i),(o.step = 0),(o.sps = 30),e.gravity && ((c = +e.gravity), (f = 90)),(r *= v),(f *= v),(o.fr = 1 - (+e.friction || 0)),o._props.push(l, p),(o.xp = new t(n, l, Math.cos(r) * a, Math.cos(f) * c, o.sps)),(o.yp = new t(n, p, Math.sin(r) * a, Math.sin(f) * c, o.sps)),(o.skipX = o.skipY = 0)},render: function render(n, e) {var t,i,s,o,r,a,c = e.xp,l = e.yp,p = e.tween,f = e.target,d = e.step,u = e.sps,v = e.fr,h = e.skipX,g = e.skipY,w = p._from ? p._dur - p._time : p._timeif (p._time || !y()) {if (1 === v)(s = w * w * 0.5),(t = c.s + c.vel * w + c.acc * s),(i = l.s + l.vel * w + l.acc * s)else {for (o = a = (0 | (w *= u)) - d,a < 0 &&((c.v = c.vel / u),(l.v = l.vel / u),(c.val = c.s),(l.val = l.s),(o = a = (e.step = 0) | w)),r = (w % 1) * v;a--;)(c.v += c.a),(l.v += l.a),(c.v *= v),(l.v *= v),(c.val += c.v),(l.val += l.v);(t = c.val + c.v * r), (i = l.val + l.v * r), (e.step += o)}h || c.set(f, c.p, k(t) + c.u), g || l.set(f, l.p, k(i) + l.u)} else e.styles.revert()},kill: function kill(n) {this.xp.p === n && (this.skipX = 1),this.yp.p === n && (this.skipY = 1)},})j() && r.registerPlugin(i), (e.Physics2DPlugin = i), (e.default = i)if (typeof window === 'undefined' || window !== e) {Object.defineProperty(e, '__esModule', {value: !0})} else {delete e.default}
})

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/156734.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Qwt 使用QwtDial绘制汽车仪表盘

1.概述 QwtDial是Qwt库中的一个类&#xff0c;用于绘制一个可旋转的仪表盘。 以下是类继承关系&#xff1a; 2.常用方法 void setOrigin(double origin) 设置仪表盘的原点角度&#xff0c;以度为单位&#xff0c;默认为0度&#xff0c;正值为逆时针旋转&#xff0c;负值为顺时…

探索C++中的不变之美:const与构造函数的深度剖析

W...Y的主页&#x1f60a; 代码仓库分享&#x1f495; &#x1f354;前言&#xff1a; 关于C的博客中&#xff0c;我们已经了解了六个默认函数中的四个&#xff0c;分别是构造函数、析构函数、拷贝构造函数以及函数的重载。但是这些函数都是有返回值与参数的。提到参数与返回…

MySQL启动后反复重新启动故障

MySQL版本为5.6.45 系统为Ubuntu 20.04 LTS 该服务器重启后&#xff0c;MySQL需要手动执行启动。 运行执行脚本后发现异常&#xff0c;如下图&#xff1a; 提示MySQL服务在不停重复启动。 反复使用ps -ef |grep mysql命令查看&#xff0c;发现mysql进程号一直在变化&#x…

Qlik Sense Enterprise 忘记PostgreSQL密码

在 Windows 上安装 Qlik Sense Enterprise 期间会提供密码。如果您忘记了该密码&#xff0c;则无法找回&#xff1b;但是&#xff0c;可以按照以下步骤重置密码。 如何在 Qlik 中重置忘记的 PostgreSQL 密码... - Qlik Community - 1712725 如果该过程完成后记录了密码错误的…

信号、进程、线程、I/O介绍

文章目录 信号进程进程通信线程可/不可重入函数线程同步互斥锁条件变量自旋锁读写锁 I/O操作阻塞/非阻塞I/OI/O多路复用存储映射I/O 信号 信号是事件发生时对进程的通知机制&#xff0c;可以看做软件中断。信号与硬件中断的相似之处在于其能够打断程序当前执行的正常流程。大多…

分享一下怎么做一个商城小程序

如何制作一个商城小程序&#xff1a;功能解析、设计思路与实现方法 一、引言 随着移动设备的普及和微信小程序的兴起&#xff0c;越来越多的消费者选择在商城小程序上进行购物。商城小程序具有便捷、高效、即用即走等特点&#xff0c;为企业提供了新的销售渠道和推广方式。本…

回归预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积神经网络-支持向量机的多输入单输出回归预测

回归预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积神经网络-支持向量机的多输入单输出回归预测 目录 回归预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积神经网络-支持向量机的多输入单输出回归预测效果一览基本介绍程序设计参考资料 效果一览 基本介绍 1.WOA-CNN-SVM鲸鱼算法…

关于嵌入式rtthread系统与单片机芯片

简介 我估计已经有很久没更新了&#xff0c;近一年都在某个国企里工作&#xff0c;我做的就是嵌入式工程师的岗位&#xff0c;最近才刚刚退出来&#xff0c;想来说说自己的工作使用的软件和系统。 本身进公司的时候&#xff0c;其实做的就是写单片机的板子的程序的工作&#x…

如何优雅地单元测试 Kotlin/Java 中的 private 方法?

翻译自 https://medium.com/mindorks/how-to-unit-test-private-methods-in-java-and-kotlin-d3cae49dccd ❓如何单元测试 Kotlin/Java 中的 private 方法❓ 首先&#xff0c;开发者应该测试代码里的 private 私有方法吗&#xff1f; 直接信任这些私有方法&#xff0c;测试到…

【Linux】Nginx安装使用负载均衡及动静分离(前后端项目部署),前端项目打包

一、Nginx导言 1、引言 Nginx 是一款高性能的 Web 服务器和反向代理服务器&#xff0c;也可以充当负载均衡器、HTTP 缓存和安全防护设备。它的特点是内存占用小、稳定性高、并发性强、易于扩展&#xff0c;因此在互联网领域得到了广泛的使用。 总结出以下三点: 负载均衡&#x…

【MySQL进阶之路丨第十四篇】一文带你精通MySQL重复数据及SQL注入

引言 在上一篇中我们介绍了MySQL ALTER命令及序列使用&#xff1b;在开发中&#xff0c;对MySQL重复数据的处理是十分重要的。这一篇我们使用命令行方式来帮助读者掌握MySQL中重复数据的操作。 上一篇链接&#xff1a;【MySQL进阶之路丨第十三篇】一文带你精通MySQL之ALTER命令…

最新Ai智能创作系统源码V3.0,AI绘画系统/支持GPT联网提问/支持Prompt应用+搭建部署教程

一、AI创作系统 SparkAi创作系统是基于OpenAI很火的ChatGPT进行开发的Ai智能问答系统和Midjourney绘画系统&#xff0c;支持OpenAI-GPT全模型国内AI全模型。本期针对源码系统整体测试下来非常完美&#xff0c;可以说SparkAi是目前国内一款的ChatGPT对接OpenAI软件系统。那么如…