Embedding three.js in WordPress 워드프레스에서 three.js 사용

Embedding three.js in WordPress

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

The little piece of code that I added (under the “text” tab in WordPress’ backend) looks like this:

<iframe src="http://3dspace.com/3dassets/experiments/demo1.html" width="700" height="300" scrolling="no"></iframe>

A little bit of explanation of what’s going on in there:

  • src points to where the html file (with the three.js payload) lives on my server. I have to ftp the file into that location – so this isn’t a very “WordPress” solution. But, other than the ftp part, there’s no headaches.
  • the height and width I chose are maximums, as far as the .css is concerned. I’m using the twentysixteen theme, and it nicely keeps the size of the iframe within the device window. Though – you do have to reload the page when you resize the window – the three.js part isn’t able to adapt to new window sizes on the fly.
  • scrolling is an extra argument that gets rid of the scrollbars on the iframe.

And that’s it. Pretty close to a no-brainer. Which, for me is a bit of a relief. I had been monkeying with adding three.js code in WordPress’ backend – but I found that the backend was helpfully adding html mark-up to my javascript, and that the css/layout issues were nontrivial, to say the least.

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
4 [Bootstrap3] Bootstrap 기본 졸리운_곰 2020.02.20 506
3 bootstrap 시작하기 file 졸리운_곰 2017.01.29 718
2 Bootstrap 사용법 file 졸리운_곰 2017.01.29 716
1 Bootstrap file 졸리운_곰 2017.01.29 365
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED