Files
tinyusdz/web/demo/public/assets/cube-animation.usda
Syoyo Fujita af2115490e Fix segfault in TimeSamples::get when accessing empty _samples vector
Added bounds check before accessing _samples[0] to prevent crash when
using unified storage mode where _samples is empty but empty() returns false.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 10:12:09 +09:00

66 lines
1.9 KiB
Plaintext

#usda 1.0
(
defaultPrim = "World"
endTimeCode = 90
startTimeCode = 0
timeCodesPerSecond = 24
upAxis = "Y"
)
def Xform "World" (
kind = "component"
)
{
def Xform "AnimatedCube" (
kind = "component"
)
{
float3 xformOp:rotateXYZ.timeSamples = {
0: (0, 0, 0),
10: (15, 45, 10),
20: (30, 90, -15),
30: (45, 135, 20),
40: (60, 180, -30),
50: (45, 225, 15),
60: (30, 270, -20),
70: (15, 315, 25),
80: (0, 360, 0),
90: (0, 405, 0),
}
float3 xformOp:scale.timeSamples = {
0: (1, 1, 1),
10: (1.2, 0.8, 1.1),
20: (1.5, 0.6, 1.3),
30: (1.8, 0.5, 1.2),
40: (2.0, 0.4, 1.0),
50: (1.8, 0.6, 0.9),
60: (1.5, 0.8, 1.1),
70: (1.2, 1.0, 1.3),
80: (1.0, 1.2, 1.2),
90: (1.0, 1.0, 1.0),
}
float3 xformOp:translate.timeSamples = {
0: (0, 0, 0),
10: (1, 0.5, 0.5),
20: (2, 1.5, 0.2),
30: (2.5, 2.5, -0.3),
40: (2, 3.0, -0.8),
50: (1, 2.8, -0.5),
60: (0, 2.0, 0),
70: (-1, 1.2, 0.5),
80: (-1.5, 0.5, 0.8),
90: (0, 0, 0),
}
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
def Mesh "Cube"
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4]
point3f[] points = [(-1, -1, 1), (1, -1, 1), (-1, 1, 1), (1, 1, 1), (-1, 1, -1), (1, 1, -1), (-1, -1, -1), (1, -1, -1)]
uniform token subdivisionScheme = "none"
}
}
}