2022-03-01ãã1ã¶æéã®è¨äºä¸è¦§
Cloud Firestore ããªã¬ã¼ ã使ã£ã¦ãããã¥ã¡ã³ãã«å¤æ´ããã£ãéã«ããã·ã¥éç¥ãéã£ã¦ã¿ã¾ãããfirebase.google.com åæ Cloud Firestoreã«ããã¤ã¹ãã¼ã¯ã³ãä¿åããï¼tokensã³ã¬ã¯ã·ã§ã³ã«ããã¤ã¹IDãããã¥ã¡ã³ãIDã«ãã¦ä¿åããï¼ Cloud Firesâ¦
é¢é£è¨äº Expoã§ã¤ãã£ãã¢ããªã«ãã¼ã«ã«ãµã¼ãããããã·ã¥éç¥ãéã blog.kimizuka.org Expoã§ã¤ãã£ãã¢ããªã«ãµã¼ãããããã·ã¥éç¥ãéã blog.kimizuka.orgããã¾ã§ããã¼ã«ã«ãµã¼ãããããã·ã¥éç¥éä¿¡ããµã¼ãããããã·ã¥éç¥éä¿¡ã試ãã¾ãâ¦
ãã¨ã®çºç«¯ Expoã§ä½ã£ãã¢ããªããã©ã¢ã°ã©ã¦ã³ãã«ãªã£ãã¿ã¤ãã³ã°ãããªãã¡iOSã¢ããªã§ããã¨ããã®viewWillEnterForegroundãã©ãæ¸ãã®ããReact Nativeã®ããã¥ã¡ã³ãã§èª¿ã¹ãã¨ããã import { useRef, useState, useEffect } from 'react'; importâ¦
æã¯Cloud Functionsã«å ããCloud Pub/SubãCloud Schedulerã§è¨å®ãå¿ è¦ã ã£ãããã§ããããã¾ã¯Cloud Functionsã§è¨å®ããã°ãèªåçã«Cloud Pub/Subã®ãããã¯ã¨Cloud Schedulerã®ã¸ã§ããä½æããã¾ãã便å©ãªæ代ã«ãªãã¾ããããfirebase.google.comâ¦
çµè« firebase 9.6.7ã使ã£ãã解決ãããï¼expoã¯44.0.0ï¼ ãã¨ã®çºç«¯ ãã¡ãã®ããã¥ã¡ã³ããã¿ãªãããExpoã¢ããªã«Firebaseãå°å ¥ãããã¨ããã®ã§ãããiOSã§ãAndroidã§ãinitializeAppã®ã¿ã¤ãã³ã°ã§ãCan't find variableï¼IDBindexãã¨ã¨ã©ã¼ã表示â¦
è¿½è¨ Next.js 13以éã§ã®è¨å®æ¹æ³ãã¾ã¨ãã¾ãããblog.kimizuka.org Next.js 12ããå°å ¥ãããããã«ã¦ã§ã¢ã使ã£ã¦ãBasicèªè¨¼ãè¨å®ãããµã³ãã«ãè¦ã¤ããã®ã§è©¦ãã¦ã¿ã¾ãããnextjs.orggithub.com _middleware.ts import { NextRequest, NextResponse â¦
ãã¨ã®çºç«¯ expo startã§èµ·åããExpoã¢ããªã¯ãã¿ã¼ããã«ã§iãæ¼ä¸ãããã¨ã§iOSã·ãã¥ã¬ã¼ã¿ã¼ã§ãã¬ãã¥ã¼ãããã¨ãã§ãã¾ãã Macã«Xcodeã¨Command Line Toolsãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ãæ¡ä»¶ã¨ãªãã®ã§ããã両æ¹ã¤ã³ã¹ãã¼ã«ãã¦ãã â Xcode neâ¦
ååã¤ãã£ããExpoã¢ããªã«ããã·ã¥éç¥ãéããã¼ã«ã«ãµã¼ããblog.kimizuka.orgãããªããã¾ããã£ãã®ã§ãããããã®ã¾ã¾HerokuãããLambdaãããCloud Functionsããã«ãããã¤ããã°ãåé¡ãªãããã·ã¥éç¥ãé ããã¨æãè¾¼ãã§ãã¾ããããå·éã«èâ¦
ã¾ã çæã«ãã対å¿ã§ãã¦ã¾ããããã³ã³ããã¼ã©ã¼ã§ãªãã¸ã§ã¯ããæ´ããã¨ãã§ããWebVRãã¤ããã¾ããã cannon.jsã§ç©çæ¼ç®ãã¦ããã®ã§ãæ´ãã ãªãã¸ã§ã¯ããæ¾ãæãããã¨ãã§ãã¾ãã DEMO kimizuka.org å®è£ æ¹é ãã¦ã¹ã§3Dãªãã¸ã§ã¯ããæ´ãã§â¦
çµè« ãã¨ã®çºç«¯ Expoã®èª¿æ» Expoã®å°å ¥ ⶠã¢ã«ã¦ã³ãã®ä½æ â· ã¢ããªã®æºå ⸠expo-cliã®å°å ¥ â¹ expo-cliã«ãã°ã¤ã³ ããã·ã¥éç¥ãåä¿¡ããã¢ããªã®ä½æ ⶠããã¸ã§ã¯ãã®ä½æ â· expo-notificationsã®å°å ¥ ⸠app.jsonãç·¨é â¹ ã³ã¼ããæ¸ã App.tsx ããã·â¦
Cannon.js + Three.js + React.jsã§ã ãã¦ã¹åº§æ¨ã«å¿ãã¦åºãå¾ãã åæ¹ãè¦ããªãå£ã§å²ã ã¨ãã空éãä½ã£ã¦ããã®ãªç°¡æ3Dã®çãé ç½®ãã¦ã¿ã¾ããã DEMO kimizuka.org ã½ã¼ã¹ã³ã¼ãï¼æç²ï¼ function handleMouseMove(evt) { const deg = 12; const xâ¦
Three.jsï¼r136ï¼ãã THREE.GammaEncoding ã undefined ã«ãªã£ã¦ãããã¨ã«æ°ã¥ã ð±
Three.jsï¼r127ï¼ã§éçºãã¦ãããµã¤ãã§ãThree.jsã®ãã¼ã¸ã§ã³ãr136ã¾ã§ä¸ãã¦ã¿ãã¨ãããglTFãã¡ã¤ã«ã®è²å³ãè¥å¹²èæããªãã¾ããã r127 r136 ç´æçã«ã renderer.outputEncoding = THREE.GammaEncoding; ã®é¨åãå¹ãã¦ããªãã®ã ã¨æãã調æ»ãã¦â¦
ååã¯ãworldã«addBodyããCannon.Bodyã¨addBodyãã¦ããªãCannon.Bodyã«å¯¾ãã¦PointToPointConstraintã使ãã¾ãããblog.kimizuka.orgä»åã¯PointToPointConstraintã®å¼æ°ã«ãworldã«addBodyããCannon.Bodyã2ã¤æ¸¡ãã¦ã¿ã¾ãã çµè«ã¨ãã¦ã¯åã座æ¨ï¼ä¸â¦
ååãCannon.jsã使ã£ã¦ãªãã¸ã§ã¯ãããã¦ã¹ã§æ´ãã§æ¾ãæããã¢ã㯠ãã¤ããã¾ãããblog.kimizuka.orgã¤ããã¾ããããããããªãçãçããããã®ã§ãè¦ç´ ãå解ãã¦æ¤è¨¼ãã¦ããããã¨æãã¾ããä»åã¯ããã®ãããã·ã³ãã«ã«ããã¦ã¹ãã¦ã³ èªåã®â¦
Cannon.js + Three.jsã使ã£ã¦ããã¦ã¹ã§ãªãã¸ã§ã¯ããæ´ããããã«ãã¦ã¿ã¾ããã ç©çæ¼ç®ããã¦ããã®ã§æ¾ãæãããã¨ãã§ãã¾ãããã£ããã¨ããæµãã¨ãã¦ã¯ãⶠCannon.jsã§è¨ç®ç¨ã®worldãã¤ãã â· æ¯ãã¬ã¼ã ãCannon.jsã§ãªãã¸ã§ã¯ãã®ä½ç½®ãè¨ç®â¦
Cannon.js + Three.jsã§ãªãã¸ã§ã¯ãã®ä½ç½®ãç©çæ¼ç®ã§ç®åºãã¦ã¿ã¾ããããã£ããã¨ããæµãã¨ãã¦ã¯ãⶠCannon.jsã§è¨ç®ç¨ã®worldãã¤ãã â· æ¯ãã¬ã¼ã ãCannon.jsã§ãªãã¸ã§ã¯ãã®ä½ç½®ãè¨ç®ãã ⸠æ¯ãã¬ã¼ã ãThree.jsã®ãªãã¸ã§ã¯ãã®ä½ç½®ã¨å§¿å¢ãCaâ¦
AR.js + Three.js + Next.jsï¼React.jsï¼ ã§WebARã³ã³ãã³ããä½ãéãAR.jsã®èªã¿è¾¼ã¿ãã©ãããã®ãã¹ãã¼ããªã®ãããã¼ã£ã¨æ©ãã§ããã®ã§ãããã¨ããããã«ã¹ã¿ã ããã¯ãä½ã£ã¦ã¿ã¾ããã ã½ã¼ã¹ã³ã¼ã useMakerAr.js import { useEffect, useState }â¦