Skip to content

Instantly share code, notes, and snippets.

View digitalbreed's full-sized avatar

Matthias Gall digitalbreed

View GitHub Profile

Keybase proof

I hereby claim:

  • I am digitalbreed on github.
  • I am digitalbreed (https://keybase.io/digitalbreed) on keybase.
  • I have a public key ASCRSSGkg9ATdSIHOerNI7W28pj7d8HFN-VmYxvuM0Am6go

To claim this, I am signing this object:

@digitalbreed
digitalbreed / AnimatedSceneSetup.cs
Last active December 5, 2023 23:33
Animated Scene Setup - animates an entire subtree to demonstrate a scene setup as shown in https://twitter.com/digitalbreed/status/1732084984603701429
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
// Needs DOTween: https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676
using DG.Tweening;
namespace Prefabby
{
.radial-progress {
$circle-size: 120px;
$circle-background: #d6dadc;
$circle-color: #97a71d;
$inset-size: 90px;
$inset-color: #fbfbfb;
$transition-length: 1s;
$shadow: 6px 6px 10px rgba(0,0,0,0.2);
$percentage-color: #97a71d;
$percentage-font-size: 22px;
// Load Synty Studio art pack FBX models with THREE.js
// Remarks:
// * Assumes the POLYGON City pack in subdirectory models/PolygonCity, adjust directories and filenames as you need
// * Relies on submesh naming conventions to assign glass material; if it doesn't work for your FBX, double-check that the glass actually ends with "_Glass"
// * Uses async/await to improve the readability and traceability of the program flow
// Standard THREE initialization code
import * as THREE from 'three'
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader'