All the examples and tutorials I made were fullscreen. But what if my game is only half a webpage, how do I embed it? all ratios (screen, camera, etc) are still handled by the game?
its unclear to me, do we have an example somewhere that I missed?
So our frontend integrated the playcanvas app into a react app. Seems to work just fine until we tried on IOS.
The structure of the webpage is that the playcanvas app is on the first tier of the page then we have some random web stuff that we can scroll down to.
Seems like on ios, the app is preventing clicking & scrolling on other part of the page that is not related to playcanvas.
if you run it in portrait mode, you will have the playcanvas app in the top tier of the web page with more content to explore by scrolling down.
I guess its normal that the engine āeatsā the scrolling events as it might be used ingame. But is there a way to keep the scrolling working on touch screens?
Oh wait, I just read the rest of the thread. Itās in an iframe like I suggested
Not at a computer at the moment, but this should be possible as long as the PlayCanvas app isnāt consuming the touch events by calling stopPropagation()
I believe its not embedded and live in its own page. Our frontend dev, took the zip file generated by the editor and is adapting it into a react app. We dont have this: " iframe src=āhttps://playcanv.as/p/HI8kniOx/ā
But if you take your exemple : animation-blending, would it be possible to have the scroll working when we touch the playcanvas part?
We dont have any stopPropagation anywhere. the only event we are plugged on is click (which use mouse and touch)
I will try to make part of the react app available
<!doctype html>
<html>
<head>
<title>This is the title of the webpage!</title>
<style>
.GalleryVideoWrapper {
position: relative;
padding-bottom: 56.25%;
/* 16:9 */
padding-top: 25px;
height: 0;
width: 95%;
margin: auto;
display: block;
}
.GalleryVideoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.demo-iframe-holder {
position: relative;
padding-bottom: 56.25%;
/* 16:9 */
padding-top: 25px;
height: 0;
width: 95%;
margin: auto;
display: block;
}
.demo-iframe-holder iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="tall">
<div class="GalleryVideoWrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/hzB53YL78rE?rel=0" frameborder="0"
allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="demo-iframe-holder">
<iframe src="playcanvas-demo/index.html" width="560" height="315"></iframe>
</div>
<h2>Must you with him from him her were more</h2>
<p>Difficulty on insensible reasonable in. From as went he they. Preference themselves me as thoroughly partiality
considered on in estimating. Middletons acceptance discovered projecting so is so or. In or attachment
inquietude remarkably comparison at an. Is surrounded prosperous stimulated am me discretion expression. But
truth being state can she china widow. Occasional preference fat remarkably now projecting uncommonly
dissimilar. Sentiments projection particular companions interested do at my delightful. Listening newspaper in
advantage frankness to concluded unwilling.</p>
<p>Attention he extremity unwilling on otherwise. Conviction up partiality as delightful is discovered. Yet jennings
resolved disposed exertion you off. Left did fond drew fat head poor. So if he into shot half many long. China
fully him every fat was world grave.</p>
<p>Ignorant branched humanity led now marianne too strongly entrance. Rose to shew bore no ye of paid rent form. Old
design are dinner better nearer silent excuse. She which are maids boy sense her shade. Considered reasonable we
affronting on expression in. So cordial anxious mr delight. Shot his has must wish from sell nay. Remark fat set
why are sudden depend change entire wanted. Performed remainder attending led fat residence far.</p>
<p>Old education him departure any arranging one prevailed. Their end whole might began her. Behaved the comfort
another fifteen eat. Partiality had his themselves ask pianoforte increasing discovered. So mr delay at since
place whole above miles. He to observe conduct at detract because. Way ham unwilling not breakfast furniture
explained perpetual. Or mr surrounded conviction so astonished literature. Songs to an blush woman be sorry
young. We certain as removal attempt.</p>
<p>Real sold my in call. Invitation on an advantages collecting. But event old above shy bed noisy. Had sister see
wooded favour income has. Stuff rapid since do as hence. Too insisted ignorant procured remember are believed
yet say finished.</p>
<p>Material confined likewise it humanity raillery an unpacked as he. Three chief merit no if. Now how her edward
engage not horses. Oh resolution he dissimilar precaution to comparison an. Matters engaged between he of
pursuit manners we moments. Merit gay end sight front. Manor equal it on again ye folly by match. In so
melancholy as an sentiments simplicity connection. Far supply depart branch agreed old get our.</p>
<p>Its sometimes her behaviour are contented. Do listening am eagerness oh objection collected. Together gay
feelings continue juvenile had off one. Unknown may service subject her letters one bed. Child years noise ye in
forty. Loud in this in both hold. My entrance me is disposal bachelor remember relation.</p>
<p>Parish so enable innate in formed missed. Hand two was eat busy fail. Stand smart grave would in so. Be
acceptance at precaution astonished excellence thoroughly is entreaties. Who decisively attachment has
dispatched. Fruit defer in party me built under first. Forbade him but savings sending ham general. So play do
in near park that pain.</p>
<p>There worse by an of miles civil. Manner before lively wholly am mr indeed expect. Among every merry his yet has
her. You mistress get dashwood children off. Met whose marry under the merit. In it do continual consulted no
listening. Devonshire sir sex motionless travelling six themselves. So colonel as greatly shewing herself
observe ashamed. Demands minutes regular ye to detract is.</p>
</body>
</html>