Skip to main content
Version: 0.3.0

Tattvas

A tattva is any object you can place, animate, and render. From Sanskrit: “element” or “essence.”

Add it with scene.add(...). Keep the handle.

from murali_engine import Circle, Label, Scene
from murali_kit.colors import GREEN_D, WHITE
from murali_kit.themes import DarkTheme, apply_theme

scene = apply_theme(Scene(), DarkTheme())
title = scene.add(Label("Hello", height=0.38, color=WHITE), at=(0.0, 2.4, 0.0))
circle = scene.add(
Circle(radius=0.8, color=GREEN_D, segments=48).with_stroke(0.04, WHITE),
at=(0.0, 0.0, 0.0),
)

Engine primitives are the language. Kit teaching views are sentences built from that language. Import each from the package that owns it.

Engine primitives

NeedType
ShapesCircle, Square, Rectangle, RoundedRectangle, Polygon, Line, Arrow, Path
TextLabel, Latex, Typst, CodeBlock
StructureAxes, NumberPlane, Table
3DAxes3D, ParametricSurface, ParametricCurve3D, Prop3D, Letter3D
Motion tracesTracedPath, ParticleBelt
Nested sceneSceneView
from murali_engine import Circle, Label, Latex, Axes, Table, Path, Prop3D

with_stroke, with_color, and other with_* methods return the same object.

Kit teaching views

NeedImport
Title / openingmurali_kit.composite (TitleCard, Opening, MuraliLogo)
AI diagramsmurali_kit.ai (NeuralNetworkDiagram, AttentionMatrix, TokenSequence, KvCacheView, …)
Mathsmurali_kit.maths (FunctionGraph, NumberLine, VectorField, linear-algebra views)
Storymurali_kit.storytelling (Stepwise)
Layoutmurali_kit.layout (Group, stacks)
Theme / palettemurali_kit.themes, murali_kit.colors

See Teaching views for the catalog.

Shared scene helpers

scene.to_edge(handle, "up", margin=0.8)
scene.hide(handle)
scene.show(handle)
scene.set_position(handle, (1.0, 0.0, 0.0))
scene.set_scale(handle, (2.0, 2.0, 2.0))
scene.set_layer(handle, 1)

Constructor field lists for the native Rust types still live under Internals → Tattva details. Prefer this page and the Python API while authoring.

3D props

Load a GLB/GLTF with Prop3D.from_file(...) / from_glb / from_gltf. Asset notes: 3D prop assets.