@combos-fun/engine 0.0.39 → 0.0.41
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/dist/engine.cjs.js +28 -1
- package/dist/engine.cjs.js.map +1 -1
- package/dist/engine.cjs.prod.js +1 -1
- package/dist/engine.d.ts +4 -3
- package/dist/engine.esm.js +28 -1
- package/dist/engine.esm.js.map +1 -1
- package/package.json +3 -3
- package/references/bootstrap-examples.md +59 -30
- package/references/public-api.md +1 -1
package/dist/engine.cjs.js
CHANGED
|
@@ -1001,7 +1001,7 @@ class Scene extends GameObject {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
1003
|
/** Generated at build from package.json */
|
|
1004
|
-
const version = "0.0.
|
|
1004
|
+
const version = "0.0.41";
|
|
1005
1005
|
|
|
1006
1006
|
/**
|
|
1007
1007
|
* Sent to `window.parent` after each `System.init` completes during `Game.addSystem`
|
|
@@ -1649,6 +1649,9 @@ const SLOT_DEFAULT_TYPE = {
|
|
|
1649
1649
|
ske: 'ske',
|
|
1650
1650
|
audio: 'audio',
|
|
1651
1651
|
video: 'video',
|
|
1652
|
+
model: 'glb',
|
|
1653
|
+
mtl: 'mtl',
|
|
1654
|
+
bin: 'bin',
|
|
1652
1655
|
};
|
|
1653
1656
|
const EXT_TO_TYPE = {
|
|
1654
1657
|
png: 'png',
|
|
@@ -1666,6 +1669,13 @@ const EXT_TO_TYPE = {
|
|
|
1666
1669
|
webm: 'video',
|
|
1667
1670
|
glb: 'glb',
|
|
1668
1671
|
gltf: 'gltf',
|
|
1672
|
+
fbx: 'fbx',
|
|
1673
|
+
obj: 'obj',
|
|
1674
|
+
mtl: 'mtl',
|
|
1675
|
+
stl: 'stl',
|
|
1676
|
+
dae: 'dae',
|
|
1677
|
+
ply: 'ply',
|
|
1678
|
+
bin: 'bin',
|
|
1669
1679
|
};
|
|
1670
1680
|
function extensionOf(url) {
|
|
1671
1681
|
const path = url.split('?')[0].split('#')[0];
|
|
@@ -1682,6 +1692,8 @@ function defaultSlotForResourceType(resourceType) {
|
|
|
1682
1692
|
return 'audio';
|
|
1683
1693
|
if (resourceType === 'VIDEO')
|
|
1684
1694
|
return 'video';
|
|
1695
|
+
if (resourceType === 'MODEL' || resourceType === 'GLB')
|
|
1696
|
+
return 'model';
|
|
1685
1697
|
return 'image';
|
|
1686
1698
|
}
|
|
1687
1699
|
function wrapSlot(slot, value, resourceName) {
|
|
@@ -1860,6 +1872,7 @@ exports.RESOURCE_TYPE = void 0;
|
|
|
1860
1872
|
RESOURCE_TYPE["AUDIO"] = "AUDIO";
|
|
1861
1873
|
RESOURCE_TYPE["VIDEO"] = "VIDEO";
|
|
1862
1874
|
RESOURCE_TYPE["GLB"] = "GLB";
|
|
1875
|
+
RESOURCE_TYPE["MODEL"] = "MODEL";
|
|
1863
1876
|
})(exports.RESOURCE_TYPE || (exports.RESOURCE_TYPE = {}));
|
|
1864
1877
|
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('json', resourceLoader$1.XhrResponseType.Json);
|
|
1865
1878
|
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('tex', resourceLoader$1.XhrResponseType.Json);
|
|
@@ -1870,6 +1883,13 @@ resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('aac', resourceLoader$1.Xhr
|
|
|
1870
1883
|
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('ogg', resourceLoader$1.XhrResponseType.Buffer);
|
|
1871
1884
|
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('glb', resourceLoader$1.XhrResponseType.Buffer);
|
|
1872
1885
|
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('gltf', resourceLoader$1.XhrResponseType.Json);
|
|
1886
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('fbx', resourceLoader$1.XhrResponseType.Buffer);
|
|
1887
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('stl', resourceLoader$1.XhrResponseType.Buffer);
|
|
1888
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('ply', resourceLoader$1.XhrResponseType.Buffer);
|
|
1889
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('bin', resourceLoader$1.XhrResponseType.Buffer);
|
|
1890
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('obj', resourceLoader$1.XhrResponseType.Text);
|
|
1891
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('mtl', resourceLoader$1.XhrResponseType.Text);
|
|
1892
|
+
resourceLoader$1.XhrLoadStrategy.setExtensionXhrType('dae', resourceLoader$1.XhrResponseType.Text);
|
|
1873
1893
|
const RESOURCE_TYPE_STRATEGY = {
|
|
1874
1894
|
png: resourceLoader$1.ImageLoadStrategy,
|
|
1875
1895
|
jpg: resourceLoader$1.ImageLoadStrategy,
|
|
@@ -1882,6 +1902,13 @@ const RESOURCE_TYPE_STRATEGY = {
|
|
|
1882
1902
|
video: resourceLoader$1.VideoLoadStrategy,
|
|
1883
1903
|
glb: resourceLoader$1.XhrLoadStrategy,
|
|
1884
1904
|
gltf: resourceLoader$1.XhrLoadStrategy,
|
|
1905
|
+
fbx: resourceLoader$1.XhrLoadStrategy,
|
|
1906
|
+
obj: resourceLoader$1.XhrLoadStrategy,
|
|
1907
|
+
mtl: resourceLoader$1.XhrLoadStrategy,
|
|
1908
|
+
stl: resourceLoader$1.XhrLoadStrategy,
|
|
1909
|
+
dae: resourceLoader$1.XhrLoadStrategy,
|
|
1910
|
+
ply: resourceLoader$1.XhrLoadStrategy,
|
|
1911
|
+
bin: resourceLoader$1.XhrLoadStrategy,
|
|
1885
1912
|
};
|
|
1886
1913
|
/**
|
|
1887
1914
|
* Resource manager
|