From ce26910ed44c19491ab7790fe482c39a26bd6ad2 Mon Sep 17 00:00:00 2001 From: rubydusa Date: Mon, 12 Jun 2023 17:34:55 +0300 Subject: [PATCH] docs: How to add support for ES6 syntax --- .../01-Working with Paper.js/tutorial.txt | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/content/07-Tutorials/01-Getting Started/01-Working with Paper.js/tutorial.txt b/content/07-Tutorials/01-Getting Started/01-Working with Paper.js/tutorial.txt index c463091..d7a6233 100644 --- a/content/07-Tutorials/01-Getting Started/01-Working with Paper.js/tutorial.txt +++ b/content/07-Tutorials/01-Getting Started/01-Working with Paper.js/tutorial.txt @@ -56,6 +56,38 @@ If we copy the inlined code to a file called js/myScript.js we can rewr +Depending on your installation method of paper.js, ES6 syntax might not work correctly. To fix this, you need to load a version of acorn.js that supports ES6 syntax: + + + + + + + + + + + + + + + + + + +The above example fetches acorn.js from the internet. You may also install acorn.js locally and import it from a file. + These attributes are supported in PaperScript \ tags: src="URL": The URL to load the PaperScript code from.