-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add AmbientLights to bitecs #5918
Conversation
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.
Don't feel super strong since I want to deprecate light components, but we should probably carry forward the defaults. Otherwise, LGTM
src/bit-components.js
Outdated
@@ -47,6 +47,7 @@ export const AEntity = defineComponent(); | |||
export const Object3DTag = defineComponent(); | |||
export const GLTFModel = defineComponent(); | |||
export const LightTag = defineComponent(); | |||
export const AmbientLight = defineComponent(); |
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 might want to call this AmbientLightTag
just to avoid ambiguity and having to rename when importing AmbientLight
from Three.
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.
Updated, thanks
intensity: number; | ||
}; | ||
|
||
export function inflateAmbientLight(world: HubsWorld, eid: number, params: AmbientLightParams) { |
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.
In the aframe component we have default values. We probably want to preserve those. https://github.com/mozilla/hubs/blob/master/src/components/ambient-light.js#L3-L4
We can do this easily with Object.assign()
like https://github.com/mozilla/hubs/blob/master/src/inflators/simple-water.ts#L34
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.
Updated, thanks
Deprecate light components and encourage glTF lights extension instead? If so, yes I absolutely agree. |
8983e58
to
8f79ccb
Compare
8f79ccb
to
9e54209
Compare
This PR adds
AmbientLights
to bitecs in the same way asDirectionalLight
.