@galacean/cli 2.0.0-alpha.1 → 2.0.0-alpha.3
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/cli.bundle.cjs +12 -13
- package/package.json +1 -1
package/dist/cli.bundle.cjs
CHANGED
|
@@ -79784,11 +79784,13 @@ function buildMaterialMainData(name16, props, original) {
|
|
|
79784
79784
|
result.renderState = renderState;
|
|
79785
79785
|
return result;
|
|
79786
79786
|
}
|
|
79787
|
+
const resolvedShader = shader ?? "pbr";
|
|
79788
|
+
const defaultMacros = resolvedShader === "pbr" ? [{ name: "MATERIAL_NEED_WORLD_POS" }, { name: "MATERIAL_NEED_TILING_OFFSET" }] : [];
|
|
79787
79789
|
return {
|
|
79788
79790
|
name: name16,
|
|
79789
|
-
shader:
|
|
79791
|
+
shader: resolvedShader,
|
|
79790
79792
|
shaderRef: shaderRef ?? { refId: "0000501" },
|
|
79791
|
-
macros: macros ??
|
|
79793
|
+
macros: macros ?? defaultMacros,
|
|
79792
79794
|
shaderData,
|
|
79793
79795
|
renderState: renderState ?? {}
|
|
79794
79796
|
};
|
|
@@ -97678,10 +97680,7 @@ var init_schema5 = __esm({
|
|
|
97678
97680
|
message: "colliderType \u4E0E componentType \u4E0D\u4E00\u81F4"
|
|
97679
97681
|
});
|
|
97680
97682
|
}
|
|
97681
|
-
}).
|
|
97682
|
-
...rest,
|
|
97683
|
-
componentType: componentType ?? colliderType ?? "StaticCollider"
|
|
97684
|
-
})).describe("\u6DFB\u52A0\u78B0\u649E\u5668\u7EC4\u4EF6\u7684\u53C2\u6570");
|
|
97683
|
+
}).describe("\u6DFB\u52A0\u78B0\u649E\u5668\u7EC4\u4EF6\u7684\u53C2\u6570");
|
|
97685
97684
|
colliderUpdateInputSchema = external_exports.object({
|
|
97686
97685
|
entityId: external_exports.string().describe("\u76EE\u6807\u5B9E\u4F53 ID"),
|
|
97687
97686
|
componentType: colliderComponentTypeEnum.optional().describe("\u78B0\u649E\u5668\u7EC4\u4EF6\u7C7B\u578B\uFF08\u7528\u4E8E\u5B9A\u4F4D\u7EC4\u4EF6\uFF09"),
|
|
@@ -97972,7 +97971,7 @@ var init_collider_add = __esm({
|
|
|
97972
97971
|
if (!entityModel) {
|
|
97973
97972
|
throw new EditorAPIError("ENTITY_NOT_FOUND", params.entityId);
|
|
97974
97973
|
}
|
|
97975
|
-
const componentType = params.componentType ?? "StaticCollider";
|
|
97974
|
+
const componentType = params.componentType ?? params.colliderType ?? "StaticCollider";
|
|
97976
97975
|
const shapeType = params.shapeType;
|
|
97977
97976
|
const existingComp = ctx.query.findComponent(params.entityId, componentType);
|
|
97978
97977
|
let existingShapes = [];
|
|
@@ -126488,7 +126487,7 @@ export default class extends StateMachineScript {
|
|
|
126488
126487
|
shader: "pbr",
|
|
126489
126488
|
shaderRef: { refId: "0000501" },
|
|
126490
126489
|
// 内置 PBR shader 的固定 asset ID(引擎约定)
|
|
126491
|
-
macros: [],
|
|
126490
|
+
macros: [{ name: "MATERIAL_NEED_WORLD_POS" }, { name: "MATERIAL_NEED_TILING_OFFSET" }],
|
|
126492
126491
|
shaderData: {
|
|
126493
126492
|
material_BaseColor: { type: "Color", value: { r: 1, g: 1, b: 1, a: 1 } },
|
|
126494
126493
|
material_Metal: { type: "Float", value: 1 },
|
|
@@ -156919,8 +156918,8 @@ function buildDefaultScene3D() {
|
|
|
156919
156918
|
class: "Transform",
|
|
156920
156919
|
props: {
|
|
156921
156920
|
enabled: true,
|
|
156922
|
-
position: { x: 0, y:
|
|
156923
|
-
rotation: { x:
|
|
156921
|
+
position: { x: 0, y: 3, z: 5 },
|
|
156922
|
+
rotation: { x: -20, y: 0, z: 0 },
|
|
156924
156923
|
scale: { x: 1, y: 1, z: 1 }
|
|
156925
156924
|
}
|
|
156926
156925
|
},
|
|
@@ -156960,7 +156959,7 @@ function buildDefaultScene3D() {
|
|
|
156960
156959
|
props: {
|
|
156961
156960
|
enabled: true,
|
|
156962
156961
|
position: { x: 0, y: 0, z: 0 },
|
|
156963
|
-
rotation: { x: 50, y: -30, z: 0 },
|
|
156962
|
+
rotation: { x: -50, y: -30, z: 0 },
|
|
156964
156963
|
scale: { x: 1, y: 1, z: 1 }
|
|
156965
156964
|
}
|
|
156966
156965
|
},
|
|
@@ -157117,7 +157116,7 @@ function buildDefaultScene(platform) {
|
|
|
157117
157116
|
return platform === "2d" ? buildDefaultScene2D() : buildDefaultScene3D();
|
|
157118
157117
|
}
|
|
157119
157118
|
async function createProject(opts) {
|
|
157120
|
-
const { name: name16, platform = "3d", engineVersion = "
|
|
157119
|
+
const { name: name16, platform = "3d", engineVersion = "2.0.0-alpha.25", force = false } = opts;
|
|
157121
157120
|
const outputDir = opts.outputDir ?? `./${slugify2(name16)}`;
|
|
157122
157121
|
const absDir = import_node_path14.default.resolve(outputDir);
|
|
157123
157122
|
await (0, import_promises12.mkdir)(absDir, { recursive: true });
|
|
@@ -157272,7 +157271,7 @@ function readCliVersionFromPackageJson() {
|
|
|
157272
157271
|
const parsed = JSON.parse(raw);
|
|
157273
157272
|
return typeof parsed.version === "string" && parsed.version.length > 0 ? parsed.version : "0.0.0";
|
|
157274
157273
|
}
|
|
157275
|
-
var CLI_VERSION = "2.0.0-alpha.
|
|
157274
|
+
var CLI_VERSION = "2.0.0-alpha.3".length > 0 ? "2.0.0-alpha.3" : readCliVersionFromPackageJson();
|
|
157276
157275
|
|
|
157277
157276
|
// src/cli.ts
|
|
157278
157277
|
init_config();
|