threers 0.0.7

Drop-in three.js replacement for Rust and WebAssembly (wgpu) — THREE.* API, scene graph, PBR, post-fx, mesh BVH, CSG, an OpenSCAD front end with a watertight exact-CSG kernel, headless render, and native media codecs
Documentation
#usda 1.0
(
    defaultPrim = "World"
    metersPerUnit = 1
    upAxis = "Y"
)

def Xform "World"
{
    def Scope "Materials"
    {
        def Material "Red"
        {
            token outputs:surface.connect = </World/Materials/Red/S.outputs:surface>
            def Shader "S"
            {
                uniform token info:id = "UsdPreviewSurface"
                color3f inputs:diffuseColor = (1, 0, 0)
                token outputs:surface
            }
        }

        def Material "Blue"
        {
            token outputs:surface.connect = </World/Materials/Blue/S.outputs:surface>
            def Shader "S"
            {
                uniform token info:id = "UsdPreviewSurface"
                color3f inputs:diffuseColor = (0, 0, 1)
                token outputs:surface
            }
        }
    }

    def Mesh "TwoTone" (
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        uniform token subdivisionScheme = "none"
        uniform token subsetFamily:materialBind:familyType = "nonOverlapping"
        int[] faceVertexCounts = [4, 4, 4, 4]
        int[] faceVertexIndices = [
            0, 1, 2, 3,
            4, 5, 6, 7,
            8, 9, 10, 11,
            12, 13, 14, 15
        ]
        point3f[] points = [
            (0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1, 0),
            (2, 0, 0), (3, 0, 0), (3, 1, 0), (2, 1, 0),
            (4, 0, 0), (5, 0, 0), (5, 1, 0), (4, 1, 0),
            (6, 0, 0), (7, 0, 0), (7, 1, 0), (6, 1, 0)
        ]
        rel material:binding = </World/Materials/Red>

        def GeomSubset "BluePart" (
            prepend apiSchemas = ["MaterialBindingAPI"]
        )
        {
            uniform token elementType = "face"
            uniform token familyName = "materialBind"
            int[] indices = [1, 3]
            rel material:binding = </World/Materials/Blue>
        }
    }
}