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

2024.2.1 #226

Merged
merged 19 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading