-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Patch#2: DefineModule, StateModule #259
Conversation
README.md
Outdated
@@ -77,7 +77,7 @@ You can find lots of examples at [showcases](https://whs-dev.surge.sh/examples/) | |||
const app = new WHS.App([ | |||
new WHS.ElementModule(), // attach to DOM | |||
new WHS.SceneModule(), // creates THREE.Scene instance | |||
new WHS.CameraModule(), // creates PerspectiveCamera instance | |||
new WHS.DefineModule('camera', new WHS.PerspectiveCamera()), // creates PerspectiveCamera instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to be careful with updating readme, (well doc too if we publish early) as this module is not available with beta releases yet.
@@ -3,14 +3,14 @@ import * as UTILS from '../../globals'; | |||
const ad = UTILS.appDefaults; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this example was broken btw. not sure perhaps we should remove it, the area light from three.js is an odd one.
package.json
Outdated
@@ -31,6 +31,7 @@ | |||
"license": "MIT", | |||
"homepage": "https://github.com/WhitestormJS/whitestorm.js#readme", | |||
"dependencies": { | |||
"@types/node": "^7.0.32", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
@@ -16,8 +16,8 @@ test('SceneModule', () => { | |||
modules.scene = new WHS.SceneModule(); | |||
}); | |||
|
|||
test('CameraModule', () => { | |||
modules.camera = new WHS.CameraModule(); | |||
test('DefineModule', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we modify classes, I think we should try to add proper tests/assertions.
Maybe just check that data was populated with the passed in param (PerspectiveCamera), with the passed name?
This PR is not yet complete and please do not merge it yet.
Patch includes:
DefineModule
- replaces modules asCameraModule
camera: {}
andlight: {}
.StateModule
ElementModule
new ElementModule(domObject)
ModuleManager
manager.require
manager.require
whitestorm.js
->whs.js
Circle
&Cone
added