mrdoob/three.js 64409
JavaScript 3D library.
aframevr/aframe 11960
:a: web framework for building virtual reality experiences.
mozilla/hubs 863
Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
MozillaReality/WebXR-emulator-extension 170
WebXR emulator extension
MozillaReality/immersive-custom-elements 128
Immersive Custom Elements
A-Frame MMD component
MozillaReality/webxr-ios-js 44
A JS implementation of WebXR used *only* in Mozilla's WebXR Viewer
A-Frame Rainfall effect component
Two-pass Outline effect component for A-Frame
issue openedMozillaReality/WebXR-emulator-extension
https://immersive-web.github.io/layers/
created time in 7 hours
push eventMozillaReality/WebXR-emulator-extension
commit sha 41a367e9f6b210c552e9c733b238d65dc9934f45
Update README.md fixed some typos and a broken link
commit sha b38459464318dd9fd90991aa15f670e7d087a942
Merge pull request #258 from jaeh/jaeh-typos Update README.md
push time in 7 hours
PR merged MozillaReality/WebXR-emulator-extension
fixed some typos and a broken link
pr closed time in 7 hours
issue commentmozilla/hubs
Improve Dynamic Audio Normalization quality
I have been testing and I think at least the background noise problem can't ignored to enable by default.
comment created time in 7 hours
PR closed mozilla/hubs
Resolves #3098. Refer to https://github.com/mozilla/hubs/issues/3098#issuecomment-703917282 for the detail.
pr closed time in 10 hours
pull request commentmozilla/hubs
Reparenting audioListener immediately after camera mode is updated
Let me close this PR for now because I noticed that the root issue may be different. I'll make another PR or reopen if I figure out.
comment created time in 10 hours
pull request commentmozilla/hubs
Reparenting audioListener immediately after camera mode is updated
I didn't notice that inspect and uninsect are called from out of camera system tick. This current change is not good enough. I'll update soon.
comment created time in 2 days
PR opened mozilla/hubs
Resolves #3098. Refer to https://github.com/mozilla/hubs/issues/3098#issuecomment-703917282 for the detail.
pr created time in 2 days
Pull request review commentmrdoob/three.js
GLTFLoader: Add support for EXT_texture_webp.
THREE.GLTFLoader = ( function () { }; ++ /**+ * WebP Texture Extension+ *+ * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp+ */+ function GLTFTextureWebPExtension( parser ) {++ this.parser = parser;+ this.name = EXTENSIONS.EXT_TEXTURE_WEBP;+ this.isSupported = null;++ }++ GLTFTextureWebPExtension.prototype.loadTexture = function ( textureIndex ) {++ var name = this.name;+ var parser = this.parser;+ var json = parser.json;++ var textureDef = json.textures[ textureIndex ];++ if ( ! textureDef.extensions || ! textureDef.extensions[ name ] ) {++ return null;++ }++ var extension = textureDef.extensions[ name ];+ var source = json.images[ extension.source ];+ var loader = source.uri ? parser.options.manager.getHandler( source.uri ) : parser.textureLoader;++ return this.detectSupport().then( function ( isSupported ) {++ if ( isSupported ) return parser.loadTextureImage( textureIndex, source, loader );++ if ( ! isSupported && json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) {++ throw new Error( 'THREE.GLTFLoader: WebP required by asset but unsupported.' );++ }++ // Fall back to PNG or JPEG.+ return parser.loadTexture( textureIndex );
Yeah, ideally moving to the next extension handler as fallback should be better but as Don explained currently invokeOne() doesn't accept Promise<null> as the sign of moving to the next handler. The reason why I designed so is if it accepts Promise<null> invokeOne() can form a long Promise chain and I think it can make the response time very longer.
We need to update or test more invokeOne() to resolve this issue. I'd like to suggest this PR goes as is so far, and discussing invokeOne() in another issue/PR because I don't want to make this PR bigger and complex.
comment created time in 3 days
push eventtakahirox/hubs
commit sha 9b27e8e30008d42f26ef61a0b463d11c4f6fc8e2
Remove Lint errors
commit sha c8a606df1c3c9135c117e4e069593d435da07ade
Merge pull request #3229 from takahirox/FixLint Remove Lint errors
push time in 3 days
push eventmozilla/hubs
commit sha 9b27e8e30008d42f26ef61a0b463d11c4f6fc8e2
Remove Lint errors
commit sha c8a606df1c3c9135c117e4e069593d435da07ade
Merge pull request #3229 from takahirox/FixLint Remove Lint errors
push time in 3 days
PR merged mozilla/hubs
Sorry, I should have run/checked CI test before merging #2801 as @brianpeiris gave me an advice, but I have forgotten. This PR fixes the lint errors.
pr closed time in 3 days
PR opened mozilla/hubs
Sorry, I should have run/checked CI test before merging #2801 as @brianpeiris gave me an advice, but I have forgotten. This PR fixes the lint errors.
pr created time in 3 days
push eventtakahirox/hubs
commit sha 730074836b770f8d72817347bb3843aa19c083e7
Add volume option to run-bot.js
commit sha 2b494bed5364e4a2001a0ad45c8cf93f44f21e25
AudioNormalization
commit sha 75d430c8f24f11db6fa95a0f6d51503bae828bfd
Improve Audio Normalization algorithm
commit sha ecc7fdb0a4cfe1a367040efddce9cd35c4d67a17
Let audioNormalization command take factor parameter
commit sha 2c5c62345407634aac0e10f01adcc501b94b563f
Formattinng for lint
commit sha 13e912f8205a4fb28e624988c953669713ba3483
remove create button for avatars
commit sha 11978f511bb9bcea790f9ddcfc983df9ed012354
Bump lodash from 4.17.11 to 4.17.20 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.20) Signed-off-by: dependabot[bot] <[email protected]>
commit sha 9f24a4fb36e5768b1e7c36c3c1ddb7f4651eb6ff
Bump node-fetch from 2.6.0 to 2.6.1 Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] <[email protected]>
commit sha d301eb6d3a07963549b93ca04da5f684e653e002
Bump lodash.merge from 4.6.1 to 4.6.2 Bumps [lodash.merge](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/commits) Signed-off-by: dependabot[bot] <[email protected]>
commit sha f817cef2d1555e02b31def173e3cb6f7a0d760a8
pt-br translation add brazilian portuguese support to hubs Co-Authored-By: peusodre <[email protected]>
commit sha ab3c79b1dcd2bb0713a65bb815bde3a1f8c2b352
Fallback to default local model when there is an avatar load error
commit sha f6e481fed049393162d5ae510c65982d9fb3e30a
Fixes the room description scroll
commit sha 20d5d115138205a2306a7868c18cfbd722f65bfb
Get the device Id from the audio track instead of the outbound stream
commit sha 834f6e06dc32af537526b72af9b54f2e58704bb6
Merge remote-tracking branch 'upstream/master' into AudioNormalization
commit sha cb9f4d5eee6b0e74a3669e35a06a150f868118e5
Use audio listener for distance based attenuation
commit sha 769e364eefbcb6483cd4b92e1d45226361e2bd81
Fix bug where audio is not initialized in the correct place
commit sha 526bc1bfc125cf65c0525f35ff865579277c32be
improve some Japanese translations
commit sha 2f7aa2eee8b3e8b2b9a522c1668ad6b3b009b906
fix percent symbols in the Japanese locale fie
commit sha b668b3dbcd021938ee939684f613e3e72dee1a06
Default avatar update
commit sha 7837bc77f6dd9ca1e9ffef6892c3c9fd5ed96765
Japanese translation: unify translations of "phone"
push time in 3 days
push eventtakahirox/hubs
commit sha 23e4316c83c30b25581642daf9f3edb515be872b
Discord fullscreen
push time in 3 days
push eventmozilla/hubs
commit sha 730074836b770f8d72817347bb3843aa19c083e7
Add volume option to run-bot.js
commit sha 13a4f295646fef45d5e913a71a7e35d6e103ac7c
Merge pull request #2801 from takahirox/AudioVolumeBot Add volume option to run-bot.js
push time in 3 days
PR merged mozilla/hubs
This PR resolves #2793 by adding -v --volume option to run-bot.js which controls audio volume level of bot.
$ node run-bot.js -r roomid -a bot-recording.mp3 -v 0.2
Some notes:
- I insert GainNode to control the volume instead of setting
audioelement volume because "the audio level or volume of the media element does not affect the volume of captured audio"
https://www.w3.org/TR/mediacapture-fromelement/#html-media-element-media-capture-extensions
- I pass
audio_volumeparameter toscene-entry-manager.jsby addingaudio_volumein URL likehttps://localhost:8080/hub.html?allow_multi=true&audio_volume=2.0&bot=true. Let me know if there is a better way -v --volumeoption has an effect only if-a --audiooption is set
pr closed time in 3 days
issue closedmozilla/hubs
Add volume option to scripts/bot/run_bot.js for audio volume control
Is your feature request related to a problem? Please describe.
I'm working on #2662 and want to test with bots speaking. scripts/bot/run_bot.js supports audio option which lets a bot loads audio file and speaks.
I want multiple bots in a room and want some of them to speak loudly and the others to speak softly. But scripts/bot/run_bot.js doesn't provide a way to control audio volume.
Describe the solution you'd like
I'd like to suggest to add -v --volume option to scripts/bot/run_bot.js to control audio volume. With the new option you can place speaking bots in a room with different audio volumes.
$ node run-bot.js -r roomid -a bot-recording.mp3 -v 0.2
$ node run-bot.js -r roomid -a bot-recording.mp3 -v 0.5
$ node run-bot.js -r roomid -a bot-recording.mp3 -v 1.0
Describe alternatives you've considered
Having different volume level audio files may be another option to satisfy my demand but it would be a bit too annoying. And letting scripts/bot/run_bot.js support volume option would be more useful and it can be even used for other audio related tests.
closed time in 3 days
takahiroxissue openedmozilla/hubs
Improve Dynamic Audio Normalization quality
We added a new feature "Dynamic Audio Normalization" in #2824. Currently it's an experimental feature and behind the chat command.
Hopefully I want to enable it by default at somepoint. To do that, we need to improve the quality and make it more robust.
Please try the feature and give any feedbacks in this thread.
How to enable:
/audioNormalization 4 in chat command. Bigger number makes the volumes louder.
How to disable:
/audioNormalization 0 in chat command
Note: I have applied this effect to voice but haven't to Media yet. I'm going to apply the effect to Media too when the quality becomes good enough.
Problems I have found so far.
-
If someone's mic has white noise, this feature make the noise very louder. We may need to detect more precisely whether a person speaks or not.
-
How loud volume will be with this feature very depends on audio mode. For example,
/audioNormalization 10with positional audio is comfortable for me while it is very loud without positional audio. When I enabled this feature and switched the audio mode from positional audio to non positional audio, my ears were about to be broken due to the sudden loud volume. We may need to make the final audio volume constant as much as possible across the audio mode, or we may need to reset the audio normalization factor when user switches the audio mode. -
Hopefully I'd like to cut off requiring to a user to enter a specific factor. But it may be hard to determine an appropriate factor. It may depend on an individual, audio device, audio mode, room settings (audio rolloff and so on), room member's raw voice volumes, and so on. I want more users to test and give us feedbacks.
-
Privacy. Imagine that a person speaks in very small voice because the speaker wants the only people who are close to the speaker in distance to listen. If another person who is not so close to the speaker turns this feature on, the one may catch up what the speaker is speaking.
created time in 6 days
issue commentmrdoob/three.js
Renderer state.reset() no longer resets attributes
Unfortunately we need to be careful to add this type of API as written in the above. So I'd like to suggest making your fork for now and revisiting in the core if we get the same feature request more.
comment created time in 6 days
pull request commentmozilla/hubs
Thanks for the review! I deployed. As I wrote in the PR I want to start this feature as experimental behind the chat command. I have applied this effect to Voice but haven't to Media yet. I want users and devs to test first, and want to apply the effect to Media, too, when we find the effect is actually good.
comment created time in 6 days
push eventmozilla/hubs
commit sha 2b494bed5364e4a2001a0ad45c8cf93f44f21e25
AudioNormalization
commit sha 75d430c8f24f11db6fa95a0f6d51503bae828bfd
Improve Audio Normalization algorithm
commit sha ecc7fdb0a4cfe1a367040efddce9cd35c4d67a17
Let audioNormalization command take factor parameter
commit sha 2c5c62345407634aac0e10f01adcc501b94b563f
Formattinng for lint
commit sha 834f6e06dc32af537526b72af9b54f2e58704bb6
Merge remote-tracking branch 'upstream/master' into AudioNormalization
commit sha b2aeae952575168e52b3becf36ea464580af706c
Dynamic Audio Normalization: Insert compressor node to protect user's ears in case of misguessing the volume
commit sha 6579753b772ba071f30acef7b28769ed91b85bce
Update AudioNormalization command message
commit sha 5e7cca707ab056a9e19fb5c2774d1fdd68e62a7c
Call normalizer.apply() after AudioNormalization instanciation
commit sha cffd34d3d7daef4dc89399cc99267b74ea8983df
AudioNormaliztion: Set and delete filters more robustly.
commit sha 54573ad3e5a7d33023d54edfd5d9936a9d5a7bec
Merge pull request #2824 from takahirox/AudioNormalization Dynamic Audio Normalization
push time in 6 days
PR merged mozilla/hubs
Resolves: #2662
Background
I'm trying to make Dynamic Audio Normalization in Hubs. It dynamically and automatically adjusts all people's volume to a certain volume range. It helps comfortably hearing everyone in a room without controlling each person's volume manually. It would be useful for example for group meeting #2738
My prototype seems to work, but I think I need to optimize more, because for example the volume balance would be better than nothing but still someone's volume is louder than others, and am wondering if there is a better approach. Then I share it as draft PR here because I want you to test and want feedback from you, especially how do you feel about audio normalization and how to optimize.
Demo Video
https://twitter.com/superhoge/status/1291932792662630402
How to use
Enter /audioNormalization <factor> command in chat box. Default factor is 0 (disabled). Bigger factor normalizes the volume levels at higher level. I recommend 4 so far. This is still an experimental feature so I added it as an experimental command so far.
Basic idea
I insert AudioAnalyser and Gain nodes after audio source. Calculate the RMS of time domain data and then adjusts the gain node value in "a rule of the thumb" way. Refer to the inline comments for the detail. I'd be glad if I can know more better/standard approach (if exists).
The nodes are inserted right after audio source so audio normalization works as if controlling their master input volume level. Other audio effects, for example panning or roll off, are applied after the normalization.
Test
For the test, I recommend to locally merge #2766 and #2801 and run multiple bots speaking with different volumes
$ node run-bot.js -a ./bot-recording.mp3 -r room_id -v 0.2
$ node run-bot.js -a ./bot-recording.mp3 -r room_id -v 4.0
and turn off audio rolloff and positional audio with commands in Hubs chat box
/audiomode #disable positional audio
/audioRolloff 0.0 #disable audio rolloff
because it would be easier to see that the audio normalization works by disabling them.
Notes
- I haven't applied the audio normalization for media in this PR yet. After fixing the algorithm I add to media, too.
pr closed time in 6 days
issue closedmozilla/hubs
Automatic voice volume normalization/balancing
Is your feature request related to a problem? Please describe.
If there are many people in a room, often someone's voice is too huge while someone else's is too small. We can manually control each member's voice volume, but it's a bit annoying especially if the number of people in a room is many.
Describe the solution you'd like
Hopefully, it would be nice if we add an option we can automatically balance/normalize all voice volumes.
Additional context
Perhaps, this can be done with WebAudio in Client side?
closed time in 6 days
takahiroxpush eventtakahirox/riscv-rust
commit sha 627c743585cf0fbbc985d3bfdb0ab9c1698af734
ips registers and edge-triggered interrupt support in PLIC.
commit sha 26a0cb4b81fead8ae7b01b4d8c5dfdd439abcb7b
Merge pull request #161 from takahirox/EdgeTriggeredInterrupt ips registers and edge-triggered interrupt support in PLIC.
push time in 6 days
PR merged takahirox/riscv-rust
Resolves #159. Resolves #160.
pr closed time in 6 days
issue closedtakahirox/riscv-rust
Implement interrupt pendings memory mapped registers in PLIC
https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc#interrupt-pending-bits
closed time in 6 days
takahiroxissue closedtakahirox/riscv-rust
Rewrite UART (& PLIC) THRE interrupt from "level-triggered" with "edge-triggered"
Currently riscv-rust implements THRE (transmission holder register empty) interrupt as "level-triggered" interrupt in UART (and PLIC).
But in the UART spec, it doesn't seem to be mentioned whether it should be "level-triggered" or "edge-triggered". And switching trigger mode is undefined.
The latest (Oct 18 2020) xv6-riscv UART driver seems to expect it is "edge-triggered".
It may be good to rewrite our THRE interrupt from "level-triggered" to "edge-triggered" because the latter one would support more many drivers. I speculate drivers would hardly make the use of "level-triggered" behavior which keeps interrupting while the register is empty.
closed time in 6 days
takahiroxpush eventtakahirox/riscv-rust
commit sha 627c743585cf0fbbc985d3bfdb0ab9c1698af734
ips registers and edge-triggered interrupt support in PLIC.
push time in 7 days
push eventtakahirox/riscv-rust
commit sha 4458392f981f103f9803f7ca2d7b40bf29487ef0
ips registers and edge-triggered interrupt support in PLIC.
push time in 7 days
issue commentmrdoob/three.js
Renderer state.reset() no longer resets attributes
I agree with @Mugen87. If we expose an API which affects internal WebGL resources, it can block the change (optimization) of the renderer inside because we should keep an API as much as possible once we expose. The renderer inside is even complex and exposing such an API can make it harder to maintain.
But also I know we sometimes have requests from users that they want to finely control WebGL resources by themselves. So I think it might be acceptable if the change is very simple and easy.
comment created time in 7 days
Pull request review commentmrdoob/three.js
GLTFLoader: Add support for EXT_texture_webp.
THREE.GLTFLoader = ( function () { }; ++ /**+ * WebP Texture Extension+ *+ * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp+ */+ function GLTFTextureWebPExtension( parser ) {++ this.parser = parser;+ this.name = EXTENSIONS.EXT_TEXTURE_WEBP;+ this.isSupported = null;++ }++ GLTFTextureWebPExtension.prototype.loadTexture = function ( textureIndex ) {++ var parser = this.parser;+ var json = parser.json;++ var textureDef = json.textures[ textureIndex ];++ if ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] || ! this.detectSupport() ) {++ return null;++ }++ var extension = textureDef.extensions[ this.name ];+ var source = json.images[ extension.source ];+ var loader = source.uri ? parser.options.manager.getHandler( source.uri ) : parser.textureLoader;++ return this.detectSupport()+ .then( function () { return parser.loadTextureImage( textureIndex, source, loader ) } )+ .catch( function () { return parser.loadTexture( textureIndex ); } );
Here silently uses core spec texture as fallback for non-webp-support browser. Do you think if we should do console warnings for it like "Ignoring webp extension due to no webp support in this browser"?
Safari on old Mac seems the only browser in the major latest browsers which doesn't fully support WebP (except for IE) and I'm not sure how many users there are tho.
https://caniuse.com/webp
comment created time in 8 days
Pull request review commentmrdoob/three.js
GLTFLoader: Add support for EXT_texture_webp.
THREE.GLTFLoader = ( function () { }; ++ /**+ * WebP Texture Extension+ *+ * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp+ */+ function GLTFTextureWebPExtension( parser ) {++ this.parser = parser;+ this.name = EXTENSIONS.EXT_TEXTURE_WEBP;+ this.isSupported = null;++ }++ GLTFTextureWebPExtension.prototype.loadTexture = function ( textureIndex ) {++ var parser = this.parser;+ var json = parser.json;++ var textureDef = json.textures[ textureIndex ];++ if ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] || ! this.detectSupport() ) {
I think we can drop || ! this.detectSupport() here because this.detectSupport() returns promise instance, not boolean, then ! this.detectSupport() will be always false.
comment created time in 8 days
push eventtakahirox/three.js
commit sha a3e1703aebcbf1b8d7618ada1d69c18c9fafe1a0
Fix ReferenceError in check-coverage.js
commit sha da9c3108ebded7b71d2b8c270bd99ffc7566a6d6
Merge pull request #20543 from takahirox/FixCheckCoverage Fix ReferenceError in check-coverage.js
commit sha 8840098fb0df067a1e476b3d13d589a55b578673
Examples: Make files and tags to JSON files.
commit sha 3e44305d3832778f6a88bd7a5d7b852c35ddc3ca
Merge pull request #20544 from Mugen87/dev44 Examples: Make files and tags to JSON files.
commit sha 5bf214287fdd73d9b0d39bab3ca7ce5159e71741
Docs: Use let instead of const.
commit sha 80509b14fec51180f1c37ad6cc9c66f76d1f7018
Examples: Use async/await instead of promises.
push time in 8 days
Pull request review commentmozilla/hubs
const MAX_VOLUME = 8; const SMALL_STEP = 1 / (VOLUME_LABELS.length / 2); const BIG_STEP = (MAX_VOLUME - 1) / (VOLUME_LABELS.length / 2); +// Inserts analyser and gain nodes after audio source.+// Analyses audio source volume and adjusts gain value+// to make it in a certain range.+class AudioNormalizer {+ constructor(audio) {+ this.audio = audio;+ this.analyser = audio.context.createAnalyser();+ this.compressor = audio.context.createDynamicsCompressor();+ this.connected = false;++ // To analyse volume, 32 fftsize may be good enough+ this.analyser.fftSize = 32;+ this.gain = audio.context.createGain();+ this.timeData = new Uint8Array(this.analyser.frequencyBinCount);+ this.volumes = [];+ this.volumeSum = 0;++ // To protect user's ears, we insert compressor in case of misguessing the volume.+ // Threshold -30 is just an arbitary number so far.+ this.compressor.threshold.setValueAtTime(-30, audio.context.currentTime);+ }++ apply() {+ if (window.APP.store.state.preferences.audioNormalization) {+ if (!this.connected) {+ this.connect();+ }+ } else {+ if (this.connected) {+ this.disconnect();+ }+ return;+ }++ // Adjusts volume in "a rule of the thumb" way+ // Any better algorithm?++ // Regards the RMS of time-domain data as volume.+ // Is this a right approach?+ // Using the RMS of frequency-domain data would be another option.+ this.analyser.getByteTimeDomainData(this.timeData);+ const squareSum = this.timeData.reduce((sum, num) => sum + Math.pow(num - 128, 2), 0);+ const volume = Math.sqrt(squareSum / this.analyser.frequencyBinCount);+ const baseVolume = window.APP.store.state.preferences.audioNormalization;++ // Regards volume under certain threshold as "not speaking" and skips.+ // I'm not sure if 0.4 is an appropriate threshold.+ if (volume >= Math.min(0.4, baseVolume)) {+ this.volumeSum += volume;+ this.volumes.push(volume);+ // Sees only recent volume history because there is a chance+ // that a speaker changes their master input volume.+ // I'm not sure if 600 is an appropriate number.+ while (this.volumes.length > 600) {+ this.volumeSum -= this.volumes.shift();+ }+ // Adjusts volume after getting many enough volume history.+ // I'm not sure if 60 is an appropriate number.+ if (this.volumes.length >= 60) {+ const averageVolume = this.volumeSum / this.volumes.length;+ this.gain.gain.setTargetAtTime(baseVolume / averageVolume, this.audio.context.currentTime, 0.01);+ }+ }+ }++ connect() {+ // Hacks. THREE.Audio connects audio nodes when source is set.+ // If audio is not played yet, THREE.Audio.setFilters() doesn't+ // reset connections. Then manually caling .connect()/disconnect() here.+ // This might be a bug of Three.js and should be fixed in Three.js side?+ if (this.audio.source && !this.audio.isPlaying) {+ this.audio.disconnect();+ }+ // @TODO: Here overrides filters even if filters are already set other places.
Non implementing was my intentional. But I reviewed by myself again and found that implementation would not be so complex. Then I implemented. Would you please review again?
comment created time in 8 days
push eventtakahirox/hubs
commit sha cffd34d3d7daef4dc89399cc99267b74ea8983df
AudioNormaliztion: Set and delete filters more robustly.
push time in 8 days
Pull request review commentmozilla/hubs
const MAX_VOLUME = 8; const SMALL_STEP = 1 / (VOLUME_LABELS.length / 2); const BIG_STEP = (MAX_VOLUME - 1) / (VOLUME_LABELS.length / 2); +// Inserts analyser and gain nodes after audio source.+// Analyses audio source volume and adjusts gain value+// to make it in a certain range.+class AudioNormalizer {+ constructor(audio) {+ this.audio = audio;+ this.analyser = audio.context.createAnalyser();+ this.compressor = audio.context.createDynamicsCompressor();+ this.connected = false;++ // To analyse volume, 32 fftsize may be good enough+ this.analyser.fftSize = 32;+ this.gain = audio.context.createGain();+ this.timeData = new Uint8Array(this.analyser.frequencyBinCount);+ this.volumes = [];+ this.volumeSum = 0;++ // To protect user's ears, we insert compressor in case of misguessing the volume.+ // Threshold -30 is just an arbitary number so far.+ this.compressor.threshold.setValueAtTime(-30, audio.context.currentTime);+ }++ apply() {+ if (window.APP.store.state.preferences.audioNormalization) {+ if (!this.connected) {+ this.connect();+ }+ } else {+ if (this.connected) {+ this.disconnect();+ }+ return;+ }++ // Adjusts volume in "a rule of the thumb" way+ // Any better algorithm?++ // Regards the RMS of time-domain data as volume.+ // Is this a right approach?+ // Using the RMS of frequency-domain data would be another option.+ this.analyser.getByteTimeDomainData(this.timeData);+ const squareSum = this.timeData.reduce((sum, num) => sum + Math.pow(num - 128, 2), 0);+ const volume = Math.sqrt(squareSum / this.analyser.frequencyBinCount);+ const baseVolume = window.APP.store.state.preferences.audioNormalization;++ // Regards volume under certain threshold as "not speaking" and skips.+ // I'm not sure if 0.4 is an appropriate threshold.+ if (volume >= Math.min(0.4, baseVolume)) {+ this.volumeSum += volume;+ this.volumes.push(volume);+ // Sees only recent volume history because there is a chance+ // that a speaker changes their master input volume.+ // I'm not sure if 600 is an appropriate number.+ while (this.volumes.length > 600) {+ this.volumeSum -= this.volumes.shift();+ }+ // Adjusts volume after getting many enough volume history.+ // I'm not sure if 60 is an appropriate number.+ if (this.volumes.length >= 60) {+ const averageVolume = this.volumeSum / this.volumes.length;+ this.gain.gain.setTargetAtTime(baseVolume / averageVolume, this.audio.context.currentTime, 0.01);+ }+ }+ }++ connect() {+ // Hacks. THREE.Audio connects audio nodes when source is set.+ // If audio is not played yet, THREE.Audio.setFilters() doesn't+ // reset connections. Then manually caling .connect()/disconnect() here.+ // This might be a bug of Three.js and should be fixed in Three.js side?+ if (this.audio.source && !this.audio.isPlaying) {+ this.audio.disconnect();+ }+ // @TODO: Here overrides filters even if filters are already set other places.
If I'm right, no other places use audio filters yet. I'd like to start to think of this problem when other places use filters. What do you think of?
comment created time in 8 days
Pull request review commentmozilla/hubs
AFRAME.registerComponent("avatar-volume-controls", { return; } + if (!this.normalizer) {+ this.normalizer = new AudioNormalizer(audio);+ this.avatarAudioSource.el.addEventListener("sound-source-set", () => {+ const audio =+ this.avatarAudioSource && this.avatarAudioSource.el.getObject3D(this.avatarAudioSource.attrName);+ if (audio) {+ this.normalizer = new AudioNormalizer(audio);
Good catch! Updated, thanks.
comment created time in 8 days
push eventtakahirox/hubs
commit sha 5e7cca707ab056a9e19fb5c2774d1fdd68e62a7c
Call normalizer.apply() after AudioNormalization instanciation
push time in 8 days
Pull request review commentmozilla/hubs
export default class MessageDispatch { this.log(`Positional Audio ${shouldEnablePositionalAudio ? "enabled" : "disabled"}.`); } break;+ case "audioNormalization":+ {+ if (args.length === 1) {+ const factor = Number(args[0]);+ if (!isNaN(factor)) {+ const effectiveFactor = Math.max(0.0, Math.min(255.0, factor));+ window.APP.store.update({+ preferences: { audioNormalization: effectiveFactor }+ });+ if (factor) {+ this.log(`audioNormalization factor is set to ${effectiveFactor}.`);+ } else {+ this.log("audioNormalization is disabled.");+ }+ } else {+ this.log("audioNormalization command needs a valid number parameter.");+ }+ } else {+ this.log(+ "audioNormalization command needs a base volume number between 0 [no normalization] and 255. Default is 0. Recommended value is 4 if you enable."
Thanks. Updated.
comment created time in 8 days
push eventtakahirox/hubs
commit sha 6579753b772ba071f30acef7b28769ed91b85bce
Update AudioNormalization command message
push time in 8 days
push eventtakahirox/hubs
commit sha e996f3d5cdf078df7ff39bf0c490bd60959bbb10
Update AudioNormalization commend message
push time in 8 days
push eventtakahirox/hubs
commit sha 6c067e90bc0a109dc81c7435e69c60bf5d8f6e97
Emit entered event when entering a room
push time in 8 days
push eventtakahirox/hubs
commit sha ea2c005dfb011ef417a31a6659573e74815c3a6b
Update test code
push time in 8 days
pull request commentmrdoob/three.js
Examples: Make files and tags to JSON files.
Yeah, this approach is much more simple and robust. Thanks for the update.
comment created time in 8 days
PR opened mrdoob/three.js
Related issues:
#20540
Description
This PR resolves #20540. Refer to that issue for the detail.
pr created time in 9 days
pull request commentmrdoob/three.js
GLTFLoader: Add support for EXT_texture_webp.
Thanks, let me try tomorrow.
BTW, CI test fails but the root issues seem not in this PR but #20540 and #20542.
comment created time in 9 days
issue openedmrdoob/three.js
Describe the bug
$ npm run test-lint
> [email protected] test-lint C:\Users\Takahiro\Documents\three.js
> eslint src --ext js --ext ts && tsc -p utils/build/tsconfig.lint.json
src/cameras/CubeCamera.d.ts(16,2): error TS2416: Property 'clear' in type 'CubeCamera' is not assignable to the same property in base type 'Object3D'.
Type '(renderer: WebGLRenderer, color: boolean, depth: boolean, stencil: boolean) => void' is not assignable to type '() => this'.
To Reproduce
Run npm run test-lint in dev branch or see CI test results of any opened PR.
Code
In Object3D.d.ts
clear(): this;
In CubeCamera.d.ts
clear( renderer: WebGLRenderer, color: boolean, depth: boolean, stencil: boolean ): void;
I'm not familiar with TypeScript but I speculate a method can't be extended with different return type.
And Object.clear() behavior looks very different from CubeCamera.clear(). The former seems for removing children while the latter seems for clearing WebGL resources(?). I'd like to suggest renaming either one.
Expected behavior
Lint test should run without error.
Platform:
- Device: Desktop
- OS: Windows
- Browser:
- Three.js version: dev
created time in 9 days
pull request commentmrdoob/three.js
GLTFLoader: Add support for EXT_texture_webp.
I would like to test. Do you or someone else have glTF file including EXT_texture_webp extension?
comment created time in 9 days
push eventtakahirox/three.js
commit sha e694e626e064b43988e2c6bf961c3456d6f6e86c
Update Quaternion.html
commit sha 729696c05eef07e5cafb0c76e73a677b959d9359
Update doc for Matrix4
commit sha 26c41e6748be5fb818286db5fd6a9cef19594dc8
Include TypeScript type exports when exporting geometries https://github.com/mrdoob/three.js/pull/20437 is helpful in adding missing exports, but it removed exporting some helpful interfaces like `TextGeometryParamters`. It's a much better experience to be able to do: ``` import { Geometry, Material, MeshBasicMaterial, TextGeometryParameters } from 'three'; ``` rather than: ``` import { Geometry, Material, MeshBasicMaterial } from 'three'; import { TextGeometryParameters } from 'three/src/geometries/TextGeometry'; ```
commit sha 8f87d4b82f8d09edff9e05837aa08dd131453310
Update ExtrudeGeometry.d.ts
commit sha 0ea09e9792360cea552485bf5b588e0ea743322b
Update TextGeometry.d.ts
commit sha 137890c69e630b089e69ddeb2541e159666c4280
Update Creating-a-scene.html change "var" to "let"
commit sha 06a73a012851349c66f5600224efe4451c53ed44
GLTFExporter: Clean up.
commit sha 66ea417c47e3bbce574c91f9f4405b3eb51ec3ec
Update ExtrudeGeometry.d.ts
commit sha b3508e49b6aa76a62c05aeabd06ff21062a26679
GLTFExporter: Clean up.
commit sha c3327da203231e99e97e99d03bd13ceaa6ed3b1f
Math: Covert to ES6 default value.
commit sha 8c9d2706a2f830d6bd114db98cc6cf00fc07eaec
Update Creating-a-scene.html i had changed "var" to "let", changed again to "const"
commit sha b7ace0ed6879142d76c198c8950d8c8db7a8b9fd
Docs: Improve VideoTexture page.
commit sha c1f7d74315e0a9afd748f10bea0f3682fd5e02c9
Matrix4: Clean up.
commit sha c5faa7fa9d6d010daae153990df79d88c85cb86b
Object3D: Add removeAll().
commit sha 0ea8e2303abb400cc8f51315c39da3a23fdea6ed
WebGLGeometries: Fix memory leak when disposing Geometry.
commit sha 33653440c1094de7c48a0a6ebe9b39e6dbb43450
Update Creating-a-scene.html change remaining "var" to "const"
commit sha 4b1a71aae70a2c730c56e928a6a08a5569796b41
Merge pull request #20472 from linbingquan/dev-cleanup-math Math: Covert to ES6 default value.
commit sha d483a427d11ef85841b2f4deb20317df2ec3fb0d
Merge pull request #20468 from montoyamoraga/patch-2 Docs: Update Creating-a-scene.html
commit sha a95af8f5115c71f0ed9e02c247f46bb22c58d992
Merge pull request #20476 from Mugen87/dev51 Docs: Improve VideoTexture page.
commit sha 68976a1ec5a3cd52208c60e875fc4500ff982996
Merge pull request #20478 from Mugen87/dev44 Object3D: Add removeAll().
push time in 9 days
issue openedmrdoob/three.js
test/e2e/check-coverage.js in CI test fails
Describe the bug
test/e2e/check-coverage.js fails in CI test.
> [email protected] test-e2e-cov /home/runner/work/three.js/three.js
> node test/e2e/check-coverage.js
/home/runner/work/three.js/three.js/test/e2e/check-coverage.js:17
for ( var key in files ) {
^
ReferenceError: files is not defined
at Object.<anonymous> (/home/runner/work/three.js/three.js/test/e2e/check-coverage.js:17:18)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-e2e-cov: `node test/e2e/check-coverage.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-e2e-cov script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
If I'm right, this error has happened since #20512 was merged?
To Reproduce
- See any PR which is open
- Check CI test results
Code
files is defined by reading examples/files.js and using eval.
https://github.com/mrdoob/three.js/blob/r121/test/e2e/check-coverage.js#L16
eval( fs.readFileSync( './examples/files.js' ).toString() );
#20512 changed from let to const for files in examples/files.js. This change has affected?
Expected behavior
test/e2e/check-coverage.js should run without error.
Platform:
- Device: Desktop
- OS: Windows
- Browser:
- Three.js version: dev
created time in 9 days
issue openedMozillaReality/webgfx-tests
If I'm right, webgfx-tests doesn't support iOS, does it? It would be nice if we can support iOS devices.
created time in 9 days
issue commentMozillaReality/webgfx-tests
Add support to launch browser on windows and linux
Not sure about Linux but it works on Windows.
comment created time in 9 days
PR opened MozillaReality/webgfx-tests
Resolves #103
This PR depends on #95, so please merge #95 before this PR.
pr created time in 9 days
push eventtakahirox/webgfx-tests
commit sha ef7de4559b11f6f6390ca30a7b963f1dfff609c3
Accept test URL with hash anchor parameter
commit sha 3084e5e27c27f7a3aa19a7c67262fb3b8197b3b5
Update tests.json
push time in 9 days
issue commentMozillaReality/webgfx-tests
Mic permission prompt blocks automatic testing
I guess it will just run your default profile right?
I guess so.
we should at least create a new profile, I believe that was the initial approach, as otherwise your profile could affect the benchmark, for example if you have extensions installed or so
webgfx-tests doesn't use private mode for other browsers. The other browsers have the same problem?
comment created time in 10 days
issue openedMozillaReality/webgfx-tests
hash anchor (#) parameter in the test URL doesn't work
webgfx-tests adds test parameter as get query (like '?key1=value1&key2=value2') to the test URL. But if test URL includes hash anchor (#) parameter, the URL will be wrong.
For example, http://foo.com#bar will be like http://foo.com#bar?testparam1=value1&testparam2=value2. But hash anchor parameter needs to be after get query like http://foo.com?testparam1=value1&testparam2=value2#bar.
created time in 10 days
PR opened MozillaReality/webgfx-tests
From #39.
This PR adds customStart test property. If customStart is set to true, test manager adds custom-start to the URL get query.
And this PR adds appReady property to TESTER. If the URL get query doesn't include custom-start then appReady will automatically be true. Otherwise, the test application manually needs to set it to true when it's ready to start the test.
foo.addEventListener('bar', event => {
TESTER.appReady = true;
});
The test starts measurement once appReady and existing ready and XRready are true.
pr created time in 10 days
push eventtakahirox/webgfx-tests
commit sha d09b7bd3be1e764742615ae5be867652b302b032
Boot up Chrome without incognito mode
commit sha f10bec7fc060401bf88b8959ca6001e8f61d7115
Add customStart test property
commit sha 59f4d75d8540b62b08db043eb71add46fba8b644
Update dist
commit sha 71daec6d245f8c5d2e1e2bfd2386e66c97b12236
Update tests.json
push time in 10 days
issue commentmozilla/hubs
Add an option to make members Invisible/Transparent
I want to wait for UI redesign.
comment created time in 10 days
pull request commentmozilla/hubs
Introduce audioRolloff command to chat box to set global audio rolloff factor
Implementation itself is already done. But before merging I want to
- wait for new US design
- discuss how to expose (Behind chat command or preference? Should the area where other people can hear be visible?)
- have a meeting to discuss entire Hubs Audio problems
comment created time in 10 days
issue openedtakahirox/riscv-rust
Implement interrupt pendings memory mapped registers in PLIC
https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc#interrupt-pending-bits
created time in 11 days
issue openedtakahirox/riscv-rust
Rewrite UART (& PLIC) THRE interrupt from "level-triggered" with "edge-triggered"
Currently riscv-rust implements THRE (transmission holder register empty) interrupt as "level-triggered" interrupt in UART (and PLIC).
But in the UART spec, it doesn't seem to be mentioned whether it should be "level-triggered" or "edge-triggered". And switching trigger mode is undefined.
In the latest (Oct 18 2020) xv6-riscv UART driver seems to expect it is "edge-triggered".
It may be good to rewrite our THRE interrupt from "level-triggered" to "edge-triggered" because the former one would support more many drivers.
created time in 11 days
issue closedtakahirox/riscv-rust
As rust project, I hope it can support to run redox os .
As rust project, I hope it can support to run redox os .
closed time in 11 days
goodforeverissue commenttakahirox/riscv-rust
As rust project, I hope it can support to run redox os .
Hi, thanks for the request!
Unfortunately this request is duplicated. Let me close this issue and let's keep discussion in #124
comment created time in 11 days
issue closedtakahirox/riscv-rust
Write note about how to build xv6-riscv for riscv-rust
I should write a note about the files in xv6 directory.
- xv6-riscv kernel file in xv6 directory (xv6/kernel) is built without C extension because the emulator doesn't support C extension yet. I added
-march=rv64imafdcompile/assemble option in Makefile of xv6-riscv. And also I edited initcode in kernel/proc.c to convert to non-C extension instructions. Plus, I added-O3compile option to get better performance. - xv6-riscv filesystem image file (xv6/fs.img) is made by
make qemuof xv6-riscv
closed time in 12 days
takahiroxissue commenttakahirox/riscv-rust
Write note about how to build xv6-riscv for riscv-rust
Done
comment created time in 12 days
push eventtakahirox/riscv-rust
commit sha 918c76225909cc34d60876eea5074ff9758a6084
Create resources/xv6/Readme.md
push time in 12 days
issue openedMozillaReality/webgfx-tests
Mic permission prompt blocks automatic testing
I have an application which first requests mic permission and then starts.
A problem of testing it with webgfx-tests is mic permission prompt blocks automatic testing. I needed to manually click the prompt to grant the permission.
One of the solutions would be to allow the mic in browser-level or domain-level via browser settings. But this solution has a problem with Chrome. webgfx-tests opens Chrome in private (Incognito) mode and private mode seems to reset the settings.
I found --deny-permission-prompts command line option in https://peter.sh/experiments/chromium-command-line-switches/ but it didn't seem to work.
Another solution would be booting it up without private mode by removing --incognito command line option. It works for my case so far.
So I'd like to suggest booting Chrome up without private mode. (I don't remember what the root reason why it does with private mode is.)
created time in 13 days
push eventtakahirox/riscv-rust
commit sha be6b43f42e1409bf7f83649a099673272ef027b0
Update README.md
push time in 16 days
PR opened mit-pdos/xv6-riscv
Hi, thanks for adding me as an ack bug finder. Do you mind if replacing my first name (Takahiro) with my full name (Takahiro Aoyagi)?
pr created time in 17 days
push eventtakahirox/xv6-riscv
commit sha 32e2b0550352bc110e886f52304584f9bd800f80
Minor ack update in readme
push time in 17 days
issue commentriscv/risc-v-getting-started-guide
Failed to run Ubuntu/Debian on QEMU RISC-V
I'm not sure if this is a right approach, but I succeeded in booting it up by building OpenSBI with linux/arch/riscv/boot/Image and creating root filesystem image from busybox.
$ cd riscv64-linux
# Build OpenSBI
$ git clone https://github.com/riscv/opensbi.git
$ cd opensbi
$ git checkout v0.8
$ make CROSS_COMPILE=riscv64-unknown-elf- PLATFORM=generic \
FW_PAYLOAD_PATH=../linux/arch/riscv/boot/Image
$ cd ..
# Create root filesystem image
$ mkdir rootfs
$ cd rootfs
$ dd if=/dev/zero of=rootfs.img bs=1M count=50
$ mkfs.ext2 -L riscv-rootfs rootfs.img
$ sudo mkdir /mnt/rootfs
$ sudo mount rootfs.img /mnt/rootfs
$ sudo cp -ar ../busybox/_install/* /mnt/rootfs
$ sudo mkdir /mnt/rootfs/{dev,home,mnt,proc,sys,tmp,var}
$ sudo chown -R -h root:root /mnt/rootfs
# Check
$ df /mnt/rootfs
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop5 49584 1704 45320 4% /mnt/rootfs
$ mount | grep rootfs
riscv64-linux/rootfs/rootfs.img on /mnt/rootfs type ext2 (rw,relatime)
# Clean up
$ sudo umount /mnt/rootfs
$ sudo rmdir /mnt/rootfs
$ cd ..
# Run QEMU
$ qemu-system-riscv64 -nographic -machine virt \
-kernel opensbi/build/platform/generic/firmware/fw_payload.elf \
-append "root=/dev/vda rw console=ttyS0" \
-drive file=rootfs/rootfs.img,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0
https://github.com/takahirox/riscv-rust/tree/master/resources/linux/opensbi
comment created time in 18 days
issue openedtakahirox/riscv-rust
I face this error on the terminal in web demo in my iPad touch Safari or Chrome.
WebAssembly.Module doesn't part at byte 1227: 19th Export isn't immutable, named '__wbindgen_export_1'
created time in 18 days
issue closedtakahirox/riscv-rust
Write note about how to build Linux for riscv-rust
closed time in 18 days
takahiroxissue commenttakahirox/riscv-rust
Write note about how to build Linux for riscv-rust
Done
comment created time in 18 days