iTwinjs 4.10-4.11 更新

撤銷更改

目前,撤銷一個有缺陷的變更集的唯一方法是從 iModel Hub 中移除它,這可能會導致許多副作用(無法撤銷)。一個更好的方法是在時間線中撤銷變更集,并將其作為新的變更集引入。盡管這種方法仍然具有侵入性,并且需要鎖定Schema,但它更安全,因為它允許撤銷操作恢復之前的變更,確保時間線中沒有任何內容被永久刪除。(任何操作都被記錄了,有點像git了)

BriefcaseDb.revertAndPushChanges 允許推送一個單一的變更集,該變更集撤銷從當前版本到指定歷史變更集的所有變更。

以下是一些細節和要求:

  • 在調用 iModel 時,它不能有任何本地修改。

  • 該操作是原子性的;如果操作失敗,數據庫將恢復到其之前的狀態。

  • 撤銷操作需要一個模式鎖(對 iModel 的獨占鎖),因為它不會鎖定受撤銷影響的每個單獨元素。

  • 如果在撤銷后沒有提供描述,則會創建并推送一個默認的變更集描述,這將釋放模式鎖。

  • 在模式同步(SchemaSync)期間不會撤銷模式更改,或者在不使用模式同步時可以選擇性地跳過模式更改。

具體的代碼可參見

github\itwinjs-core\full-stack-tests\backend\src\integration\SchemaSync.test.ts

    // 2. Insert a element for the classconst el1 = await createEl({ p1: "test1" });const el2 = await createEl({ p1: "test2" });b1.saveChanges();await b1.pushChanges({ description: "insert 2 elements" });// 3. Update the element.await updateEl(el1, { p1: "test3" });b1.saveChanges();await b1.pushChanges({ description: "update element 1" });// 4. Delete the element.await deleteEl(el2);const el3 = await createEl({ p1: "test4" });b1.saveChanges();await b1.pushChanges({ description: "delete element 2" });// 5. import schema and insert element 4 & update element 3await addPropertyAndImportSchema(b1);const el4 = await createEl({ p1: "test5", p2: "test6" });await updateEl(el3, { p1: "test7", p2: "test8" });b1.saveChanges();await b1.pushChanges({ description: "import schema, insert element 4 & update element 3" });assert.isDefined(findEl(el1));assert.isUndefined(findEl(el2));assert.isDefined(findEl(el3));assert.isDefined(findEl(el4));// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2"]);// 6. Revert to timeline 2await b2.revertAndPushChanges({ toIndex: 3, description: "revert to timeline 2" });assert.equal((await getChanges()).at(-1)!.description, "revert to timeline 2");await b1.pullChanges();assert.isUndefined(findEl(el1));assert.isUndefined(findEl(el2));assert.isUndefined(findEl(el3));assert.isUndefined(findEl(el4));// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2"]);await b2.revertAndPushChanges({ toIndex: 7, description: "reinstate last reverted changeset" });assert.equal((await getChanges()).at(-1)!.description, "reinstate last reverted changeset");await b1.pullChanges();assert.isDefined(findEl(el1));assert.isUndefined(findEl(el2));assert.isDefined(findEl(el3));assert.isDefined(findEl(el4));// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2"]);await addPropertyAndImportSchema(b1);const el5 = await createEl({ p1: "test9", p2: "test10", p3: "test11" });await updateEl(el1, { p1: "test12", p2: "test13", p3: "test114" });b1.saveChanges();await b1.pushChanges({ description: "import schema, insert element 5 & update element 1" });// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3"]);// skip schema changes & auto generated commentawait b1.revertAndPushChanges({ toIndex: 2, skipSchemaChanges: true });assert.equal((await getChanges()).at(-1)!.description, "Reverted changes from 9 to 2 (schema changes skipped)");assert.isUndefined(findEl(el1));assert.isUndefined(findEl(el2));assert.isUndefined(findEl(el3));assert.isUndefined(findEl(el4));assert.isUndefined(findEl(el5));// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3"]);await b1.revertAndPushChanges({ toIndex: 10 });assert.equal((await getChanges()).at(-1)!.description, "Reverted changes from 10 to 10 (schema changes skipped)");assert.isDefined(findEl(el1));assert.isUndefined(findEl(el2));assert.isDefined(findEl(el3));assert.isDefined(findEl(el4));assert.isDefined(findEl(el5));// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3"]);// schema sync should be skip for revertawait b2.pullChanges();const b3 = await HubWrappers.downloadAndOpenBriefcase({ iTwinId, iModelId: rwIModelId, accessToken: adminToken });assert.isTrue(SchemaSync.isEnabled(b3));await addPropertyAndImportSchema(b1);// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b1.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3", "p4"]);// b3 should get new property via schema syncawait b3.pullChanges();// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b3.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3", "p4"]);// b2 should not see new property even after revert// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b2.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3"]);await b2.revertAndPushChanges({ toIndex: 11 });assert.equal((await getChanges()).at(-1)!.description, "Reverted changes from 11 to 11 (schema changes skipped)");// eslint-disable-next-line @typescript-eslint/no-deprecatedassert.deepEqual(Object.getOwnPropertyNames(b2.getMetaData("TestDomain:Test2dElement").properties), ["p1", "p2", "p3"]);await b1.pullChanges();await b2.pullChanges();await b3.pullChanges();

從代碼中可以看到revertAndPushChanges 可以支持:

  • 回退

調用?revertAndPushChanges({ toIndex: N, description }),將當前 briefcase 的狀態回退到第 N 個 changeset,并將回退結果作為新的 changeset 推送到服務器。

回退后,所有在 N 之后新增或修改的元素、屬性都會被移除或還原,Schema 結構也會恢復到當時的狀態。

  • 恢復

調用?revertAndPushChanges({ toIndex: N, description }),將當前 briefcase 的狀態回退到第 N 個 changeset,并將回退結果作為新的 changeset 推送到服務器。

回退后,所有在 N 之后新增或修改的元素、屬性都會被移除或還原,Schema 結構也會恢復到當時的狀態。

  • 跳過 Schema 變更的回退

支持?skipSchemaChanges: true,只回退數據變更,保留 Schema 結構不變。

用于只想撤銷數據操作而不影響 Schema 的場景。

Display

實例

某些場景需要反復顯示相同的圖形。例如,想象你正在編寫一個裝飾器(Decorator),用于在道路網絡的許多交叉路口顯示停車標志。你可能會為每個單獨的停車標志創建一個 RenderGraphic 并繪制它們,但這樣做會通過多次復制相同的幾何形狀而浪費大量內存,并且通過多次調用繪制操作而降低幀率。簡而言之,將一個 glTF 模型在多個指定的位置以實例化方式高效渲染

WebGL 提供了實例化渲染(instanced rendering),以更高效地支持此類用例。你可以定義一個停車標志圖形的單一表示形式,然后告訴渲染器在不同的位置、方向和縮放下多次繪制它。iTwin.js 現在提供了易于使用的 API,以便你創建實例化圖形:

  • GraphicTemplate 定義圖形的外觀。你可以通過 GraphicBuilder.finishTemplateRenderSystem.createTemplateFromDescriptionreadGltfTemplate 獲取模板。

  • RenderInstances 定義要繪制的模板實例集合。除了變換矩陣(Transform)之外,每個實例還可以覆蓋模板外觀的某些方面,如顏色和線寬,并且每個實例都可以有一個獨特的 Feature,以便每個實例都能作為一個獨立的實體行為。你可以使用 RenderInstancesParamsBuilder 創建 RenderInstances

  • RenderSystem.createGraphicFromTemplate 從圖形模板和實例集合生成 RenderGraphic

  • GraphicTemplateRenderInstances 都是可重用的——你可以為給定的模板生成多個實例集合,并將相同的實例集合用于多個不同的模板。

對于上述停車標志的例子,你可能有一個表示停車標志的 glTF 模型和一個包含每個停車標志位置的數組。然后,你可以使用以下函數生成一個在這些位置繪制停車標志的圖形:

export async function instanceGltfModel(gltf: Uint8Array | object, positions: Point3d[], iModel: IModelConnection): Promise<RenderGraphic> {// Decode the raw glTF as an instanceable  template.const template = (await readGltfTemplate({ gltf, iModel }))?.template;if (!template) {throw new Error("Failed to decode glTF model.");}// Generate an Id for a "model" to contain the instances.const modelId = iModel.transientIds.getNext();// Define multiple instances, one at each of the specified positions.const instancesBuilder = RenderInstancesParamsBuilder.create({ modelId });for (const position of positions) {instancesBuilder.add({// Translate to the specified position.transform: Transform.createTranslation(position),// Assign a unique pickable Id.feature: iModel.transientIds.getNext(),});}const instancesParams = instancesBuilder.finish();const instances = IModelApp.renderSystem.createRenderInstances(instancesParams);// Create a graphic that associates the instances with the template.return IModelApp.renderSystem.createGraphicFromTemplate({ template, instances });
}

主要流程說明

  1. 解碼 glTF 模板
    使用?readGltfTemplate?將傳入的 glTF 數據(可以是二進制或對象)解碼為可實例化的模板(template)。如果解碼失敗則拋出異常。

  2. 生成臨時模型 Id
    通過?iModel.transientIds.getNext()?生成一個唯一的臨時模型 Id,用于標識這些實例屬于哪個“模型”。

  3. 構建實例參數
    使用?RenderInstancesParamsBuilder?創建實例參數構建器。遍歷所有位置(positions),為每個位置:

    • 創建一個平移變換(Transform),將 glTF 模型移動到該位置。
    • 分配一個唯一的 feature Id,便于后續拾取和高亮。
  4. 生成實例參數和實例對象
    調用?finish()?得到所有實例參數,再用?IModelApp.renderSystem.createRenderInstances?創建實例對象。

  5. 生成最終渲染圖形
    調用?IModelApp.renderSystem.createGraphicFromTemplate,將模板和實例對象組合成一個可渲染的圖形(RenderGraphic),用于在視圖中顯示。

覆蓋線條顏色

iTwin.js 允許在顯示時,動態覆蓋幾何圖形的外觀。然而,與 SubCategoryAppearanceGeometryParams 不同,它們可以區分“線條顏色”和“填充顏色”,而 FeatureAppearance 只提供一個單一的顏色覆蓋,適用于所有類型的幾何圖形。

為了解決這種差異,我們新增了一種方法,允許你獨立于其他幾何圖形動態覆蓋線性幾何圖形的顏色和透明度。線性幾何圖形包括開放曲線、線字符串、點字符串以及平面區域的輪廓。

詳細解釋

  1. FeatureAppearance.lineRgb

    • 作用:控制線性幾何圖形的顏色。

    • 未定義:如果未定義,線性幾何圖形將使用 FeatureAppearance.rgb 的顏色。

    • false:表示不對線性幾何圖形的顏色進行覆蓋。

    • 指定顏色:可以指定一個 RgbColor,僅適用于線性幾何圖形。

  2. FeatureAppearance.lineTransparency

    • 作用:控制線性幾何圖形的透明度。

    • 未定義:如果未定義,線性幾何圖形將使用 FeatureAppearance.transparency 的透明度。

    • false:表示不對線性幾何圖形的透明度進行覆蓋。

FeatureAppearance.fromJSON({rgb: RgbColor.fromColorDef(ColorDef.white),lineRgb: false,lineTransparency: 0.5,}),

控制實景顯示隱藏

之前通過 DisplayStyleState.attachRealityModel 方法添加實景模型(Context Reality Model),現在可以通過啟用 ContextRealityModel.invisible 標志來隱藏。

import { ContextRealityModelProps, ContextRealityModels } from "@itwin/core-common";// 構造實景模型屬性
const realityModelProps: ContextRealityModelProps = {tilesetUrl: "https://your-reality-data-url/tileset.json",name: "實景模型名稱",description: "描述信息",// 還可以設置 appearanceOverrides、planarClipMask、classifiers 等
};// 獲取當前視圖的 DisplayStyleSettings
const displayStyle = viewport.displayStyle.settings;// 獲取或創建 ContextRealityModels
const contextRealityModels = displayStyle.contextRealityModels;// 添加實景模型
const realityModel = contextRealityModels.add(realityModelProps);// 隱藏實景模型
realityModel.invisible = true;// 顯示實景模型
realityModel.invisible = false;

更復雜的控制(如外觀覆蓋、裁剪等),可以設置?appearanceOverrides、planarClipMask?等屬性。

等高線展示

const contourDisplayProps: ContourDisplayProps = {displayContours: true,groups: [{contourDef: {showGeometry: true,majorStyle: { color: ..., pixelWidth: ..., pattern: ... },minorStyle: { color: ..., pixelWidth: ..., pattern: ... },minorInterval: 2,majorIntervalCount: 8,},subCategories: CompressedId64Set.sortAndCompress([ "0x5b", "0x5a" ]),},{contourDef: {showGeometry: false,majorStyle: { ... },minorStyle: { ... },minorInterval: 1,majorIntervalCount: 7,},subCategories: CompressedId64Set.sortAndCompress([ "0x5c", "0x6a" ]),},],
};
  • displayContours: true?必須為 true,才會顯示等高線。
  • groups?數組定義了多個等高線分組,每組可以指定不同的樣式和適用的 subCategory(子類別)。
  • contourDef?里可以分別設置主等高線(major)和次等高線(minor)的顏色、線寬、線型、間隔等。
  • showGeometry?控制是否同時顯示原始幾何體。

交互工具

元素定位

在調用 ElementLocateManager.doLocate 之后,現在可以使用 Reset 來選擇一些被其他元素遮擋的元素。以前,Reset 只會在定位孔徑(locate aperture)內選擇可見的元素。

截面視圖

  • 在 iTwin.js 中,視圖可以嵌套或附加,比如:
    • 一個 SheetView 可以通過 ViewAttachment 附加其他視圖;
    • 一個 DrawingView 可以通過 SectionDrawing 附加 SpatialView。
  • 當你在屏幕上點擊或定位元素時,實際命中的幾何體可能并不直接屬于當前主視圖,而是屬于某個被附加的子視圖。
  • HitPath?結構體就用來描述這種“命中路徑”,它包含兩個可選屬性:
    • viewAttachment:描述命中點是通過哪個 ViewAttachment 附加視圖獲得的(如 SheetView 附加的 DrawingView)。
    • sectionDrawingAttachment:描述命中點是通過哪個 SectionDrawing 附加視圖獲得的(如 DrawingView 附加的 SpatialView)

Presentation

擴展數據屬性

計算屬性規范中新增了一個可選的 extendedData 屬性。該屬性允許將計算屬性字段與一些額外信息關聯起來,這在動態創建的計算屬性中可能特別有用

量值支持

添加對“比例”格式類型的支持(例如“1:2”)

示例:格式化比例

假設已經注冊并初始化了一個 UnitsProvider,以下是格式化比例的方法:

const ratioFormatProps: FormatProps = {type: "Ratio",ratioType: "OneToN",  // Formats the ratio in "1:N" formcomposite: {includeZero: true,units: [{ name: "Units.HORIZONTAL_PER_VERTICAL" },],},
};const ratioFormat = new Format("Ratio");
ratioFormat.fromJSON(unitsProvider, ratioFormatProps).catch(() => {});

支持Node22

支持Electron 33

API 的棄用

@itwin/appui-abstract

LayoutFragmentPropsContentLayoutPropsLayoutSplitPropsBaseLayoutHorizontalSplitPropsLayoutVerticalSplitPropsStandardContentLayouts 已被棄用。請改用 @itwin/appui-react 中的相同 API。

BackendItemsManager 是內部 API,本不應被外部使用。它已被棄用,并將在 5.0.0 版本中被移除。請改用 @itwin/appui-react 中的 UiFramework.backstage

@itwin/core-backend

IModelHost.snapshotFileNameResolverFileNameResolver 已被棄用。請確保為 SnapshotConnection.openFile 提供已解析的文件路徑。

@itwin/core-frontend

SnapshotConnection.openRemote 已被棄用。在 Web 應用程序中,使用 CheckpointConnection.openRemote 來打開對 iModel 的連接。

@itwin/core-quantity

  • FormatTypeScientificTypeShowSignOption 已從整型枚舉重構為字符串枚舉,并新增了 RatioType 作為字符串枚舉。由于字符串枚舉不需要序列化方法,相關的 toString 函數(包括 formatTypeToStringscientificTypeToStringshowSignOptionToString)已被棄用。

  • Parser.parseToQuantityValue 已被棄用。請改用現有的 Parser.parseQuantityString 方法。

@itwin/presentation-common

PresentationRpcInterface 的所有公共方法已被棄用。今后,不應直接調用 RPC 接口。應改用公共包裝器,例如 PresentationManager

已棄用的 ECSqlStatement

ECSqlStatement 在 4.11 版本中已被棄用。請改用 IModelDb.createQueryReaderECDb.createQueryReader

以下與 ECSqlStatement 相關的類也被標記為棄用:

  • ECEnumValue

  • ECSqlValue

  • ECSqlValueIterator

  • ECSqlColumnInfo

在并發查詢中,QueryOptions.convertClassIdsToClassNamesQueryOptionsBuilder.setConvertClassIdsToNames() 已被棄用。請改用 ECSQL 的 ec_classname() 函數將類 ID 轉換為類名稱。

即將被移除的 API

以下 @itwin/core-common 中的 API 正在從 @itwin/core-bentley 重新導出,并且在下一個主版本中將被移除,而不會提前標記為棄用。請改為從 @itwin/core-bentley 導入它們。

  • BentleyStatus

  • BentleyError

  • IModelStatus

  • BriefcaseStatus

  • DbResult

  • ChangeSetStatus

  • GetMetaDataFunction

  • LogFunction

  • LoggingMetaData

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/90310.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/90310.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/90310.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【CSS-15】深入理解CSS transition-duration:掌握過渡動畫的時長控制

在現代網頁設計中&#xff0c;平滑的過渡效果是提升用戶體驗的關鍵因素之一。CSS transitions 為我們提供了一種簡單而強大的方式來實現元素在不同狀態之間的平滑過渡&#xff0c;而 transition-duration 屬性則是控制這些過渡效果時長的核心工具。本文將全面探討 transition-d…

mysql-筆記

1. 安裝mysql # 使用brew安裝 brew install mysql# 查看是否安裝成功 mysql -V 相關文檔&#xff1a; mac&#xff1a;macOS下MySQL 8.0 安裝與配置教程 - KenTalk - 博客園 Linux安裝&#xff1a;linux安裝mysql客戶端_linux mysql 客戶端-CSDN博客 2. 啟動mysql 每次使…

Spring Boot啟動優化7板斧(延遲初始化、組件掃描精準打擊、JVM參數調優):砍掉70%啟動時間的魔鬼實踐

Spring Boot啟動優化7板斧&#xff1a;砍掉70%啟動時間的魔鬼實踐1. 延遲初始化&#xff1a;按需加載的智慧2. 組件掃描精準打擊&#xff1a;告別無差別掃描3. JVM參數調優&#xff1a;啟動加速的隱藏開關4. 自動配置瘦身&#xff1a;砍掉Spring Boot的"贅肉"5. 類加…

從0開始學習計算機視覺--Day08--卷積神經網絡

之前我們提到&#xff0c;神經網絡是通過全連接層對輸入做降維處理&#xff0c;將輸入的向量通過矩陣和激活函數進行降維&#xff0c;在神經元上輸出激活值。而卷積神經網絡中&#xff0c;用卷積層代替了全連接層。 不同的是&#xff0c;這里的輸入不再需要降維&#xff0c;而…

解決阿里云ubuntu內存溢出導致vps死機無法訪問 - 永久性增加ubuntu的swap空間 - 阿里云Linux實例內存溢出(OOM)問題修復方案

效果圖報錯通過對實例當前截屏的分析發現&#xff0c;實例因 Linux實例內存空間不足&#xff0c;導致操作系統出現內存溢出&#xff08;OOM&#xff09; 無法正常啟動。請您根據 Code&#xff1a;1684829582&#xff0c;在文檔中查詢該問題對應的修復方案&#xff0c;并通過VNC…

Serverless JManus: 企業生產級通用智能體運行時

作者&#xff1a;叢霄、陸龜 概述&#xff1a;本文介紹如何使用 JManus 框架構建通用智能體應用&#xff0c;部署并運行在 Serverless 運行時&#xff0c;構建企業級高可用智能體應用的實踐經驗。基于阿里云 Serverless 應用引擎SAE 運行穩定高可用的智能體應用&#xff0c; 基…

MySQL的數據目錄

導讀&#xff1a;根據前面的所學知識&#xff0c;我們知道了InnoDB存儲引擎存儲數據的數據結構、存儲過程&#xff0c;而被組織好的數據則被存儲在操作系統的磁盤上&#xff0c;當我們在對表數據進行增刪改查時&#xff0c;其實就是InnoDB存儲引擎與磁盤的交互。此外&#xff0…

Web前端開發: :has功能性偽類選擇器

:has功能性偽類選擇器::has() 是 CSS 中的一個功能性偽類選擇器&#xff0c;它允許開發者根據元素的后代元素、兄弟元素或后續元素的存在或狀態來選擇目標元素。它本質上是一個“父選擇器”或“關系選擇器”&#xff0c;解決了 CSS 長期以來無法根據子元素反向選擇父元素的痛點…

深度學習8(梯度下降算法改進2)

目錄 RMSProp 算法 Adam算法 學習率衰減 RMSProp 算法 RMSProp(Root Mean Square Prop)算法是在對梯度進行指數加權平均的基礎上&#xff0c;引入平方和平方根。 其中e是一個非常小的數&#xff0c;防止分母太小導致不穩定,當 dw 或 db 較大時&#xff0c;(du)2,(db)2會較大&…

JAVA面試寶典 -《網絡編程核心:NIO 與 Netty 線程模型詳解》

網絡編程核心&#xff1a;NIO 與 Netty 線程模型詳解 文章目錄網絡編程核心&#xff1a;NIO 與 Netty 線程模型詳解一、傳統 BIO 模型&#xff1a;排隊買奶茶的阻塞模式 &#x1f964;1.1 專業解釋1.2 簡單點比喻1.3 簡單示例二、NIO 模型&#xff1a;智能叫號餐廳系統 &#x…

藍橋杯 第十六屆(2025)真題思路復盤解析

本文以洛谷平臺所提供的題目描述及評測數據為基礎進行講解。 前言&#xff1a;這是本人的藍橋杯試卷&#xff0c;大概排省一前40%的位置&#xff0c;實際上這屆題目偏難&#xff0c;我沒有做出太多的有效得分。我把當時的思路和現在學習的思路都復盤進來&#xff0c;希望給大家…

蘭頓螞蟻路徑lua測試

蘭頓螞蟻local p0 local x,y,z0,7,0 local function add() local result,id Block:getBlockID(x,y,z)if id1 thenBlock:destroyBlock(x,y,z,false) pp90 elseBlock:setBlockAll(x,y,z,1,0) pp-90 end x,zx-math.floor(0.5math.sin(math.rad(p))),z-math.floor(0.5math.cos(m…

【Axure RP】什么是Axure?Axure可以用來做什么?

【Axure RP】什么是Axure&#xff1f;Axure可以用來做什么&#xff1f; 目錄【Axure RP】什么是Axure&#xff1f;Axure可以用來做什么&#xff1f;Axure RP簡介Axure RP 是什么&#xff1f;Axure RP核心功能和應用場景Axure RP簡介 Axure RP 是什么&#xff1f; Axure RP 是一…

Java項目:基于SSM框架實現的暢玩北海旅游網站管理系統【ssm+B/S架構+源碼+數據庫+畢業論文】

摘 要 現代經濟快節奏發展以及不斷完善升級的信息化技術&#xff0c;讓傳統數據信息的管理升級為軟件存儲&#xff0c;歸納&#xff0c;集中處理數據信息的管理方式。本暢玩北海旅游網站就是在這樣的大環境下誕生&#xff0c;其可以幫助管理者在短時間內處理完畢龐大的數據信息…

NuxtJS中網絡請求模塊的封裝與最佳實戰

在網絡開發中&#xff0c;封裝一個簡潔、高效的網絡請求模塊對于項目的可維護性和擴展性至關重要。本文將詳細介紹如何在NuxtJS中封裝一個通用的網絡請求模塊&#xff0c;并結合最佳實踐來說明如何使用它來進行網絡請求。良好的代碼結構和封裝&#xff0c;不但結構清晰還能夠大…

云歸子批量混剪軟件批量剪輯軟件批量分割視頻更新記錄

www.yunguizi.com 優化顯卡硬件加速配置 ? 優化 2025年07月07日 版本 v1.1.6 優化顯卡硬件加速配置 修復了一些重要內容 &#x1f41b; 修復 2025年07月06日 版本 v1.1.6 修復了一些重要內容 重構讀寫機制 ? 優化 2025年07月06日 版本 v1.1.6 優化了一些重要內容&#xff1b;…

SpringBoot校園外賣服務系統設計與實現源碼

概述 基于SpringBoot開發的校園外賣服務系統&#xff0c;實現了從外賣管理到訂單處理的全流程數字化解決方案&#xff0c;包含外賣管理、訂單處理、用戶管理等全方位功能。 主要內容 核心功能模塊&#xff1a; ??個人信息管理??&#xff1a; 修改密碼個人信息修改 ??…

東軟8位MCU低功耗調試總結

簡介主控選用8位ES7P7021&#xff0c;應用于磁吸無線充電場景&#xff0c;有一個雙向C口&#xff08;IP5219&#xff09;&#xff0c;MCU控制電量燈顯示&#xff0c;通過IIC控制C口的降額&#xff0c;插入TYPE-C線之后有一個外部中斷信號&#xff0c;觸發MCU喚醒&#xff0c;開…

什么是 3D 文件?

3D 文件是 3D 對象的數字表示形式&#xff0c;可以在計算機輔助設計 &#xff08;CAD&#xff09; 軟件中創建或編輯。它們包含有關物體的形狀、大小和結構的信息&#xff0c;對 3D 打印過程至關重要。3D 文件格式允許在不同的程序和打印機之間交換 3D 模型&#xff0c;并確定模…

語言模型 RLHF 實踐指南(一):策略網絡、價值網絡與 PPO 損失函數

在使用 Proximal Policy Optimization&#xff08;PPO&#xff09;對語言模型進行強化學習微調&#xff08;如 RLHF&#xff09;時&#xff0c;大家經常會問&#xff1a; 策略網絡的動作概率是怎么來的&#xff1f;價值網絡的得分是如何計算的&#xff1f;獎勵從哪里來&#xf…