Skip to content

Commit

Permalink
use library 0.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshikiohshima committed Sep 7, 2023
1 parent a75e619 commit d4512f8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>Microverse</title>
<link id="microverse-css" rel="stylesheet" href="./assets/css/microverse.css" />
<script defer src="lib/index-bcc3336e.js"></script></head>
<script defer src="lib/index-d42aa9b0.js"></script></head>

<body class="no-select">
</body>
Expand Down
17 changes: 13 additions & 4 deletions lib/index-bcc3336e.js → lib/index-d42aa9b0.js
Original file line number Diff line number Diff line change
Expand Up @@ -8930,8 +8930,15 @@ const PM_ThreeCamera = superclass => class extends (0,_worldcore__WEBPACK_IMPORT
render.camera.matrixWorldNeedsUpdate = true;
}

setRaycastFrom2D(xy) {
setRaycastFrom2D(eventXY) {
// eventXY is now from offsetX and offsetY of the DOM event.
const render = this.service("ThreeRenderManager");
let xy = [...eventXY];
if (render.useDevicePixelRatio) {
xy[0] *= window.devicePixelRatio;
xy[1] *= window.devicePixelRatio;
}

const x = ( xy[0] / render.canvas.width ) * 2 - 1;
const y = - ( xy[1] / render.canvas.height) * 2 + 1;
if (!this.raycaster) this.raycaster = new THREE.Raycaster();
Expand Down Expand Up @@ -9275,6 +9282,7 @@ class ThreeRenderManager extends _worldcore__WEBPACK_IMPORTED_MODULE_0__.RenderM
// this.renderer.outputColorSpace = THREE.LinearSRGBColorSpace;
this.renderer.toneMappingExposure = 1.4;

this.useDevicePixelRatio = !!options.useDevicePixelRatio;
if (options.useDevicePixelRatio) {
this.renderer.setPixelRatio(window.devicePixelRatio);
this.listenOnDevicePixelRatio();
Expand Down Expand Up @@ -11066,10 +11074,11 @@ class AvatarActor extends (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.mix)(_card_

addSticky(pe) {
if (!this.behaviorManager.hasBehavior("StickyNote")) {return;}
if (!pe.xyz) {return;}
const tackOffset = 0.1;
let tackPoint = (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.v3_add)(pe.xyz, (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.v3_scale)(pe.normal, tackOffset));
let normal = [...pe.normal]; // clear up and down
normal[1] = 0;
let normal = pe.normal || [0, 0, 1];
let tackPoint = (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.v3_add)(pe.xyz, (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.v3_scale)(normal, tackOffset));
normal = [normal[0], 0, normal[2]]; // clear up and down
let nsq = (0,_worldcore__WEBPACK_IMPORTED_MODULE_0__.v3_sqrMag)(normal);
let rotation;
if (nsq > 0.0001) {
Expand Down
2 changes: 1 addition & 1 deletion meta/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
commit: ae0c614f57c1bf578c1b807f26080dbb5445b86e Date: Fri Sep 1 13:19:23 2023 -0700
commit: a3e176311e950065755e7ea14f7151e04ade16e8 Date: Wed Sep 6 16:12:40 2023 -0700
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"watch-server": "watch-server"
},
"dependencies": {
"@croquet/microverse-library": "^0.7.7"
"@croquet/microverse-library": "^0.7.8"
},
"devDependencies": {
"@croquet/microverse-file-server": "^1.0.7",
Expand Down

0 comments on commit d4512f8

Please sign in to comment.