-
I'm using version v0.27.0. How can i reach the clamp() function. I can't import Math. |
Beta Was this translation helpful? Give feedback.
Answered by
eonarheim
Mar 16, 2023
Replies: 1 comment 1 reply
-
Hi @bpikaar Great question, If you include excalibur.js as a script on the page it will be hanging off of the <!DOCTYPE html>
<html>
<head></head>
<body>
<script src="https://unpkg.com/[email protected]"></script>
<script src="./main.js"></script>
</body>
</html> // main.js
console.log(ex.clamp(6, 0, 4)); Let me know if this helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bpikaar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @bpikaar
Great question,
clamp()
is available at the top level import if you are doing commonjs style modulesIf you include excalibur.js as a script on the page it will be hanging off of the
ex
global.Let me know if this helps!