{"record":{"id":"884394216b5622cb","repo":"greensock/GSAP","slug":"please-gsap-registerplugin-customease-custombounc","errorCode":null,"errorMessage":"Please gsap.registerPlugin(CustomEase, CustomBounce)","messagePattern":"Please gsap\\.registerPlugin\\(CustomEase, CustomBounce\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/CustomBounce.js","lineNumber":20,"sourceCode":" * CustomBounce 3.15.0\n * https://gsap.com\n *\n * @license Copyright 2008-2026, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license\n * @author: Jack Doyle, jack@greensock.com\n*/\n/* eslint-disable */\n\nlet gsap, _coreInitted, createCustomEase,\n\t_getGSAP = () => gsap || (typeof(window) !== \"undefined\" && (gsap = window.gsap) && gsap.registerPlugin && gsap),\n\t_initCore = required => {\n\t\tgsap = _getGSAP();\n\t\tcreateCustomEase = gsap && gsap.parseEase(\"_CE\");\n\t\tif (createCustomEase) {\n\t\t\t_coreInitted = 1;\n\t\t\tgsap.parseEase(\"bounce\").config = vars => typeof(vars) === \"object\" ? _create(\"\", vars) : _create(\"bounce(\" + vars + \")\", {strength:+vars});\n\t\t} else {\n\t\t\trequired && console.warn(\"Please gsap.registerPlugin(CustomEase, CustomBounce)\");\n\t\t}\n\t},\n\t_normalizeX = a => { //scales all the x values in an array [x, y, x, y...] AND rounds them to the closest hundredth (decimal)\n\t\tlet l = a.length,\n\t\t\ts = 1 / a[l - 2],\n\t\t\trnd = 1000,\n\t\t\ti;\n\t\tfor (i = 2; i < l; i += 2) {\n\t\t\ta[i] = ~~(a[i] * s * rnd) / rnd;\n\t\t}\n\t\ta[l - 2] = 1; //in case there are any rounding errors. x should always end at 1.\n\t},\n\t_bonusValidated = 1, //<name>CustomBounce</name>\n\t_create = (id, vars) => {\n\t\tif (!_coreInitted) {\n\t\t\t_initCore(1);\n\t\t}\n\t\tvars = vars || {};","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/greensock/GSAP/blob/13e2b790546426a1a2e0e9b409f3f8dc6d6611f2/src/CustomBounce.js#L2-L38","documentation":"CustomBounce builds on CustomEase: _initCore looks for gsap.parseEase(\"_CE\"), which only exists after CustomEase is registered. If CustomEase (or gsap itself) is missing when CustomBounce is created/registered, it warns that both plugins must be registered. `required` gates the warning so passive registration doesn't spam.","triggerScenarios":"Creating a bounce ease (gsap.parseEase(\"bounce(...)\") config or CustomBounce.create) before gsap.registerPlugin(CustomEase, CustomBounce); or CustomEase not imported at all; or gsap not found on window.","commonSituations":"Registering only CustomBounce and forgetting CustomEase is a hard dependency; tree-shaking removed CustomEase; module import from wrong path so CustomEase never registers.","solutions":["Call gsap.registerPlugin(CustomEase, CustomBounce) before using bounce eases","Import both: `import { gsap, CustomEase, CustomBounce } from 'gsap/all'`","Confirm the gsap instance is the same one registered (single bundle copy)","If easing isn't needed yet, the warning is gated by `required` — ensure registration happens before first _create"],"exampleFix":"// before\ngsap.registerPlugin(CustomBounce);\ngsap.to('.el', {ease: CustomBounce.create('bounce', {strength: 0.5})});\n// after\ngsap.registerPlugin(CustomEase, CustomBounce);\ngsap.to('.el', {ease: CustomBounce.create('bounce', {strength: 0.5})});","handlingStrategy":"validation","validationCode":"if (!gsap || typeof gsap.parseEase('_CE') !== 'function') {\n  gsap.registerPlugin(CustomEase, CustomBounce);\n}","typeGuard":"function customBounceReady() {\n  return typeof gsap.parseEase === 'function' && typeof gsap.parseEase('_CE') === 'function';\n}","tryCatchPattern":null,"preventionTips":["Register CustomEase before CustomBounce (hard dependency)","Import both plugins from one gsap package","Run registration at module init, before any ease creation","Tree-shake-proof: import CustomEase explicitly"],"tags":["gsap","plugin-registration","customease","custombounce"],"backgroundTag":"gsap-plugin-not-registered","analyzedSha":"13e2b790546426a1a2e0e9b409f3f8dc6d6611f2","analyzedAt":"2026-08-29T08:34:05.027Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}