Closed saidmoya12 closed 1 month ago
thanks @saidmoya12 this is great! if you don't mind could you change the import to fully qualified (with .js
)
I think
import { Camera } from "@babylonjs/core/Cameras/camera"
would become:
import { Camera } from "@babylonjs/core/Cameras/camera.js"
// ^^
That's needed for compat with bundlers. I don't mind making that change just let me know and then I'll merge 😄
also, let me know if it's ok to at mention you in main readme as a contributor. thx
@saidmoya12 Do you have an example codepen or code sample for using it - would be cool to have a working page up for the hook in the docs.
Sounds great, but you can give me some example to install from my fork while isn't merge?
Thanks!
@saidmoya12 what about a codesandbox with current NPM version? I can add the sample to the new doc - it would be great to have an example of how to use the hooks. You could also just post some snippets of how you found those hooks useful here. If you wanted to do a codesandbox this may be a useful starting point: https://codesandbox.io/s/floral-water-els13w
you can also npm link
current version if you want to make a separate CRA example. the other option is to use the 'static' folder to make an example in the Gatsby site (I have no docs to run it yet), but the storybook site is currently broken - otherwise normally you can test out new features directly in the repo.
Thanks, I will working with it soon!
hi @saidmoya12 - sorry i didn't merge this earlier. i think i was waiting on a sample from you and then... ⏲️ anyway. Better late then never! Thank-you for your contribution.
hi @saidmoya12 - sorry i didn't merge this earlier. i think i was waiting on a sample from you and then... ⏲️ anyway. Better late then never! Thank-you for your contribution.
implement of useBeforeCameraRender and useAfterCameraRender to work with multiple cameras like VR eyes
This is an easy alternative to get active shader for camera
useBeforeCameraRender is used in textureDome (PhotoDome) to check current eye of camera https://github.com/BabylonJS/Babylon.js/blob/fdbf393d1d7699dc7cc69cec1dca0819ebd2622a/packages/dev/core/src/Helpers/textureDome.ts