Skip to content

Commit

Permalink
2024.2.1 (#226)
Browse files Browse the repository at this point in the history
* unparent skybox from zone

Skybox is no longer attached to zone and now displays behind everything else as "infinite." This is one step towards allowing for multiple zones to work properly.

* Fixed a repeated typo across multiple files

- changed entity.copyFormPacketData(props) to entity.copyFromPacketData(props) in multiple files
- changed `"Receive entity data:`, data)" to "Receive entity data:", data.length.toString())"

* Add compound shape url handling to zone entity.

* Added initial mesh to Zones

- each zone now has a child mesh matching dimensions. Used "shapeType" so that we can change the mesh later for custom shapes.

* Set skybox to a fixed distance of 10000

-skybox set to 10000 instead of pulling the zone dimensions

* redirected sara.glb to local file

-we were loading this file from a server rather than from the local copy (which was already in the assets folder).

* Zone now detects when MainCamera is within it's bounds

-detections for when a camera exists or enters a zone.

* Fixed "undefined" ZoneEntityController name

ZoneEntityController will now get it's suffix and ID from it's parent Zone

* Add timer to Zone check

- Instead of checking which zone we are in every frame, I've set the timer to every 200ms for the time being.

* Fixed small bugs to reduce start warnings

-minor bugfixes
-some defined but unused elements commented out with TODO

* Reverting changes

-pushed at the wrong stage. Whoopsie.

* Initial support for multiple zones added

-you can now have multiple zones that will switch skybox backgrounds and settings depending on which zone's bounding box/shape the camera within at the time.

* Zone Properties & Skybox Sync

-Switching of Zone Properties and the display of skyboxes are now on the same timer found in ZoneManager.ts

* -foundation for compound mesh shaped zones

-This lays the foundation for being able to use a glb file as your zone shape.

* Custom compound mesh for zones now working

-you can now enter a compound URL (glb) and use this to control the shape of your zone.

* Added option to disable bevels and regain 15-20 fps

-created "const enableBevels" Bool and set default to "false" for the time being.

* Added the option to enable or disable alpha effects on nametags/labels

added new "const enableAlpha " property and switched off transparency effects on labels as default.

* Attempt to fix macOS build.

---------

Co-authored-by: Aitolda <[email protected]>
  • Loading branch information
digisomni and Aitolda authored Oct 16, 2024
1 parent bea1e0b commit 3b58c6f
Show file tree
Hide file tree
Showing 23 changed files with 947 additions and 564 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,29 @@ yarn-error.log*
*.njsproj
*.sln
VERSION.json

# Ignore BabylonJS_Docs folder
/BabylonJS_Docs/
public/local-assets/cityscape2048f.png
public/local-assets/Collisions_10-25-2023.glb
public/local-assets/Decor_10-25-2023.glb
public/local-assets/Foliage_10-25-2023.glb
public/local-assets/FurnitureCulling_10-25-2023.glb
public/local-assets/Headquarters_10-25-2023.glb
public/local-assets/Hologram_10-25-2023.glb
public/local-assets/LandscapeTilesLOD_10-25-2023.glb
public/local-assets/LandscapeTrimLOD_10-25-2023.glb
public/local-assets/LandscapeWalkwayLOD_10-25-2023.glb
public/local-assets/OuterWrap_10-25-2023.glb
public/local-assets/Path_10-25-2023.glb
public/local-assets/Reflections1k.hdr
public/local-assets/SitObjects_10-25-2023.glb
public/local-assets/SitObjectsNoSit_10-25-2023.glb
public/local-assets/Water_10-25-2023.glb
public/local-assets/Waterfalls_10-25-2023.glb
src/modules/directory_structure.txt
public/local-assets/Skybox2k.png
public/local-assets/Reflections4.hdr
public/local-assets/monkey.glb
public/local-assets/Cylinder.glb
public/local-assets/Meters.glb
47 changes: 24 additions & 23 deletions desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[package]
name = "vircadia-desktop"
version = "0.0.0"
description = ""
authors = ["DigiSomni", "Giga", "Vircadia Contributors"]
license = ""
repository = ""
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.5", features = [] }

