-
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
Examples Rework #6030
Comments
This was considered during last refactoring, but at the end keeping all / as much code required to run the example in the same file was decided is a good way to show people what needs to be done to get an app running, as examples are in a way tutorials too. Kind of self contained examples, similar to a completely self-contained html files examples used to be a long time ago. |
Love the idea of Few other points could do with more information as well to make it more clear what the goal here is. |
It would be great if we can remove the direct dependancy on the |
The examples no longer need to build the engine first. Just |
But |
IIRC the only missing thing is the engine |
Currently the example code, shows the core of the example stuff, but at the same time, it is not easily replicable from the scratch. In contrast, three.js example - is a html file, with everything in it, you can just take it and experiment with it, without need of complex build processes, understanding of project structure, etc. |
The PCUI examples browser is like that: |
I just wanted to update my RTI pull request and running into regressions:
Examples Lines 24 to 28 in d807226
( |
|
Thank you for the feedback @kpal81xd! I still can't get it to work on my machine, can you test this? cd examples
npm run clean
ENGINE_PATH=../build/playcanvas.mjs npm run build Then I get this error: |
Not sure if it has any effect @kungfooman @kpal81xd, but would the new ESM build have changed this? Previously Unrelated (more out of curiosity) but can |
I don't think it's related to the bundle/dir rewrite, it should still work (I edited
(that worked through my refactor to cut down on build time for quick/explorative coding, unsure about current situation because of the error I get) |
Standalone example path's also seem to be broken, repro:
It used to work: https://pc.runtimetypeinspector.org/iframe/Graphics_LightsBakedAO.html |
Ahh I see so ENGINE_PATH expected an unpacked version of the engine (i.e. a folder) with the entry point being index.js. I should be able to support both these however in the build script |
This issue is for the discussion of reworking the examples to make the development and experimentation experience easier. Stage 1 of the refactor and cleanup has already been completed and merged in #6005.
Stage 1
Stage 2
example
andcontrols
functionsimports
Stage 3
jsx
wrapper for controls to use jsx components (Will probably require PCUI rebuild/state optimisation)The text was updated successfully, but these errors were encountered: