mirror of https://github.com/CesiumGS/cesium.git
Compare commits
8 Commits
51291baf36
...
069b594fba
| Author | SHA1 | Date |
|---|---|---|
|
|
069b594fba | |
|
|
ee2b3813b2 | |
|
|
4e3980cc53 | |
|
|
c92d0d80a1 | |
|
|
16d0cccfdb | |
|
|
5213dfc1c0 | |
|
|
bd5aa3ff29 | |
|
|
841a4cf12a |
|
|
@ -7,7 +7,8 @@
|
||||||
#### Fixes :wrench:
|
#### Fixes :wrench:
|
||||||
|
|
||||||
- Billboards using `imageSubRegion` now render as expected. [#12585](https://github.com/CesiumGS/cesium/issues/12585)
|
- Billboards using `imageSubRegion` now render as expected. [#12585](https://github.com/CesiumGS/cesium/issues/12585)
|
||||||
- Improved scaling of SVGs in billboards [#TODO](https://github.com/CesiumGS/cesium/issues/TODO)
|
- Improved scaling of SVGs in billboards [#13020](https://github.com/CesiumGS/cesium/issues/13020)
|
||||||
|
- Fixed unexpected outline artifacts around billboards [#13038](https://github.com/CesiumGS/cesium/issues/13038)
|
||||||
|
|
||||||
#### Additions :tada:
|
#### Additions :tada:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,8 @@ TexturePacker.prototype._findNode = function (node, { width, height }) {
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const borderPadding = this._borderPadding;
|
||||||
|
|
||||||
// Vertical split (childNode1 = left half, childNode2 = right half).
|
// Vertical split (childNode1 = left half, childNode2 = right half).
|
||||||
if (widthDifference > heightDifference) {
|
if (widthDifference > heightDifference) {
|
||||||
node.childNode1 = new TextureNode({
|
node.childNode1 = new TextureNode({
|
||||||
|
|
@ -130,12 +132,18 @@ TexturePacker.prototype._findNode = function (node, { width, height }) {
|
||||||
width,
|
width,
|
||||||
height: nodeHeight,
|
height: nodeHeight,
|
||||||
});
|
});
|
||||||
node.childNode2 = new TextureNode({
|
|
||||||
x: rectangle.x + width,
|
// Apply padding only along the vertical "cut".
|
||||||
y: rectangle.y,
|
const widthDifferencePadded = widthDifference - borderPadding;
|
||||||
width: widthDifference,
|
|
||||||
height: nodeHeight,
|
if (widthDifferencePadded > 0) {
|
||||||
});
|
node.childNode2 = new TextureNode({
|
||||||
|
x: rectangle.x + width + borderPadding,
|
||||||
|
y: rectangle.y,
|
||||||
|
width: widthDifferencePadded,
|
||||||
|
height: nodeHeight,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return this._findNode(node.childNode1, { width, height });
|
return this._findNode(node.childNode1, { width, height });
|
||||||
}
|
}
|
||||||
|
|
@ -147,12 +155,19 @@ TexturePacker.prototype._findNode = function (node, { width, height }) {
|
||||||
width: nodeWidth,
|
width: nodeWidth,
|
||||||
height,
|
height,
|
||||||
});
|
});
|
||||||
node.childNode2 = new TextureNode({
|
|
||||||
x: rectangle.x,
|
// Apply padding only along the horizontal "cut".
|
||||||
y: rectangle.y + height,
|
const heightDifferencePadded = heightDifference - borderPadding;
|
||||||
width: nodeWidth,
|
|
||||||
height: heightDifference,
|
if (heightDifferencePadded > 0) {
|
||||||
});
|
node.childNode2 = new TextureNode({
|
||||||
|
x: rectangle.x,
|
||||||
|
y: rectangle.y + height + borderPadding,
|
||||||
|
width: nodeWidth,
|
||||||
|
height: heightDifferencePadded,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return this._findNode(node.childNode1, { width, height });
|
return this._findNode(node.childNode1, { width, height });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -118,8 +118,17 @@ export async function buildGalleryList(options = {}) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const galleryFiles = await globby(
|
const galleryFiles = await globby(
|
||||||
galleryFilesPattern.map((pattern) => join(rootDirectory, pattern, "**/*")),
|
galleryFilesPattern.map((pattern) =>
|
||||||
|
// globby can only work with paths using '/' but node on windows uses '\'
|
||||||
|
// convert them right before passing to globby to ensure all joins work as expected
|
||||||
|
join(rootDirectory, pattern, "**/*").replaceAll("\\", "/"),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
if (galleryFiles.length === 0) {
|
||||||
|
console.warn(
|
||||||
|
"Did not find any gallery files. Please check the configuration is correct",
|
||||||
|
);
|
||||||
|
}
|
||||||
const yamlFiles = galleryFiles.filter((path) =>
|
const yamlFiles = galleryFiles.filter((path) =>
|
||||||
basename(path).match(galleryItemConfig),
|
basename(path).match(galleryItemConfig),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import { fileURLToPath } from "node:url";
|
||||||
* @returns {number} exit code from the tsc command
|
* @returns {number} exit code from the tsc command
|
||||||
*/
|
*/
|
||||||
export default async function typescriptCompile(configPath) {
|
export default async function typescriptCompile(configPath) {
|
||||||
const tsPath = import.meta.resolve("typescript");
|
const tsPath = fileURLToPath(import.meta.resolve("typescript"));
|
||||||
const binPath = fileURLToPath(join(tsPath, "../../bin/tsc"));
|
const binPath = join(tsPath, "../../bin/tsc");
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const ls = spawn(binPath, ["-p", configPath]);
|
const ls = spawn(binPath, ["-p", configPath]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,6 @@ import { buildGalleryList } from "../packages/sandcastle/scripts/buildGallery.js
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const projectRoot = join(__dirname, "..");
|
const projectRoot = join(__dirname, "..");
|
||||||
|
|
||||||
// async function importSandcastleBuildFunctions() {
|
|
||||||
// // Import asynchronously, for now, because this script is not included or run in the release zip;
|
|
||||||
// const buildGalleryScriptPath = join(
|
|
||||||
// __dirname,
|
|
||||||
// "../packages/sandcastle/index.js",
|
|
||||||
// );
|
|
||||||
// return await import(pathToFileURL(buildGalleryScriptPath).href);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses Sandcastle config file and returns its values.
|
* Parses Sandcastle config file and returns its values.
|
||||||
* @returns {Promise<Record<string,any>>} A promise that resolves to the config values.
|
* @returns {Promise<Record<string,any>>} A promise that resolves to the config values.
|
||||||
|
|
@ -52,10 +43,7 @@ export async function buildSandcastleApp({
|
||||||
outputToBuildDir,
|
outputToBuildDir,
|
||||||
includeDevelopment,
|
includeDevelopment,
|
||||||
}) {
|
}) {
|
||||||
// const { join, dirname } = path;
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
// const { createSandcastleConfig, buildStatic } =
|
|
||||||
// await importSandcastleBuildFunctions();
|
|
||||||
const version = await getVersion();
|
const version = await getVersion();
|
||||||
let config;
|
let config;
|
||||||
if (outputToBuildDir) {
|
if (outputToBuildDir) {
|
||||||
|
|
@ -168,8 +156,6 @@ export async function buildSandcastleGallery({
|
||||||
metadata,
|
metadata,
|
||||||
} = gallery ?? {};
|
} = gallery ?? {};
|
||||||
|
|
||||||
// const { buildGalleryList } = await importSandcastleBuildFunctions();
|
|
||||||
|
|
||||||
await buildGalleryList({
|
await buildGalleryList({
|
||||||
rootDirectory,
|
rootDirectory,
|
||||||
publicDirectory: outputDir,
|
publicDirectory: outputDir,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue