Comments (15)
Currently the example code, shows the core of the example stuff, but at the same time, it is not easily replicable from the scratch.
Maybe it is not related to examples, but amount of build processes, the wrapping, lack of debugging and proper error handling - all this moves away from users being able to take an example, and expand from it.
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.
from engine.
- Abstract app configuration into separate file (boilerplate code)
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.
from engine.
Love the idea of imports
, and would appreciate some more details on what you're hoping to do this, what the end goal is.
Few other points could do with more information as well to make it more clear what the goal here is.
from engine.
It would be great if we can remove the direct dependancy on the node_modules
of the engine, and just symlink it directly using npm workspace which doesn't require building the parent engine first
from engine.
The examples no longer need to build the engine first. Just npm run develop
in the examples, that builds the engine it needs.
from engine.
But npm run build
in example doesn't work unless you build the engine first.
from engine.
IIRC the only missing thing is the engine playcanvas.d.ts
generation for Monaco examples editor to make /examples/
fully standalone, which would be nice to add here too
from engine.
The PCUI examples browser is like that:
https://github.com/playcanvas/pcui/tree/main/examples
from engine.
I just wanted to update my RTI pull request and running into regressions:
ENGINE_PATH
doesn't seem to work any longer- Loading an UMD build doesn't seem to work any longer
- Edits in
examples/scripts/standalone-html.mjs
are not reflected during anpm run develop
session
Examples README.md
needs a little change:
Lines 24 to 28 in d807226
(build/playcanvas.mjs
is now our bundled file)
from engine.
I just wanted to update my RTI pull request and running into regressions:
ENGINE_PATH
doesn't seem to work any longer- Loading an UMD build doesn't seem to work any longer
- Edits in
examples/scripts/standalone-html.mjs
are not reflected during anpm run develop
sessionExamples
README.md
needs a little change:Lines 24 to 28 in d807226
(
build/playcanvas.mjs
is now our bundled file)
ENGINE_PATH
seems to work fine for me so long as its a ESM build of the engine (UMD is not supported anymore)- Yea the
standalone-html.mjs
only triggers a rollup rebuild, standalone files are generated via a script so this needs to be changes
from engine.
ENGINE_PATH
seems to work fine for me so long as its a ESM build of the engine (UMD is not supported anymore)
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:
from engine.
Not sure if it has any effect @kungfooman @kpal81xd, but would the new ESM build have changed this? Previously ../build/playcanvas.mjs
was a directory and now it's the bundled version?
Unrelated (more out of curiosity) but can ENGINE_PATH
now point directly to src
?
from engine.
I don't think it's related to the bundle/dir rewrite, it should still work (I edited ENGINE_PATH
using [TAB]
-completion to make sure the path is right)
Unrelated (more out of curiosity) but can
ENGINE_PATH
now point directly tosrc
?
(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)
from engine.
Standalone example path's also seem to be broken, repro:
npm run develop
- open http://localhost:5000/iframe/graphics_lights-baked-a-o.html
It used to work: https://pc.runtimetypeinspector.org/iframe/Graphics_LightsBakedAO.html
from engine.
ENGINE_PATH
seems to work fine for me so long as its a ESM build of the engine (UMD is not supported anymore)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:
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
from engine.
Related Issues (20)
- WebXR Light Estimation - Reflection Cube Map
- Polyfills should be a build step only HOT 7
- Some debug draw methods are hidden HOT 1
- Optimize shader generation / processing / compilation
- Investigate running engine examples in WebGPU mode using Safari HOT 1
- Bayer matrix HOT 2
- Stopped working with SvelteKit / Vite SSR HOT 5
- Material clone/copy does not preserve custom shader parameters
- Mouse events during frame update HOT 1
- Exception noted when using bloom renderpass HOT 7
- Implement support for WebXR Space Warp
- Implement KHR_materials_dispersion glTF extension support
- `app.xr.input` `add` event does not fire in `pc.XRTYPE_AR` (`immersive-ar`) mode HOT 2
- Implement KHR_materials_anisotropy glTF extension support
- pc.app is null in ESM build HOT 4
- 1.69.0 context loss crash
- Draco throws HOT 1
- Invalid Anim curves counting
- 1.69.0 Install error - Node 16.0 HOT 10
- Implement material level uniform buffer (WebGPU initially) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.