A time value in USD, typically used for animation keyframe times.
Wraps a `Double` but is treated as a distinct schema-registered
value type by USD, allowing attributes to be explicitly typed
as time code rather than generic floating-point.
Creates an instance initialized to the specified floating-point value.
Do not call this initializer directly. Instead, initialize a variable or
constant using a floating-point literal. For example:
let x = 21.5
In this example, the assignment to the `x` constant calls this
floating-point literal initializer behind the scenes.
- Parameter value: The value to create.
get · iOS 27.0+
value
TypeScript
get value(): number
Swift declaration
var value: Double { get }
The underlying time value as a Double.
get · iOS 27.0+
default
TypeScript
static get default(): USDLayer_TimeCode
Swift declaration
static let `default`: USDLayer.TimeCode
The default time code (0.0).
get · iOS 27.0+
valueType
TypeScript
static get valueType(): USDPrim_Attribute_ValueType
Swift declaration
static var valueType: USDPrim.Attribute.ValueType { get }
init · iOS 27.0+
init
TypeScript
static init(time: number): USDLayer_TimeCode
Swift declaration
init(_ time: Double)
Creates a time code at the given time.
- Parameter time: The underlying time value as a Double.