Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into basic-scene
Browse files Browse the repository at this point in the history
  • Loading branch information
diarmidmackenzie committed Nov 13, 2024
2 parents 1aee05b + 1899930 commit cfb2d68
Show file tree
Hide file tree
Showing 339 changed files with 26,215 additions and 26,732 deletions.
87 changes: 87 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"extends": ["semistandard", "standard-jsx"],
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
/* These rules are incompatible with ES5. */
"no-var": "off",
"object-shorthand": "off",
"prefer-const": "off",
"prefer-regex-literals": "off",

/* These rules are compatible with ES5
However they involve non-trivial code changes
Therefore need more careful review before adopting. */
"array-callback-return": "off",
"no-mixed-operators": "off",
"no-unreachable-loop": "off",
"no-useless-return": "off",
"prefer-promise-reject-errors": "off",

/* These rules are compatible with ES5
However they involve large-scale changes to the codebase, so
careful co-ordination is needed in adopting the rule to avoid
creating merge issues for other PRs. */
"dot-notation": "off",
"indent": "off",
"no-multi-spaces": "off",
"no-unused-vars": "off",
"object-curly-spacing": "off",
"quote-props": "off"
},
"overrides": [
{
/* Code within /src is restricted to using ES5 JavaScript
The exception is that ES6 classes are used sparingly - see exceptions below. */
"files": ["./src/**/*.js"],
"parserOptions": {
"sourceType": "script",
"ecmaVersion": 5
}
},
{
/* These modules use ES6 classes, and so are parsed as ES6 to avoid errors. */
"files": ["./src/core/**/a-*.js"],
"parserOptions": {
"ecmaVersion": 6
}
},
{
/* This module use ES6 classes, and so is parsed as ES6 to avoid errors. */
"files": ["./src/extras/primitives/primitives.js"],
"parserOptions": {
"ecmaVersion": 6
}
},
{
/* This module uses ES6 */
"files": ["./src/components/scene/real-world-meshing.js"],
"parserOptions": {
"ecmaVersion": 6
}
},
{
/* This module uses ES8 async / await due to WebXR Anchor Module integration */
"files": ["./src/components/anchored.js"],
"parserOptions": {
"ecmaVersion": 8
}
},
{
/* This module uses ES6 for…of loops, and so is parsed as ES6 to avoid errors. */
"files": ["./src/components/hand-tracking-controls.js"],
"parserOptions": {
"ecmaVersion": 6
}
},
{
/* This code is external, and the ES5 restrictions do not apply to it. */
"files": ["./src/lib/**/*.js"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 12
}
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: ['16.x']
node-version: ['20.x']
firefox-version: ['latest']
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix['node-version'] }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix['node-version'] }}
# Enabling the cache reduces the "Install dependencies" step by 1m30,
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '41 13 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: +github/codeql/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql@main
config-file: ./codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
177 changes: 166 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,186 @@
### 1.6.0 (May 23, 2024)

Tons of bug fixes. Memory management and performance improvements. API to control tick / tock execution order.

### Bug fixes

- Update wrist object position and rotation only when joint poses are available (#5438) (@mrxz)
- Fix issue when checking schema properties when a schema changes (#5426) (@mrxz)
- Set correct default value for `scene.background` when the background component is removed (#5417) (@mrxz)
- Fix fog removal from scene (#5418) (@mrxz)
- Fix Chrome non-passive violation warnings for touchmove and touchstart event handlers (#5511) (@mrxz, @mitchallen)
- Fix bug when loading models on child entities of controllers (#5415) (@mrxz)
- Fix bug in handling `processSound `callback when sound hadn't loaded yet (#5414) (@mrxz)
- Fix misspelled variable names after using a spell checker (#5462) (@mrxz)
- Fix problem when a shader that declares itself as glsl3 has its version ignored (bbe74f52) (@dmarcos)
- Fix problem when checking for duplicate names of property types (#5475) (@mrxz)
- Fix problem when adding children entities to a `hand-tracking-controls` entity before the hand model has loaded (12d550c6) (@dmarcos)
- Hide `hand-tracking-controls` entity when there's no hand tracking available (dbdb9dac) (@dmarcos)
- Fix issues when applying mixins to primitives (#5483) (@mrxz)
- Fix issue when a component is not removed from the DOM via mixin removal / update (#5492) (@mrxz)
- Fix timing issue when initializing XR Layers (#5489) (@zjm-meta)
- Fix problem where scene doesn't wait / timeout on `a-asset-items` (#5491) (@mrxz)
- Fix bug when using `setAttribute` on `a-scene` if a system has not yet initialized (#5482) (@mrxz)
- Fix broken parser cache of `getComponentPropertyPath` (#5467) (@mrxz)
- Fix issue when shadowMaps are always enabled. Make sure it's only enabled when there's a shadow component present (#5399) (@mrxz)
- Fix issue when children of an entity with `hand-tracking-controls` don't follow the hand (874fced2) (@dmarcos)
- Fix ES modules support on node (#5522) (@vincentfretin)
- Make rotation axis order is consistent when using `setAttribute` and modifying object3D directly (#5513) (@mrxz)
- Fix issue when calculating the size of the bounding box of an `obb-collider` (5da7166e) (@dmarcos)
- Fix issue when the el.hasLoaded flag can be true but not all components have initialized (924dc00e) (@dmarcos)
- Fix issue when trying to remove a mesh before model was loaded in `obj-mode`l component (#5499) (@Elettrotecnica)
- Use `renderer.useLegacyLights` instead of the deprecated `renderer.physicallyCorrectLights` in THREE (#5389) (@vincentfretin)
- Set correct default value for `glslVersion` for non-raw shaders (#5388) (@mrxz)
- Remove "skinning: true" option when instanciating a THREE.MeshStandardMaterial object. Property deprecated in THREE (#5386) (@avdynut)
- Fix issue when tracking an unexisting AR Hitest anchor (@hi-liang, @dmarcos) (bcc4bc2cae2b3) (fix #5314)
- Fix issue when layers are not initialized in AR mode (bb1e7a4e) (@dmarcos)
- Fix issue when removing unexisting light probe after exiting vr mode (#5429) (fix #5384) (@Elettrotecnica)
- Fix issue when removing an obb-collider (957237d) (fix #5385)
- Fix typo when requesting layers on the WebXR requiredFeatures list (f7e56a8f) (@dmarcos)
- Fix issue when trying to animate a non existing button on the controller (da8dc146) (@dmarcos)

### Performance

- Improve unit tests execution time (#5477) (@mrxz)
- Recycle nextData and `previousOldData` objects when a component is destroyed preventing memory leaks (#5458) (@mrxz)
- Improve pooling and recycling of internal component objects. Better memory management (#5459) (@mrxz)
- Reduce memory allocations on component update logic (#5474) (@mrxz)
- Improve throttleLeadingAndTrailing implementation to prevent unnecessary allocations (#5476) (@mrxz)

### Enhancements

- Introduce before/after component API to control tick / tock execution order (#5478) (@mrxz)
- Bump to THREE r164 (@dmarcos)
- Remove maximum canvas size (#5440) (@mrxz)
- Cache THREE.Source instead of THREE.Textures (#5449) (@mrxz)
- Introduce a sceneOnly flag for components that only apply to the `a-scene` element (#5465) (@mrxz)
- Switch unit tests from WebVR to WebXR (#5452) (@mrxz)
- Move back debug dependency from fork to upstream (#5508) (@arpu)
- Introduce stencil property in the renderer system (#5509) (@mrxz)
- Improve iPad detection logic to include iPad Pro (#5502) (@Drkjr92)
- Remove unnecessary attribute properties and special handling of is: "attribute" in shader component (#5310) (@mrxz)
- Improve async loading of aframe library and interoperation with ES module (#5481) (@mrxz)
- Improve system warning messages when setting an unknown property (#5463) (@mrxz)
- Use native bind method instead of custom implementation. Performance benefits of custom one no longer exist (#5461) (@mrxz)
- Add Pico4 controllers support to `laser-controls` component (#5435) (@IamTonio)
- Add hand model opacity to `hand-tracking-controls` (#5431) (@ehammons11)
- Postpone screenshot component offscreen canvas setup until a screenshot is taken (#5442) (@arpu)
- Update GitHub CI to use node 20.x (#5479) (@vincentfretin)
- Use window.isSecureContext instead of manually checking URL for http/localhost/127.0.0.1 (#5487) (@mrxz)
- Remove deprecated `getComputedAttribut` method (#5466) (@mrxz)
- Remove unnecessary crossOrigin configuration for THREE loaders (#5416) (@mrxz)
- Add support for `navigator.xr.offerSession` WebXR spec (#5410) (@cabanier)
- Add support for fog, toneMapping, colorSpace conversion and logarithmicDepthBuffer to the msdf shader used in the text component (#5409) (@mrxz)
- Remove minimum scale value. THREE handles zero scale gracefully (#5404) (@mrxz)
- Add `hide-on-enter-vr` component analog to `hide-on-enter-ar` (9e644def) (@dmarcos)
- Remove iOS 10 specific HLS workaround (#5450) (@mrxz)
- Remove outdated polyfills that were needed just for IE11 (#5448) (@mrxz)
- Docs improvements (@diarmidmackenzie, @Samu01Tech, @thepelkus-too, @Omegahed, stefanhuber, @ctrlw, @vincentfretin, @jgbarah)

### 1.5.0 (Nov 14, 2023)

Multiview extension, Spatial computing UIs, Mixed Reality features, Hand manipulation interactions, Quest 3 support and much more!

### Bug fixes

- Use renderer.useLegacyLights instead of the deprecated renderer.physicallyCorrectLights in three r150, but keep the physicallyCorrectLights property name for the renderer system for backward compatibility (fix #5293) (@mrx)
- Fix `hand-controls` animations (#5300)
- Fix outdated link in error message (#5313) (fix #5275) (@kolson25)
- Fix visibility of controller in model-viewer example (#5317) (@DougReeder)
- Fix typo in phong shader properties (#5334) (@nightgryphon)
- Adapt shaders to new THREE API (#5328) (@nightgryphon)
- Traverse meshes instead of using a hardcoded index (#5340) (@diarmidmackenzie)
- Fix examples miscellaneous errors (#5343) (@mrxz)
- Fix back plane resizing when text component changes (#5357) (fix #2764) (@brycethomas)
- Fix switching back and forth from hands to controller input (fix #5373) (@floe, @dmarcos)

### Enhancements

- Update to THREE r158 (@felixtrz, @dmarcos) (fix #5369)
- Add `hand-tracking-grab-controls` component to make any entity manipulable with hands (@dmarcos)
- Add support for WebXR Mesh and Planes Module (real-world-meshing component) (@dmarcos)
- Add support for WebXR Anchors Module (anchored component) (@dmarcos)
- Add support OVR_multiview extension (@felixtrz)
- Add support for Quest 3 controllers (@dmarcos, @felixtrz)
- New `obb-collider` implementing oriented bounding box colliders (@dmarcos)
- Improve hand-trackin-controls pinch logic (@dmarcos)
- Add `anisotropy` option to material and renderer (#5309) (@mrxz)
- Linter improvements (#5342) (@diarmidmackenzie)
- Add `loopStart` and `loopEnd` properties to sound component to play loops (#5364) (@JonathannJacobs)
- Improve sorting / rendering order (#5332) (@diarmidmackenzie, @mrxz)
- Redesign enter immersive mode UI (@vincentfretin, @msub2, @diarmidmackenzie, @thedart76, @dmarcos)
- Replace the use of `getJointPose` with `fillPoses` and `fillJointRadii` in hand-tracking-controls to avoid memory allocations (#5298) (@mrs)
- Handle conversion from sRGB to Linear-sRGB implicitly instead of calling `applyColorCorrection` (#5210) (@mrxz, @vincentfretin)
- Add Pico 4 headset controllers support (#5281) (@felixtrz)
- Update URL to basis encoder (#5329) (@vincentfretin)
- Add Spatial Computing UI example (#7ea40c13) (@dmarcos)
- Remove workaround for an old Chrome bug in the context of `a-assets` (#5335) (@mrxz)
- Unit tests improvements (@mrxz, @dmarcos)
- Consolidate references to the CDN URL in a global variable (#5333) (@diarmidmackenzie)
- Docs improvements (@luc122c, @donmccurdy, @turbotimon, @lainshiHenry, @Rhys-Alexander, @vincentfretin, @dmarcos)

### Deprecations

- `vr-mode-ui` component renamed to `xr-mode-ui` (@dmarcos)
- GearVR and Daydream support (@vincentfretin, @dmarcos)


### 1.4.2 (Apr 22, 2023)

### Bug fixes

- Fix issue when Quest 2 touch buttons are pressed before model has loaded (#5212, #5220) (@vincentfretin @mikemainguy)
- Fix orientation of hand tracking models (fix #4848) (@DougReeder)
- Fix problem with <a-assets> where image load quickly before the onload listener is attached. Manifests in particular for browser cached images (fix #5251) (@tomfelder94)
- Fix loading order when A-Frame is used along defer and modules script tags (fix #5228) (@wmurphyrd)
- Fix raycaster visual appearance when origin is not 0,0,0 (fix https://github.com/aframevr/aframe/issues/4882) (https://github.com/aframevr/aframe/pull/4884) (@Clicky02)
- Fix problem when adding a single property component via mixin (#5273) (@kfarr @dmarcos)
- Fix exception when trying to reference this pointer inside callback. (https://github.com/aframevr/aframe/pull/5221) (@diarmidmackenzie)
Change vertexColors property name to vertexColorsEnabled and make it a boolean to match THREE API (https://github.com/aframevr/aframe/pull/5250) (@diarmidmackenzie)

### Enhancements

- Add WebXR unit tests (https://github.com/aframevr/aframe/pull/5227) (@diarmidmackenzie)
Expose low / high refresh rates options for WebXR devices (https://github.com/aframevr/aframe/pull/5217) (@diarmidmackenzie)
- Docs improvements (@Srile @DougReeder @foobar404 @stefan-langenmaier @vincentfretin @diarmidmackenzie @dmarcos)


### 1.4.1 (Jan 6, 2023)

### Bug fixes

- Fix error when exiting immersive mode (fix https://github.com/aframevr/aframe/issues/5137)(https://github.com/aframevr/aframe/pull/5198) (@vincentfretin)
- Fix issue reentering immersive mode when using compositor layers (fix #5197) (https://github.com/supermedium/three.js/pull/9) (@vincentfretin)


### 1.4.0 (Dec 26, 2022)

A-Frame moved to custom elements V1, Oculus Quest Pro support, and tons of fixes and improvements in both A-Frame core and inspector 👏
A-Frame moved to custom elements V1, Oculus Quest Pro support, and tons of fixes and improvements in both A-Frame core and inspector 👏

28 A-Framers contributed to this one! You're awesome 🙇
28 A-Framers contributed to this one! You're awesome 🙇

[Sponsor](https://github.com/sponsors/dmarcos) A-Frame to help us move the 3D Web forward.
[Sponsor](https://github.com/sponsors/dmarcos) A-Frame to help us move the 3D Web forward.

You can also [buy a cool t-shirt](https://cottonbureau.com/p/SX82KC/shirt/a-frame-og#/9479538/tee-men-standard-tee-vintage-black-tri-blend-s) 👕
You can also [buy a cool t-shirt](https://cottonbureau.com/p/SX82KC/shirt/a-frame-og#/9479538/tee-men-standard-tee-vintage-black-tri-blend-s) 👕

### Major Changes

- Move A-Frame to [Custom Elements V1](https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements) API from the now deprecated [Custom Elements V0](https://chromestatus.com/feature/4642138092470272) (fix #4262) (#5136) (@dmarcos)
- Move build system from Browserify to Webpack adding support for ESM (#5116) (@vincentfretin)
- Move build system from Browserify to Webpack adding support for ESM (#5116) (@vincentfretin)
- Update to THREE r147 (@dmarcos @AdaRoseCannon @vincentfretin)

### Deprecations

- Cardboard mode is now disabled by default as a first step towards deprecation. Magic window is now the fallback on mobile when native WebXR API is not available (fix #4814) (@dmarcos)

### Enhancements
### Enhancements

- Add support for Meta Quest Touch Pro controllers (fix #5138) (#5139) (@felixtrz @cabanier @dmarcos)
- Replace `targetRaySpace` with `gripSpace to position WebXR tracked controllers (#88e8db12) (@felixtrz @dmarcos)
- Add support for KTX2 texture compression in [gltf-model component](https://aframe.io/docs/1.3.0/components/gltf-model.html#sidebar) (#5101) (@jameskane05)
- Add a default for Draco decoder URL for the [gltf model component](https://aframe.io/docs/1.3.0/components/gltf-model.html#sidebar) (#5156) (@kfarr)
- Hide fullscreen button in desktop mode on iPad. Safari doesn't seem to support fullscreen mode. (fix #4841) (#5191)
- Detach inactive pool entities from THREE Scene avoiding unnecessary matrix updates and raycaster checks / hits (#5188) (@diarmidmackenzie)
- Detach inactive pool entities from THREE Scene avoiding unnecessary matrix updates and raycaster checks / hits (#5188) (@diarmidmackenzie)
- Add support for WebXR [foveation level](https://aframe.io/docs/1.3.0/components/renderer.html#foveationlevel). Only WebVR API was previously supported (fix #5108) (#5110) (@mrxz)
- Events emitted on a cursor entity also pass original [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) and [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) events when applies.
- Update unit test stack and fix test suite (#5091) (@vincentfretin)
Expand All @@ -41,7 +196,7 @@ You can also [buy a cool t-shirt](https://cottonbureau.com/p/SX82KC/shirt/a-fram
### Bug fixes

- Fix `triggerchanged` event not firing with Oculus Quest 2 controllers (#5149) (@msub2)
- Fix issue of loading screen displayed indefinitely (#5033) (@diarmidmackenzie)
- Fix issue of loading screen displayed indefinitely (#5033) (@diarmidmackenzie)
- Remove duplicated update shader logic (#6858ed66) (@dmarcos)
- Fix ray positioning for Oculus Quest 2 controllers (#5141) (@felixtrz)
- Fix reflection component removal (#5125) (@vincentfretin)
Expand All @@ -63,9 +218,9 @@ You can also [buy a cool t-shirt](https://cottonbureau.com/p/SX82KC/shirt/a-fram

Huge pile of fixes!

[Sponsor](https://github.com/sponsors/dmarcos) A-Frame to help us move the 3D Web forward.
[Sponsor](https://github.com/sponsors/dmarcos) A-Frame to help us move the 3D Web forward.

You can also [buy a cool t-shirt](https://cottonbureau.com/products/fragments#/6821945/tee-men-standard-tee-vintage-black-tri-blend-s) 👕
You can also [buy a cool t-shirt](https://cottonbureau.com/products/fragments#/6821945/tee-men-standard-tee-vintage-black-tri-blend-s) 👕

### Major Changes

Expand All @@ -92,7 +247,7 @@ You can also [buy a cool t-shirt](https://cottonbureau.com/products/fragments#/6
- Automatic generation of environment map (#4797) (@AdaRoseCannon)
- Fix copy in device orientation permission dialog (#4794) (@antoninklopp)

### Enhancements
### Enhancements

- Add phong shader to [material component](https://aframe.io/docs/1.2.0/components/material.html#sidebar) (#5001) (@AdaRoseCannon)
- Allow newer npm version in package.json (#4870) (@cwadrupldijjit)
Expand Down
Loading

0 comments on commit cfb2d68

Please sign in to comment.