Comparing version 1.3.12 to 1.3.13
@@ -355,2 +355,5 @@ // Type definitions for regl 1.3.1 | ||
type MaybeNestedDynamic<Type, Context extends REGL.DefaultContext, Props extends {}> = | ||
{ [K in keyof Type]: MaybeDynamic<Type[K], Context, Props> }; | ||
interface ClearOptions { | ||
@@ -608,3 +611,3 @@ /** | ||
scissor?: MaybeDynamic<REGL.ScissorOptions, ParentContext & OwnContext, Props>; | ||
scissor?: MaybeNestedDynamic<REGL.ScissorOptions, ParentContext & OwnContext, Props>; | ||
@@ -611,0 +614,0 @@ /* Viewport */ |
@@ -192,2 +192,9 @@ var check = require('./util/check') | ||
} | ||
} else if (data instanceof ArrayBuffer) { | ||
buffer.dtype = GL_UNSIGNED_BYTE | ||
buffer.dimension = dimension | ||
initBufferFromTypedArray(buffer, data, usage) | ||
if (persist) { | ||
buffer.persistentData = new Uint8Array(new Uint8Array(data)) | ||
} | ||
} else { | ||
@@ -230,3 +237,4 @@ check.raise('invalid buffer data') | ||
isTypedArray(options) || | ||
isNDArrayLike(options)) { | ||
isNDArrayLike(options) || | ||
options instanceof ArrayBuffer) { | ||
data = options | ||
@@ -301,3 +309,3 @@ } else if (typeof options === 'number') { | ||
buffer.bind() | ||
if (isTypedArray(data)) { | ||
if (isTypedArray(data) || data instanceof ArrayBuffer) { | ||
setSubData(data, offset) | ||
@@ -304,0 +312,0 @@ } else if (Array.isArray(data)) { |
@@ -58,3 +58,3 @@ var extend = require('./extend') | ||
return join([ | ||
(vars.length > 0 ? 'var ' + vars + ';' : ''), | ||
(vars.length > 0 ? 'var ' + vars.join(',') + ';' : ''), | ||
join(code) | ||
@@ -61,0 +61,0 @@ ]) |
{ | ||
"name": "regl", | ||
"version": "1.3.12", | ||
"version": "1.3.13", | ||
"description": "regl is a fast functional WebGL framework.", | ||
@@ -5,0 +5,0 @@ "main": "dist/regl.js", |
@@ -355,2 +355,5 @@ // Type definitions for regl 1.3.1 | ||
type MaybeNestedDynamic<Type, Context extends REGL.DefaultContext, Props extends {}> = | ||
{ [K in keyof Type]: MaybeDynamic<Type[K], Context, Props> }; | ||
interface ClearOptions { | ||
@@ -608,3 +611,3 @@ /** | ||
scissor?: MaybeDynamic<REGL.ScissorOptions, ParentContext & OwnContext, Props>; | ||
scissor?: MaybeNestedDynamic<REGL.ScissorOptions, ParentContext & OwnContext, Props>; | ||
@@ -611,0 +614,0 @@ /* Viewport */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1125652
27501
1