Memoji character (11 expressions) on the engine's motion; Claude limit shows time to reset; ChatGPT weekly limit from Codex logs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ struct BotCanvasView: View {
|
||||
|
||||
// One engine per view instance (main bot)
|
||||
@StateObject private var engine = BotEngine()
|
||||
@State private var fader = MemojiFader()
|
||||
|
||||
var body: some View {
|
||||
TimelineView(.animation(paused: state.mode == .hidden)) { timeline in
|
||||
@@ -69,26 +70,15 @@ struct BotCanvasView: View {
|
||||
engine.update(dt: dt)
|
||||
var ctx = context
|
||||
engine.applyDance(&ctx, size: size)
|
||||
// Rigid-roll: when Mochi wears an outfit (presence > 0.05) and is rolling,
|
||||
// rotate the entire body+accessories context around the body center so the
|
||||
// whole character genuinely turns. Particles/badge (drawHandsAndExtras) are
|
||||
// drawn outside the rotated context and do not spin.
|
||||
if engine.outfit != .none && engine.outfitPresence > 0.05 && abs(engine.roll) > 0.001 {
|
||||
let center = engine.bodyCenter(size: size)
|
||||
var rigidCtx = ctx
|
||||
rigidCtx.translateBy(x: center.x, y: center.y)
|
||||
rigidCtx.rotate(by: .radians(engine.roll))
|
||||
rigidCtx.translateBy(x: -center.x, y: -center.y)
|
||||
engine.drawHandsBehind(context: rigidCtx, size: size)
|
||||
engine.drawOutfitBehind(context: rigidCtx, size: size)
|
||||
engine.draw(context: rigidCtx, size: size)
|
||||
engine.drawOutfitFront(context: rigidCtx, size: size)
|
||||
} else {
|
||||
engine.drawHandsBehind(context: ctx, size: size)
|
||||
engine.drawOutfitBehind(context: ctx, size: size)
|
||||
engine.draw(context: ctx, size: size)
|
||||
engine.drawOutfitFront(context: ctx, size: size)
|
||||
// BroV: the Memoji is the character. The engine's box (file upload morph)
|
||||
// fades in only while morphing; hands and outfits are not drawn.
|
||||
if engine.morph > 0.02 {
|
||||
var boxCtx = ctx
|
||||
boxCtx.opacity = Double(min(1, engine.morph * 2))
|
||||
engine.draw(context: boxCtx, size: size)
|
||||
}
|
||||
engine.drawMemoji(context: ctx, size: size, fader: fader,
|
||||
opacity: Double(max(0, 1 - engine.morph * 2)))
|
||||
engine.drawHandsAndExtras(context: ctx, size: size)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user