Skip to content
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

Microphone feedback #1536

Merged
merged 30 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8288388
Add naive implementation of mic levels to 2D hud
johnshaughnessy Jul 9, 2019
99c37af
Swap in-world-hud mic image with microphone input
johnshaughnessy Jul 10, 2019
721e1ea
Merge branch 'feature/mic-levels-in-hud' of https://github.com/mozill…
johnshaughnessy Jul 10, 2019
94625cc
Add four eight-frame animations for mic feedback
johnshaughnessy Jul 14, 2019
181b2ee
Cleanup
johnshaughnessy Jul 14, 2019
34e5b6a
Update hover color on mic icons
johnshaughnessy Jul 15, 2019
0e36d3d
Use spritesheet.js for css sprites
johnshaughnessy Jul 15, 2019
8aa4f43
Remove unused images
johnshaughnessy Jul 15, 2019
84444c2
Create a separate MediaStream for mic analysis
johnshaughnessy Jul 15, 2019
9b79a6a
Separate the css spritesheet
johnshaughnessy Jul 16, 2019
e502d6a
Fix bouncing of spritesheet-rendered icons
johnshaughnessy Jul 16, 2019
e5aadfc
lint
johnshaughnessy Jul 16, 2019
fc0b79f
Ensure first mic sprite shows in HUD
johnshaughnessy Jul 16, 2019
4a5b744
Re-hide the vr hud
johnshaughnessy Jul 16, 2019
88f88b9
Merge branch 'feature/camera-videos' of https://github.com/mozilla/hu…
johnshaughnessy Jul 16, 2019
37e0c81
Remove unused stylesheet
johnshaughnessy Jul 16, 2019
56336ce
Revert mic tooltip text
johnshaughnessy Jul 16, 2019
7634268
Adjust mic level. Fix hover issue
johnshaughnessy Jul 17, 2019
a0bcbc2
Update spritesheet doc
johnshaughnessy Jul 17, 2019
ebe6c24
Update spritesheet.js to use custom scale template
johnshaughnessy Jul 18, 2019
3a78b62
Update vr sprites
johnshaughnessy Jul 18, 2019
b84f06e
Remove unused css
johnshaughnessy Jul 18, 2019
8290c5f
Fix rounded corners of mic-off images.
johnshaughnessy Jul 18, 2019
9b8573a
Update icons to remove small details
johnshaughnessy Jul 22, 2019
e31ad6c
Merge branch 'master' of https://github.com/mozilla/hubs into feature…
johnshaughnessy Jul 22, 2019
19718c3
Remove unused var
johnshaughnessy Jul 22, 2019
1ee08ac
Prevent :hover on mobile
johnshaughnessy Jul 22, 2019
8ac4d30
Add disabledImage to icon-button schema
johnshaughnessy Jul 22, 2019
e2a6bf6
Fix default value of class
johnshaughnessy Jul 22, 2019
b61e3fa
Merge branch 'master' of https://github.com/mozilla/hubs into feature…
johnshaughnessy Jul 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions doc/spritesheet-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ In Hubs, we use texture atlassing to improve rendering efficiency. This document

Information about what spritesheets are and how to use them is outside the scope of this document, as there are many good resources about this on the web.

## generate a spritesheet
## generating spritesheets

After installing the project dependencies, the spritesheet can be generated with the command `npm run spritesheet`. The exact parameters used by this script can be inspected in the `package.json` where it is defined. More information about the tool we use, `spritesheet-js`, can be found on its [github page](https://github.com/krzysztof-o/spritesheet.js/).
After installing the project dependencies, spritesheets can be generated with the command `npm run spritesheet`. The exact parameters used by this script can be inspected in the `package.json` where it is defined. More information about the tool we use, `spritesheet-js`, can be found on the [github page](https://github.com/mozillareality/spritesheet.js/).

The steps to generate a spritesheet are :

1. Move all the sprites you want to include in the spritesheet into `src/assets/images/sprites/`.
1. Type `npm run spritesheet`. This will generate `sprite-system-spritesheet.json` and `sprite-system-spritesheet.png` in the directory `src/assets/images/spritesheets/`.
1. Move sprites you want in the sprite-system-spritesheet to `src/assets/images/sprites/`.
1. Move sprites you want in the css-spritesheet to `src/assets/images/css-sprites/`.
1. Type `npm run spritesheet`. This will generate
`sprite-system-spritesheet.json` with `sprite-system-spritesheet.png` for the
sprite system and
`css-spritesheet.css` with `css-spritesheet.png` in the directory `src/assets/images/spritesheets/`.

The name of the sprite that is used in the generated `json` file is the same as the name of original image file in `src/assets/images/sprites/`. Hence we refer to the image within a spritesheet by its associated filename. This may lead to some confusion, but should be clear when inspecting the `json` file.
## Notes

Note for hubs devs: Most of the source images in `src/assets/images/sprites` were exported from Figma. If you want to alter these images, it is probably best to do so in Figma, then re-export at the desired size.
The name of the sprite that is used in the generated `json` file is the same as its source filename; When a sprite component has the name `foo.png`, the sprite system looks for that name in the `json` file. It does not use the `foo.png` source file.

The source images are exported from Figma. If you want to alter these images, it is probably best to do so in Figma, then re-export at the desired size. It is a good idea to stack all of the icons you want to export on top of one another in figma, because otherwise Figma produces surprisingly different results for similar icons when exporting at low resolution.
Loading