HMR for blockly blocks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ObjectType, ObjectInstanceRigidBody, RuntimeGameObjectInstance, RuntimeObjectInstance } from "../types";
|
||||
import type { ObjectType, RuntimeGameObjectInstance, RuntimeObjectInstance } from "../types";
|
||||
import { useEffect, useImperativeHandle, useRef, type Ref } from "react";
|
||||
import { Euler, Quaternion, type Group } from "three";
|
||||
import { Instance, Instances } from "@react-three/drei";
|
||||
@@ -94,9 +94,9 @@ export const ObjectViewInternal = function ({ object, objectType, ref, ...props
|
||||
return;
|
||||
const otherObj = Object.values(game.scene.objects)
|
||||
.find((o) => o.rb()?.handle === otherHandle);
|
||||
game.emitEvent('object_touch_start', { object: gameObj, other: otherObj });
|
||||
game.emitEvent('objectTouchStart', { object: gameObj, other: otherObj });
|
||||
if (otherObj?.id === game.scene.playerObjectId)
|
||||
game.emitEvent('player_touch_start', { object: gameObj, other: otherObj });
|
||||
game.emitEvent('playerTouchStart', { object: gameObj, other: otherObj });
|
||||
}}
|
||||
onSync={(data) => {
|
||||
runInAction(() => {
|
||||
|
||||
Reference in New Issue
Block a user