Skip to content

Instantly share code, notes, and snippets.

View kyaroru's full-sized avatar
🧸
playing with bear

Carol kyaroru

🧸
playing with bear
View GitHub Profile
@kyaroru
kyaroru / expo-three-3d-view.js
Last active March 25, 2023 09:20
This is an utility file for loading OBJ, FBX, GLTF models using expo-three & threejs
onContextCreate = async (gl, data) => {
// const {setRenderer, setCamera, setScene} = data;
const { selected } = data;
const { drawingBufferWidth: width, drawingBufferHeight: height } = gl;
const sceneColor = 0xabd2c3;
// Create a WebGLRenderer without a DOM element
const renderer = new Renderer({ gl });
renderer.setSize(width, height);
renderer.setClearColor(sceneColor);
@kyaroru
kyaroru / expo-config-plugin-modify-pod.ts
Last active May 11, 2024 07:52
Example of expo config plugin for modifying Podfile
import { ConfigPlugin, withDangerousMod } from '@expo/config-plugins'
import {
MergeResults,
mergeContents,
removeContents,
} from '@expo/config-plugins/build/utils/generateCode'
import path from 'path'
import fs from 'fs-extra'
const debug = require('debug')('file-viewer-plugin') as typeof console.log