Skip to content

Commit

Permalink
Merge branch 'main' into notify-methods-in-STREET
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Dec 8, 2023
2 parents d4a9dfb + c9c7250 commit dd39083
Show file tree
Hide file tree
Showing 18 changed files with 674 additions and 181 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.4.2 - 2023-11-12

### What's Changed

### Major improvements
* Internal release and bugfixes prior to 0.5.0 release (no new user-facing features)
* metadata component support for title and sceneId
* notification framework
* STREET global
* screenshot (screentock)
* Modern VR UI controls (second try since long ago, but v1 for blink controls)
* bugfixes for save / load: mapbox, intersection, not storing extra street json

## 0.4.1 - 2023-08-08

### What's Changed
Expand Down
23 changes: 19 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# How to contribute to 3DStreet

We welcome community contributions to 3dstreet.

## Instructions
We welcome community contributions to 3DStreet.

## Release checklist for this repo:
- After all testing is done and things work well enough for a release.
- Bump the version on package.json & package-lock.json (for example from 0.4.2 to 0.4.4)
- Re-run npm run dist (rerun the build, it hardcodes the version into global var used for console log)
- Commit this all to the repo
- Use command line to create new tag for new version `git tag 0.4.4` and `git push --tags`
- Create a new release here: https://github.com/3DStreet/3dstreet/releases/new. Choose the tag you just created. (If needed for the title simply use the new version such as "0.4.4")
- Click to automatically "generate release notes." Consider summarizing a few key changes to put at the top.
- Use those summaries to update CHANGELOG.md in this repo with "Major improvement" changes summary and link to the new release for detailed changes
- Update https://www.3dstreet.org/docs/development/releases/ with summary of major improvements and linking back to the new release on github.
- Then to run npm publish after all github version stuff works

## Updating assets submodule:
- from the repo's root directory run `git submodule update --remote` to update the assets submodule

## Contribution Instructions
* fork the repo
* make your contribution
* make sure to do check for linting and unit test:
Expand All @@ -15,7 +30,7 @@ We welcome community contributions to 3dstreet.
* Either change your code so that the test passes once again, or
* You might need to update the tests

### About 3dstreet test
### About 3DStreet test

A small portion of 3dstreet code is tested. All of this code lives in this directory [/src/tested/](https://github.com/3DStreet/3dstreet/tree/main/src/tested)

Expand Down
4 changes: 2 additions & 2 deletions dist/aframe-street-component.js

Large diffs are not rendered by default.

54 changes: 33 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<!-- aframe -->
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>

<!-- 3dstreet -->
<script src="./dist/aframe-street-component.js"></script>
Expand All @@ -13,9 +13,6 @@
<!-- save / load -->
<script src="./src/json-utils.js"></script>

<!-- ocean -->
<script src="./src/components/ocean.js"></script>

<!-- vr teleport controls -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aframe-blink-controls.min.js"></script>

Expand Down Expand Up @@ -44,6 +41,23 @@
</head>

<body>
<!-- loading animation start -->
<div class="loader__wrapper">
<div class="loader">
<div class="entities">
<img src="./ui_assets/loader/entities.svg" alt="entities" />
</div>
<div class="transport">
<div class="wrapper__transport">
<img src="./ui_assets/loader/car.svg" class="car" alt="car" />
<img src="./ui_assets/loader/bus.svg" class="bus" alt="bus" />
<img src="./ui_assets/loader/bike.svg" class="bike" alt="bike" />
</div>
</div>
<div class="road">Loading 3DStreet</div>
</div>
</div>

<!-- viewer ui start -->
<div class="viewer-header-wrapper">
<button class="viewer-logo-start-editor-button" onclick="startEditor()">
Expand All @@ -57,15 +71,11 @@
<li onclick="inputStreetmix()"> <a class="load" href="#"> <span> Load Streetmix URL </span> <img src="ui_assets/streetmix-logo.svg"> </a></li>
<!-- <li onclick="inputJSON()"> <a class="load" href="#"> <span> Load JSON String </span> <img src="assets/ui_assets/upload-icon.svg"> </a></li> -->
<li><a class="load"> <label for="inputfile" style="display: inherit; align-items: center; cursor: pointer"> <input type="file" id="inputfile" style="display:none" accept=".js, .json, .txt"> <span> Load JSON File </span> <img src="ui_assets/upload-icon.svg"></label></a></li>
<li> <a id="custom-enter-vr-button" class="vr" href="#"> <span class="vr">Enter VR mode</span> <img src="ui_assets/vr.svg"> </a></li>
<li> <a id="custom-enter-ar-button" class="ar" href="#"> <span class="ar">Enter AR mode</span> <img src="ui_assets/ar.svg"> </a></li>
</ul>
</div>

<a-scene
vr-mode-ui="enterVRButton: #custom-enter-vr-button; enterARButton: #custom-enter-ar-button;"
vr-mode-ui-if-headset
renderer="colorManagement: true; physicallyCorrectLights: true;"
renderer="colorManagement: true; physicallyCorrectLights: true; anisotropy: 16;"
inspector="url: //3dstreet.app/dist/3dstreet-editor.js"
notify
metadata
Expand All @@ -78,11 +88,11 @@
<!-- uncomment the line below to load all possible asset categories -->
<!-- <street-assets categories="sidewalk-props people people-rigged vehicles vehicles-rigged buildings intersection-props segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets> -->
<!-- a reduced set of assets for non-animated streetmix streets without intersections -->
<street-assets categories="loud-bicycle sidewalk-props people-rigged vehicles vehicles-rigged buildings segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets>
<street-assets categories="loud-bicycle sidewalk-props people vehicles vehicles-rigged buildings segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets>
</a-assets>

<a-entity id="street-container" data-layer-name="3D Street Layers" data-layer-show-children>
<a-entity id="default-street" street="length: 60; globalAnimated: true;" streetmix-loader set-loader-from-hash></a-entity>
<a-entity id="default-street" street streetmix-loader set-loader-from-hash></a-entity>
</a-entity>

<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children></a-entity>
Expand All @@ -98,21 +108,23 @@

</a-scene>
</body>
<script>
/* loading animation script */
document.addEventListener('DOMContentLoaded', function () {
const scene = document.querySelector('a-scene');
const splash = document.querySelector('.loader__wrapper');
scene.addEventListener('loaded', function (e) {
setTimeout(() => {
splash.style.display = 'none';
}, 1000);
});
});
</script>
<script>

document.getElementById('inputfile')
.addEventListener('change', fileJSON);

// only show VR button if headset connected
AFRAME.registerComponent('vr-mode-ui-if-headset', {
dependencies: ['vr-mode-ui'],
init: function () {
if (!AFRAME.utils.device.checkHeadsetConnected()) {
this.el.setAttribute('vr-mode-ui', 'enabled', false);
}
}
})

function buttonScreenshotTock() {
const screenshotEl = document.getElementById('screenshot');
screenshotEl.play(); // double check playing in case we're in editor mode
Expand Down
Loading

0 comments on commit dd39083

Please sign in to comment.