@onerjs/core 8.50.8 → 8.50.9
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/Collisions/gpuPicker.d.ts +12 -0
- package/Collisions/gpuPicker.js +51 -0
- package/Collisions/gpuPicker.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +10 -3
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +36 -3
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +13 -0
- package/FlowGraph/flowGraphEventBlock.js +21 -2
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.js +3 -3
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Misc/brdfTextureTools.d.ts +12 -0
- package/Misc/brdfTextureTools.js +22 -0
- package/Misc/brdfTextureTools.js.map +1 -1
- package/Misc/depthReducer.js +1 -1
- package/Misc/depthReducer.js.map +1 -1
- package/Rendering/depthRendererSceneComponent.js +7 -7
- package/Rendering/depthRendererSceneComponent.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +3 -3
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrIblFunctions.js +8 -5
- package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js +10 -6
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/Shaders/openpbr.fragment.js +4 -4
- package/Shaders/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +3 -3
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +5 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +5 -6
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.js +6 -6
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphConsoleLogBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAgB1C;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,oCAAoC;IAY9E;;;OAGG;IACH,YAAmB,MAA+C;QAC9D,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAsD,CAAC;QAC7H,IAAI,MAAM,EAAE,eAAe,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACjE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC1B,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC;IACL,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,OAAyB;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9B,CAAC;aAAM,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC7B,CAAC;QACD,iCAAiC;QACjC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,uEAAsC;IAC1C,CAAC;IAEO,gBAAgB,CAAC,OAAyB;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;YAC/B,IAAI,QAAQ,GAAW,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACnD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC1B,
|
|
1
|
+
{"version":3,"file":"flowGraphConsoleLogBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.ts"],"names":[],"mappings":"AAEA,OAAO,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ection } from \"../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal\";\r\nimport { RichTypeAny, RichTypeString } from \"../../flowGraphRichTypes\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { type IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\n\r\n/**\r\n * Configuration for the console log block.\r\n */\r\nexport interface IFlowGraphConsoleLogBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * An optional message template to use for the log message.\r\n * If provided, the template can hold placeholders for the message value.\r\n * For example, if the template is \"The message is: \\{data\\}\", a new data input called \"data\" will be created.\r\n * The value of the message input will be used to replace the placeholder in the template.\r\n */\r\n messageTemplate?: string;\r\n}\r\n\r\n/**\r\n * Block that logs a message to the console.\r\n */\r\nexport class FlowGraphConsoleLogBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * Input connection: The message to log.\r\n * Will be ignored if a message template is provided.\r\n */\r\n public readonly message: FlowGraphDataConnection<any>;\r\n\r\n /**\r\n * Input connection: The log type.\r\n */\r\n public readonly logType: FlowGraphDataConnection<\"log\" | \"warn\" | \"error\">;\r\n\r\n /**\r\n * Creates a new console log block.\r\n * @param config optional configuration\r\n */\r\n public constructor(config?: IFlowGraphConsoleLogBlockConfiguration) {\r\n super(config);\r\n this.message = this.registerDataInput(\"message\", RichTypeAny);\r\n this.logType = this.registerDataInput(\"logType\", RichTypeString, \"log\") as FlowGraphDataConnection<\"log\" | \"warn\" | \"error\">;\r\n if (config?.messageTemplate) {\r\n const matches = this._getTemplateMatches(config.messageTemplate);\r\n for (const match of matches) {\r\n this.registerDataInput(match, RichTypeAny);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext): void {\r\n const typeValue = this.logType.getValue(context);\r\n const messageValue = this._getMessageValue(context);\r\n if (typeValue === \"warn\") {\r\n Logger.Warn(messageValue);\r\n } else if (typeValue === \"error\") {\r\n Logger.Error(messageValue);\r\n } else {\r\n Logger.Log(messageValue);\r\n }\r\n // activate the output flow block\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.ConsoleLog;\r\n }\r\n\r\n private _serializeValue(value: any): string {\r\n if (value === null || value === undefined) {\r\n return String(value);\r\n }\r\n if (typeof value === \"object\") {\r\n // Prefer the object's own toString() (e.g. Vector3 → \"{X:1 Y:2 Z:3}\").\r\n // Only fall back to JSON.stringify when toString() is the unhelpful default.\r\n const str = value.toString();\r\n if (str === \"[object Object]\") {\r\n try {\r\n return JSON.stringify(value);\r\n } catch {\r\n return str;\r\n }\r\n }\r\n return str;\r\n }\r\n return String(value);\r\n }\r\n\r\n private _getMessageValue(context: FlowGraphContext): string {\r\n if (this.config?.messageTemplate) {\r\n let template: string = this.config.messageTemplate;\r\n const matches = this._getTemplateMatches(template);\r\n // If the message input is an object, use its keys as the primary\r\n // source for template placeholders, falling back to named data inputs.\r\n const messageValue = this.message.getValue(context);\r\n const messageObj = messageValue !== null && messageValue !== undefined && typeof messageValue === \"object\" ? messageValue : null;\r\n for (const match of matches) {\r\n let value: any;\r\n if (messageObj !== null && match in messageObj) {\r\n value = messageObj[match];\r\n } else {\r\n value = this.getDataInput(match)?.getValue(context);\r\n }\r\n if (value !== undefined) {\r\n // Escape regex metacharacters in the placeholder name before building the pattern.\r\n const escapedMatch = match.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n template = template.replace(new RegExp(`\\\\{${escapedMatch}\\\\}`, \"g\"), this._serializeValue(value));\r\n }\r\n }\r\n return template;\r\n } else {\r\n // No template — pass the raw value directly so Logger receives the original\r\n // object (e.g. Vector3) rather than a stringified representation.\r\n return this.message.getValue(context);\r\n }\r\n }\r\n\r\n private _getTemplateMatches(template: string): string[] {\r\n const regex = /\\{([^}]+)\\}/g;\r\n const matches: string[] = [];\r\n let match;\r\n while ((match = regex.exec(template)) !== null) {\r\n matches.push(match[1]);\r\n }\r\n return matches;\r\n }\r\n}\r\n\r\nRegisterClass(FlowGraphBlockNames.ConsoleLog, FlowGraphConsoleLogBlock);\r\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FlowGraphAsyncExecutionBlock } from "./flowGraphAsyncExecutionBlock.js";
|
|
2
|
+
import { type IFlowGraphBlockConfiguration } from "./flowGraphBlock.js";
|
|
2
3
|
import { type FlowGraphContext } from "./flowGraphContext.js";
|
|
3
4
|
import { FlowGraphEventType } from "./flowGraphEventType.js";
|
|
4
5
|
/**
|
|
@@ -11,6 +12,18 @@ export declare abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutio
|
|
|
11
12
|
* For example, scene start should have a negative priority because it should be initialized last.
|
|
12
13
|
*/
|
|
13
14
|
initPriority: number;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new event block.
|
|
17
|
+
* @param config optional configuration
|
|
18
|
+
*/
|
|
19
|
+
constructor(config?: IFlowGraphBlockConfiguration);
|
|
20
|
+
/**
|
|
21
|
+
* Deserializes from an object.
|
|
22
|
+
* Filters out the legacy "in" signal input that existed before event blocks
|
|
23
|
+
* stopped exposing it, so old serialized graphs load without error.
|
|
24
|
+
* @param serializationObject the object to deserialize from
|
|
25
|
+
*/
|
|
26
|
+
deserialize(serializationObject: any): void;
|
|
14
27
|
/**
|
|
15
28
|
* The type of the event
|
|
16
29
|
*/
|
|
@@ -4,8 +4,12 @@ import { FlowGraphAsyncExecutionBlock } from "./flowGraphAsyncExecutionBlock.js"
|
|
|
4
4
|
* its output signal when the event is triggered.
|
|
5
5
|
*/
|
|
6
6
|
export class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new event block.
|
|
9
|
+
* @param config optional configuration
|
|
10
|
+
*/
|
|
11
|
+
constructor(config) {
|
|
12
|
+
super(config);
|
|
9
13
|
/**
|
|
10
14
|
* the priority of initialization of this block.
|
|
11
15
|
* For example, scene start should have a negative priority because it should be initialized last.
|
|
@@ -15,6 +19,21 @@ export class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {
|
|
|
15
19
|
* The type of the event
|
|
16
20
|
*/
|
|
17
21
|
this.type = "NoTrigger" /* FlowGraphEventType.NoTrigger */;
|
|
22
|
+
// Event blocks are driven by scene events, not by an incoming signal.
|
|
23
|
+
// Remove the inherited `in` port so it is not shown in the editor UI
|
|
24
|
+
// and cannot be accidentally wired.
|
|
25
|
+
this._unregisterSignalInput("in");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deserializes from an object.
|
|
29
|
+
* Filters out the legacy "in" signal input that existed before event blocks
|
|
30
|
+
* stopped exposing it, so old serialized graphs load without error.
|
|
31
|
+
* @param serializationObject the object to deserialize from
|
|
32
|
+
*/
|
|
33
|
+
deserialize(serializationObject) {
|
|
34
|
+
const filtered = { ...serializationObject };
|
|
35
|
+
filtered.signalInputs = (serializationObject.signalInputs ?? []).filter((s) => s.name !== "in");
|
|
36
|
+
super.deserialize(filtered);
|
|
18
37
|
}
|
|
19
38
|
/**
|
|
20
39
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphEventBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphEventBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAK9E;;;GAGG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,4BAA4B;IAO1E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AO,CAAC,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CASJ","sourcesContent":["import { FlowGraphAsyncExecutionBlock } from \"./flowGraphAsyncExecutionBlock\";\r\nimport { type IFlowGraphBlockConfiguration } from \"./flowGraphBlock\";\r\nimport { type FlowGraphContext } from \"./flowGraphContext\";\r\nimport { FlowGraphEventType } from \"./flowGraphEventType\";\r\n\r\n/**\r\n * A type of block that listens to an event observable and activates\r\n * its output signal when the event is triggered.\r\n */\r\nexport abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * the priority of initialization of this block.\r\n * For example, scene start should have a negative priority because it should be initialized last.\r\n */\r\n public initPriority: number = 0;\r\n\r\n /**\r\n * Creates a new event block.\r\n * @param config optional configuration\r\n */\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n // Event blocks are driven by scene events, not by an incoming signal.\r\n // Remove the inherited `in` port so it is not shown in the editor UI\r\n // and cannot be accidentally wired.\r\n this._unregisterSignalInput(\"in\");\r\n }\r\n\r\n /**\r\n * Deserializes from an object.\r\n * Filters out the legacy \"in\" signal input that existed before event blocks\r\n * stopped exposing it, so old serialized graphs load without error.\r\n * @param serializationObject the object to deserialize from\r\n */\r\n public override deserialize(serializationObject: any) {\r\n const filtered = { ...serializationObject };\r\n filtered.signalInputs = (serializationObject.signalInputs ?? []).filter((s: any) => s.name !== \"in\");\r\n super.deserialize(filtered);\r\n }\r\n\r\n /**\r\n * The type of the event\r\n */\r\n public readonly type: FlowGraphEventType = FlowGraphEventType.NoTrigger;\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext): void {\r\n context._notifyExecuteNode(this);\r\n // Fire both signals: KHR_interactivity graphs connect to `done`,\r\n // while editor-authored graphs typically connect to `out`.\r\n // Both must fire so that either wiring style works correctly.\r\n this.done._activateSignal(context);\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Override _startPendingTasks so that event blocks do NOT fire the\r\n * `out` signal at graph-start time. The base FlowGraphAsyncExecutionBlock\r\n * fires `out` immediately in _startPendingTasks (useful for async blocks\r\n * like PlayAnimation that start a task and let sync flow continue).\r\n * Event blocks should only fire their output signals when the actual\r\n * event occurs, which is handled by _execute.\r\n */\r\n public override _startPendingTasks(context: FlowGraphContext): void {\r\n if (context._getExecutionVariable(this, \"_initialized\", false)) {\r\n this._cancelPendingTasks(context);\r\n this._resetAfterCanceled(context);\r\n }\r\n this._preparePendingTasks(context);\r\n context._addPendingBlock(this);\r\n // Do NOT fire out._activateSignal — event blocks fire both out and\r\n // done in _execute when the actual event triggers.\r\n context._setExecutionVariable(this, \"_initialized\", true);\r\n }\r\n\r\n /**\r\n * Execute the event. This function should be called by the flow graph when the event is triggered.\r\n * @param context the context in which the event is executed\r\n * @param payload the payload of the event\r\n * @returns a boolean indicating if the event should stop propagation. if false, the event will stop propagating.\r\n */\r\n public abstract _executeEvent(context: FlowGraphContext, payload: any): boolean;\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "../../tslib.es6.js";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
import { serialize, expandToProperty, addAccessorsForMaterialProperty } from "../../Misc/decorators.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetEnvironmentFuzzBRDFTexture, GetOpenPBREnvironmentBRDFTexture } from "../../Misc/brdfTextureTools.js";
|
|
5
5
|
import { Color3 } from "../../Maths/math.color.js";
|
|
6
6
|
import { ImageProcessingConfiguration } from "../imageProcessingConfiguration.js";
|
|
7
7
|
import { Texture } from "../Textures/texture.js";
|
|
@@ -1017,7 +1017,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1017
1017
|
this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);
|
|
1018
1018
|
return this._renderTargets;
|
|
1019
1019
|
};
|
|
1020
|
-
this._environmentBRDFTexture =
|
|
1020
|
+
this._environmentBRDFTexture = GetOpenPBREnvironmentBRDFTexture(this.getScene());
|
|
1021
1021
|
this._environmentFuzzBRDFTexture = GetEnvironmentFuzzBRDFTexture(this.getScene());
|
|
1022
1022
|
this.prePassConfiguration = new PrePassConfiguration();
|
|
1023
1023
|
// Build the internal property list that can be used to generate and update the uniform buffer
|
|
@@ -1734,7 +1734,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1734
1734
|
dispose(forceDisposeEffect, forceDisposeTextures) {
|
|
1735
1735
|
this._breakShaderLoadedCheck = true;
|
|
1736
1736
|
if (forceDisposeTextures) {
|
|
1737
|
-
if (this._environmentBRDFTexture && this.getScene().
|
|
1737
|
+
if (this._environmentBRDFTexture && this.getScene().openPBREnvironmentBRDFTexture !== this._environmentBRDFTexture) {
|
|
1738
1738
|
this._environmentBRDFTexture.dispose();
|
|
1739
1739
|
}
|
|
1740
1740
|
if (this._environmentFuzzBRDFTexture && this.getScene().environmentFuzzBRDFTexture !== this._environmentFuzzBRDFTexture) {
|