Browse Source

new level and item fix

master
Cailean Finn 1 week ago
parent
commit
5580487e48
  1. 2
      data/drawings.json
  2. 4
      js/Player.js
  3. 10
      js/main.js
  4. 66
      public/json/ItemsNew.json
  5. BIN
      public/models/wip-world-exr-e.glb
  6. BIN
      public/models/wip-world-exr.glb

2
data/drawings.json

File diff suppressed because one or more lines are too long

4
js/Player.js

@ -20,7 +20,7 @@ export class Player {
this.rigibody = null;
this.collider = null;
this.moveSpeed = 20;
this.moveSpeed = 40;
this.mouseSensitivity = 0.002;
this.maxInteractionDistance = 200.0;
@ -609,7 +609,7 @@ export class Player {
if (this.enableInput) {
if (this.attachedItem && !this.renderer.xr.isPresenting) { // Only lock camera for desktop
this._lockCameraForAttachedItem();
this._lockCameraForAttachedItem();
} else if (!this.renderer.xr.isPresenting) { // Only update movement if not in VR
this._updatePlayerMovement(delta);
}

10
js/main.js

@ -24,7 +24,7 @@ import { ModelLoader } from './ModelLoader';
let scene, renderer;
let player;
let rapierWorld, debugLines, itemManager;
let debugRapier = false;
let debugRapier = true;
let isPaused = false;
let floorGridSize = new THREE.Vector2(10, 200);
const worldScale = 20.0;
@ -91,7 +91,7 @@ async function init() {
scene.add(player.playerRig);;
/* Load Items/Content */
loadWorldModel("models/demo-world-comp.glb");
loadWorldModel("models/wip-world-exr.glb");
instructions.innerHTML = "Click to play";
instructions.addEventListener( 'click', function () {
@ -133,8 +133,6 @@ async function init() {
}
}
});
//console.log(scene)
}
async function animate() {
@ -454,7 +452,7 @@ async function loadWorldModel(modelUrl) {
rapierWorld,
staticWorldGroup,
player,
true,
false,
object.position,
1,
object.name || 'static-world-object',
@ -489,7 +487,7 @@ async function loadWorldModel(modelUrl) {
});
itemManager = new ItemManager(
"json/Items.json",
"json/ItemsNew.json",
preloadedObjectsMap,
dynamicGroupsMap,
scene,

66
public/json/ItemsNew.json

@ -2,88 +2,88 @@
"items": [
{
"id": 0,
"groupId": "reddit_Sensordata",
"name": "Reddit_RawSensorData",
"groupId": "group_reddit_Sensordata",
"name": "dyBall",
"contentType": "image",
"file": "./images/reddit_Sensordata/Reddit_RawSensorData.png",
"links": []
},
{
"id": 1,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_0",
"groupId": "group_reddit_Dataconcerns",
"name": "dyDetergent",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_0.png",
"links": []
},
{
"id": 2,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_1",
"groupId": "group_reddit_Dataconcerns",
"name": "dyToy",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_1.png",
"links": []
},
{
"id": 3,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_2",
"groupId": "group_reddit_Dataconcerns",
"name": "dyCan",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_2.png",
"links": []
},
{
"id": 4,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_3",
"groupId": "group_reddit_Dataconcerns",
"name": "dyBottle",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_3.png",
"links": []
},
{
"id": 5,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_4",
"groupId": "group_reddit_Dataconcerns",
"name": "dyChair",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_4.png",
"links": []
},
{
"id": 6,
"groupId": "reddit_Dataconcerns",
"name": "reddit_Dataconcerns_5",
"groupId": "group_reddit_Dataconcerns",
"name": "dyCig",
"contentType": "image",
"file": "./images/reddit_Dataconcerns.png",
"file": "./images/reddit_Dataconcerns/reddit_Dataconcerns_5.png",
"links": []
},
{
"id": 7,
"groupId": "reddit_ChangeOS",
"name": "reddit_ChangeOS_0",
"groupId": "group_reddit_ChangeOS",
"name": "dyPan",
"contentType": "image",
"file": "./images/reddit_Change_OS.png",
"file": "./images/reddit_ChangeOS/reddit_ChangeOS_0.png",
"links": []
},
{
"id": 8,
"groupId": "reddit_ChangeOS",
"name": "reddit_ChangeOS_1",
"groupId": "group_reddit_ChangeOS",
"name": "dySoda",
"contentType": "image",
"file": "./images/reddit_Change_OS.png",
"file": "./images/reddit_ChangeOS/reddit_ChangeOS_0.png",
"links": []
},
{
"id": 9,
"groupId": "XR_FLOSS_Init",
"name": "XR_FLOSS_Init",
"groupId": "group_XRFLOSS",
"name": "dyLettuce",
"contentType": "text",
"file": "./text/XR_FLOSS_Init.md",
"file": "./texts/XR_FLOSS_Init.md",
"links": []
},
{
"id": 10,
"groupId": "Quest3_root_demo",
"name": "Quest3_root_demo.mov",
"groupId": "group_Q3Root",
"name": "dyRifle",
"contentType": "video",
"file": "./videos/Quest3_root_demo.mov",
"links": []
@ -91,7 +91,7 @@
],
"groupLinks": [
["Quest3_root_demo", "reddit_ChangeOS"],
["reddit_Dataconcerns", "reddit_Sensordata"]
["group_Q3Root", "group_reddit_ChangeOS"],
["group_reddit_Dataconcerns", "group_reddit_Sensordata"]
]
}

BIN
public/models/wip-world-exr-e.glb (Stored with Git LFS)

Binary file not shown.

BIN
public/models/wip-world-exr.glb (Stored with Git LFS)

Binary file not shown.
Loading…
Cancel
Save