@babylonjs/core 6.38.0 → 6.38.1
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/Engines/ICanvas.d.ts +60 -0
- package/Engines/ICanvas.js.map +1 -1
- package/Engines/IPipelineContext.d.ts +3 -3
- package/Engines/IPipelineContext.js.map +1 -1
- package/Engines/Native/nativePipelineContext.d.ts +4 -5
- package/Engines/Native/nativePipelineContext.js +2 -9
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/Native/validatedNativeDataStream.d.ts +3 -0
- package/Engines/Native/validatedNativeDataStream.js +3 -0
- package/Engines/Native/validatedNativeDataStream.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuConstants.d.ts +3 -1
- package/Engines/WebGPU/webgpuConstants.js +2 -0
- package/Engines/WebGPU/webgpuConstants.js.map +1 -1
- package/Engines/engine.d.ts +10 -45
- package/Engines/nativeEngine.d.ts +3 -1
- package/Engines/nativeEngine.js +29 -30
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +0 -1
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Logic/index.d.ts +0 -1
- package/FlowGraph/Blocks/Data/Logic/index.js +0 -1
- package/FlowGraph/Blocks/Data/Logic/index.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +327 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +465 -74
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +2 -2
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +7 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +7 -6
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +14 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +4 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +16 -0
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +14 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphInteger.d.ts +62 -0
- package/FlowGraph/flowGraphInteger.js +76 -0
- package/FlowGraph/flowGraphInteger.js.map +1 -0
- package/FlowGraph/flowGraphPathConverterComponent.d.ts +2 -1
- package/FlowGraph/flowGraphPathConverterComponent.js +3 -3
- package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
- package/FlowGraph/flowGraphRichTypes.d.ts +2 -0
- package/FlowGraph/flowGraphRichTypes.js +5 -0
- package/FlowGraph/flowGraphRichTypes.js.map +1 -1
- package/FlowGraph/serialization.js +8 -1
- package/FlowGraph/serialization.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/spotLight.js +1 -1
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Node/Blocks/addBlock.js +1 -1
- package/Materials/Node/Blocks/addBlock.js.map +1 -1
- package/Materials/Node/Blocks/divideBlock.js +1 -1
- package/Materials/Node/Blocks/divideBlock.js.map +1 -1
- package/Materials/Node/Blocks/multiplyBlock.js +1 -1
- package/Materials/Node/Blocks/multiplyBlock.js.map +1 -1
- package/Materials/Node/Blocks/subtractBlock.js +1 -1
- package/Materials/Node/Blocks/subtractBlock.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +1 -0
- package/Materials/PBR/pbrMaterial.js +1 -0
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/effect.js +2 -1
- package/Materials/effect.js.map +1 -1
- package/Navigation/INavigationEngine.d.ts +10 -1
- package/Navigation/INavigationEngine.js.map +1 -1
- package/Navigation/Plugins/recastJSPlugin.d.ts +20 -0
- package/Navigation/Plugins/recastJSPlugin.js +43 -8
- package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
- package/ObjectModel/objectModelInterfaces.d.ts +5 -0
- package/ObjectModel/objectModelInterfaces.js.map +1 -1
- package/Physics/v2/ragdoll.js +4 -0
- package/Physics/v2/ragdoll.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.js +1 -0
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/node.d.ts +3 -0
- package/node.js +3 -0
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.d.ts +0 -60
- package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js +0 -104
- package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js.map +0 -1
package/Engines/ICanvas.d.ts
CHANGED
|
@@ -117,29 +117,89 @@ export interface DOMMatrix {
|
|
|
117
117
|
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
118
118
|
*/
|
|
119
119
|
a: number;
|
|
120
|
+
/**
|
|
121
|
+
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
122
|
+
*/
|
|
120
123
|
b: number;
|
|
124
|
+
/**
|
|
125
|
+
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
126
|
+
*/
|
|
121
127
|
c: number;
|
|
128
|
+
/**
|
|
129
|
+
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
130
|
+
*/
|
|
122
131
|
d: number;
|
|
132
|
+
/**
|
|
133
|
+
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
134
|
+
*/
|
|
123
135
|
e: number;
|
|
136
|
+
/**
|
|
137
|
+
* The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
|
|
138
|
+
*/
|
|
124
139
|
f: number;
|
|
125
140
|
/**
|
|
126
141
|
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
127
142
|
*/
|
|
128
143
|
m11: number;
|
|
144
|
+
/**
|
|
145
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
146
|
+
*/
|
|
129
147
|
m12: number;
|
|
148
|
+
/**
|
|
149
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
150
|
+
*/
|
|
130
151
|
m13: number;
|
|
152
|
+
/**
|
|
153
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
154
|
+
*/
|
|
131
155
|
m14: number;
|
|
156
|
+
/**
|
|
157
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
158
|
+
*/
|
|
132
159
|
m21: number;
|
|
160
|
+
/**
|
|
161
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
162
|
+
*/
|
|
133
163
|
m22: number;
|
|
164
|
+
/**
|
|
165
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
166
|
+
*/
|
|
134
167
|
m23: number;
|
|
168
|
+
/**
|
|
169
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
170
|
+
*/
|
|
135
171
|
m24: number;
|
|
172
|
+
/**
|
|
173
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
174
|
+
*/
|
|
136
175
|
m31: number;
|
|
176
|
+
/**
|
|
177
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
178
|
+
*/
|
|
137
179
|
m32: number;
|
|
180
|
+
/**
|
|
181
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
182
|
+
*/
|
|
138
183
|
m33: number;
|
|
184
|
+
/**
|
|
185
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
186
|
+
*/
|
|
139
187
|
m34: number;
|
|
188
|
+
/**
|
|
189
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
190
|
+
*/
|
|
140
191
|
m41: number;
|
|
192
|
+
/**
|
|
193
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
194
|
+
*/
|
|
141
195
|
m42: number;
|
|
196
|
+
/**
|
|
197
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
198
|
+
*/
|
|
142
199
|
m43: number;
|
|
200
|
+
/**
|
|
201
|
+
* The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
|
|
202
|
+
*/
|
|
143
203
|
m44: number;
|
|
144
204
|
}
|
|
145
205
|
/**
|
package/Engines/ICanvas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n\r\n /**\r\n * Removes the canvas from the document.\r\n */\r\n remove(): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract a matrix\r\n */\r\nexport interface DOMMatrix {\r\n /**\r\n * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.\r\n */\r\n is2D: boolean;\r\n /**\r\n * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).\r\n */\r\n isIdentity: boolean;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n\r\n /**\r\n * Retrieves the current transformation matrix being applied to the context.\r\n */\r\n getTransform(): DOMMatrix;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n\r\n /**\r\n * Removes the canvas from the document.\r\n */\r\n remove(): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract a matrix\r\n */\r\nexport interface DOMMatrix {\r\n /**\r\n * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.\r\n */\r\n is2D: boolean;\r\n /**\r\n * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).\r\n */\r\n isIdentity: boolean;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n a: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n b: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n c: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n d: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n e: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n f: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m11: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m12: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m13: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m14: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m21: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m22: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m23: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m24: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m31: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m32: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m33: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m34: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m41: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m42: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m43: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m44: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n\r\n /**\r\n * Retrieves the current transformation matrix being applied to the context.\r\n */\r\n getTransform(): DOMMatrix;\r\n}\r\n"]}
|
|
@@ -8,11 +8,11 @@ export interface IPipelineContext {
|
|
|
8
8
|
/**
|
|
9
9
|
* Gets a boolean indicating that this pipeline context is supporting asynchronous creating
|
|
10
10
|
*/
|
|
11
|
-
isAsync: boolean;
|
|
11
|
+
readonly isAsync: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Gets a boolean indicating that the context is ready to be used (like shaders / pipelines are compiled and ready for instance)
|
|
14
14
|
*/
|
|
15
|
-
isReady: boolean;
|
|
15
|
+
readonly isReady: boolean;
|
|
16
16
|
/** @internal */
|
|
17
17
|
_name?: string;
|
|
18
18
|
/** @internal */
|
|
@@ -20,7 +20,7 @@ export interface IPipelineContext {
|
|
|
20
20
|
/** @internal */
|
|
21
21
|
_getFragmentShaderCode(): string | null;
|
|
22
22
|
/** @internal */
|
|
23
|
-
_handlesSpectorRebuildCallback(onCompiled: (compiledObject: any) => void): void;
|
|
23
|
+
_handlesSpectorRebuildCallback?(onCompiled: (compiledObject: any) => void): void;
|
|
24
24
|
/** @internal */
|
|
25
25
|
_fillEffectInformation(effect: Effect, uniformBuffersNames: {
|
|
26
26
|
[key: string]: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPipelineContext.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/IPipelineContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport type { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like, IQuaternionLike } from \"../Maths/math.like\";\r\n\r\n/**\r\n * Class used to store and describe the pipeline context associated with an effect\r\n */\r\nexport interface IPipelineContext {\r\n /**\r\n * Gets a boolean indicating that this pipeline context is supporting asynchronous creating\r\n */\r\n isAsync: boolean;\r\n /**\r\n * Gets a boolean indicating that the context is ready to be used (like shaders / pipelines are compiled and ready for instance)\r\n */\r\n isReady: boolean;\r\n\r\n /** @internal */\r\n _name?: string;\r\n\r\n /** @internal */\r\n _getVertexShaderCode(): string | null;\r\n\r\n /** @internal */\r\n _getFragmentShaderCode(): string | null;\r\n\r\n /** @internal */\r\n _handlesSpectorRebuildCallback(onCompiled: (compiledObject: any) => void): void;\r\n\r\n /** @internal */\r\n _fillEffectInformation(\r\n effect: Effect,\r\n uniformBuffersNames: { [key: string]: number },\r\n uniformsNames: string[],\r\n uniforms: { [key: string]: Nullable<WebGLUniformLocation> },\r\n samplerList: string[],\r\n samplers: { [key: string]: number },\r\n attributesNames: string[],\r\n attributes: number[]\r\n ): void;\r\n\r\n /** Releases the resources associated with the pipeline. */\r\n dispose(): void;\r\n\r\n /**\r\n * Sets an integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n setInt(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets an int2 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int2.\r\n * @param y Second int in int2.\r\n */\r\n setInt2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets an int3 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int3.\r\n * @param y Second int in int3.\r\n * @param z Third int in int3.\r\n */\r\n setInt3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets an int4 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int4.\r\n * @param y Second int in int4.\r\n * @param z Third int in int4.\r\n * @param w Fourth int in int4.\r\n */\r\n setInt4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray2(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray3(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray4(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an unsigned integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n setUInt(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets an unsigned int2 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint2.\r\n * @param y Second unsigned int in uint2.\r\n */\r\n setUInt2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets an unsigned int3 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint3.\r\n * @param y Second unsigned int in uint3.\r\n * @param z Third unsigned int in uint3.\r\n */\r\n setUInt3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets an unsigned int4 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint4.\r\n * @param y Second unsigned int in uint4.\r\n * @param z Third unsigned int in uint4.\r\n * @param w Fourth unsigned int in uint4.\r\n */\r\n setUInt4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets an unsigned int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray2(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray3(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray4(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray2(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray3(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray4(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n */\r\n setMatrices(uniformName: string, matrices: Float32Array): void;\r\n\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix(uniformName: string, matrix: IMatrixLike): void;\r\n\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix3x3(uniformName: string, matrix: Float32Array): void;\r\n\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix2x2(uniformName: string, matrix: Float32Array): void;\r\n\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n */\r\n setFloat(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n */\r\n setVector2(uniformName: string, vector2: IVector2Like): void;\r\n\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n */\r\n setFloat2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n */\r\n setVector3(uniformName: string, vector3: IVector3Like): void;\r\n\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n */\r\n setFloat3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n */\r\n setVector4(uniformName: string, vector4: IVector4Like): void;\r\n\r\n /**\r\n * Sets a Quaternion on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param quaternion Value to be set.\r\n */\r\n setQuaternion(uniformName: string, quaternion: IQuaternionLike): void;\r\n\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n */\r\n setFloat4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n */\r\n setColor3(uniformName: string, color3: IColor3Like): void;\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n */\r\n setColor4(uniformName: string, color3: IColor3Like, alpha: number): void;\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n */\r\n setDirectColor4(uniformName: string, color4: IColor4Like): void;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IPipelineContext.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/IPipelineContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport type { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like, IQuaternionLike } from \"../Maths/math.like\";\r\n\r\n/**\r\n * Class used to store and describe the pipeline context associated with an effect\r\n */\r\nexport interface IPipelineContext {\r\n /**\r\n * Gets a boolean indicating that this pipeline context is supporting asynchronous creating\r\n */\r\n readonly isAsync: boolean;\r\n /**\r\n * Gets a boolean indicating that the context is ready to be used (like shaders / pipelines are compiled and ready for instance)\r\n */\r\n readonly isReady: boolean;\r\n\r\n /** @internal */\r\n _name?: string;\r\n\r\n /** @internal */\r\n _getVertexShaderCode(): string | null;\r\n\r\n /** @internal */\r\n _getFragmentShaderCode(): string | null;\r\n\r\n /** @internal */\r\n _handlesSpectorRebuildCallback?(onCompiled: (compiledObject: any) => void): void;\r\n\r\n /** @internal */\r\n _fillEffectInformation(\r\n effect: Effect,\r\n uniformBuffersNames: { [key: string]: number },\r\n uniformsNames: string[],\r\n uniforms: { [key: string]: Nullable<WebGLUniformLocation> },\r\n samplerList: string[],\r\n samplers: { [key: string]: number },\r\n attributesNames: string[],\r\n attributes: number[]\r\n ): void;\r\n\r\n /** Releases the resources associated with the pipeline. */\r\n dispose(): void;\r\n\r\n /**\r\n * Sets an integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n setInt(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets an int2 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int2.\r\n * @param y Second int in int2.\r\n */\r\n setInt2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets an int3 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int3.\r\n * @param y Second int in int3.\r\n * @param z Third int in int3.\r\n */\r\n setInt3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets an int4 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int4.\r\n * @param y Second int in int4.\r\n * @param z Third int in int4.\r\n * @param w Fourth int in int4.\r\n */\r\n setInt4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray2(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray3(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setIntArray4(uniformName: string, array: Int32Array): void;\r\n\r\n /**\r\n * Sets an unsigned integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n setUInt(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets an unsigned int2 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint2.\r\n * @param y Second unsigned int in uint2.\r\n */\r\n setUInt2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets an unsigned int3 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint3.\r\n * @param y Second unsigned int in uint3.\r\n * @param z Third unsigned int in uint3.\r\n */\r\n setUInt3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets an unsigned int4 value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint4.\r\n * @param y Second unsigned int in uint4.\r\n * @param z Third unsigned int in uint4.\r\n * @param w Fourth unsigned int in uint4.\r\n */\r\n setUInt4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets an unsigned int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray2(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray3(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setUIntArray4(uniformName: string, array: Uint32Array): void;\r\n\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray2(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray3(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n setArray4(uniformName: string, array: number[] | Float32Array): void;\r\n\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n */\r\n setMatrices(uniformName: string, matrices: Float32Array): void;\r\n\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix(uniformName: string, matrix: IMatrixLike): void;\r\n\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix3x3(uniformName: string, matrix: Float32Array): void;\r\n\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n setMatrix2x2(uniformName: string, matrix: Float32Array): void;\r\n\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n */\r\n setFloat(uniformName: string, value: number): void;\r\n\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n */\r\n setVector2(uniformName: string, vector2: IVector2Like): void;\r\n\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n */\r\n setFloat2(uniformName: string, x: number, y: number): void;\r\n\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n */\r\n setVector3(uniformName: string, vector3: IVector3Like): void;\r\n\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n */\r\n setFloat3(uniformName: string, x: number, y: number, z: number): void;\r\n\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n */\r\n setVector4(uniformName: string, vector4: IVector4Like): void;\r\n\r\n /**\r\n * Sets a Quaternion on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param quaternion Value to be set.\r\n */\r\n setQuaternion(uniformName: string, quaternion: IQuaternionLike): void;\r\n\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n */\r\n setFloat4(uniformName: string, x: number, y: number, z: number, w: number): void;\r\n\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n */\r\n setColor3(uniformName: string, color3: IColor3Like): void;\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n */\r\n setColor4(uniformName: string, color3: IColor3Like, alpha: number): void;\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n */\r\n setDirectColor4(uniformName: string, color4: IColor4Like): void;\r\n}\r\n"]}
|
|
@@ -3,21 +3,20 @@ import type { Effect } from "../../Materials/effect";
|
|
|
3
3
|
import type { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like, IQuaternionLike } from "../../Maths/math.like";
|
|
4
4
|
import type { IPipelineContext } from "../IPipelineContext";
|
|
5
5
|
import type { NativeEngine } from "../nativeEngine";
|
|
6
|
+
import type { NativeProgram } from "./nativeInterfaces";
|
|
6
7
|
export declare class NativePipelineContext implements IPipelineContext {
|
|
7
|
-
isParallelCompiled: boolean;
|
|
8
8
|
isCompiled: boolean;
|
|
9
9
|
compilationError?: Error;
|
|
10
|
-
|
|
10
|
+
readonly isAsync: boolean;
|
|
11
|
+
program: NativeProgram;
|
|
11
12
|
get isReady(): boolean;
|
|
12
13
|
onCompiled?: () => void;
|
|
13
14
|
_getVertexShaderCode(): string | null;
|
|
14
15
|
_getFragmentShaderCode(): string | null;
|
|
15
|
-
_handlesSpectorRebuildCallback(onCompiled: (compiledObject: any) => void): void;
|
|
16
|
-
nativeProgram: any;
|
|
17
16
|
private _engine;
|
|
18
17
|
private _valueCache;
|
|
19
18
|
private _uniforms;
|
|
20
|
-
constructor(engine: NativeEngine);
|
|
19
|
+
constructor(engine: NativeEngine, isAsync: boolean);
|
|
21
20
|
_fillEffectInformation(effect: Effect, uniformBuffersNames: {
|
|
22
21
|
[key: string]: number;
|
|
23
22
|
}, uniformsNames: string[], uniforms: {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export class NativePipelineContext {
|
|
2
|
-
get isAsync() {
|
|
3
|
-
return this.isParallelCompiled;
|
|
4
|
-
}
|
|
5
2
|
get isReady() {
|
|
6
3
|
if (this.compilationError) {
|
|
7
4
|
const message = this.compilationError.message;
|
|
@@ -15,15 +12,11 @@ export class NativePipelineContext {
|
|
|
15
12
|
_getFragmentShaderCode() {
|
|
16
13
|
return null;
|
|
17
14
|
}
|
|
18
|
-
|
|
19
|
-
_handlesSpectorRebuildCallback(onCompiled) {
|
|
20
|
-
throw new Error("Not implemented");
|
|
21
|
-
}
|
|
22
|
-
constructor(engine) {
|
|
23
|
-
this.isParallelCompiled = true;
|
|
15
|
+
constructor(engine, isAsync) {
|
|
24
16
|
this.isCompiled = false;
|
|
25
17
|
this._valueCache = {};
|
|
26
18
|
this._engine = engine;
|
|
19
|
+
this.isAsync = isAsync;
|
|
27
20
|
}
|
|
28
21
|
_fillEffectInformation(effect, uniformBuffersNames, uniformsNames, uniforms, samplerList, samplers, attributesNames, attributes) {
|
|
29
22
|
const engine = this._engine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativePipelineContext.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/Native/nativePipelineContext.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,qBAAqB;IAK9B,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,OAAO;QACd,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,cAAc,GAAG,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACzF;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAIM,oBAAoB;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,6BAA6B;IACtB,8BAA8B,CAAC,UAAyC;QAC3E,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IAQD,YAAY,MAAoB;QArCzB,uBAAkB,GAAY,IAAI,CAAC;QACnC,eAAU,GAAY,KAAK,CAAC;QAiC3B,gBAAW,GAA2B,EAAE,CAAC;QAI7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAEM,sBAAsB,CACzB,MAAc,EACd,mBAA8C,EAC9C,aAAuB,EACvB,QAA2D,EAC3D,WAAqB,EACrB,QAAmC,EACnC,eAAyB,EACzB,UAAoB;QAEpB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,CAAC,sBAAsB,EAAE;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I,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YACrE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAE,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;gBAC5F,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;aACxC;SACJ;IACL,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,WAAmB,EAAE,MAAmB;QAC3D,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;YACxE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAE,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;gBAC/F,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;aACxC;SACJ;IACL,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../../types\";\r\nimport type { Effect } from \"../../Materials/effect\";\r\nimport type { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like, IQuaternionLike } from \"../../Maths/math.like\";\r\nimport type { IPipelineContext } from \"../IPipelineContext\";\r\nimport type { NativeEngine } from \"../nativeEngine\";\r\n\r\nexport class NativePipelineContext implements IPipelineContext {\r\n public isParallelCompiled: boolean = true;\r\n public isCompiled: boolean = false;\r\n public compilationError?: Error;\r\n\r\n public get isAsync(): boolean {\r\n return this.isParallelCompiled;\r\n }\r\n\r\n public get isReady(): boolean {\r\n if (this.compilationError) {\r\n const message = this.compilationError.message;\r\n throw new Error(\"SHADER ERROR\" + (typeof message === \"string\" ? \"\\n\" + message : \"\"));\r\n }\r\n return this.isCompiled;\r\n }\r\n\r\n public onCompiled?: () => void;\r\n\r\n public _getVertexShaderCode(): string | null {\r\n return null;\r\n }\r\n\r\n public _getFragmentShaderCode(): string | null {\r\n return null;\r\n }\r\n\r\n // TODO: what should this do?\r\n public _handlesSpectorRebuildCallback(onCompiled: (compiledObject: any) => void): void {\r\n throw new Error(\"Not implemented\");\r\n }\r\n\r\n public nativeProgram: any;\r\n\r\n private _engine: NativeEngine;\r\n private _valueCache: { [key: string]: any } = {};\r\n private _uniforms: { [key: string]: Nullable<WebGLUniformLocation> };\r\n\r\n constructor(engine: NativeEngine) {\r\n this._engine = engine;\r\n }\r\n\r\n public _fillEffectInformation(\r\n effect: Effect,\r\n uniformBuffersNames: { [key: string]: number },\r\n uniformsNames: string[],\r\n uniforms: { [key: string]: Nullable<WebGLUniformLocation> },\r\n samplerList: string[],\r\n samplers: { [key: string]: number },\r\n attributesNames: string[],\r\n attributes: number[]\r\n ) {\r\n const engine = this._engine;\r\n if (engine.supportsUniformBuffers) {\r\n for (const name in uniformBuffersNames) {\r\n effect.bindUniformBlock(name, uniformBuffersNames[name]);\r\n }\r\n }\r\n\r\n const effectAvailableUniforms = this._engine.getUniforms(this, uniformsNames);\r\n effectAvailableUniforms.forEach((uniform, index) => {\r\n uniforms[uniformsNames[index]] = uniform;\r\n });\r\n this._uniforms = uniforms;\r\n\r\n let index: number;\r\n for (index = 0; index < samplerList.length; index++) {\r\n const sampler = effect.getUniform(samplerList[index]);\r\n if (sampler == null) {\r\n samplerList.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n\r\n samplerList.forEach((name, index) => {\r\n samplers[name] = index;\r\n });\r\n\r\n attributes.push(...engine.getAttributes(this, attributesNames));\r\n }\r\n\r\n /**\r\n * Release all associated resources.\r\n **/\r\n public dispose() {\r\n this._uniforms = {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheMatrix(uniformName: string, matrix: IMatrixLike): boolean {\r\n const cache = this._valueCache[uniformName];\r\n const flag = matrix.updateFlag;\r\n if (cache !== undefined && cache === flag) {\r\n return false;\r\n }\r\n\r\n this._valueCache[uniformName] = flag;\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat2(uniformName: string, x: number, y: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat3(uniformName: string, x: number, y: number, z: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat4(uniformName: string, x: number, y: number, z: number, w: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z, w];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n if (cache[3] !== w) {\r\n cache[3] = w;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Sets an integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n public setInt(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setInt(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int2.\r\n * @param y Second int in int2.\r\n */\r\n public setInt2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setInt2(this._uniforms[uniformName], x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int3.\r\n * @param y Second int in int3.\r\n * @param z Third int in int3.\r\n */\r\n public setInt3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setInt3(this._uniforms[uniformName], x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int4.\r\n * @param y Second int in int4.\r\n * @param z Third int in int4.\r\n * @param w Fourth int in int4.\r\n */\r\n public setInt4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setInt4(this._uniforms[uniformName], x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray2(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray3(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray4(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n public setUInt(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setUInt(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint2.\r\n * @param y Second unsigned int in uint2.\r\n */\r\n public setUInt2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setUInt2(this._uniforms[uniformName], x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint3.\r\n * @param y Second unsigned int in uint3.\r\n * @param z Third unsigned int in uint3.\r\n */\r\n public setUInt3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setUInt3(this._uniforms[uniformName], x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint4.\r\n * @param y Second unsigned int in uint4.\r\n * @param z Third unsigned int in uint4.\r\n * @param w Fourth unsigned int in uint4.\r\n */\r\n public setUInt4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setUInt4(this._uniforms[uniformName], x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray2(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray3(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray4(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray2(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray3(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray4(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray2(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n public setArray3(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray4(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n */\r\n public setMatrices(uniformName: string, matrices: Float32Array): void {\r\n if (!matrices) {\r\n return;\r\n }\r\n\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrices(this._uniforms[uniformName]!, matrices);\r\n }\r\n\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix(uniformName: string, matrix: IMatrixLike): void {\r\n if (this._cacheMatrix(uniformName, matrix)) {\r\n if (!this._engine.setMatrices(this._uniforms[uniformName]!, matrix.toArray() as Float32Array)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix3x3(uniformName: string, matrix: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix3x3(this._uniforms[uniformName]!, matrix);\r\n }\r\n\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix2x2(uniformName: string, matrix: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix2x2(this._uniforms[uniformName]!, matrix);\r\n }\r\n\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n * @returns this effect.\r\n */\r\n public setFloat(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setFloat(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a boolean on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param bool value to be set.\r\n */\r\n public setBool(uniformName: string, bool: boolean): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === bool) {\r\n return;\r\n }\r\n\r\n if (this._engine.setInt(this._uniforms[uniformName]!, bool ? 1 : 0)) {\r\n this._valueCache[uniformName] = bool ? 1 : 0;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n */\r\n public setVector2(uniformName: string, vector2: IVector2Like): void {\r\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\r\n if (!this._engine.setFloat2(this._uniforms[uniformName]!, vector2.x, vector2.y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n */\r\n public setFloat2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setFloat2(this._uniforms[uniformName]!, x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n */\r\n public setVector3(uniformName: string, vector3: IVector3Like): void {\r\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, vector3.x, vector3.y, vector3.z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n */\r\n public setFloat3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n */\r\n public setVector4(uniformName: string, vector4: IVector4Like): void {\r\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Quaternion on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param quaternion Value to be set.\r\n */\r\n public setQuaternion(uniformName: string, quaternion: IQuaternionLike): void {\r\n if (this._cacheFloat4(uniformName, quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n * @returns this effect.\r\n */\r\n public setFloat4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n */\r\n public setColor3(uniformName: string, color3: IColor3Like): void {\r\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, color3.r, color3.g, color3.b)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n */\r\n public setColor4(uniformName: string, color3: IColor3Like, alpha: number): void {\r\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, color3.r, color3.g, color3.b, alpha)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n */\r\n public setDirectColor4(uniformName: string, color4: IColor4Like): void {\r\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, color4.r, color4.g, color4.b, color4.a)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"nativePipelineContext.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/Native/nativePipelineContext.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,qBAAqB;IAQ9B,IAAW,OAAO;QACd,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,cAAc,GAAG,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACzF;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAIM,oBAAoB;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,CAAC;IAChB,CAAC;IAMD,YAAY,MAAoB,EAAE,OAAgB;QA7B3C,eAAU,GAAY,KAAK,CAAC;QA0B3B,gBAAW,GAA2B,EAAE,CAAC;QAI7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IA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,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;gBACrF,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;aACxC;SACJ;IACL,CAAC;IAED;;;;;OAKG;IACI,SAAS,CAAC,WAAmB,EAAE,MAAmB,EAAE,KAAa;QACpE,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YACrE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAE,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;gBAC5F,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;aACxC;SACJ;IACL,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,WAAmB,EAAE,MAAmB;QAC3D,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;YACxE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAE,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;gBAC/F,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;aACxC;SACJ;IACL,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../../types\";\r\nimport type { Effect } from \"../../Materials/effect\";\r\nimport type { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like, IQuaternionLike } from \"../../Maths/math.like\";\r\nimport type { IPipelineContext } from \"../IPipelineContext\";\r\nimport type { NativeEngine } from \"../nativeEngine\";\r\nimport type { NativeProgram } from \"./nativeInterfaces\";\r\n\r\nexport class NativePipelineContext implements IPipelineContext {\r\n public isCompiled: boolean = false;\r\n public compilationError?: Error;\r\n\r\n public readonly isAsync: boolean;\r\n\r\n public program: NativeProgram;\r\n\r\n public get isReady(): boolean {\r\n if (this.compilationError) {\r\n const message = this.compilationError.message;\r\n throw new Error(\"SHADER ERROR\" + (typeof message === \"string\" ? \"\\n\" + message : \"\"));\r\n }\r\n return this.isCompiled;\r\n }\r\n\r\n public onCompiled?: () => void;\r\n\r\n public _getVertexShaderCode(): string | null {\r\n return null;\r\n }\r\n\r\n public _getFragmentShaderCode(): string | null {\r\n return null;\r\n }\r\n\r\n private _engine: NativeEngine;\r\n private _valueCache: { [key: string]: any } = {};\r\n private _uniforms: { [key: string]: Nullable<WebGLUniformLocation> };\r\n\r\n constructor(engine: NativeEngine, isAsync: boolean) {\r\n this._engine = engine;\r\n this.isAsync = isAsync;\r\n }\r\n\r\n public _fillEffectInformation(\r\n effect: Effect,\r\n uniformBuffersNames: { [key: string]: number },\r\n uniformsNames: string[],\r\n uniforms: { [key: string]: Nullable<WebGLUniformLocation> },\r\n samplerList: string[],\r\n samplers: { [key: string]: number },\r\n attributesNames: string[],\r\n attributes: number[]\r\n ) {\r\n const engine = this._engine;\r\n if (engine.supportsUniformBuffers) {\r\n for (const name in uniformBuffersNames) {\r\n effect.bindUniformBlock(name, uniformBuffersNames[name]);\r\n }\r\n }\r\n\r\n const effectAvailableUniforms = this._engine.getUniforms(this, uniformsNames);\r\n effectAvailableUniforms.forEach((uniform, index) => {\r\n uniforms[uniformsNames[index]] = uniform;\r\n });\r\n this._uniforms = uniforms;\r\n\r\n let index: number;\r\n for (index = 0; index < samplerList.length; index++) {\r\n const sampler = effect.getUniform(samplerList[index]);\r\n if (sampler == null) {\r\n samplerList.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n\r\n samplerList.forEach((name, index) => {\r\n samplers[name] = index;\r\n });\r\n\r\n attributes.push(...engine.getAttributes(this, attributesNames));\r\n }\r\n\r\n /**\r\n * Release all associated resources.\r\n **/\r\n public dispose() {\r\n this._uniforms = {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheMatrix(uniformName: string, matrix: IMatrixLike): boolean {\r\n const cache = this._valueCache[uniformName];\r\n const flag = matrix.updateFlag;\r\n if (cache !== undefined && cache === flag) {\r\n return false;\r\n }\r\n\r\n this._valueCache[uniformName] = flag;\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat2(uniformName: string, x: number, y: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat3(uniformName: string, x: number, y: number, z: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cacheFloat4(uniformName: string, x: number, y: number, z: number, w: number): boolean {\r\n let cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z, w];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n\r\n let changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n if (cache[3] !== w) {\r\n cache[3] = w;\r\n changed = true;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Sets an integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n public setInt(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setInt(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int2.\r\n * @param y Second int in int2.\r\n */\r\n public setInt2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setInt2(this._uniforms[uniformName], x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int3.\r\n * @param y Second int in int3.\r\n * @param z Third int in int3.\r\n */\r\n public setInt3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setInt3(this._uniforms[uniformName], x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a int4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First int in int4.\r\n * @param y Second int in int4.\r\n * @param z Third int in int4.\r\n * @param w Fourth int in int4.\r\n */\r\n public setInt4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setInt4(this._uniforms[uniformName], x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray2(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray3(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setIntArray4(uniformName: string, array: Int32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned integer value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n */\r\n public setUInt(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setUInt(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint2.\r\n * @param y Second unsigned int in uint2.\r\n */\r\n public setUInt2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setUInt2(this._uniforms[uniformName], x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint3.\r\n * @param y Second unsigned int in uint3.\r\n * @param z Third unsigned int in uint3.\r\n */\r\n public setUInt3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setUInt3(this._uniforms[uniformName], x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a unsigned int4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First unsigned int in uint4.\r\n * @param y Second unsigned int in uint4.\r\n * @param z Third unsigned int in uint4.\r\n * @param w Fourth unsigned int in uint4.\r\n */\r\n public setUInt4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setUInt4(this._uniforms[uniformName], x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray2(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray3(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setUIntArray4(uniformName: string, array: Uint32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setUIntArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray2(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray3(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setFloatArray4(uniformName: string, array: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray2(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n public setArray3(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n */\r\n public setArray4(uniformName: string, array: number[]): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName]!, array);\r\n }\r\n\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n */\r\n public setMatrices(uniformName: string, matrices: Float32Array): void {\r\n if (!matrices) {\r\n return;\r\n }\r\n\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrices(this._uniforms[uniformName]!, matrices);\r\n }\r\n\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix(uniformName: string, matrix: IMatrixLike): void {\r\n if (this._cacheMatrix(uniformName, matrix)) {\r\n if (!this._engine.setMatrices(this._uniforms[uniformName]!, matrix.toArray() as Float32Array)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix3x3(uniformName: string, matrix: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix3x3(this._uniforms[uniformName]!, matrix);\r\n }\r\n\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n */\r\n public setMatrix2x2(uniformName: string, matrix: Float32Array): void {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix2x2(this._uniforms[uniformName]!, matrix);\r\n }\r\n\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n * @returns this effect.\r\n */\r\n public setFloat(uniformName: string, value: number): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return;\r\n }\r\n\r\n if (this._engine.setFloat(this._uniforms[uniformName]!, value)) {\r\n this._valueCache[uniformName] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a boolean on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param bool value to be set.\r\n */\r\n public setBool(uniformName: string, bool: boolean): void {\r\n const cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === bool) {\r\n return;\r\n }\r\n\r\n if (this._engine.setInt(this._uniforms[uniformName]!, bool ? 1 : 0)) {\r\n this._valueCache[uniformName] = bool ? 1 : 0;\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n */\r\n public setVector2(uniformName: string, vector2: IVector2Like): void {\r\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\r\n if (!this._engine.setFloat2(this._uniforms[uniformName]!, vector2.x, vector2.y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n */\r\n public setFloat2(uniformName: string, x: number, y: number): void {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n if (!this._engine.setFloat2(this._uniforms[uniformName]!, x, y)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n */\r\n public setVector3(uniformName: string, vector3: IVector3Like): void {\r\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, vector3.x, vector3.y, vector3.z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n */\r\n public setFloat3(uniformName: string, x: number, y: number, z: number): void {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, x, y, z)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n */\r\n public setVector4(uniformName: string, vector4: IVector4Like): void {\r\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Quaternion on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param quaternion Value to be set.\r\n */\r\n public setQuaternion(uniformName: string, quaternion: IQuaternionLike): void {\r\n if (this._cacheFloat4(uniformName, quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n * @returns this effect.\r\n */\r\n public setFloat4(uniformName: string, x: number, y: number, z: number, w: number): void {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, x, y, z, w)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n */\r\n public setColor3(uniformName: string, color3: IColor3Like): void {\r\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\r\n if (!this._engine.setFloat3(this._uniforms[uniformName]!, color3.r, color3.g, color3.b)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n */\r\n public setColor4(uniformName: string, color3: IColor3Like, alpha: number): void {\r\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, color3.r, color3.g, color3.b, alpha)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n */\r\n public setDirectColor4(uniformName: string, color4: IColor4Like): void {\r\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\r\n if (!this._engine.setFloat4(this._uniforms[uniformName]!, color4.r, color4.g, color4.b, color4.a)) {\r\n this._valueCache[uniformName] = null;\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { NativeData } from "./nativeDataStream";
|
|
2
2
|
import { NativeDataStream } from "./nativeDataStream";
|
|
3
|
+
/**
|
|
4
|
+
* Validated Native Data Stream
|
|
5
|
+
*/
|
|
3
6
|
export declare class ValidatedNativeDataStream extends NativeDataStream {
|
|
4
7
|
constructor();
|
|
5
8
|
writeUint32(value: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validatedNativeDataStream.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/Native/validatedNativeDataStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,YAAY,CAAC,uBAAuB,GAAG;IACnC,IAAI,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;QAC7C,OAAO,IAAI,yBAAyB,EAAE,CAAC;KAC1C;SAAM;QACH,OAAO,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AAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAEe,YAAY,CAAC,KAAc;QACvC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QAC/D,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ","sourcesContent":["import { NativeEngine } from \"../nativeEngine\";\r\nimport type { NativeData } from \"./nativeDataStream\";\r\nimport { NativeDataStream } from \"./nativeDataStream\";\r\nimport type { INative } from \"./nativeInterfaces\";\r\n\r\ndeclare const _native: INative;\r\n\r\nNativeEngine._createNativeDataStream = function () {\r\n if (_native.NativeDataStream.VALIDATION_ENABLED) {\r\n return new ValidatedNativeDataStream();\r\n } else {\r\n return new NativeDataStream();\r\n }\r\n};\r\n\r\nexport class ValidatedNativeDataStream extends NativeDataStream {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public override writeUint32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_UINT_32);\r\n super.writeUint32(value);\r\n }\r\n\r\n public override writeInt32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_INT_32);\r\n super.writeInt32(value);\r\n }\r\n\r\n public override writeFloat32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_FLOAT_32);\r\n super.writeFloat32(value);\r\n }\r\n\r\n public override writeUint32Array(values: Uint32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_UINT_32_ARRAY);\r\n super.writeUint32Array(values);\r\n }\r\n\r\n public override writeInt32Array(values: Int32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_INT_32_ARRAY);\r\n super.writeInt32Array(values);\r\n }\r\n\r\n public override writeFloat32Array(values: Float32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_FLOAT_32_ARRAY);\r\n super.writeFloat32Array(values);\r\n }\r\n\r\n public override writeNativeData(handle: NativeData) {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_NATIVE_DATA);\r\n super.writeNativeData(handle);\r\n }\r\n\r\n public override writeBoolean(value: boolean) {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_BOOLEAN);\r\n super.writeBoolean(value);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"validatedNativeDataStream.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/Native/validatedNativeDataStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,YAAY,CAAC,uBAAuB,GAAG;IACnC,IAAI,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;QAC7C,OAAO,IAAI,yBAAyB,EAAE,CAAC;KAC1C;SAAM;QACH,OAAO,IAAI,gBAAgB,EAAE,CAAC;KACjC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,gBAAgB;IAC3D;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAEe,WAAW,CAAC,KAAa;QACrC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QAC/D,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAEe,UAAU,CAAC,KAAa;QACpC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;QAC9D,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAEe,YAAY,CAAC,KAAa;QACtC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;QAChE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEe,gBAAgB,CAAC,MAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;QACrE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAEe,eAAe,CAAC,MAAkB;QAC9C,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;QACpE,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAEe,iBAAiB,CAAC,MAAoB;QAClD,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;QACtE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAEe,eAAe,CAAC,MAAkB;QAC9C,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;QACnE,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAEe,YAAY,CAAC,KAAc;QACvC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QAC/D,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ","sourcesContent":["import { NativeEngine } from \"../nativeEngine\";\r\nimport type { NativeData } from \"./nativeDataStream\";\r\nimport { NativeDataStream } from \"./nativeDataStream\";\r\nimport type { INative } from \"./nativeInterfaces\";\r\n\r\ndeclare const _native: INative;\r\n\r\nNativeEngine._createNativeDataStream = function () {\r\n if (_native.NativeDataStream.VALIDATION_ENABLED) {\r\n return new ValidatedNativeDataStream();\r\n } else {\r\n return new NativeDataStream();\r\n }\r\n};\r\n\r\n/**\r\n * Validated Native Data Stream\r\n */\r\nexport class ValidatedNativeDataStream extends NativeDataStream {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public override writeUint32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_UINT_32);\r\n super.writeUint32(value);\r\n }\r\n\r\n public override writeInt32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_INT_32);\r\n super.writeInt32(value);\r\n }\r\n\r\n public override writeFloat32(value: number): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_FLOAT_32);\r\n super.writeFloat32(value);\r\n }\r\n\r\n public override writeUint32Array(values: Uint32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_UINT_32_ARRAY);\r\n super.writeUint32Array(values);\r\n }\r\n\r\n public override writeInt32Array(values: Int32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_INT_32_ARRAY);\r\n super.writeInt32Array(values);\r\n }\r\n\r\n public override writeFloat32Array(values: Float32Array): void {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_FLOAT_32_ARRAY);\r\n super.writeFloat32Array(values);\r\n }\r\n\r\n public override writeNativeData(handle: NativeData) {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_NATIVE_DATA);\r\n super.writeNativeData(handle);\r\n }\r\n\r\n public override writeBoolean(value: boolean) {\r\n super.writeUint32(_native.NativeDataStream.VALIDATION_BOOLEAN);\r\n super.writeBoolean(value);\r\n }\r\n}\r\n"]}
|