mobile device ratio
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import HouseItem from "./HouseItem";
|
||||
import { VILLAS } from "../../../consts/villas";
|
||||
// a1t/m, b2t/m
|
||||
const enableVillas = ["a1t", "a1m", "b2t", "b2m"];
|
||||
|
||||
const HouseList = () => {
|
||||
|
||||
@@ -23,7 +23,7 @@ const MobileApartmentPage = () => {
|
||||
const { unityProvider, sendMessage, addEventListener, removeEventListener } =
|
||||
useUnity();
|
||||
const [isContainerLoaded, setIsContainerLoaded] = useState(false);
|
||||
const isDeviceSupported = !(Number(osVersion) < 17 && isIOS);
|
||||
const isDeviceSupported = (Number(osVersion) > 17 && isIOS) || !isIOS;
|
||||
|
||||
useEffect(() => {
|
||||
if (!isDeviceSupported) {
|
||||
@@ -85,6 +85,7 @@ const MobileApartmentPage = () => {
|
||||
<ButtonPanel />
|
||||
{isDeviceSupported && (
|
||||
<Unity
|
||||
devicePixelRatio={2}
|
||||
unityProvider={unityProvider}
|
||||
style={{ width: "100vw", height: "100vh" }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user