@vesium/parser 1.0.1-beta.54 → 1.0.1-beta.59
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/README.md +1 -1
- package/dist/index.cjs +11 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.iife.js +11 -35
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
## Documentation
|
|
34
34
|
|
|
35
|
-
To view the documentation, visit <a href="https://vesium.
|
|
35
|
+
To view the documentation, visit <a href="https://vesium.js.org" target="__blank">vesium.js.org</a>
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,34 +1,7 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
1
|
let cesium = require("cesium");
|
|
25
|
-
cesium = __toESM(cesium);
|
|
26
2
|
let zod = require("zod");
|
|
27
|
-
zod = __toESM(zod);
|
|
28
3
|
let vesium = require("vesium");
|
|
29
|
-
|
|
30
|
-
let __vueuse_core = require("@vueuse/core");
|
|
31
|
-
__vueuse_core = __toESM(__vueuse_core);
|
|
4
|
+
let _vueuse_core = require("@vueuse/core");
|
|
32
5
|
|
|
33
6
|
//#region src/ArcType.ts
|
|
34
7
|
const strings$10 = [
|
|
@@ -500,7 +473,7 @@ function BillboardGraphicsToJSON(instance, time, omit) {
|
|
|
500
473
|
return {
|
|
501
474
|
parser: "BillboardGraphics",
|
|
502
475
|
value: {
|
|
503
|
-
show: omit?.includes("show") ? void 0 :
|
|
476
|
+
show: omit?.includes("show") ? void 0 : (0, vesium.toPropertyValue)(instance.show, time),
|
|
504
477
|
image: omit?.includes("image") ? void 0 : (0, vesium.toPropertyValue)(instance.image, time),
|
|
505
478
|
scale: omit?.includes("scale") ? void 0 : (0, vesium.toPropertyValue)(instance.scale, time),
|
|
506
479
|
pixelOffset: omit?.includes("pixelOffset") ? void 0 : Cartesian2ToJSON((0, vesium.toPropertyValue)(instance.pixelOffset, time)),
|
|
@@ -533,7 +506,7 @@ function BillboardGraphicsFromJSON(json, result, omit) {
|
|
|
533
506
|
if (!json) return;
|
|
534
507
|
json = BillboardGraphicsZodSchema().parse(json);
|
|
535
508
|
const instance = new cesium.BillboardGraphics({
|
|
536
|
-
show: omit?.includes("show") ? void 0 :
|
|
509
|
+
show: omit?.includes("show") ? void 0 : json.value.show,
|
|
537
510
|
image: omit?.includes("image") ? void 0 : json.value.image,
|
|
538
511
|
scale: omit?.includes("scale") ? void 0 : json.value.scale,
|
|
539
512
|
pixelOffset: omit?.includes("pixelOffset") ? void 0 : Cartesian2FromJSON(json.value.pixelOffset),
|
|
@@ -595,11 +568,14 @@ function MaterialPropertyZodSchema() {
|
|
|
595
568
|
* Convert `Cesium.MaterialProperty` instance to JSON
|
|
596
569
|
*/
|
|
597
570
|
function MaterialPropertyToJSON(instance) {
|
|
598
|
-
if (!(0,
|
|
571
|
+
if (!(0, _vueuse_core.notNullish)(instance)) return;
|
|
599
572
|
const program = [..._programs.values()].find((item) => item.predicate(instance));
|
|
600
573
|
if (program) return {
|
|
601
|
-
|
|
602
|
-
|
|
574
|
+
parser: "MaterialProperty",
|
|
575
|
+
value: {
|
|
576
|
+
name: program.programName,
|
|
577
|
+
content: program.toJSON(instance)
|
|
578
|
+
}
|
|
603
579
|
};
|
|
604
580
|
}
|
|
605
581
|
/**
|
|
@@ -607,7 +583,7 @@ function MaterialPropertyToJSON(instance) {
|
|
|
607
583
|
* @param json - A JSON containing instance data
|
|
608
584
|
*/
|
|
609
585
|
function MaterialPropertyFromJSON(json) {
|
|
610
|
-
if (!(0,
|
|
586
|
+
if (!(0, _vueuse_core.notNullish)(json)) return;
|
|
611
587
|
const program = [..._programs.values()].find((item) => item.programName === json.value.name);
|
|
612
588
|
if (program) return program.fromJSON(json.value.content);
|
|
613
589
|
}
|
|
@@ -1169,7 +1145,7 @@ function ConstantPositionPropertyZodSchema() {
|
|
|
1169
1145
|
* Convert `Cesium.ConstantPositionProperty` instance to JSON
|
|
1170
1146
|
*/
|
|
1171
1147
|
function ConstantPositionPropertyToJSON(instance, time) {
|
|
1172
|
-
if (!(0,
|
|
1148
|
+
if (!(0, _vueuse_core.notNullish)(instance)) return;
|
|
1173
1149
|
return {
|
|
1174
1150
|
parser: "ConstantPositionProperty",
|
|
1175
1151
|
value: Cartesian3ToJSON(instance.getValue(time))?.value
|