babylonjs-gltf2interface 7.51.0 → 7.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babylon.glTF2Interface.d.ts +139 -36
- package/package.json +1 -1
@@ -1361,58 +1361,161 @@ declare module BABYLON.GLTF2 {
|
|
1361
1361
|
* Interfaces for the KHR_interactivity extension
|
1362
1362
|
*/
|
1363
1363
|
interface IKHRInteractivity {
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1364
|
+
/**
|
1365
|
+
* Holding all of the graphs in the glTF
|
1366
|
+
*/
|
1367
|
+
graphs: IKHRInteractivity_Graph[];
|
1368
|
+
/**
|
1369
|
+
* The graph to run. Defaults to index 0
|
1370
|
+
*/
|
1371
|
+
graph?: number;
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
interface IKHRInteractivity_Graph {
|
1375
|
+
types?: IKHRInteractivity_Type /* | IKHRInteractivity_CustomType */[]; // should technically behave as a set - no two signatures should match
|
1367
1376
|
variables?: IKHRInteractivity_Variable[];
|
1377
|
+
events?: IKHRInteractivity_Event[];
|
1378
|
+
declarations?: IKHRInteractivity_Declaration[];
|
1379
|
+
nodes?: IKHRInteractivity_Node[];
|
1368
1380
|
}
|
1369
1381
|
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1382
|
+
/**
|
1383
|
+
* An index of the types array
|
1384
|
+
*/
|
1385
|
+
type TypeIndex = number;
|
1386
|
+
/**
|
1387
|
+
* An index of the declaration array
|
1388
|
+
*/
|
1389
|
+
type DeclarationIndex = number;
|
1390
|
+
|
1391
|
+
/**
|
1392
|
+
* An index of the nodes array
|
1393
|
+
*/
|
1394
|
+
type NodeIndex = number;
|
1395
|
+
/**
|
1396
|
+
* Value types supported (in js it is either boolean or number)
|
1397
|
+
*/
|
1398
|
+
type ValueType = (boolean | number)[];
|
1399
|
+
|
1400
|
+
type ValueSignature = "bool" | "float" | "float2" | "float3" | "float4" | "float2x2" | "float3x3" | "float4x4" | "int" | "custom";
|
1401
|
+
|
1402
|
+
type ConfigurationValueSignature = "bool" | "int" | "int[]" | "string";
|
1403
|
+
|
1404
|
+
type ConfigurationValueType = (boolean | number | string)[];
|
1405
|
+
|
1406
|
+
interface IKHRInteractivity_Event {
|
1407
|
+
/**
|
1408
|
+
* The event id is an application-specific event identifier recognized by the execution environment. If the id property is undefined, the event is considered internal to the graph.
|
1409
|
+
*/
|
1410
|
+
id?: string;
|
1411
|
+
/**
|
1412
|
+
* The properties of the values object define ids and the values of those properties define types and optional initial values of the value sockets associated with the event.
|
1413
|
+
*/
|
1414
|
+
values?:
|
1415
|
+
| {
|
1416
|
+
[id: string]: IKHRInteractivity_Variable;
|
1417
|
+
}
|
1418
|
+
| undefined;
|
1376
1419
|
}
|
1377
1420
|
|
1378
|
-
interface
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1421
|
+
interface IKHRInteractivity_Type {
|
1422
|
+
/**
|
1423
|
+
* A signature of this type or custom if defined by an external extension
|
1424
|
+
*/
|
1425
|
+
signature: ValueSignature;
|
1382
1426
|
}
|
1383
1427
|
|
1384
|
-
interface
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1428
|
+
// interface IKHRInteractivity_CustomType {
|
1429
|
+
// signature: string;
|
1430
|
+
// }
|
1431
|
+
|
1432
|
+
interface IKHRInteractivity_Variable {
|
1433
|
+
/**
|
1434
|
+
* Array size depends on the type. primitives have array size 1, rest depending on the object type (2,3,4,16)
|
1435
|
+
* if value is not provided it should be initialized to the default value of the type according to the specs - NaN for floats, 0 for integers, false for booleans.
|
1436
|
+
*/
|
1437
|
+
value?: ValueType;
|
1438
|
+
/**
|
1439
|
+
* An index in the types array
|
1440
|
+
*/
|
1441
|
+
type: TypeIndex;
|
1388
1442
|
}
|
1389
1443
|
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1444
|
+
/**
|
1445
|
+
* a KHR_Interactivity operation declaration.
|
1446
|
+
* Declarations are considered equal when their op, extension and input values are equal.
|
1447
|
+
* If stating an external extension it is possible the declaration is not supported by the engine. In this case the operation will be a no-op
|
1448
|
+
*/
|
1449
|
+
interface IKHRInteractivity_Declaration {
|
1450
|
+
/**
|
1451
|
+
* the operation identifier.
|
1452
|
+
* Either defined by the interactivity extension or a custom operation by an external extension
|
1453
|
+
*/
|
1454
|
+
op: string;
|
1455
|
+
/**
|
1456
|
+
* If the op is not defined by the interactivity specs, this states the extension that defines the operation
|
1457
|
+
*/
|
1458
|
+
extension?: string;
|
1459
|
+
/**
|
1460
|
+
* If custom operation, this is the output values signatures of the event
|
1461
|
+
* if undefined the custom operation has no outputs
|
1462
|
+
*/
|
1463
|
+
outputValueSockets?: { [id: string]: { type: TypeIndex } };
|
1464
|
+
/**
|
1465
|
+
* if custom operation, this is the input values signatures of the event
|
1466
|
+
* If undefined the custom operation has no inputs
|
1467
|
+
*/
|
1468
|
+
inputValueSockets?: { [id: string]: { type: TypeIndex } };
|
1396
1469
|
}
|
1397
1470
|
|
1398
|
-
interface
|
1399
|
-
|
1400
|
-
|
1471
|
+
interface IKHRInteractivity_Node {
|
1472
|
+
/**
|
1473
|
+
* An index in the declarations array
|
1474
|
+
*/
|
1475
|
+
declaration: DeclarationIndex;
|
1476
|
+
/**
|
1477
|
+
* Input value sockets
|
1478
|
+
*/
|
1479
|
+
values?: { [id: string]: IKHRInteractivity_Variable | IKHRInteractivity_OutputSocketReference };
|
1480
|
+
|
1481
|
+
/**
|
1482
|
+
* Output Flow Socket Pointers
|
1483
|
+
*/
|
1484
|
+
flows?: { [id: string]: IKHRInteractivity_OutputFlow };
|
1485
|
+
configuration?: { [id: string]: IKHRInteractivity_Configuration };
|
1401
1486
|
}
|
1402
1487
|
|
1403
|
-
interface
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1488
|
+
interface IKHRInteractivity_OutputSocketReference {
|
1489
|
+
/**
|
1490
|
+
* An index in the nodes array
|
1491
|
+
*/
|
1492
|
+
node: NodeIndex;
|
1493
|
+
/**
|
1494
|
+
* Must be defined if the node doesn't have a "value" output socket
|
1495
|
+
*/
|
1496
|
+
socket?: string;
|
1497
|
+
/**
|
1498
|
+
* An optional type that must match the type of the output socket of the target node
|
1499
|
+
*/
|
1500
|
+
type?: TypeIndex;
|
1407
1501
|
}
|
1408
1502
|
|
1409
|
-
interface
|
1410
|
-
|
1503
|
+
interface IKHRInteractivity_OutputFlow {
|
1504
|
+
/**
|
1505
|
+
* An index in the nodes array
|
1506
|
+
*/
|
1507
|
+
node: NodeIndex;
|
1508
|
+
/**
|
1509
|
+
* The socket to connect to in the target node
|
1510
|
+
* defaults to "in" when undefined.
|
1511
|
+
*/
|
1512
|
+
socket?: string;
|
1411
1513
|
}
|
1412
1514
|
|
1413
|
-
interface
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1515
|
+
interface IKHRInteractivity_Configuration {
|
1516
|
+
/**
|
1517
|
+
* Array size depends on the type. primitives have array size 1, rest depending on the object type (2,3,4,16)
|
1518
|
+
*/
|
1519
|
+
value: ConfigurationValueType;
|
1417
1520
|
}
|
1418
1521
|
}
|
package/package.json
CHANGED