[dependencies]
tauri = { version = "1.5", features = ["shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]
[package]
name = "vircadia-desktop"
version = "0.0.0"
description = ""
authors = ["DigiSomni", "Giga", "Vircadia Contributors"]
license = ""
repository = ""
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.5", features = [] }

[dependencies]
tauri = { version = "1.5", features = ["shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
time = "0.3.35"

[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]
8 changes: 4 additions & 4 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ module.exports = configure(function (ctx) {
JSON.stringify({
HTP45FSQ: {
name: "Sara",
image: "https://staging.vircadia.com/O12OR634/UA92/sara-cropped-small.webp",
file: "https://staging.vircadia.com/O12OR634/UA92/sara.glb",
image: "/assets/models/avatars/sara-cropped-small.webp",
file: "/assets/models/avatars/sara.glb",
scale: 1,
starred: true,
starred: false,
},
KLM23NOP: {
name: "Mark",
Expand Down Expand Up @@ -391,7 +391,7 @@ module.exports = configure(function (ctx) {
image: "/assets/models/avatars/Maria-small.webp",
file: "/assets/models/avatars/Maria.glb",
scale: 1,
starred: false,
starred: true,
}),
},
},
Expand Down
207 changes: 105 additions & 102 deletions src/modules/entity/EntityInterfaces.ts
Original file line number Diff line number Diff line change
@@ -1,102 +1,105 @@
//
// IEntity.ts
//
// Created by Nolan Huang on 3 Aug 2022.
// Copyright 2022 Vircadia contributors.
// Copyright 2022 DigiSomni LLC.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
import { IEntityProperties, ISpatialProperties, IBehaviorProperties,
IModelEProperties, IShapeProperties, ILightProperties,
IZoneProperties, IImageProperties, IMaterialProperties, IWebProperties } from "./EntityProperties";
import { Observable } from "@babylonjs/core";

export interface IEntity extends
IEntityProperties,
ISpatialProperties,
IBehaviorProperties {

onCommonPropertiesChanged?: Observable<IEntity>;
onParentChanged?: Observable<IEntity>;
onPositionAndRotationChanged?: Observable<IEntity>;
onDimensionChanged?: Observable<IEntity>;
onRenderModeChanged?: Observable<IEntity>;
onScriptChanged?: Observable<IEntity>;
onUserDataChanged?: Observable<IEntity>;
onCollisionPropertiesChanged?: Observable<IEntity>;
onPhysicsPropertiesChanged?: Observable<IEntity>;
}

export interface IModelEntity extends
IEntity,
IModelEProperties {

onModelURLChanged?: Observable<IEntity>;
onAnimationChanged?: Observable<IEntity>
}

export type JitsiSettings = {
roomID: string;
roomName: string;
};

export type WebExtensions = {
jitsi: JitsiSettings | undefined
};

export interface IWebEntity extends
IEntity,
IWebProperties {

onColorChanged: Observable<IEntity>;
onSourceURLChanged: Observable<IEntity>;
onWebPropertiesChanged: Observable<IEntity>;
}

export interface IShapeEntity extends
IEntity,
IShapeProperties {

onShapeChanged?: Observable<IEntity>;
onColorChanged?: Observable<IEntity>;
}

export interface ILightEntity extends
IEntity,
ILightProperties {

onLightPropertiesChanged?: Observable<IEntity>;
onLightTypeChanged?: Observable<IEntity>;
}

export interface IZoneEntity extends
IEntity,
IZoneProperties {

onShapeTypeChanged: Observable<IEntity>;
onAmbientLightPropertiesChanged: Observable<IEntity>;
onKeyLightPropertiesChanged: Observable<IEntity>;
onSkyboxPropertiesChanged: Observable<IEntity>;
onHazePropertiesChanged: Observable<IEntity>;
onBloomPropertiesChanged: Observable<IEntity>;
}

export interface IImageEntity extends
IEntity,
IImageProperties {

onColorChanged: Observable<IEntity>;
onImageURLChanged: Observable<IEntity>
}

export interface IMaterialEntity extends
IEntity,
IMaterialProperties {

onMaterialDataChanged?: Observable<IEntity>;
onMaterialMappingModeChanged?: Observable<IEntity>;
onMaterialPriorityChanged?: Observable<IEntity>;
onParentMaterialNameChanged?: Observable<IEntity>;
}
//
// IEntity.ts
//
// Created by Nolan Huang on 3 Aug 2022.
// Copyright 2022 Vircadia contributors.
// Copyright 2022 DigiSomni LLC.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
import {
IEntityProperties, ISpatialProperties, IBehaviorProperties,
IModelEProperties, IShapeProperties, ILightProperties,
IZoneProperties, IImageProperties, IMaterialProperties, IWebProperties
} from "./EntityProperties";
import { Observable } from "@babylonjs/core";

export interface IEntity extends
IEntityProperties,
ISpatialProperties,
IBehaviorProperties {

onCommonPropertiesChanged?: Observable<IEntity>;
onParentChanged?: Observable<IEntity>;
onPositionAndRotationChanged?: Observable<IEntity>;
onDimensionChanged?: Observable<IEntity>;
onRenderModeChanged?: Observable<IEntity>;
onScriptChanged?: Observable<IEntity>;
onUserDataChanged?: Observable<IEntity>;
onCollisionPropertiesChanged?: Observable<IEntity>;
onPhysicsPropertiesChanged?: Observable<IEntity>;
}

export interface IModelEntity extends
IEntity,
IModelEProperties {

onModelURLChanged?: Observable<IEntity>;
onAnimationChanged?: Observable<IEntity>
}

export type JitsiSettings = {
roomID: string;
roomName: string;
};

export type WebExtensions = {
jitsi: JitsiSettings | undefined
};

export interface IWebEntity extends
IEntity,
IWebProperties {

onColorChanged: Observable<IEntity>;
onSourceURLChanged: Observable<IEntity>;
onWebPropertiesChanged: Observable<IEntity>;
}

export interface IShapeEntity extends
IEntity,
IShapeProperties {

onShapeChanged?: Observable<IEntity>;
onColorChanged?: Observable<IEntity>;
}

export interface ILightEntity extends
IEntity,
ILightProperties {

onLightPropertiesChanged?: Observable<IEntity>;
onLightTypeChanged?: Observable<IEntity>;
}

export interface IZoneEntity extends
IEntity,
IZoneProperties {

onShapeTypeChanged: Observable<IEntity>;
onCompoundShapeURLChanged: Observable<IEntity>;
onAmbientLightPropertiesChanged: Observable<IEntity>;
onKeyLightPropertiesChanged: Observable<IEntity>;
onSkyboxPropertiesChanged: Observable<IEntity>;
onHazePropertiesChanged: Observable<IEntity>;
onBloomPropertiesChanged: Observable<IEntity>;
}

export interface IImageEntity extends
IEntity,
IImageProperties {

onColorChanged: Observable<IEntity>;
onImageURLChanged: Observable<IEntity>
}

export interface IMaterialEntity extends
IEntity,
IMaterialProperties {

onMaterialDataChanged?: Observable<IEntity>;
onMaterialMappingModeChanged?: Observable<IEntity>;
onMaterialPriorityChanged?: Observable<IEntity>;
onParentMaterialNameChanged?: Observable<IEntity>;
}
10 changes: 5 additions & 5 deletions src/modules/entity/EntityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class EntityManager {
return undefined;
}
const entity = factory(props.entityItemID.stringify());
entity.copyFormPacketData(props);
entity.copyFromPacketData(props);
// prevent to emit change event
entity.update();

Expand All @@ -99,7 +99,7 @@ export class EntityManager {
public updateEntity(props: EntityProperties): void {
const entity = this._entities.get(props.entityItemID.stringify());
if (entity) {
entity.copyFormPacketData(props);
entity.copyFromPacketData(props);
}
}

Expand All @@ -114,7 +114,7 @@ export class EntityManager {
this._entityPropertiesArray.forEach((props) => {
const entity = this._entities.get(props.entityItemID.stringify());
if (entity) {
entity.copyFormPacketData(props);
entity.copyFromPacketData(props);
} else {
this.createEntity(props);
}
Expand All @@ -124,9 +124,9 @@ export class EntityManager {
}

private _handleOnEntityData(data: EntityProperties[]): void {
if (data.length > 0) {
if (data && data.length > 0) {
Log.info(Log.types.ENTITIES,
`Receive entity data:`, data);
"Receive entity data:", data.length.toString());

this._entityPropertiesArray = this._entityPropertiesArray.concat(data);
}
Expand Down
Loading

0 comments on commit 3b58c6f

Please sign in to comment.