Patch #1: VRKit, ModuleManager, PostProcessor#252
Conversation
modules/whs-vrkit/package.json
Outdated
| "name": "whs-vrkit", | ||
| "main": "build/VRKit.js", | ||
| "scripts": { | ||
| "build": "webpack", |
There was a problem hiding this comment.
this won't work unless webpack is installed globally.
modules/whs-vrkit/README.md
Outdated
| const app = new WHS.App([ | ||
| new WHS.ElementModule(), // This module is required | ||
| // other modules | ||
| new StatsModule(StatsModule.codes.fps) // or just "0" |
| new WHS.ElementModule(), // This module is required | ||
| // other modules | ||
| new StatsModule(StatsModule.codes.fps) // or just "0" | ||
| new VRKit.VRModule() // enables VR |
There was a problem hiding this comment.
OK ignore my other comment.
| new WHS.ResizeModule(), | ||
| new StatsModule(), | ||
| new VRKit.VRModule(), | ||
| // postprocessor |
There was a problem hiding this comment.
let's remove commented out code.
There was a problem hiding this comment.
@hirako2000 It will be used when we'll make post-processing work with VREffect.
| // // .name('MyShader') | ||
| // .renderToScreen(); | ||
|
|
||
| const sphere = new WHS.Sphere({ // Create sphere comonent. |
There was a problem hiding this comment.
typo, and no need for a comment imo
| @@ -0,0 +1,149 @@ | |||
| /** | |||
There was a problem hiding this comment.
looks like this lib is on npm. maybe use it as a dep instead?
https://github.com/halvves/three-vrcontrols-module
src/modules/app/RenderingModule.js
Outdated
|
|
||
| play() { | ||
| this.renderLoop.start(); | ||
| // this.renderLoop.start(); |
| export * from './RenderingModule'; | ||
| export * from './SceneModule'; | ||
| export * from './ResizeModule'; | ||
| export * from './PostProcessorModule'; |
There was a problem hiding this comment.
that would break the API
| @@ -0,0 +1,186 @@ | |||
| /** | |||
There was a problem hiding this comment.
I think we should publish code like this if not already on npm yet.
There was a problem hiding this comment.
@hirako2000 No need. @mrdoob says VR API in Three.js will be changed soon. No more even VREffect & VRControls
| ); | ||
|
|
||
| export default { | ||
| devtool: isProduction ? '#hidden-source-map' : '#source-map', |
There was a problem hiding this comment.
Yes, I saw it somewhere:)
.define(),.use()postprocessingnpm module.shader(),.pass()API changes
manager.define("name"). Adds module to modules list with this name. Is optional for modules without much API.manager.get('renderer', true)->manager.use('rendering')postprocessor.shader(material)- MakesShaderPassfrom material automatically and uses it.postprocessor.pass(pass)- Adds a pass.postprocessor.renderToScreen()- Make this pass be rendered to screen.postprocessor.name(name)- Name current pass.postprocessor.to(name)- Change current pass.Examples added
VRKit/basicVRKit/controlsVRKit/postprocessing(work in progress)