@galacean/cli 2.0.0-alpha.1 → 2.0.0-alpha.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/dist/cli.bundle.cjs +10 -8
- 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
|
};
|
|
@@ -126488,7 +126490,7 @@ export default class extends StateMachineScript {
|
|
|
126488
126490
|
shader: "pbr",
|
|
126489
126491
|
shaderRef: { refId: "0000501" },
|
|
126490
126492
|
// 内置 PBR shader 的固定 asset ID(引擎约定)
|
|
126491
|
-
macros: [],
|
|
126493
|
+
macros: [{ name: "MATERIAL_NEED_WORLD_POS" }, { name: "MATERIAL_NEED_TILING_OFFSET" }],
|
|
126492
126494
|
shaderData: {
|
|
126493
126495
|
material_BaseColor: { type: "Color", value: { r: 1, g: 1, b: 1, a: 1 } },
|
|
126494
126496
|
material_Metal: { type: "Float", value: 1 },
|
|
@@ -156919,8 +156921,8 @@ function buildDefaultScene3D() {
|
|
|
156919
156921
|
class: "Transform",
|
|
156920
156922
|
props: {
|
|
156921
156923
|
enabled: true,
|
|
156922
|
-
position: { x: 0, y:
|
|
156923
|
-
rotation: { x:
|
|
156924
|
+
position: { x: 0, y: 3, z: 5 },
|
|
156925
|
+
rotation: { x: -20, y: 0, z: 0 },
|
|
156924
156926
|
scale: { x: 1, y: 1, z: 1 }
|
|
156925
156927
|
}
|
|
156926
156928
|
},
|
|
@@ -156960,7 +156962,7 @@ function buildDefaultScene3D() {
|
|
|
156960
156962
|
props: {
|
|
156961
156963
|
enabled: true,
|
|
156962
156964
|
position: { x: 0, y: 0, z: 0 },
|
|
156963
|
-
rotation: { x: 50, y: -30, z: 0 },
|
|
156965
|
+
rotation: { x: -50, y: -30, z: 0 },
|
|
156964
156966
|
scale: { x: 1, y: 1, z: 1 }
|
|
156965
156967
|
}
|
|
156966
156968
|
},
|
|
@@ -157117,7 +157119,7 @@ function buildDefaultScene(platform) {
|
|
|
157117
157119
|
return platform === "2d" ? buildDefaultScene2D() : buildDefaultScene3D();
|
|
157118
157120
|
}
|
|
157119
157121
|
async function createProject(opts) {
|
|
157120
|
-
const { name: name16, platform = "3d", engineVersion = "
|
|
157122
|
+
const { name: name16, platform = "3d", engineVersion = "2.0.0-alpha.25", force = false } = opts;
|
|
157121
157123
|
const outputDir = opts.outputDir ?? `./${slugify2(name16)}`;
|
|
157122
157124
|
const absDir = import_node_path14.default.resolve(outputDir);
|
|
157123
157125
|
await (0, import_promises12.mkdir)(absDir, { recursive: true });
|
|
@@ -157272,7 +157274,7 @@ function readCliVersionFromPackageJson() {
|
|
|
157272
157274
|
const parsed = JSON.parse(raw);
|
|
157273
157275
|
return typeof parsed.version === "string" && parsed.version.length > 0 ? parsed.version : "0.0.0";
|
|
157274
157276
|
}
|
|
157275
|
-
var CLI_VERSION = "2.0.0-alpha.
|
|
157277
|
+
var CLI_VERSION = "2.0.0-alpha.2".length > 0 ? "2.0.0-alpha.2" : readCliVersionFromPackageJson();
|
|
157276
157278
|
|
|
157277
157279
|
// src/cli.ts
|
|
157278
157280
|
init_config();
|