Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@luma.gl/test-utils

Package Overview
Dependencies
Maintainers
8
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luma.gl/test-utils - npm Package Compare versions

Comparing version 9.0.11 to 9.1.0-alpha.1

LICENSE

3

dist/engine/classic-animation-loop.js

@@ -6,3 +6,4 @@ // luma.gl

// TODO - remove dependency on framebuffer (bundle size impact)
import { luma, log, requestAnimationFrame, cancelAnimationFrame } from '@luma.gl/core';
import { luma, log } from '@luma.gl/core';
import { requestAnimationFrame, cancelAnimationFrame } from '@luma.gl/engine';
import { isBrowser } from '@probe.gl/env';

@@ -9,0 +10,0 @@ import { resetGLParameters } from '@luma.gl/webgl';

@@ -1,2 +0,2 @@

import type { CanvasContextProps } from '@luma.gl/core';
import type { CanvasContextProps, TextureFormat } from '@luma.gl/core';
import { CanvasContext } from '@luma.gl/core';

@@ -10,2 +10,4 @@ import type { NullDevice } from "./null-device.js";

readonly device: NullDevice;
readonly format: TextureFormat;
readonly depthStencilFormat: TextureFormat;
presentationSize: [number, number];

@@ -12,0 +14,0 @@ private _framebuffer;

@@ -11,2 +11,4 @@ // luma.gl

device;
format = 'rgba8unorm';
depthStencilFormat = 'depth24plus';
presentationSize;

@@ -13,0 +15,0 @@ _framebuffer = null;

// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { Device, CanvasContext, uid, DeviceFeatures } from '@luma.gl/core';
import { Device, CanvasContext, DeviceFeatures } from '@luma.gl/core';
import { NullDeviceInfo } from "./null-device-info.js";

@@ -43,3 +43,3 @@ import { NullDeviceLimits } from "./null-device-features.js";

