-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESM script base class #6367
base: main
Are you sure you want to change the base?
ESM script base class #6367
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
What would be the impact to users in terms of migrations or API changes? |
|
…PU (#6394) * Support for Picker on WebGPU * Gizmos example on webgpu * USDZ / GLTF exporter supports exposing of compressed textures on WebGPU * tiny comment update --------- Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
* SSAO engine example * lint * draco + texture resize: 17MB -> 6MB --------- Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
* [BREAKING] Removed backwards compatibility for few functions * lint --------- Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
* treeshake smallest enabled * ignore playcanvas PCUI from being treeshaken * treeshake ignore only pcui * added device type constants directly (no playcanvas dependency) * format rollup * word wrap fix * Updated PCUI * removed PCUI aliasing
…6593) Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
* New texture formats: R8 and RG8 * Apply suggestions from code review Co-authored-by: Will Eastcott <will@playcanvas.com> * deprecate the old constants --------- Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com> Co-authored-by: Will Eastcott <will@playcanvas.com>
* separated out grid code * split out selector and disabled deselection on orbiting * added type for observer set callback * fixed example page
* cleaned up ts and js config; adds debug and profiler to exports * set module resolution to node
* docs update * Update README.md --------- Co-authored-by: Will Eastcott <willeastcott@gmail.com>
New Script Base class
This PR adds a new base class
Script
to replace the currentScriptType
class which is incompatible with ESM class syntax.The
Script
class extracts a small subset of features fromScriptType
and keeps anything related toScriptAttributes
inScriptType
.ScriptType
now inherits fromScript
. This update minimizes the code changes required in the component system.Files Changes
script.js
renamed toscript-create.js
script.js
containsScript
base classscript-type.js
contains legacyScriptType
classAPI Changes
ScriptAttributes.rawToValue
is now exposed as a utility. This will also be used by the launcher pageScriptRegistry.addSchema
/getSchema
- This stores a map of the the attribute schema<scriptName, schema>
Tests
Passes the ScriptType tests in
npm run test:karma
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.