Skip to content

Instantly share code, notes, and snippets.

View PixelPartner's full-sized avatar
💭
Who wants his products configured directly in AR?

Thomas Kumlehn PixelPartner

💭
Who wants his products configured directly in AR?
View GitHub Profile
@PixelPartner
PixelPartner / allow-ar3d-in-wordpress-media-library.php
Last active November 11, 2021 10:06 — forked from alexmoise/allow-usdz-in-wordpress-media-library.php
A plugin that makes it possible to upload Apple AR Quick Look files (.usdz + .reality) and glTF-binary (.glb) in WordPress Media Manager
<?php
/**
* Plugin Name: Allow GLB, USDZ and Reality mime in Wordpress Media Library
* Plugin URI: https://gist.github.com/PixelPartner/d3362a9fad57165ba9d5bd76a3f5b4ee
* Description: A plugin that makes it possible to upload AR files in Media Manager. Don't forget to add the three MIME types in web server config if necessary! No settings necessary, just activate and upload USDZ files in media library as usually. Tested with WP 5.2.3
* Version: 1.0.0
* Author: Thomas Kumlehn
* Author URI: https://config-xr.mobi
*/
@PixelPartner
PixelPartner / vaccination-stats.js
Last active December 30, 2020 14:18 — forked from marco79cgn/vaccination-stats.js
A Scriptable widget that shows the amount of people who have received the corona vaccination in Germany
const cacheMinutes = 60 // 60 min
const today = new Date();
let result
let widget = new ListWidget()
widget.setPadding(8, 8, 8, 8)
widget.url = "https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Daten/Impfquoten-Tab.html"
await getNumbers()
await createWidget()
Script.setWidget(widget)
@PixelPartner
PixelPartner / ARQL_world_domination_by_openness.md
Last active April 25, 2020 13:16
My thoughts about the Apple Roadmap for AR Quicklook

What is revolutional with AR Quicklook on iOS 13.4 ?

With iOS 13.4 Apple lifted the veil of some internals of its RealityKit universe.

Formerly their AR-Editor Reality Composer was exporting scenes only in a proprietary .reality file format. And just a few users and designers used it to manually create and update scenes. And developers had no access to documentation and not a clue how to create those scenes with their own Code base.

With iOS 13.4 and the new release of Reality Composer with USDZ export the situation changed drastically.

USDZ files are just uncompressed zip archives containing one or more USD files (the binary form = .usdc) and folders with textures and sounds needed by the scene (aka USDStage).

@PixelPartner
PixelPartner / RC2usdz_issues.md
Last active April 11, 2020 17:56
Found problems in the export of Reality scene(s) to USDZ

Issues with the Preliminary RealityComposer Scene Export as USDZ

I have encountered the following 5 issues in scenes exported with the following versions / creator strings:

  • "com.apple.RCFoundation Version 1.4 (134.6.1)" (found on the web)
  • "com.apple.RCFoundation Version 1.4 (133.20)" (RC export on my macBook)

Issue 1: sceneGroundPlane

reported as FB7660346

@PixelPartner
PixelPartner / USDZ_AR_QuickLook_with_elm-ui.elm
Created October 17, 2018 16:50
Define your own elm-ui Element that works with Safari AR Quicklook feature on iOS 12+
{-
Define your own elm-ui Element that works with Safari AR Quicklook feature on iOS 12+
The problem with the standard Element nodes is that Safari wants the <a> node to only have
a single child and that needs to be an <img>
-}
usdz : List (Attribute Msg) -> { usdzUrl : String, imgUrl : String } -> Element Msg
usdz attrs rec =
link
( htmlAttribute (Html.Attributes.attribute "rel" "ar")