constructor(props) {
super({ ...props, id: props.id || uid('dummy-device') });
super({ ...props, id: props.id || 'null-device' });
this.canvasContext = new NullCanvasContext(this, props);

@@ -46,0 +46,0 @@ this.lost = new Promise(resolve => { });

// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { Buffer, assert } from '@luma.gl/core';
import { Buffer } from '@luma.gl/core';
export class NullBuffer extends Buffer {

@@ -13,3 +13,3 @@ device;

const byteLength = props.byteLength ?? (props.data ? props.data.byteLength + byteOffset : 0);
assert(byteLength >= 0);
// assert(byteLength >= 0);
this.byteLength = byteLength;

@@ -29,4 +29,4 @@ this.trackAllocatedMemory(byteLength);

write(data, byteOffset = 0) {
assert(data.byteLength + byteOffset <= this.byteLength);
// assert(data.byteLength + byteOffset <= this.byteLength);
}
}
import type { FramebufferProps } from '@luma.gl/core';
import { Framebuffer } from '@luma.gl/core';
import type { NullDevice } from "../null-device.js";
import type { NullTextureView } from "./null-texture-view.js";
export declare class NullFramebuffer extends Framebuffer {
device: NullDevice;
colorAttachments: NullTextureView[];
depthStencilAttachment: NullTextureView | null;
constructor(device: NullDevice, props: FramebufferProps);
}
//# sourceMappingURL=null-framebuffer.d.ts.map

@@ -7,2 +7,4 @@ // luma.gl

device;
colorAttachments = [];
depthStencilAttachment = null;
constructor(device, props) {

@@ -9,0 +11,0 @@ super(device, props);

// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { RenderPipeline, cast } from '@luma.gl/core';
import { RenderPipeline } from '@luma.gl/core';
/** Creates a new render pipeline */

@@ -15,4 +15,4 @@ export class NullRenderPipeline extends RenderPipeline {

this.device = device;
this.vs = cast(props.vs);
this.fs = cast(props.fs);
this.vs = props.vs;
this.fs = props.fs;
this.shaderLayout = props.shaderLayout || {

@@ -19,0 +19,0 @@ attributes: [],

import type { TextureProps, Sampler, SamplerProps, TextureViewProps } from '@luma.gl/core';
import type { Texture1DData, Texture2DData, Texture3DData, TextureCubeData, TextureArrayData, TextureCubeArrayData } from '@luma.gl/core';
import { Texture } from '@luma.gl/core';

@@ -6,3 +7,3 @@ import { NullDevice } from "../null-device.js";

import { NullTextureView } from "./null-texture-view.js";
export declare class NullTexture extends Texture<TextureProps> {
export declare class NullTexture extends Texture {
readonly device: NullDevice;

@@ -14,9 +15,10 @@ sampler: NullSampler;

createView(props: TextureViewProps): NullTextureView;
setTexture1DData(data: Texture1DData): void;
setTexture2DData(lodData: Texture2DData, depth?: number, target?: number): void;
setTexture3DData(lodData: Texture3DData, depth?: number, target?: number): void;
setTextureCubeData(data: TextureCubeData, depth?: number): void;
setTextureArrayData(data: TextureArrayData): void;
setTextureCubeArrayData(data: TextureCubeArrayData): void;
initialize(props?: TextureProps): this;
setSampler(sampler?: Sampler | SamplerProps): this;
resize(options: {
height: number;
width: number;
mipmaps?: boolean;
}): this;
setImageData(options: {

@@ -23,0 +25,0 @@ data?: any;

// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { Texture, assert, loadImage } from '@luma.gl/core';
import { Texture } from '@luma.gl/core';
import { NullSampler } from "./null-sampler.js";

@@ -16,3 +16,3 @@ import { NullTextureView } from "./null-texture-view.js";

if (typeof this.props?.data === 'string') {
Object.assign(this.props, { data: loadImage(this.props.data) });
throw new Error('Texture2D: Loading textures from URLs is not supported');
}

@@ -31,2 +31,20 @@ this.initialize(this.props);

}
setTexture1DData(data) {
throw new Error('not implemented');
}
setTexture2DData(lodData, depth, target) {
throw new Error('not implemented');
}
setTexture3DData(lodData, depth, target) {
throw new Error('not implemented');
}
setTextureCubeData(data, depth) {
throw new Error('not implemented');
}
setTextureArrayData(data) {
throw new Error('not implemented');
}
setTextureCubeArrayData(data) {
throw new Error('not implemented');
}
initialize(props = {}) {

@@ -60,13 +78,2 @@ const data = props.data;

}
resize(options) {
const { height, width, mipmaps = false } = options;
if (width !== this.width || height !== this.height) {
return this.initialize({
width,
height,
mipmaps
});
}
return this;
}
setImageData(options) {

@@ -89,7 +96,7 @@ this.trackDeallocatedMemory('Texture');

setSubImageData(options) {
const { data, x = 0, y = 0 } = options;
const width = options.width ?? data.width;
const height = options.height ?? data.height;
assert(width + x <= this.width && height + y <= this.height);
// const {data, x = 0, y = 0} = options;
// const width = options.width ?? (data as ImageBitmap).width;
// const height = options.height ?? (data as ImageBitmap).height;
// assert(width + x <= this.width && height + y <= this.height);
}
}

@@ -1,2 +0,3 @@

import type { Buffer, VertexArrayProps, TypedArray } from '@luma.gl/core';
import type { TypedArray } from '@math.gl/types';
import type { Buffer, VertexArrayProps } from '@luma.gl/core';
import { VertexArray } from '@luma.gl/core';

@@ -3,0 +4,0 @@ import type { NullDevice } from "../null-device.js";

{
"name": "@luma.gl/test-utils",
"version": "9.0.11",
"version": "9.1.0-alpha.1",
"description": "Automated WebGL testing utilities with Puppeteer and image diffing",

@@ -39,13 +39,13 @@ "type": "module",

"peerDependencies": {
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0",
"@luma.gl/shadertools": "^9.0.0",
"@luma.gl/webgl": "^9.0.0",
"@luma.gl/webgpu": "^9.0.0"
"@luma.gl/core": "^9.0.0-beta",
"@luma.gl/engine": "^9.0.0-beta",
"@luma.gl/shadertools": "^9.0.0-beta",
"@luma.gl/webgl": "^9.0.0-beta",
"@luma.gl/webgpu": "^9.0.0-beta"
},
"dependencies": {
"@probe.gl/env": "^4.0.2",
"@probe.gl/stats": "^4.0.2"
"@probe.gl/env": "^4.0.8",
"@probe.gl/stats": "^4.0.8"
},
"gitHead": "82c56392f73c3f7b258e2928d687a4beca2e2838"
"gitHead": "bc5c11c87f1e4db857e701688ca1410d7f51fd0f"
}

@@ -7,10 +7,4 @@ // luma.gl

// TODO - remove dependency on framebuffer (bundle size impact)
import {
luma,
Device,
DeviceProps,
log,
requestAnimationFrame,
cancelAnimationFrame
} from '@luma.gl/core';
import {luma, Device, DeviceProps, log} from '@luma.gl/core';
import {requestAnimationFrame, cancelAnimationFrame} from '@luma.gl/engine';
import {Timeline, AnimationProps} from '@luma.gl/engine';

@@ -17,0 +11,0 @@ import {Stats, Stat} from '@probe.gl/stats';

@@ -5,3 +5,3 @@ // luma.gl

import type {CanvasContextProps} from '@luma.gl/core';
import type {CanvasContextProps, TextureFormat} from '@luma.gl/core';
import {CanvasContext} from '@luma.gl/core';

@@ -16,2 +16,5 @@ import type {NullDevice} from './null-device';

readonly device: NullDevice;
readonly format: TextureFormat = 'rgba8unorm';
readonly depthStencilFormat: TextureFormat = 'depth24plus';
presentationSize: [number, number];

@@ -18,0 +21,0 @@ private _framebuffer: NullFramebuffer | null = null;

@@ -12,3 +12,3 @@ // luma.gl

} from '@luma.gl/core';
import {Device, CanvasContext, uid, DeviceFeatures} from '@luma.gl/core';
import {Device, CanvasContext, DeviceFeatures} from '@luma.gl/core';

@@ -78,3 +78,3 @@ import type {

constructor(props: DeviceProps) {
super({...props, id: props.id || uid('dummy-device')});
super({...props, id: props.id || 'null-device'});

@@ -81,0 +81,0 @@ this.canvasContext = new NullCanvasContext(this, props);

@@ -6,3 +6,3 @@ // luma.gl

import type {BufferProps} from '@luma.gl/core';
import {Buffer, assert} from '@luma.gl/core';
import {Buffer} from '@luma.gl/core';
import type {NullDevice} from '../null-device';

@@ -22,3 +22,3 @@

assert(byteLength >= 0);
// assert(byteLength >= 0);

@@ -42,4 +42,4 @@ this.byteLength = byteLength;

write(data: ArrayBufferView, byteOffset: number = 0): void {
assert(data.byteLength + byteOffset <= this.byteLength);
// assert(data.byteLength + byteOffset <= this.byteLength);
}
}

@@ -8,2 +8,3 @@ // luma.gl

import type {NullDevice} from '../null-device';
import type {NullTextureView} from './null-texture-view';

@@ -13,2 +14,5 @@ export class NullFramebuffer extends Framebuffer {

colorAttachments: NullTextureView[] = [];
depthStencilAttachment: NullTextureView | null = null;
constructor(device: NullDevice, props: FramebufferProps) {

@@ -15,0 +19,0 @@ super(device, props);

@@ -7,3 +7,3 @@ // luma.gl

import type {RenderPass, VertexArray} from '@luma.gl/core';
import {RenderPipeline, cast} from '@luma.gl/core';
import {RenderPipeline} from '@luma.gl/core';

@@ -26,4 +26,4 @@ import type {NullDevice} from '../null-device';

this.vs = cast<NullShader>(props.vs);
this.fs = cast<NullShader>(props.fs);
this.vs = props.vs as NullShader;
this.fs = props.fs as NullShader;

@@ -30,0 +30,0 @@ this.shaderLayout = props.shaderLayout || {

@@ -6,3 +6,12 @@ // luma.gl

import type {TextureProps, Sampler, SamplerProps, TextureViewProps} from '@luma.gl/core';
import {Texture, assert, loadImage} from '@luma.gl/core';
import type {
Texture1DData,
Texture2DData,
Texture3DData,
TextureCubeData,
TextureArrayData,
TextureCubeArrayData
} from '@luma.gl/core';
import {Texture} from '@luma.gl/core';
import {NullDevice} from '../null-device';

@@ -12,7 +21,7 @@ import {NullSampler} from './null-sampler';

export class NullTexture extends Texture<TextureProps> {
export class NullTexture extends Texture {
readonly device: NullDevice;
sampler!: NullSampler;
view!: NullTextureView;
sampler: NullSampler;
view: NullTextureView;

@@ -26,3 +35,3 @@ constructor(device: NullDevice, props: TextureProps) {

if (typeof this.props?.data === 'string') {
Object.assign(this.props, {data: loadImage(this.props.data)});
throw new Error('Texture2D: Loading textures from URLs is not supported');
}

@@ -46,2 +55,26 @@

setTexture1DData(data: Texture1DData): void {
throw new Error('not implemented');
}
setTexture2DData(lodData: Texture2DData, depth?: number, target?: number): void {
throw new Error('not implemented');
}
setTexture3DData(lodData: Texture3DData, depth?: number, target?: number): void {
throw new Error('not implemented');
}
setTextureCubeData(data: TextureCubeData, depth?: number): void {
throw new Error('not implemented');
}
setTextureArrayData(data: TextureArrayData): void {
throw new Error('not implemented');
}
setTextureCubeArrayData(data: TextureCubeArrayData): void {
throw new Error('not implemented');
}
initialize(props: TextureProps = {}): this {

@@ -86,14 +119,2 @@ const data = props.data;

resize(options: {height: number; width: number; mipmaps?: boolean}): this {
const {height, width, mipmaps = false} = options;
if (width !== this.width || height !== this.height) {
return this.initialize({
width,
height,
mipmaps
});
}
return this;
}
setImageData(options: {data?: any; width?: number; height?: number}) {

@@ -121,7 +142,7 @@ this.trackDeallocatedMemory('Texture');

setSubImageData(options: {data: any; width?: number; height?: number; x?: number; y?: number}) {
const {data, x = 0, y = 0} = options;
const width = options.width ?? (data as ImageBitmap).width;
const height = options.height ?? (data as ImageBitmap).height;
assert(width + x <= this.width && height + y <= this.height);
// const {data, x = 0, y = 0} = options;
// const width = options.width ?? (data as ImageBitmap).width;
// const height = options.height ?? (data as ImageBitmap).height;
// assert(width + x <= this.width && height + y <= this.height);
}
}

@@ -5,3 +5,4 @@ // luma.gl

import type {Buffer, VertexArrayProps, TypedArray} from '@luma.gl/core';
import type {TypedArray} from '@math.gl/types';
import type {Buffer, VertexArrayProps} from '@luma.gl/core';
import {VertexArray} from '@luma.gl/core';

@@ -8,0 +9,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc