{ "version": 3, "sources": ["index.js", "animation/timeline.js", "animation/key-frames.js", "animation-loop/animation-loop-template.js", "animation-loop/animation-loop.js", "animation-loop/make-animation-loop.js", "model/model.js", "geometry/gpu-geometry.js", "shader-inputs.js", "lib/pipeline-factory.js", "lib/shader-factory.js", "debug/debug-shader-layout.js", "debug/debug-framebuffer.js", "transform/buffer-transform.js", "transform/texture-transform.js", "lib/clip-space.js", "geometry/geometry.js", "scenegraph/scenegraph-node.js", "scenegraph/group-node.js", "scenegraph/model-node.js", "geometries/cone-geometry.js", "geometries/truncated-cone-geometry.js", "geometries/cube-geometry.js", "geometries/cylinder-geometry.js", "geometries/ico-sphere-geometry.js", "geometries/plane-geometry.js", "geometry/geometry-utils.js", "geometries/sphere-geometry.js", "computation.js"], "sourcesContent": ["// luma.gl Engine API\n// Animation\nexport { Timeline } from \"./animation/timeline.js\";\nexport { KeyFrames } from \"./animation/key-frames.js\";\nexport { AnimationLoopTemplate } from \"./animation-loop/animation-loop-template.js\";\nexport { AnimationLoop } from \"./animation-loop/animation-loop.js\";\nexport { makeAnimationLoop } from \"./animation-loop/make-animation-loop.js\";\nexport { Model } from \"./model/model.js\";\nexport { BufferTransform } from \"./transform/buffer-transform.js\";\nexport { TextureTransform } from \"./transform/texture-transform.js\";\nexport { PipelineFactory } from \"./lib/pipeline-factory.js\";\nexport { ShaderFactory } from \"./lib/shader-factory.js\";\n// Utils\nexport { ClipSpace } from \"./lib/clip-space.js\";\n// Scenegraph Core nodes\nexport { ScenegraphNode } from \"./scenegraph/scenegraph-node.js\";\nexport { GroupNode } from \"./scenegraph/group-node.js\";\nexport { ModelNode } from \"./scenegraph/model-node.js\";\nexport { Geometry } from \"./geometry/geometry.js\";\nexport { GPUGeometry } from \"./geometry/gpu-geometry.js\";\nexport { ConeGeometry } from \"./geometries/cone-geometry.js\";\nexport { CubeGeometry } from \"./geometries/cube-geometry.js\";\nexport { CylinderGeometry } from \"./geometries/cylinder-geometry.js\";\nexport { IcoSphereGeometry } from \"./geometries/ico-sphere-geometry.js\";\nexport { PlaneGeometry } from \"./geometries/plane-geometry.js\";\nexport { SphereGeometry } from \"./geometries/sphere-geometry.js\";\nexport { TruncatedConeGeometry } from \"./geometries/truncated-cone-geometry.js\";\n// EXPERIMENTAL\nexport { ShaderInputs as _ShaderInputs } from \"./shader-inputs.js\";\nexport { Computation } from \"./computation.js\";\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nlet channelHandles = 1;\nlet animationHandles = 1;\nexport class Timeline {\n time = 0;\n channels = new Map();\n animations = new Map();\n playing = false;\n lastEngineTime = -1;\n constructor() { }\n addChannel(props) {\n const { delay = 0, duration = Number.POSITIVE_INFINITY, rate = 1, repeat = 1 } = props;\n const channelId = channelHandles++;\n const channel = {\n time: 0,\n delay,\n duration,\n rate,\n repeat\n };\n this._setChannelTime(channel, this.time);\n this.channels.set(channelId, channel);\n return channelId;\n }\n removeChannel(channelId) {\n this.channels.delete(channelId);\n for (const [animationHandle, animation] of this.animations) {\n if (animation.channel === channelId) {\n this.detachAnimation(animationHandle);\n }\n }\n }\n isFinished(channelId) {\n const channel = this.channels.get(channelId);\n if (channel === undefined) {\n return false;\n }\n return this.time >= channel.delay + channel.duration * channel.repeat;\n }\n getTime(channelId) {\n if (channelId === undefined) {\n return this.time;\n }\n const channel = this.channels.get(channelId);\n if (channel === undefined) {\n return -1;\n }\n return channel.time;\n }\n setTime(time) {\n this.time = Math.max(0, time);\n const channels = this.channels.values();\n for (const channel of channels) {\n this._setChannelTime(channel, this.time);\n }\n const animations = this.animations.values();\n for (const animationData of animations) {\n const { animation, channel } = animationData;\n animation.setTime(this.getTime(channel));\n }\n }\n play() {\n this.playing = true;\n }\n pause() {\n this.playing = false;\n this.lastEngineTime = -1;\n }\n reset() {\n this.setTime(0);\n }\n attachAnimation(animation, channelHandle) {\n const animationHandle = animationHandles++;\n this.animations.set(animationHandle, {\n animation,\n channel: channelHandle\n });\n animation.setTime(this.getTime(channelHandle));\n return animationHandle;\n }\n detachAnimation(channelId) {\n this.animations.delete(channelId);\n }\n update(engineTime) {\n if (this.playing) {\n if (this.lastEngineTime === -1) {\n this.lastEngineTime = engineTime;\n }\n this.setTime(this.time + (engineTime - this.lastEngineTime));\n this.lastEngineTime = engineTime;\n }\n }\n _setChannelTime(channel, time) {\n const offsetTime = time - channel.delay;\n const totalDuration = channel.duration * channel.repeat;\n // Note(Tarek): Don't loop on final repeat.\n if (offsetTime >= totalDuration) {\n channel.time = channel.duration * channel.rate;\n }\n else {\n channel.time = Math.max(0, offsetTime) % channel.duration;\n channel.time *= channel.rate;\n }\n }\n}\n", "/** Holds a list of key frames (timestamped values) */\nexport class KeyFrames {\n startIndex = -1;\n endIndex = -1;\n factor = 0;\n times = [];\n values = [];\n _lastTime = -1;\n constructor(keyFrames) {\n this.setKeyFrames(keyFrames);\n this.setTime(0);\n }\n setKeyFrames(keyFrames) {\n const numKeys = keyFrames.length;\n this.times.length = numKeys;\n this.values.length = numKeys;\n for (let i = 0; i < numKeys; ++i) {\n this.times[i] = keyFrames[i][0];\n this.values[i] = keyFrames[i][1];\n }\n this._calculateKeys(this._lastTime);\n }\n setTime(time) {\n time = Math.max(0, time);\n if (time !== this._lastTime) {\n this._calculateKeys(time);\n this._lastTime = time;\n }\n }\n getStartTime() {\n return this.times[this.startIndex];\n }\n getEndTime() {\n return this.times[this.endIndex];\n }\n getStartData() {\n return this.values[this.startIndex];\n }\n getEndData() {\n return this.values[this.endIndex];\n }\n _calculateKeys(time) {\n let index = 0;\n const numKeys = this.times.length;\n for (index = 0; index < numKeys - 2; ++index) {\n if (this.times[index + 1] > time) {\n break;\n }\n }\n this.startIndex = index;\n this.endIndex = index + 1;\n const startTime = this.times[this.startIndex];\n const endTime = this.times[this.endIndex];\n this.factor = Math.min(Math.max(0, (time - startTime) / (endTime - startTime)), 1);\n }\n}\n", "/**\n * Minimal class that represents a \"componentized\" rendering life cycle\n * (resource construction, repeated rendering, resource destruction)\n *\n * @note A motivation for this class compared to the raw animation loop is\n * that it simplifies TypeScript code by allowing resources to be typed unconditionally\n * since they are allocated in the constructor rather than in onInitialized\n *\n * @note Introduced in luma.gl v9\n *\n * @example AnimationLoopTemplate is intended to be subclassed,\n * but the subclass should not be instantiated directly. Instead the subclass\n * (i.e. the constructor of the subclass) should be used\n * as an argument to create an AnimationLoop.\n */\nexport class AnimationLoopTemplate {\n constructor(animationProps) { }\n async onInitialize(animationProps) {\n return null;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { luma } from '@luma.gl/core';\nimport { requestAnimationFrame, cancelAnimationFrame } from '@luma.gl/core';\nimport { Stats } from '@probe.gl/stats';\nlet statIdCounter = 0;\nconst DEFAULT_ANIMATION_LOOP_PROPS = {\n device: null,\n onAddHTML: () => '',\n onInitialize: async () => {\n return null;\n },\n onRender: () => { },\n onFinalize: () => { },\n onError: error => console.error(error), // eslint-disable-line no-console\n stats: luma.stats.get(`animation-loop-${statIdCounter++}`),\n // view parameters\n useDevicePixels: true,\n autoResizeViewport: false,\n autoResizeDrawingBuffer: false\n};\n/** Convenient animation loop */\nexport class AnimationLoop {\n device = null;\n canvas = null;\n props;\n animationProps = null;\n timeline = null;\n stats;\n cpuTime;\n gpuTime;\n frameRate;\n display;\n needsRedraw = 'initialized';\n _initialized = false;\n _running = false;\n _animationFrameId = null;\n _nextFramePromise = null;\n _resolveNextFrame = null;\n _cpuStartTime = 0;\n // _gpuTimeQuery: Query | null = null;\n /*\n * @param {HTMLCanvasElement} canvas - if provided, width and height will be passed to context\n */\n constructor(props) {\n this.props = { ...DEFAULT_ANIMATION_LOOP_PROPS, ...props };\n props = this.props;\n if (!props.device) {\n throw new Error('No device provided');\n }\n const { useDevicePixels = true } = this.props;\n // state\n this.stats = props.stats || new Stats({ id: 'animation-loop-stats' });\n this.cpuTime = this.stats.get('CPU Time');\n this.gpuTime = this.stats.get('GPU Time');\n this.frameRate = this.stats.get('Frame Rate');\n this.setProps({\n autoResizeViewport: props.autoResizeViewport,\n autoResizeDrawingBuffer: props.autoResizeDrawingBuffer,\n useDevicePixels\n });\n // Bind methods\n this.start = this.start.bind(this);\n this.stop = this.stop.bind(this);\n this._onMousemove = this._onMousemove.bind(this);\n this._onMouseleave = this._onMouseleave.bind(this);\n }\n destroy() {\n this.stop();\n this._setDisplay(null);\n }\n /** @deprecated Use .destroy() */\n delete() {\n this.destroy();\n }\n /** Flags this animation loop as needing redraw */\n setNeedsRedraw(reason) {\n this.needsRedraw = this.needsRedraw || reason;\n return this;\n }\n /** TODO - move these props to CanvasContext? */\n setProps(props) {\n if ('autoResizeViewport' in props) {\n this.props.autoResizeViewport = props.autoResizeViewport || false;\n }\n if ('autoResizeDrawingBuffer' in props) {\n this.props.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer || false;\n }\n if ('useDevicePixels' in props) {\n this.props.useDevicePixels = props.useDevicePixels || false;\n }\n return this;\n }\n /** Starts a render loop if not already running */\n async start() {\n if (this._running) {\n return this;\n }\n this._running = true;\n try {\n let appContext;\n if (!this._initialized) {\n this._initialized = true;\n // Create the WebGL context\n await this._initDevice();\n this._initialize();\n // Note: onIntialize can return a promise (e.g. in case app needs to load resources)\n await this.props.onInitialize(this._getAnimationProps());\n }\n // check that we haven't been stopped\n if (!this._running) {\n return null;\n }\n // Start the loop\n if (appContext !== false) {\n // cancel any pending renders to ensure only one loop can ever run\n this._cancelAnimationFrame();\n this._requestAnimationFrame();\n }\n return this;\n }\n catch (err) {\n const error = err instanceof Error ? err : new Error('Unknown error');\n this.props.onError(error);\n // this._running = false; // TODO\n throw error;\n }\n }\n /** Stops a render loop if already running, finalizing */\n stop() {\n // console.debug(`Stopping ${this.constructor.name}`);\n if (this._running) {\n // call callback\n // If stop is called immediately, we can end up in a state where props haven't been initialized...\n if (this.animationProps) {\n this.props.onFinalize(this.animationProps);\n }\n this._cancelAnimationFrame();\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n this._running = false;\n }\n return this;\n }\n /** Explicitly draw a frame */\n redraw() {\n if (this.device?.isLost) {\n return this;\n }\n this._beginFrameTimers();\n this._setupFrame();\n this._updateAnimationProps();\n this._renderFrame(this._getAnimationProps());\n // clear needsRedraw flag\n this._clearNeedsRedraw();\n if (this._resolveNextFrame) {\n this._resolveNextFrame(this);\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n }\n this._endFrameTimers();\n return this;\n }\n /** Add a timeline, it will be automatically updated by the animation loop. */\n attachTimeline(timeline) {\n this.timeline = timeline;\n return this.timeline;\n }\n /** Remove a timeline */\n detachTimeline() {\n this.timeline = null;\n }\n /** Wait until a render completes */\n waitForRender() {\n this.setNeedsRedraw('waitForRender');\n if (!this._nextFramePromise) {\n this._nextFramePromise = new Promise(resolve => {\n this._resolveNextFrame = resolve;\n });\n }\n return this._nextFramePromise;\n }\n /** TODO - should use device.deviceContext */\n async toDataURL() {\n this.setNeedsRedraw('toDataURL');\n await this.waitForRender();\n if (this.canvas instanceof HTMLCanvasElement) {\n return this.canvas.toDataURL();\n }\n throw new Error('OffscreenCanvas');\n }\n // PRIVATE METHODS\n _initialize() {\n this._startEventHandling();\n // Initialize the callback data\n this._initializeAnimationProps();\n this._updateAnimationProps();\n // Default viewport setup, in case onInitialize wants to render\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n // this._gpuTimeQuery = Query.isSupported(this.gl, ['timers']) ? new Query(this.gl) : null;\n }\n _setDisplay(display) {\n if (this.display) {\n this.display.destroy();\n this.display.animationLoop = null;\n }\n // store animation loop on the display\n if (display) {\n display.animationLoop = this;\n }\n this.display = display;\n }\n _requestAnimationFrame() {\n if (!this._running) {\n return;\n }\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.requestAnimationFrame) {\n // this._animationFrameId = this.display.requestAnimationFrame(this._animationFrame.bind(this));\n // }\n this._animationFrameId = requestAnimationFrame(this._animationFrame.bind(this));\n }\n _cancelAnimationFrame() {\n if (this._animationFrameId === null) {\n return;\n }\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.cancelAnimationFrame) {\n // this.display.cancelAnimationFrame(this._animationFrameId);\n // }\n cancelAnimationFrame(this._animationFrameId);\n this._animationFrameId = null;\n }\n _animationFrame() {\n if (!this._running) {\n return;\n }\n this.redraw();\n this._requestAnimationFrame();\n }\n // Called on each frame, can be overridden to call onRender multiple times\n // to support e.g. stereoscopic rendering\n _renderFrame(animationProps) {\n // Allow e.g. VR display to render multiple frames.\n if (this.display) {\n this.display._renderFrame(animationProps);\n return;\n }\n // call callback\n this.props.onRender(this._getAnimationProps());\n // end callback\n // Submit commands (necessary on WebGPU)\n this.device.submit();\n }\n _clearNeedsRedraw() {\n this.needsRedraw = false;\n }\n _setupFrame() {\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n }\n // Initialize the object that will be passed to app callbacks\n _initializeAnimationProps() {\n if (!this.device) {\n throw new Error('loop');\n }\n this.animationProps = {\n animationLoop: this,\n device: this.device,\n canvas: this.device?.canvasContext?.canvas,\n timeline: this.timeline,\n // Initial values\n useDevicePixels: this.props.useDevicePixels,\n needsRedraw: false,\n // Placeholders\n width: 1,\n height: 1,\n aspect: 1,\n // Animation props\n time: 0,\n startTime: Date.now(),\n engineTime: 0,\n tick: 0,\n tock: 0,\n // Experimental\n _mousePosition: null // Event props\n };\n }\n _getAnimationProps() {\n if (!this.animationProps) {\n throw new Error('animationProps');\n }\n return this.animationProps;\n }\n // Update the context object that will be passed to app callbacks\n _updateAnimationProps() {\n if (!this.animationProps) {\n return;\n }\n // Can this be replaced with canvas context?\n const { width, height, aspect } = this._getSizeAndAspect();\n if (width !== this.animationProps.width || height !== this.animationProps.height) {\n this.setNeedsRedraw('drawing buffer resized');\n }\n if (aspect !== this.animationProps.aspect) {\n this.setNeedsRedraw('drawing buffer aspect changed');\n }\n this.animationProps.width = width;\n this.animationProps.height = height;\n this.animationProps.aspect = aspect;\n this.animationProps.needsRedraw = this.needsRedraw;\n // Update time properties\n this.animationProps.engineTime = Date.now() - this.animationProps.startTime;\n if (this.timeline) {\n this.timeline.update(this.animationProps.engineTime);\n }\n this.animationProps.tick = Math.floor((this.animationProps.time / 1000) * 60);\n this.animationProps.tock++;\n // For back compatibility\n this.animationProps.time = this.timeline\n ? this.timeline.getTime()\n : this.animationProps.engineTime;\n }\n /** Wait for supplied device */\n async _initDevice() {\n this.device = await this.props.device;\n if (!this.device) {\n throw new Error('No device provided');\n }\n this.canvas = this.device.canvasContext?.canvas || null;\n // this._createInfoDiv();\n }\n _createInfoDiv() {\n if (this.canvas && this.props.onAddHTML) {\n const wrapperDiv = document.createElement('div');\n document.body.appendChild(wrapperDiv);\n wrapperDiv.style.position = 'relative';\n const div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '10px';\n div.style.bottom = '10px';\n div.style.width = '300px';\n div.style.background = 'white';\n if (this.canvas instanceof HTMLCanvasElement) {\n wrapperDiv.appendChild(this.canvas);\n }\n wrapperDiv.appendChild(div);\n const html = this.props.onAddHTML(div);\n if (html) {\n div.innerHTML = html;\n }\n }\n }\n _getSizeAndAspect() {\n if (!this.device) {\n return { width: 1, height: 1, aspect: 1 };\n }\n // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html\n const [width, height] = this.device?.canvasContext?.getPixelSize() || [1, 1];\n // https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html\n let aspect = 1;\n const canvas = this.device?.canvasContext?.canvas;\n // @ts-expect-error\n if (canvas && canvas.clientHeight) {\n // @ts-expect-error\n aspect = canvas.clientWidth / canvas.clientHeight;\n }\n else if (width > 0 && height > 0) {\n aspect = width / height;\n }\n return { width, height, aspect };\n }\n /** Default viewport setup */\n _resizeViewport() {\n // TODO can we use canvas context to code this in a portable way?\n // @ts-expect-error Expose on canvasContext\n if (this.props.autoResizeViewport && this.device.gl) {\n // @ts-expect-error Expose canvasContext\n this.device.gl.viewport(0, 0, \n // @ts-expect-error Expose canvasContext\n this.device.gl.drawingBufferWidth, \n // @ts-expect-error Expose canvasContext\n this.device.gl.drawingBufferHeight);\n }\n }\n /**\n * Resize the render buffer of the canvas to match canvas client size\n * Optionally multiplying with devicePixel ratio\n */\n _resizeCanvasDrawingBuffer() {\n if (this.props.autoResizeDrawingBuffer) {\n this.device?.canvasContext?.resize({ useDevicePixels: this.props.useDevicePixels });\n }\n }\n _beginFrameTimers() {\n this.frameRate.timeEnd();\n this.frameRate.timeStart();\n // Check if timer for last frame has completed.\n // GPU timer results are never available in the same\n // frame they are captured.\n // if (\n // this._gpuTimeQuery &&\n // this._gpuTimeQuery.isResultAvailable() &&\n // !this._gpuTimeQuery.isTimerDisjoint()\n // ) {\n // this.stats.get('GPU Time').addTime(this._gpuTimeQuery.getTimerMilliseconds());\n // }\n // if (this._gpuTimeQuery) {\n // // GPU time query start\n // this._gpuTimeQuery.beginTimeElapsedQuery();\n // }\n this.cpuTime.timeStart();\n }\n _endFrameTimers() {\n this.cpuTime.timeEnd();\n // if (this._gpuTimeQuery) {\n // // GPU time query end. Results will be available on next frame.\n // this._gpuTimeQuery.end();\n // }\n }\n // Event handling\n _startEventHandling() {\n if (this.canvas) {\n this.canvas.addEventListener('mousemove', this._onMousemove.bind(this));\n this.canvas.addEventListener('mouseleave', this._onMouseleave.bind(this));\n }\n }\n _onMousemove(event) {\n if (event instanceof MouseEvent) {\n this._getAnimationProps()._mousePosition = [event.offsetX, event.offsetY];\n }\n }\n _onMouseleave(event) {\n this._getAnimationProps()._mousePosition = null;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { luma } from '@luma.gl/core';\nimport { AnimationLoop } from \"./animation-loop.js\";\n/** Instantiates and runs the render loop */\nexport function makeAnimationLoop(AnimationLoopTemplateCtor, props) {\n let renderLoop = null;\n const device = props?.device || luma.createDevice();\n // Create an animation loop;\n const animationLoop = new AnimationLoop({\n ...props,\n device,\n async onInitialize(animationProps) {\n // @ts-expect-error abstract to prevent instantiation\n renderLoop = new AnimationLoopTemplateCtor(animationProps);\n // Any async loading can be handled here\n return await renderLoop?.onInitialize(animationProps);\n },\n onRender: (animationProps) => renderLoop?.onRender(animationProps),\n onFinalize: (animationProps) => renderLoop?.onFinalize(animationProps)\n });\n // @ts-expect-error Hack: adds info for the website to find\n animationLoop.getInfo = () => {\n // @ts-ignore\n // eslint-disable-next-line no-invalid-this\n return this.AnimationLoopTemplateCtor.info;\n };\n // Start the loop automatically\n // animationLoop.start();\n return animationLoop;\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Buffer, Texture, TextureView, Sampler } from '@luma.gl/core';\nimport { RenderPipeline, UniformStore } from '@luma.gl/core';\nimport { log, uid, deepEqual, isObjectEmpty, splitUniformsAndBindings } from '@luma.gl/core';\nimport { getTypedArrayFromDataType, getAttributeInfosFromLayouts } from '@luma.gl/core';\nimport { ShaderAssembler, getShaderLayoutFromWGSL } from '@luma.gl/shadertools';\nimport { makeGPUGeometry } from \"../geometry/gpu-geometry.js\";\nimport { ShaderInputs } from \"../shader-inputs.js\";\nimport { PipelineFactory } from \"../lib/pipeline-factory.js\";\nimport { ShaderFactory } from \"../lib/shader-factory.js\";\nimport { getDebugTableForShaderLayout } from \"../debug/debug-shader-layout.js\";\nimport { debugFramebuffer } from \"../debug/debug-framebuffer.js\";\nconst LOG_DRAW_PRIORITY = 2;\nconst LOG_DRAW_TIMEOUT = 10000;\n/**\n * v9 Model API\n * A model\n * - automatically reuses pipelines (programs) when possible\n * - automatically rebuilds pipelines if necessary to accommodate changed settings\n * shadertools integration\n * - accepts modules and performs shader transpilation\n */\nexport class Model {\n static defaultProps = {\n ...RenderPipeline.defaultProps,\n source: null,\n vs: null,\n fs: null,\n id: 'unnamed',\n handle: undefined,\n userData: {},\n defines: {},\n modules: [],\n moduleSettings: undefined,\n geometry: null,\n indexBuffer: null,\n attributes: {},\n constantAttributes: {},\n varyings: [],\n isInstanced: undefined,\n instanceCount: 0,\n vertexCount: 0,\n shaderInputs: undefined,\n pipelineFactory: undefined,\n shaderFactory: undefined,\n transformFeedback: undefined,\n shaderAssembler: ShaderAssembler.getDefaultShaderAssembler(),\n debugShaders: undefined,\n disableWarnings: undefined\n };\n device;\n id;\n source;\n vs;\n fs;\n pipelineFactory;\n shaderFactory;\n userData = {};\n // Fixed properties (change can trigger pipeline rebuild)\n /** The render pipeline GPU parameters, depth testing etc */\n parameters;\n /** The primitive topology */\n topology;\n /** Buffer layout */\n bufferLayout;\n // Dynamic properties\n /** Use instanced rendering */\n isInstanced = undefined;\n /** instance count. `undefined` means not instanced */\n instanceCount = 0;\n /** Vertex count */\n vertexCount;\n /** Index buffer */\n indexBuffer = null;\n /** Buffer-valued attributes */\n bufferAttributes = {};\n /** Constant-valued attributes */\n constantAttributes = {};\n /** Bindings (textures, samplers, uniform buffers) */\n bindings = {};\n /** Sets uniforms @deprecated Use uniform buffers and setBindings() for portability*/\n uniforms = {};\n /**\n * VertexArray\n * @note not implemented: if bufferLayout is updated, vertex array has to be rebuilt!\n * @todo - allow application to define multiple vertex arrays?\n * */\n vertexArray;\n /** TransformFeedback, WebGL 2 only. */\n transformFeedback = null;\n /** The underlying GPU \"program\". @note May be recreated if parameters change */\n pipeline;\n /** ShaderInputs instance */\n shaderInputs;\n _uniformStore;\n _attributeInfos = {};\n _gpuGeometry = null;\n _getModuleUniforms;\n props;\n _pipelineNeedsUpdate = 'newly created';\n _needsRedraw = 'initializing';\n _destroyed = false;\n /** \"Time\" of last draw. Monotonically increasing timestamp */\n _lastDrawTimestamp = -1;\n constructor(device, props) {\n this.props = { ...Model.defaultProps, ...props };\n props = this.props;\n this.id = props.id || uid('model');\n this.device = device;\n Object.assign(this.userData, props.userData);\n // Setup shader module inputs\n const moduleMap = Object.fromEntries(this.props.modules?.map(module => [module.name, module]) || []);\n this.setShaderInputs(props.shaderInputs || new ShaderInputs(moduleMap));\n // Setup shader assembler\n const platformInfo = getPlatformInfo(device);\n // Extract modules from shader inputs if not supplied\n const modules = (this.props.modules?.length > 0 ? this.props.modules : this.shaderInputs?.getModules()) || [];\n const isWebGPU = this.device.type === 'webgpu';\n // WebGPU\n // TODO - hack to support unified WGSL shader\n // TODO - this is wrong, compile a single shader\n if (isWebGPU && this.props.source) {\n // WGSL\n this.props.shaderLayout ||= getShaderLayoutFromWGSL(this.props.source);\n const { source, getUniforms } = this.props.shaderAssembler.assembleShader({\n platformInfo,\n ...this.props,\n modules\n });\n this.source = source;\n this._getModuleUniforms = getUniforms;\n }\n else {\n // GLSL\n const { vs, fs, getUniforms } = this.props.shaderAssembler.assembleShaderPair({\n platformInfo,\n ...this.props,\n modules\n });\n this.vs = vs;\n this.fs = fs;\n this._getModuleUniforms = getUniforms;\n }\n this.vertexCount = this.props.vertexCount;\n this.instanceCount = this.props.instanceCount;\n this.topology = this.props.topology;\n this.bufferLayout = this.props.bufferLayout;\n this.parameters = this.props.parameters;\n // Geometry, if provided, sets topology and vertex cound\n if (props.geometry) {\n this.setGeometry(props.geometry);\n }\n this.pipelineFactory =\n props.pipelineFactory || PipelineFactory.getDefaultPipelineFactory(this.device);\n this.shaderFactory = props.shaderFactory || ShaderFactory.getDefaultShaderFactory(this.device);\n // Create the pipeline\n // @note order is important\n this.pipeline = this._updatePipeline();\n this.vertexArray = device.createVertexArray({\n renderPipeline: this.pipeline\n });\n // Now we can apply geometry attributes\n if (this._gpuGeometry) {\n this._setGeometryAttributes(this._gpuGeometry);\n }\n // Apply any dynamic settings that will not trigger pipeline change\n if ('isInstanced' in props) {\n this.isInstanced = props.isInstanced;\n }\n if (props.instanceCount) {\n this.setInstanceCount(props.instanceCount);\n }\n if (props.vertexCount) {\n this.setVertexCount(props.vertexCount);\n }\n if (props.indexBuffer) {\n this.setIndexBuffer(props.indexBuffer);\n }\n if (props.attributes) {\n this.setAttributes(props.attributes);\n }\n if (props.constantAttributes) {\n this.setConstantAttributes(props.constantAttributes);\n }\n if (props.bindings) {\n this.setBindings(props.bindings);\n }\n if (props.uniforms) {\n this.setUniforms(props.uniforms);\n }\n if (props.moduleSettings) {\n // log.warn('Model.props.moduleSettings is deprecated. Use Model.shaderInputs.setProps()')();\n this.updateModuleSettings(props.moduleSettings);\n }\n if (props.transformFeedback) {\n this.transformFeedback = props.transformFeedback;\n }\n // Catch any access to non-standard props\n Object.seal(this);\n }\n destroy() {\n if (this._destroyed)\n return;\n this.pipelineFactory.release(this.pipeline);\n this.shaderFactory.release(this.pipeline.vs);\n if (this.pipeline.fs) {\n this.shaderFactory.release(this.pipeline.fs);\n }\n this._uniformStore.destroy();\n // TODO - mark resource as managed and destroyIfManaged() ?\n this._gpuGeometry?.destroy();\n this._destroyed = true;\n }\n // Draw call\n /** Query redraw status. Clears the status. */\n needsRedraw() {\n // Catch any writes to already bound resources\n if (this._getBindingsUpdateTimestamp() > this._lastDrawTimestamp) {\n this.setNeedsRedraw('contents of bound textures or buffers updated');\n }\n const needsRedraw = this._needsRedraw;\n this._needsRedraw = false;\n return needsRedraw;\n }\n /** Mark the model as needing a redraw */\n setNeedsRedraw(reason) {\n this._needsRedraw ||= reason;\n }\n predraw() {\n // Update uniform buffers if needed\n this.updateShaderInputs();\n // Check if the pipeline is invalidated\n this.pipeline = this._updatePipeline();\n }\n draw(renderPass) {\n this.predraw();\n let drawSuccess;\n try {\n this._logDrawCallStart();\n // Update the pipeline if invalidated\n // TODO - inside RenderPass is likely the worst place to do this from performance perspective.\n // Application can call Model.predraw() to avoid this.\n this.pipeline = this._updatePipeline();\n // Set pipeline state, we may be sharing a pipeline so we need to set all state on every draw\n // Any caching needs to be done inside the pipeline functions\n this.pipeline.setBindings(this.bindings, { disableWarnings: this.props.disableWarnings });\n if (!isObjectEmpty(this.uniforms)) {\n this.pipeline.setUniformsWebGL(this.uniforms);\n }\n const { indexBuffer } = this.vertexArray;\n const indexCount = indexBuffer\n ? indexBuffer.byteLength / (indexBuffer.indexType === 'uint32' ? 4 : 2)\n : undefined;\n drawSuccess = this.pipeline.draw({\n renderPass,\n vertexArray: this.vertexArray,\n isInstanced: this.isInstanced,\n vertexCount: this.vertexCount,\n instanceCount: this.instanceCount,\n indexCount,\n transformFeedback: this.transformFeedback || undefined,\n // WebGL shares underlying cached pipelines even for models that have different parameters and topology,\n // so we must provide our unique parameters to each draw\n // (In WebGPU most parameters are encoded in the pipeline and cannot be changed per draw call)\n parameters: this.parameters,\n topology: this.topology\n });\n }\n finally {\n this._logDrawCallEnd();\n }\n this._logFramebuffer(renderPass);\n // Update needsRedraw flag\n if (drawSuccess) {\n this._lastDrawTimestamp = this.device.timestamp;\n this._needsRedraw = false;\n }\n else {\n this._needsRedraw = 'waiting for resource initialization';\n }\n return drawSuccess;\n }\n // Update fixed fields (can trigger pipeline rebuild)\n /**\n * Updates the optional geometry\n * Geometry, set topology and bufferLayout\n * @note Can trigger a pipeline rebuild / pipeline cache fetch on WebGPU\n */\n setGeometry(geometry) {\n this._gpuGeometry?.destroy();\n const gpuGeometry = geometry && makeGPUGeometry(this.device, geometry);\n if (gpuGeometry) {\n this.setTopology(gpuGeometry.topology || 'triangle-list');\n this.bufferLayout = mergeBufferLayouts(gpuGeometry.bufferLayout, this.bufferLayout);\n if (this.vertexArray) {\n this._setGeometryAttributes(gpuGeometry);\n }\n }\n this._gpuGeometry = gpuGeometry;\n }\n /**\n * Updates the primitive topology ('triangle-list', 'triangle-strip' etc).\n * @note Triggers a pipeline rebuild / pipeline cache fetch on WebGPU\n */\n setTopology(topology) {\n if (topology !== this.topology) {\n this.topology = topology;\n this._setPipelineNeedsUpdate('topology');\n }\n }\n /**\n * Updates the buffer layout.\n * @note Triggers a pipeline rebuild / pipeline cache fetch\n */\n setBufferLayout(bufferLayout) {\n this.bufferLayout = this._gpuGeometry\n ? mergeBufferLayouts(bufferLayout, this._gpuGeometry.bufferLayout)\n : bufferLayout;\n this._setPipelineNeedsUpdate('bufferLayout');\n // Recreate the pipeline\n this.pipeline = this._updatePipeline();\n // vertex array needs to be updated if we update buffer layout,\n // but not if we update parameters\n this.vertexArray = this.device.createVertexArray({\n renderPipeline: this.pipeline\n });\n // Reapply geometry attributes to the new vertex array\n if (this._gpuGeometry) {\n this._setGeometryAttributes(this._gpuGeometry);\n }\n }\n /**\n * Set GPU parameters.\n * @note Can trigger a pipeline rebuild / pipeline cache fetch.\n * @param parameters\n */\n setParameters(parameters) {\n if (!deepEqual(parameters, this.parameters, 2)) {\n this.parameters = parameters;\n this._setPipelineNeedsUpdate('parameters');\n }\n }\n // Update dynamic fields\n /**\n * Updates the instance count (used in draw calls)\n * @note Any attributes with stepMode=instance need to be at least this big\n */\n setInstanceCount(instanceCount) {\n this.instanceCount = instanceCount;\n // luma.gl examples don't set props.isInstanced and rely on auto-detection\n // but deck.gl sets instanceCount even for models that are not instanced.\n if (this.isInstanced === undefined && instanceCount > 0) {\n this.isInstanced = true;\n }\n this.setNeedsRedraw('instanceCount');\n }\n /**\n * Updates the vertex count (used in draw calls)\n * @note Any attributes with stepMode=vertex need to be at least this big\n */\n setVertexCount(vertexCount) {\n this.vertexCount = vertexCount;\n this.setNeedsRedraw('vertexCount');\n }\n /** Set the shader inputs */\n setShaderInputs(shaderInputs) {\n this.shaderInputs = shaderInputs;\n this._uniformStore = new UniformStore(this.shaderInputs.modules);\n // Create uniform buffer bindings for all modules\n for (const moduleName of Object.keys(this.shaderInputs.modules)) {\n const uniformBuffer = this._uniformStore.getManagedUniformBuffer(this.device, moduleName);\n this.bindings[`${moduleName}Uniforms`] = uniformBuffer;\n }\n this.setNeedsRedraw('shaderInputs');\n }\n /** Update uniform buffers from the model's shader inputs */\n updateShaderInputs() {\n this._uniformStore.setUniforms(this.shaderInputs.getUniformValues());\n this.setBindings(this.shaderInputs.getBindings());\n // TODO - this is already tracked through buffer/texture update times?\n this.setNeedsRedraw('shaderInputs');\n }\n /**\n * Sets bindings (textures, samplers, uniform buffers)\n */\n setBindings(bindings) {\n Object.assign(this.bindings, bindings);\n this.setNeedsRedraw('bindings');\n }\n /**\n * Updates optional transform feedback. WebGL only.\n */\n setTransformFeedback(transformFeedback) {\n this.transformFeedback = transformFeedback;\n this.setNeedsRedraw('transformFeedback');\n }\n /**\n * Sets the index buffer\n * @todo - how to unset it if we change geometry?\n */\n setIndexBuffer(indexBuffer) {\n this.vertexArray.setIndexBuffer(indexBuffer);\n this.setNeedsRedraw('indexBuffer');\n }\n /**\n * Sets attributes (buffers)\n * @note Overrides any attributes previously set with the same name\n */\n setAttributes(buffers, options) {\n if (buffers.indices) {\n log.warn(`Model:${this.id} setAttributes() - indexBuffer should be set using setIndexBuffer()`)();\n }\n for (const [bufferName, buffer] of Object.entries(buffers)) {\n const bufferLayout = this.bufferLayout.find(layout => getAttributeNames(layout).includes(bufferName));\n if (!bufferLayout) {\n log.warn(`Model(${this.id}): Missing layout for buffer \"${bufferName}\".`)();\n continue; // eslint-disable-line no-continue\n }\n // For an interleaved attribute we may need to set multiple attributes\n const attributeNames = getAttributeNames(bufferLayout);\n let set = false;\n for (const attributeName of attributeNames) {\n const attributeInfo = this._attributeInfos[attributeName];\n if (attributeInfo) {\n this.vertexArray.setBuffer(attributeInfo.location, buffer);\n set = true;\n }\n }\n if (!set && !(options?.disableWarnings ?? this.props.disableWarnings)) {\n log.warn(`Model(${this.id}): Ignoring buffer \"${buffer.id}\" for unknown attribute \"${bufferName}\"`)();\n }\n }\n this.setNeedsRedraw('attributes');\n }\n /**\n * Sets constant attributes\n * @note Overrides any attributes previously set with the same name\n * Constant attributes are only supported in WebGL, not in WebGPU\n * Any attribute that is disabled in the current vertex array object\n * is read from the context's global constant value for that attribute location.\n * @param constantAttributes\n */\n setConstantAttributes(attributes, options) {\n for (const [attributeName, value] of Object.entries(attributes)) {\n const attributeInfo = this._attributeInfos[attributeName];\n if (attributeInfo) {\n this.vertexArray.setConstantWebGL(attributeInfo.location, value);\n }\n else if (!(options?.disableWarnings ?? this.props.disableWarnings)) {\n log.warn(`Model \"${this.id}: Ignoring constant supplied for unknown attribute \"${attributeName}\"`)();\n }\n }\n this.setNeedsRedraw('constants');\n }\n // DEPRECATED METHODS\n /**\n * Sets individual uniforms\n * @deprecated WebGL only, use uniform buffers for portability\n * @param uniforms\n */\n setUniforms(uniforms) {\n if (!isObjectEmpty(uniforms)) {\n this.pipeline.setUniformsWebGL(uniforms);\n Object.assign(this.uniforms, uniforms);\n }\n this.setNeedsRedraw('uniforms');\n }\n /**\n * @deprecated Updates shader module settings (which results in uniforms being set)\n */\n updateModuleSettings(props) {\n // log.warn('Model.updateModuleSettings is deprecated. Use Model.shaderInputs.setProps()')();\n const { bindings, uniforms } = splitUniformsAndBindings(this._getModuleUniforms(props));\n Object.assign(this.bindings, bindings);\n Object.assign(this.uniforms, uniforms);\n this.setNeedsRedraw('moduleSettings');\n }\n // Internal methods\n /** Get the timestamp of the latest updated bound GPU memory resource (buffer/texture). */\n _getBindingsUpdateTimestamp() {\n let timestamp = 0;\n for (const binding of Object.values(this.bindings)) {\n if (binding instanceof TextureView) {\n timestamp = Math.max(timestamp, binding.texture.updateTimestamp);\n }\n else if (binding instanceof Buffer || binding instanceof Texture) {\n timestamp = Math.max(timestamp, binding.updateTimestamp);\n }\n else if (!(binding instanceof Sampler)) {\n timestamp = Math.max(timestamp, binding.buffer.updateTimestamp);\n }\n }\n return timestamp;\n }\n /**\n * Updates the optional geometry attributes\n * Geometry, sets several attributes, indexBuffer, and also vertex count\n * @note Can trigger a pipeline rebuild / pipeline cache fetch on WebGPU\n */\n _setGeometryAttributes(gpuGeometry) {\n // Filter geometry attribute so that we don't issue warnings for unused attributes\n const attributes = { ...gpuGeometry.attributes };\n for (const [attributeName] of Object.entries(attributes)) {\n if (!this.pipeline.shaderLayout.attributes.find(layout => layout.name === attributeName) &&\n attributeName !== 'positions') {\n delete attributes[attributeName];\n }\n }\n // TODO - delete previous geometry?\n this.vertexCount = gpuGeometry.vertexCount;\n this.setIndexBuffer(gpuGeometry.indices || null);\n this.setAttributes(gpuGeometry.attributes, { disableWarnings: true });\n this.setAttributes(attributes, { disableWarnings: this.props.disableWarnings });\n this.setNeedsRedraw('geometry attributes');\n }\n /** Mark pipeline as needing update */\n _setPipelineNeedsUpdate(reason) {\n this._pipelineNeedsUpdate ||= reason;\n this.setNeedsRedraw(reason);\n }\n /** Update pipeline if needed */\n _updatePipeline() {\n if (this._pipelineNeedsUpdate) {\n let prevShaderVs = null;\n let prevShaderFs = null;\n if (this.pipeline) {\n log.log(1, `Model ${this.id}: Recreating pipeline because \"${this._pipelineNeedsUpdate}\".`)();\n prevShaderVs = this.pipeline.vs;\n prevShaderFs = this.pipeline.fs;\n }\n this._pipelineNeedsUpdate = false;\n const vs = this.shaderFactory.createShader({\n id: `${this.id}-vertex`,\n stage: 'vertex',\n source: this.source || this.vs,\n debug: this.props.debugShaders\n });\n let fs = null;\n if (this.source) {\n fs = vs;\n }\n else if (this.fs) {\n fs = this.shaderFactory.createShader({\n id: `${this.id}-fragment`,\n stage: 'fragment',\n source: this.source || this.fs,\n debug: this.props.debugShaders\n });\n }\n this.pipeline = this.pipelineFactory.createRenderPipeline({\n ...this.props,\n bufferLayout: this.bufferLayout,\n topology: this.topology,\n parameters: this.parameters,\n vs,\n fs\n });\n this._attributeInfos = getAttributeInfosFromLayouts(this.pipeline.shaderLayout, this.bufferLayout);\n if (prevShaderVs)\n this.shaderFactory.release(prevShaderVs);\n if (prevShaderFs)\n this.shaderFactory.release(prevShaderFs);\n }\n return this.pipeline;\n }\n /** Throttle draw call logging */\n _lastLogTime = 0;\n _logOpen = false;\n _logDrawCallStart() {\n // IF level is 4 or higher, log every frame.\n const logDrawTimeout = log.level > 3 ? 0 : LOG_DRAW_TIMEOUT;\n if (log.level < 2 || Date.now() - this._lastLogTime < logDrawTimeout) {\n return;\n }\n this._lastLogTime = Date.now();\n this._logOpen = true;\n log.group(LOG_DRAW_PRIORITY, `>>> DRAWING MODEL ${this.id}`, { collapsed: log.level <= 2 })();\n }\n _logDrawCallEnd() {\n if (this._logOpen) {\n const shaderLayoutTable = getDebugTableForShaderLayout(this.pipeline.shaderLayout, this.id);\n // log.table(logLevel, attributeTable)();\n // log.table(logLevel, uniformTable)();\n log.table(LOG_DRAW_PRIORITY, shaderLayoutTable)();\n const uniformTable = this.shaderInputs.getDebugTable();\n // Add any global uniforms\n for (const [name, value] of Object.entries(this.uniforms)) {\n uniformTable[name] = { value };\n }\n log.table(LOG_DRAW_PRIORITY, uniformTable)();\n const attributeTable = this._getAttributeDebugTable();\n log.table(LOG_DRAW_PRIORITY, this._attributeInfos)();\n log.table(LOG_DRAW_PRIORITY, attributeTable)();\n log.groupEnd(LOG_DRAW_PRIORITY)();\n this._logOpen = false;\n }\n }\n _drawCount = 0;\n _logFramebuffer(renderPass) {\n const debugFramebuffers = log.get('framebuffer');\n this._drawCount++;\n // Update first 3 frames and then every 60 frames\n if (!debugFramebuffers || (this._drawCount++ > 3 && this._drawCount % 60)) {\n return;\n }\n // TODO - display framebuffer output in debug window\n const framebuffer = renderPass.props.framebuffer;\n if (framebuffer) {\n debugFramebuffer(framebuffer, { id: framebuffer.id, minimap: true });\n // log.image({logLevel: LOG_DRAW_PRIORITY, message: `${framebuffer.id} %c sup?`, image})();\n }\n }\n _getAttributeDebugTable() {\n const table = {};\n for (const [name, attributeInfo] of Object.entries(this._attributeInfos)) {\n table[attributeInfo.location] = {\n name,\n type: attributeInfo.shaderType,\n values: this._getBufferOrConstantValues(this.vertexArray.attributes[attributeInfo.location], attributeInfo.bufferDataType)\n };\n }\n if (this.vertexArray.indexBuffer) {\n const { indexBuffer } = this.vertexArray;\n const values = indexBuffer.indexType === 'uint32'\n ? new Uint32Array(indexBuffer.debugData)\n : new Uint16Array(indexBuffer.debugData);\n table.indices = {\n name: 'indices',\n type: indexBuffer.indexType,\n values: values.toString()\n };\n }\n return table;\n }\n // TODO - fix typing of luma data types\n _getBufferOrConstantValues(attribute, dataType) {\n const TypedArrayConstructor = getTypedArrayFromDataType(dataType);\n const typedArray = attribute instanceof Buffer ? new TypedArrayConstructor(attribute.debugData) : attribute;\n return typedArray.toString();\n }\n}\n// HELPERS\n/** TODO - move to core, document add tests */\nfunction mergeBufferLayouts(layouts1, layouts2) {\n const layouts = [...layouts1];\n for (const attribute of layouts2) {\n const index = layouts.findIndex(attribute2 => attribute2.name === attribute.name);\n if (index < 0) {\n layouts.push(attribute);\n }\n else {\n layouts[index] = attribute;\n }\n }\n return layouts;\n}\n/** Create a shadertools platform info from the Device */\nexport function getPlatformInfo(device) {\n return {\n type: device.type,\n shaderLanguage: device.info.shadingLanguage,\n shaderLanguageVersion: device.info.shadingLanguageVersion,\n gpu: device.info.gpu,\n // HACK - we pretend that the DeviceFeatures is a Set, it has a similar API\n features: device.features\n };\n}\n/** Get attribute names from a BufferLayout */\nfunction getAttributeNames(bufferLayout) {\n return bufferLayout.attributes\n ? bufferLayout.attributes?.map(layout => layout.attribute)\n : [bufferLayout.name];\n}\n", "import { Buffer, uid, assert, getVertexFormatFromAttribute } from '@luma.gl/core';\nexport class GPUGeometry {\n id;\n userData = {};\n /** Determines how vertices are read from the 'vertex' attributes */\n topology;\n bufferLayout = [];\n vertexCount;\n indices;\n attributes;\n constructor(props) {\n this.id = props.id || uid('geometry');\n this.topology = props.topology;\n this.indices = props.indices || null;\n this.attributes = props.attributes;\n this.vertexCount = props.vertexCount;\n this.bufferLayout = props.bufferLayout || [];\n if (this.indices) {\n assert(this.indices.usage === Buffer.INDEX);\n }\n }\n destroy() {\n this.indices?.destroy();\n for (const attribute of Object.values(this.attributes)) {\n attribute.destroy();\n }\n }\n getVertexCount() {\n return this.vertexCount;\n }\n getAttributes() {\n return this.attributes;\n }\n getIndexes() {\n return this.indices;\n }\n _calculateVertexCount(positions) {\n // Assume that positions is a fully packed float32x3 buffer\n const vertexCount = positions.byteLength / 12;\n return vertexCount;\n }\n}\nexport function makeGPUGeometry(device, geometry) {\n if (geometry instanceof GPUGeometry) {\n return geometry;\n }\n const indices = getIndexBufferFromGeometry(device, geometry);\n const { attributes, bufferLayout } = getAttributeBuffersFromGeometry(device, geometry);\n return new GPUGeometry({\n topology: geometry.topology || 'triangle-list',\n bufferLayout,\n vertexCount: geometry.vertexCount,\n indices,\n attributes\n });\n}\nexport function getIndexBufferFromGeometry(device, geometry) {\n if (!geometry.indices) {\n return undefined;\n }\n const data = geometry.indices.value;\n return device.createBuffer({ usage: Buffer.INDEX, data });\n}\nexport function getAttributeBuffersFromGeometry(device, geometry) {\n const bufferLayout = [];\n const attributes = {};\n for (const [attributeName, attribute] of Object.entries(geometry.attributes)) {\n let name = attributeName;\n // TODO Map some GLTF attribute names (is this still needed?)\n switch (attributeName) {\n case 'POSITION':\n name = 'positions';\n break;\n case 'NORMAL':\n name = 'normals';\n break;\n case 'TEXCOORD_0':\n name = 'texCoords';\n break;\n case 'COLOR_0':\n name = 'colors';\n break;\n }\n attributes[name] = device.createBuffer({ data: attribute.value, id: `${attributeName}-buffer` });\n const { value, size, normalized } = attribute;\n bufferLayout.push({ name, format: getVertexFormatFromAttribute(value, size, normalized) });\n }\n const vertexCount = geometry._calculateVertexCount(geometry.attributes, geometry.indices);\n return { attributes, bufferLayout, vertexCount };\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { log, splitUniformsAndBindings } from '@luma.gl/core';\n// import type {ShaderUniformType, UniformValue, UniformFormat, UniformInfoDevice, Texture, Sampler} from '@luma.gl/core';\nimport { _resolveModules } from '@luma.gl/shadertools';\n/**\n * ShaderInputs holds uniform and binding values for one or more shader modules,\n * - It can generate binary data for any uniform buffer\n * - It can manage a uniform buffer for each block\n * - It can update managed uniform buffers with a single call\n * - It performs some book keeping on what has changed to minimize unnecessary writes to uniform buffers.\n */\nexport class ShaderInputs {\n /**\n * The map of modules\n * @todo should should this include the resolved dependencies?\n */\n modules;\n /** Stores the uniform values for each module */\n moduleUniforms;\n /** Stores the uniform bindings for each module */\n moduleBindings;\n /** Tracks if uniforms have changed */\n moduleUniformsChanged;\n /**\n * Create a new UniformStore instance\n * @param modules\n */\n constructor(modules) {\n // Extract modules with dependencies\n const resolvedModules = _resolveModules(Object.values(modules).filter(module => module.dependencies));\n for (const resolvedModule of resolvedModules) {\n // @ts-ignore\n modules[resolvedModule.name] = resolvedModule;\n }\n log.log(1, 'Creating ShaderInputs with modules', Object.keys(modules))();\n // Store the module definitions and create storage for uniform values and binding values, per module\n this.modules = modules;\n this.moduleUniforms = {};\n this.moduleBindings = {};\n // Initialize the modules\n for (const [name, module] of Object.entries(modules)) {\n const moduleName = name;\n // Get default uniforms from module\n this.moduleUniforms[moduleName] = module.defaultUniforms || {};\n this.moduleBindings[moduleName] = {};\n }\n }\n /** Destroy */\n destroy() { }\n /**\n * Set module props\n */\n setProps(props) {\n for (const name of Object.keys(props)) {\n const moduleName = name;\n const moduleProps = props[moduleName];\n const module = this.modules[moduleName];\n if (!module) {\n // Ignore props for unregistered modules\n log.warn(`Module ${name} not found`)();\n continue; // eslint-disable-line no-continue\n }\n const oldUniforms = this.moduleUniforms[moduleName];\n const oldBindings = this.moduleBindings[moduleName];\n const uniformsAndBindings = module.getUniforms?.(moduleProps, oldUniforms) || moduleProps;\n const { uniforms, bindings } = splitUniformsAndBindings(uniformsAndBindings);\n this.moduleUniforms[moduleName] = { ...oldUniforms, ...uniforms };\n this.moduleBindings[moduleName] = { ...oldBindings, ...bindings };\n // this.moduleUniformsChanged ||= moduleName;\n // console.log(`setProps(${String(moduleName)}`, moduleName, this.moduleUniforms[moduleName])\n }\n }\n /** Merges all bindings for the shader (from the various modules) */\n // getUniformBlocks(): Record {\n // return this.moduleUniforms;\n // }\n /**\n * Return the map of modules\n * @todo should should this include the resolved dependencies?\n */\n getModules() {\n return Object.values(this.modules);\n }\n /** Get all uniform values for all modules */\n getUniformValues() {\n return this.moduleUniforms;\n }\n /** Merges all bindings for the shader (from the various modules) */\n getBindings() {\n const bindings = {};\n for (const moduleBindings of Object.values(this.moduleBindings)) {\n Object.assign(bindings, moduleBindings);\n }\n return bindings;\n }\n getDebugTable() {\n const table = {};\n for (const [moduleName, module] of Object.entries(this.moduleUniforms)) {\n for (const [key, value] of Object.entries(module)) {\n table[`${moduleName}.${key}`] = {\n type: this.modules[moduleName].uniformTypes?.[key],\n value: String(value)\n };\n }\n }\n return table;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { RenderPipeline, ComputePipeline } from '@luma.gl/core';\n/**\n * Efficiently creates / caches pipelines\n */\nexport class PipelineFactory {\n static defaultProps = { ...RenderPipeline.defaultProps };\n device;\n _hashCounter = 0;\n _hashes = {};\n _renderPipelineCache = {};\n _computePipelineCache = {};\n /** Get the singleton default pipeline factory for the specified device */\n static getDefaultPipelineFactory(device) {\n device._lumaData.defaultPipelineFactory =\n device._lumaData.defaultPipelineFactory || new PipelineFactory(device);\n return device._lumaData.defaultPipelineFactory;\n }\n constructor(device) {\n this.device = device;\n }\n /** Return a RenderPipeline matching props. Reuses a similar pipeline if already created. */\n createRenderPipeline(props) {\n const allProps = { ...RenderPipeline.defaultProps, ...props };\n const hash = this._hashRenderPipeline(allProps);\n if (!this._renderPipelineCache[hash]) {\n const pipeline = this.device.createRenderPipeline({\n ...allProps,\n id: allProps.id ? `${allProps.id}-cached` : undefined\n });\n pipeline.hash = hash;\n this._renderPipelineCache[hash] = { pipeline, useCount: 0 };\n }\n this._renderPipelineCache[hash].useCount++;\n return this._renderPipelineCache[hash].pipeline;\n }\n createComputePipeline(props) {\n const allProps = { ...ComputePipeline.defaultProps, ...props };\n const hash = this._hashComputePipeline(allProps);\n if (!this._computePipelineCache[hash]) {\n const pipeline = this.device.createComputePipeline({\n ...allProps,\n id: allProps.id ? `${allProps.id}-cached` : undefined\n });\n pipeline.hash = hash;\n this._computePipelineCache[hash] = { pipeline, useCount: 0 };\n }\n this._computePipelineCache[hash].useCount++;\n return this._computePipelineCache[hash].pipeline;\n }\n release(pipeline) {\n const hash = pipeline.hash;\n const cache = pipeline instanceof ComputePipeline ? this._computePipelineCache : this._renderPipelineCache;\n cache[hash].useCount--;\n if (cache[hash].useCount === 0) {\n cache[hash].pipeline.destroy();\n delete cache[hash];\n }\n }\n // PRIVATE\n _hashComputePipeline(props) {\n const shaderHash = this._getHash(props.shader.source);\n return `${shaderHash}`;\n }\n /** Calculate a hash based on all the inputs for a render pipeline */\n _hashRenderPipeline(props) {\n const vsHash = this._getHash(props.vs.source);\n const fsHash = props.fs ? this._getHash(props.fs.source) : 0;\n // WebGL specific\n // const {varyings = [], bufferMode = {}} = props;\n // const varyingHashes = varyings.map((v) => this._getHash(v));\n const varyingHash = '-'; // `${varyingHashes.join('/')}B${bufferMode}`\n const bufferLayoutHash = this._getHash(JSON.stringify(props.bufferLayout));\n switch (this.device.type) {\n case 'webgl':\n // WebGL is more dynamic\n return `${vsHash}/${fsHash}V${varyingHash}BL${bufferLayoutHash}`;\n default:\n // On WebGPU we need to rebuild the pipeline if topology, parameters or bufferLayout change\n const parameterHash = this._getHash(JSON.stringify(props.parameters));\n // TODO - Can json.stringify() generate different strings for equivalent objects if order of params is different?\n // create a deepHash() to deduplicate?\n return `${vsHash}/${fsHash}V${varyingHash}T${props.topology}P${parameterHash}BL${bufferLayoutHash}`;\n }\n }\n _getHash(key) {\n if (this._hashes[key] === undefined) {\n this._hashes[key] = this._hashCounter++;\n }\n return this._hashes[key];\n }\n}\n", "import { Shader } from '@luma.gl/core';\n/** Manages a cached pool of Shaders for reuse. */\nexport class ShaderFactory {\n static defaultProps = { ...Shader.defaultProps };\n device;\n _cache = {};\n /** Returns the default ShaderFactory for the given {@link Device}, creating one if necessary. */\n static getDefaultShaderFactory(device) {\n device._lumaData.defaultShaderFactory ||= new ShaderFactory(device);\n return device._lumaData.defaultShaderFactory;\n }\n /** @internal */\n constructor(device) {\n this.device = device;\n }\n /** Requests a {@link Shader} from the cache, creating a new Shader only if necessary. */\n createShader(props) {\n const key = this._hashShader(props);\n let cacheEntry = this._cache[key];\n if (!cacheEntry) {\n const shader = this.device.createShader({\n ...props,\n id: props.id ? `${props.id}-cached` : undefined\n });\n this._cache[key] = cacheEntry = { shader, useCount: 0 };\n }\n cacheEntry.useCount++;\n return cacheEntry.shader;\n }\n /** Releases a previously-requested {@link Shader}, destroying it if no users remain. */\n release(shader) {\n const key = this._hashShader(shader);\n const cacheEntry = this._cache[key];\n if (cacheEntry) {\n cacheEntry.useCount--;\n if (cacheEntry.useCount === 0) {\n delete this._cache[key];\n cacheEntry.shader.destroy();\n }\n }\n }\n // PRIVATE\n _hashShader(value) {\n return `${value.stage}:${value.source}`;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/**\n * Extracts a table suitable for `console.table()` from a shader layout to assist in debugging.\n * @param layout shader layout\n * @param name app should provide the most meaningful name, usually the model or pipeline name / id.\n * @returns\n */\nexport function getDebugTableForShaderLayout(layout, name) {\n const table = {};\n const header = 'Values'; // '`Shader Layout for ${name}`;\n if (layout.attributes.length === 0 && !layout.varyings?.length) {\n return { 'No attributes or varyings': { [header]: 'N/A' } };\n }\n for (const attributeDeclaration of layout.attributes) {\n if (attributeDeclaration) {\n const glslDeclaration = `${attributeDeclaration.location} ${attributeDeclaration.name}: ${attributeDeclaration.type}`;\n table[`in ${glslDeclaration}`] = { [header]: attributeDeclaration.stepMode || 'vertex' };\n }\n }\n for (const varyingDeclaration of layout.varyings || []) {\n const glslDeclaration = `${varyingDeclaration.location} ${varyingDeclaration.name}`;\n table[`out ${glslDeclaration}`] = { [header]: JSON.stringify(varyingDeclaration.accessor) };\n }\n return table;\n}\n", "// import {copyTextureToImage} from '../debug/copy-texture-to-image';\n/** Only works with 1st device? */\nlet canvas = null;\nlet ctx = null;\n// let targetImage: HTMLImageElement | null = null;\n/** Debug utility to draw FBO contents onto screen */\n// eslint-disable-next-line\nexport function debugFramebuffer(fbo, { id, minimap, opaque, top = '0', left = '0', rgbaScale = 1 }) {\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = id;\n canvas.title = id;\n canvas.style.zIndex = '100';\n canvas.style.position = 'absolute';\n canvas.style.top = top; // \u26A0\uFE0F\n canvas.style.left = left; // \u26A0\uFE0F\n canvas.style.border = 'blue 1px solid';\n canvas.style.transform = 'scaleY(-1)';\n document.body.appendChild(canvas);\n ctx = canvas.getContext('2d');\n // targetImage = new Image();\n }\n // const canvasHeight = (minimap ? 2 : 1) * fbo.height;\n if (canvas.width !== fbo.width || canvas.height !== fbo.height) {\n canvas.width = fbo.width / 2;\n canvas.height = fbo.height / 2;\n canvas.style.width = '400px';\n canvas.style.height = '400px';\n }\n // const image = copyTextureToImage(fbo, {targetMaxHeight: 100, targetImage});\n // ctx.drawImage(image, 0, 0);\n const color = fbo.device.readPixelsToArrayWebGL(fbo);\n const imageData = ctx.createImageData(fbo.width, fbo.height);\n // Full map\n const offset = 0;\n // if (color.some((v) => v > 0)) {\n // console.error('THERE IS NON-ZERO DATA IN THE FBO!');\n // }\n for (let i = 0; i < color.length; i += 4) {\n imageData.data[offset + i + 0] = color[i + 0] * rgbaScale;\n imageData.data[offset + i + 1] = color[i + 1] * rgbaScale;\n imageData.data[offset + i + 2] = color[i + 2] * rgbaScale;\n imageData.data[offset + i + 3] = opaque ? 255 : color[i + 3] * rgbaScale;\n }\n ctx.putImageData(imageData, 0, 0);\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Buffer, assert } from '@luma.gl/core';\nimport { getPassthroughFS } from '@luma.gl/shadertools';\nimport { Model } from \"../model/model.js\";\n/**\n * Creates a pipeline for buffer\u2192buffer transforms.\n * @deprecated\n */\nexport class BufferTransform {\n device;\n model;\n transformFeedback;\n /** @deprecated Use device feature test. */\n static isSupported(device) {\n return device?.info?.type === 'webgl';\n }\n constructor(device, props = Model.defaultProps) {\n assert(BufferTransform.isSupported(device), 'BufferTransform not yet implemented on WebGPU');\n this.device = device;\n this.model = new Model(this.device, {\n id: props.id || 'buffer-transform-model',\n fs: props.fs || getPassthroughFS(),\n topology: props.topology || 'point-list',\n ...props\n });\n this.transformFeedback = this.device.createTransformFeedback({\n layout: this.model.pipeline.shaderLayout,\n buffers: props.feedbackBuffers\n });\n this.model.setTransformFeedback(this.transformFeedback);\n Object.seal(this);\n }\n /** Destroy owned resources. */\n destroy() {\n if (this.model) {\n this.model.destroy();\n }\n }\n /** @deprecated Use {@link destroy}. */\n delete() {\n this.destroy();\n }\n /** Run one transform loop. */\n run(options) {\n const renderPass = this.device.beginRenderPass(options);\n this.model.draw(renderPass);\n renderPass.end();\n }\n /** @deprecated */\n update(...args) {\n // TODO(v9): Method should likely be removed for v9. Keeping a method stub\n // to assist with migrating DeckGL usage.\n // eslint-disable-next-line no-console\n console.warn('TextureTransform#update() not implemented');\n }\n /** Returns the {@link Buffer} or {@link BufferRange} for given varying name. */\n getBuffer(varyingName) {\n return this.transformFeedback.getBuffer(varyingName);\n }\n readAsync(varyingName) {\n const result = this.getBuffer(varyingName);\n if (result instanceof Buffer) {\n return result.readAsync();\n }\n const { buffer, byteOffset = 0, byteLength = buffer.byteLength } = result;\n return buffer.readAsync(byteOffset, byteLength);\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Model } from \"../model/model.js\";\nimport { getPassthroughFS } from '@luma.gl/shadertools';\nconst FS_OUTPUT_VARIABLE = 'transform_output';\n/**\n * Creates a pipeline for texture\u2192texture transforms.\n * @deprecated\n */\nexport class TextureTransform {\n device;\n model;\n sampler;\n currentIndex = 0;\n samplerTextureMap = null;\n bindings = []; // each element is an object : {sourceTextures, targetTexture, framebuffer}\n resources = {}; // resources to be deleted\n constructor(device, props) {\n this.device = device;\n // For precise picking of element IDs.\n this.sampler = device.createSampler({\n addressModeU: 'clamp-to-edge',\n addressModeV: 'clamp-to-edge',\n minFilter: 'nearest',\n magFilter: 'nearest',\n mipmapFilter: 'nearest'\n });\n this.model = new Model(this.device, {\n id: props.id || 'texture-transform-model',\n fs: props.fs ||\n getPassthroughFS({\n input: props.targetTextureVarying,\n inputChannels: props.targetTextureChannels,\n output: FS_OUTPUT_VARIABLE\n }),\n vertexCount: props.vertexCount, // TODO(donmccurdy): Naming?\n ...props\n });\n this._initialize(props);\n Object.seal(this);\n }\n // Delete owned resources.\n destroy() { }\n /** @deprecated Use {@link destroy}. */\n delete() {\n this.destroy();\n }\n run(options) {\n const { framebuffer } = this.bindings[this.currentIndex];\n const renderPass = this.device.beginRenderPass({ framebuffer, ...options });\n this.model.draw(renderPass);\n renderPass.end();\n }\n /** @deprecated */\n update(...args) {\n // TODO(v9): Method should likely be removed for v9. Keeping a method stub\n // to assist with migrating DeckGL usage.\n // eslint-disable-next-line no-console\n console.warn('TextureTransform#update() not implemented');\n }\n getData({ packed = false } = {}) {\n // TODO(v9): Method should likely be removed for v9. Keeping a method stub\n // to assist with migrating DeckGL usage.\n throw new Error('getData() not implemented');\n }\n getTargetTexture() {\n const { targetTexture } = this.bindings[this.currentIndex];\n return targetTexture;\n }\n getFramebuffer() {\n const currentResources = this.bindings[this.currentIndex];\n return currentResources.framebuffer;\n }\n // Private\n _initialize(props) {\n this._updateBindings(props);\n }\n _updateBindings(props) {\n this.bindings[this.currentIndex] = this._updateBinding(this.bindings[this.currentIndex], props);\n }\n _updateBinding(binding, { sourceBuffers, sourceTextures, targetTexture }) {\n if (!binding) {\n binding = {\n sourceBuffers: {},\n sourceTextures: {},\n targetTexture: null\n };\n }\n Object.assign(binding.sourceTextures, sourceTextures);\n Object.assign(binding.sourceBuffers, sourceBuffers);\n if (targetTexture) {\n binding.targetTexture = targetTexture;\n const { width, height } = targetTexture;\n // TODO(donmccurdy): When is this called, and is this expected?\n if (binding.framebuffer) {\n binding.framebuffer.destroy();\n }\n binding.framebuffer = this.device.createFramebuffer({\n id: 'transform-framebuffer',\n width,\n height,\n colorAttachments: [targetTexture]\n });\n binding.framebuffer.resize({ width, height });\n }\n return binding;\n }\n // set texture filtering parameters on source textures.\n _setSourceTextureParameters() {\n const index = this.currentIndex;\n const { sourceTextures } = this.bindings[index];\n for (const name in sourceTextures) {\n sourceTextures[name].sampler = this.sampler;\n }\n }\n}\n", "// ClipSpace\nimport { glsl } from '@luma.gl/core';\nimport { Model } from \"../model/model.js\";\nimport { Geometry } from \"../geometry/geometry.js\";\nconst CLIPSPACE_VERTEX_SHADER = `\\\n#version 300 es\nin vec2 aClipSpacePosition;\nin vec2 aTexCoord;\nin vec2 aCoordinate;\nout vec2 position;\nout vec2 coordinate;\nout vec2 uv;\nvoid main(void) {\ngl_Position = vec4(aClipSpacePosition, 0., 1.);\nposition = aClipSpacePosition;\ncoordinate = aCoordinate;\nuv = aTexCoord;\n}\n`;\n/* eslint-disable indent, no-multi-spaces */\nconst POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];\n/**\n * A flat geometry that covers the \"visible area\" that the GPU renders.\n */\nexport class ClipSpace extends Model {\n constructor(device, opts) {\n const TEX_COORDS = POSITIONS.map(coord => (coord === -1 ? 0 : coord));\n super(device, {\n ...opts,\n vs: CLIPSPACE_VERTEX_SHADER,\n vertexCount: 4,\n geometry: new Geometry({\n topology: 'triangle-strip',\n vertexCount: 4,\n attributes: {\n aClipSpacePosition: { size: 2, value: new Float32Array(POSITIONS) },\n aTexCoord: { size: 2, value: new Float32Array(TEX_COORDS) },\n aCoordinate: { size: 2, value: new Float32Array(TEX_COORDS) }\n }\n })\n });\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { uid, assert } from '@luma.gl/core';\nexport class Geometry {\n id;\n /** Determines how vertices are read from the 'vertex' attributes */\n topology;\n vertexCount;\n indices;\n attributes;\n userData = {};\n constructor(props) {\n const { attributes = {}, indices = null, vertexCount = null } = props;\n this.id = props.id || uid('geometry');\n this.topology = props.topology;\n if (indices) {\n this.indices = ArrayBuffer.isView(indices) ? { value: indices, size: 1 } : indices;\n }\n // @ts-expect-error\n this.attributes = {};\n for (const [attributeName, attributeValue] of Object.entries(attributes)) {\n // Wrap \"unwrapped\" arrays and try to autodetect their type\n const attribute = ArrayBuffer.isView(attributeValue)\n ? { value: attributeValue }\n : attributeValue;\n assert(ArrayBuffer.isView(attribute.value), `${this._print(attributeName)}: must be typed array or object with value as typed array`);\n if ((attributeName === 'POSITION' || attributeName === 'positions') && !attribute.size) {\n attribute.size = 3;\n }\n // Move indices to separate field\n if (attributeName === 'indices') {\n assert(!this.indices);\n this.indices = attribute;\n }\n else {\n this.attributes[attributeName] = attribute;\n }\n }\n if (this.indices && this.indices.isIndexed !== undefined) {\n this.indices = Object.assign({}, this.indices);\n delete this.indices.isIndexed;\n }\n this.vertexCount = vertexCount || this._calculateVertexCount(this.attributes, this.indices);\n }\n getVertexCount() {\n return this.vertexCount;\n }\n /**\n * Return an object with all attributes plus indices added as a field.\n * TODO Geometry types are a mess\n */\n getAttributes() {\n return this.indices ? { indices: this.indices, ...this.attributes } : this.attributes;\n }\n // PRIVATE\n _print(attributeName) {\n return `Geometry ${this.id} attribute ${attributeName}`;\n }\n /**\n * GeometryAttribute\n * value: typed array\n * type: indices, vertices, uvs\n * size: elements per vertex\n * target: WebGL buffer type (string or constant)\n *\n * @param attributes\n * @param indices\n * @returns\n */\n _setAttributes(attributes, indices) {\n return this;\n }\n _calculateVertexCount(attributes, indices) {\n if (indices) {\n return indices.value.length;\n }\n let vertexCount = Infinity;\n for (const attribute of Object.values(attributes)) {\n const { value, size, constant } = attribute;\n if (!constant && value && size >= 1) {\n vertexCount = Math.min(vertexCount, value.length / size);\n }\n }\n assert(Number.isFinite(vertexCount));\n return vertexCount;\n }\n}\n", "import { assert, uid } from '@luma.gl/core';\nimport { Vector3, Matrix4 } from '@math.gl/core';\nexport class ScenegraphNode {\n id;\n matrix = new Matrix4();\n display = true;\n position = new Vector3();\n rotation = new Vector3();\n scale = new Vector3(1, 1, 1);\n userData = {};\n props = {};\n constructor(props = {}) {\n const { id } = props;\n this.id = id || uid(this.constructor.name);\n this._setScenegraphNodeProps(props);\n }\n getBounds() {\n return null;\n }\n destroy() { }\n /** @deprecated use .destroy() */\n delete() {\n this.destroy();\n }\n setProps(props) {\n this._setScenegraphNodeProps(props);\n return this;\n }\n toString() {\n return `{type: ScenegraphNode, id: ${this.id})}`;\n }\n setPosition(position) {\n assert(position.length === 3, 'setPosition requires vector argument');\n this.position = position;\n return this;\n }\n setRotation(rotation) {\n assert(rotation.length === 3, 'setRotation requires vector argument');\n this.rotation = rotation;\n return this;\n }\n setScale(scale) {\n assert(scale.length === 3, 'setScale requires vector argument');\n this.scale = scale;\n return this;\n }\n setMatrix(matrix, copyMatrix = true) {\n if (copyMatrix) {\n this.matrix.copy(matrix);\n }\n else {\n this.matrix = matrix;\n }\n }\n setMatrixComponents(components) {\n const { position, rotation, scale, update = true } = components;\n if (position) {\n this.setPosition(position);\n }\n if (rotation) {\n this.setRotation(rotation);\n }\n if (scale) {\n this.setScale(scale);\n }\n if (update) {\n this.updateMatrix();\n }\n return this;\n }\n updateMatrix() {\n const pos = this.position;\n const rot = this.rotation;\n const scale = this.scale;\n this.matrix.identity();\n this.matrix.translate(pos);\n this.matrix.rotateXYZ(rot);\n this.matrix.scale(scale);\n return this;\n }\n update(options = {}) {\n const { position, rotation, scale } = options;\n if (position) {\n this.setPosition(position);\n }\n if (rotation) {\n this.setRotation(rotation);\n }\n if (scale) {\n this.setScale(scale);\n }\n this.updateMatrix();\n return this;\n }\n getCoordinateUniforms(viewMatrix, modelMatrix) {\n // TODO - solve multiple class problem\n // assert(viewMatrix instanceof Matrix4);\n assert(viewMatrix);\n modelMatrix = modelMatrix || this.matrix;\n const worldMatrix = new Matrix4(viewMatrix).multiplyRight(modelMatrix);\n const worldInverse = worldMatrix.invert();\n const worldInverseTranspose = worldInverse.transpose();\n return {\n viewMatrix,\n modelMatrix,\n objectMatrix: modelMatrix,\n worldMatrix,\n worldInverseMatrix: worldInverse,\n worldInverseTransposeMatrix: worldInverseTranspose\n };\n }\n // TODO - copied code, not yet vetted\n /*\n transform() {\n if (!this.parent) {\n this.endPosition.set(this.position);\n this.endRotation.set(this.rotation);\n this.endScale.set(this.scale);\n } else {\n const parent = this.parent;\n this.endPosition.set(this.position.add(parent.endPosition));\n this.endRotation.set(this.rotation.add(parent.endRotation));\n this.endScale.set(this.scale.add(parent.endScale));\n }\n \n const ch = this.children;\n for (let i = 0; i < ch.length; ++i) {\n ch[i].transform();\n }\n \n return this;\n }\n */\n _setScenegraphNodeProps(props) {\n if ('display' in props) {\n this.display = props.display;\n }\n if ('position' in props) {\n this.setPosition(props.position);\n }\n if ('rotation' in props) {\n this.setRotation(props.rotation);\n }\n if ('scale' in props) {\n this.setScale(props.scale);\n }\n // Matrix overwrites other props\n if ('matrix' in props) {\n this.setMatrix(props.matrix);\n }\n Object.assign(this.props, props);\n }\n}\n", "import { Matrix4, Vector3 } from '@math.gl/core';\nimport { log } from '@luma.gl/core';\nimport { ScenegraphNode } from \"./scenegraph-node.js\";\nexport class GroupNode extends ScenegraphNode {\n children;\n constructor(props = {}) {\n props = Array.isArray(props) ? { children: props } : props;\n const { children = [] } = props;\n log.assert(children.every(child => child instanceof ScenegraphNode), 'every child must an instance of ScenegraphNode');\n super(props);\n this.children = children;\n }\n getBounds() {\n const result = [\n [Infinity, Infinity, Infinity],\n [-Infinity, -Infinity, -Infinity]\n ];\n this.traverse((node, { worldMatrix }) => {\n const bounds = node.getBounds();\n if (!bounds) {\n return;\n }\n const [min, max] = bounds;\n const center = new Vector3(min).add(max).divide([2, 2, 2]);\n worldMatrix.transformAsPoint(center, center);\n const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);\n worldMatrix.transformAsVector(halfSize, halfSize);\n for (let v = 0; v < 8; v++) {\n // Test all 8 corners of the box\n const position = new Vector3(v & 0b001 ? -1 : 1, v & 0b010 ? -1 : 1, v & 0b100 ? -1 : 1)\n .multiply(halfSize)\n .add(center);\n for (let i = 0; i < 3; i++) {\n result[0][i] = Math.min(result[0][i], position[i]);\n result[1][i] = Math.max(result[1][i], position[i]);\n }\n }\n });\n if (!Number.isFinite(result[0][0])) {\n return null;\n }\n return result;\n }\n destroy() {\n this.children.forEach(child => child.destroy());\n this.removeAll();\n super.destroy();\n }\n // Unpacks arrays and nested arrays of children\n add(...children) {\n for (const child of children) {\n if (Array.isArray(child)) {\n this.add(...child);\n }\n else {\n this.children.push(child);\n }\n }\n return this;\n }\n remove(child) {\n const children = this.children;\n const indexOf = children.indexOf(child);\n if (indexOf > -1) {\n children.splice(indexOf, 1);\n }\n return this;\n }\n removeAll() {\n this.children = [];\n return this;\n }\n traverse(visitor, { worldMatrix = new Matrix4() } = {}) {\n const modelMatrix = new Matrix4(worldMatrix).multiplyRight(this.matrix);\n for (const child of this.children) {\n if (child instanceof GroupNode) {\n child.traverse(visitor, { worldMatrix: modelMatrix });\n }\n else {\n visitor(child, { worldMatrix: modelMatrix });\n }\n }\n }\n}\n", "import { ScenegraphNode } from \"./scenegraph-node.js\";\nexport class ModelNode extends ScenegraphNode {\n model;\n bounds = null;\n managedResources;\n // TODO - is this used? override callbacks to make sure we call them with this\n // onBeforeRender = null;\n // onAfterRender = null;\n // AfterRender = null;\n constructor(props) {\n super(props);\n // Create new Model or used supplied Model\n this.model = props.model;\n this.managedResources = props.managedResources || [];\n this.bounds = props.bounds || null;\n this.setProps(props);\n }\n getBounds() {\n return this.bounds;\n }\n destroy() {\n if (this.model) {\n this.model.destroy();\n // @ts-expect-error\n this.model = null;\n }\n this.managedResources.forEach(resource => resource.destroy());\n this.managedResources = [];\n }\n // Expose model methods\n draw(renderPass) {\n // Return value indicates if something was actually drawn\n return this.model.draw(renderPass);\n }\n}\n", "import { uid } from '@luma.gl/core';\nimport { TruncatedConeGeometry } from \"./truncated-cone-geometry.js\";\nexport class ConeGeometry extends TruncatedConeGeometry {\n constructor(props = {}) {\n const { id = uid('cone-geometry'), radius = 1, cap = true } = props;\n super({\n ...props,\n id,\n topRadius: 0,\n topCap: Boolean(cap),\n bottomCap: Boolean(cap),\n bottomRadius: radius\n });\n }\n}\n", "import { uid } from '@luma.gl/core';\nimport { Geometry } from \"../geometry/geometry.js\";\nconst INDEX_OFFSETS = {\n x: [2, 0, 1],\n y: [0, 1, 2],\n z: [1, 2, 0]\n};\n/**\n * Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n * copyright 2011 Google Inc. new BSD License\n * (http://www.opensource.org/licenses/bsd-license.php).\n */\nexport class TruncatedConeGeometry extends Geometry {\n constructor(props = {}) {\n const { id = uid('truncated-code-geometry') } = props;\n const { indices, attributes } = tesselateTruncatedCone(props);\n super({\n ...props,\n id,\n topology: 'triangle-list',\n indices,\n attributes: {\n POSITION: { size: 3, value: attributes.POSITION },\n NORMAL: { size: 3, value: attributes.NORMAL },\n TEXCOORD_0: { size: 2, value: attributes.TEXCOORD_0 },\n ...props.attributes\n }\n });\n }\n}\n/* eslint-disable max-statements, complexity */\nfunction tesselateTruncatedCone(props = {}) {\n const { bottomRadius = 0, topRadius = 0, height = 1, nradial = 10, nvertical = 10, verticalAxis = 'y', topCap = false, bottomCap = false } = props;\n const extra = (topCap ? 2 : 0) + (bottomCap ? 2 : 0);\n const numVertices = (nradial + 1) * (nvertical + 1 + extra);\n const slant = Math.atan2(bottomRadius - topRadius, height);\n const msin = Math.sin;\n const mcos = Math.cos;\n const mpi = Math.PI;\n const cosSlant = mcos(slant);\n const sinSlant = msin(slant);\n const start = topCap ? -2 : 0;\n const end = nvertical + (bottomCap ? 2 : 0);\n const vertsAroundEdge = nradial + 1;\n const indices = new Uint16Array(nradial * (nvertical + extra) * 6);\n const indexOffset = INDEX_OFFSETS[verticalAxis];\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n let i3 = 0;\n let i2 = 0;\n for (let i = start; i <= end; i++) {\n let v = i / nvertical;\n let y = height * v;\n let ringRadius;\n if (i < 0) {\n y = 0;\n v = 1;\n ringRadius = bottomRadius;\n }\n else if (i > nvertical) {\n y = height;\n v = 1;\n ringRadius = topRadius;\n }\n else {\n ringRadius = bottomRadius + (topRadius - bottomRadius) * (i / nvertical);\n }\n if (i === -2 || i === nvertical + 2) {\n ringRadius = 0;\n v = 0;\n }\n y -= height / 2;\n for (let j = 0; j < vertsAroundEdge; j++) {\n const sin = msin((j * mpi * 2) / nradial);\n const cos = mcos((j * mpi * 2) / nradial);\n positions[i3 + indexOffset[0]] = sin * ringRadius;\n positions[i3 + indexOffset[1]] = y;\n positions[i3 + indexOffset[2]] = cos * ringRadius;\n normals[i3 + indexOffset[0]] = i < 0 || i > nvertical ? 0 : sin * cosSlant;\n normals[i3 + indexOffset[1]] = i < 0 ? -1 : i > nvertical ? 1 : sinSlant;\n normals[i3 + indexOffset[2]] = i < 0 || i > nvertical ? 0 : cos * cosSlant;\n texCoords[i2 + 0] = j / nradial;\n texCoords[i2 + 1] = v;\n i2 += 2;\n i3 += 3;\n }\n }\n for (let i = 0; i < nvertical + extra; i++) {\n for (let j = 0; j < nradial; j++) {\n const index = (i * nradial + j) * 6;\n indices[index + 0] = vertsAroundEdge * (i + 0) + 0 + j;\n indices[index + 1] = vertsAroundEdge * (i + 0) + 1 + j;\n indices[index + 2] = vertsAroundEdge * (i + 1) + 1 + j;\n indices[index + 3] = vertsAroundEdge * (i + 0) + 0 + j;\n indices[index + 4] = vertsAroundEdge * (i + 1) + 1 + j;\n indices[index + 5] = vertsAroundEdge * (i + 1) + 0 + j;\n }\n }\n return {\n indices,\n attributes: {\n POSITION: positions,\n NORMAL: normals,\n TEXCOORD_0: texCoords\n }\n };\n}\n", "import { uid } from '@luma.gl/core';\nimport { Geometry } from \"../geometry/geometry.js\";\nexport class CubeGeometry extends Geometry {\n constructor(props = {}) {\n const { id = uid('cube-geometry'), indices = true } = props;\n super(indices\n ? {\n ...props,\n id,\n topology: 'triangle-list',\n indices: { size: 1, value: CUBE_INDICES },\n attributes: { ...ATTRIBUTES, ...props.attributes }\n }\n : {\n ...props,\n id,\n topology: 'triangle-list',\n indices: undefined,\n attributes: { ...NON_INDEXED_ATTRIBUTES, ...props.attributes }\n });\n }\n}\n// prettier-ignore\nconst CUBE_INDICES = new Uint16Array([\n 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13,\n 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23\n]);\n// prettier-ignore\nconst CUBE_POSITIONS = new Float32Array([\n -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,\n -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,\n -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,\n -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,\n 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1\n]);\n// TODO - could be Uint8\n// prettier-ignore\nconst CUBE_NORMALS = new Float32Array([\n // Front face\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,\n // Back face\n 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1,\n // Top face\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,\n // Bottom face\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0,\n // Right face\n 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,\n // Left face\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0\n]);\n// prettier-ignore\nconst CUBE_TEX_COORDS = new Float32Array([\n // Front face\n 0, 0, 1, 0, 1, 1, 0, 1,\n // Back face\n 1, 0, 1, 1, 0, 1, 0, 0,\n // Top face\n 0, 1, 0, 0, 1, 0, 1, 1,\n // Bottom face\n 1, 1, 0, 1, 0, 0, 1, 0,\n // Right face\n 1, 0, 1, 1, 0, 1, 0, 0,\n // Left face\n 0, 0, 1, 0, 1, 1, 0, 1\n]);\n// float4 position\n// prettier-ignore\nexport const CUBE_NON_INDEXED_POSITIONS = new Float32Array([\n 1, -1, 1,\n -1, -1, 1,\n -1, -1, -1,\n 1, -1, -1,\n 1, -1, 1,\n -1, -1, -1,\n 1, 1, 1,\n 1, -1, 1,\n 1, -1, -1,\n 1, 1, -1,\n 1, 1, 1,\n 1, -1, -1,\n -1, 1, 1,\n 1, 1, 1,\n 1, 1, -1,\n -1, 1, -1,\n -1, 1, 1,\n 1, 1, -1,\n -1, -1, 1,\n -1, 1, 1,\n -1, 1, -1,\n -1, -1, -1,\n -1, -1, 1,\n -1, 1, -1,\n 1, 1, 1,\n -1, 1, 1,\n -1, -1, 1,\n -1, -1, 1,\n 1, -1, 1,\n 1, 1, 1,\n 1, -1, -1,\n -1, -1, -1,\n -1, 1, -1,\n 1, 1, -1,\n 1, -1, -1,\n -1, 1, -1,\n]);\n// float2 uv,\n// prettier-ignore\nexport const CUBE_NON_INDEXED_TEX_COORDS = new Float32Array([\n 1, 1,\n 0, 1,\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 0, 1,\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 0, 1,\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 0, 1,\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 0, 1,\n 0, 0,\n 0, 0,\n 1, 0,\n 1, 1,\n 1, 1,\n 0, 1,\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 0,\n]);\n// float4 color\n// prettier-ignore\nexport const CUBE_NON_INDEXED_COLORS = new Float32Array([\n 1, 0, 1, 1,\n 0, 0, 1, 1,\n 0, 0, 0, 1,\n 1, 0, 0, 1,\n 1, 0, 1, 1,\n 0, 0, 0, 1,\n 1, 1, 1, 1,\n 1, 0, 1, 1,\n 1, 0, 0, 1,\n 1, 1, 0, 1,\n 1, 1, 1, 1,\n 1, 0, 0, 1,\n 0, 1, 1, 1,\n 1, 1, 1, 1,\n 1, 1, 0, 1,\n 0, 1, 0, 1,\n 0, 1, 1, 1,\n 1, 1, 0, 1,\n 0, 0, 1, 1,\n 0, 1, 1, 1,\n 0, 1, 0, 1,\n 0, 0, 0, 1,\n 0, 0, 1, 1,\n 0, 1, 0, 1,\n 1, 1, 1, 1,\n 0, 1, 1, 1,\n 0, 0, 1, 1,\n 0, 0, 1, 1,\n 1, 0, 1, 1,\n 1, 1, 1, 1,\n 1, 0, 0, 1,\n 0, 0, 0, 1,\n 0, 1, 0, 1,\n 1, 1, 0, 1,\n 1, 0, 0, 1,\n 0, 1, 0, 1,\n]);\nconst ATTRIBUTES = {\n POSITION: { size: 3, value: CUBE_POSITIONS },\n NORMAL: { size: 3, value: CUBE_NORMALS },\n TEXCOORD_0: { size: 2, value: CUBE_TEX_COORDS }\n};\nconst NON_INDEXED_ATTRIBUTES = {\n POSITION: { size: 3, value: CUBE_NON_INDEXED_POSITIONS },\n // NORMAL: {size: 3, value: CUBE_NON_INDEXED_NORMALS},\n TEXCOORD_0: { size: 2, value: CUBE_NON_INDEXED_TEX_COORDS },\n COLOR_0: { size: 3, value: CUBE_NON_INDEXED_COLORS }\n};\n", "import { uid } from '@luma.gl/core';\nimport { TruncatedConeGeometry } from \"./truncated-cone-geometry.js\";\nexport class CylinderGeometry extends TruncatedConeGeometry {\n constructor(props = {}) {\n const { id = uid('cylinder-geometry'), radius = 1 } = props;\n super({\n ...props,\n id,\n bottomRadius: radius,\n topRadius: radius\n });\n }\n}\n", "import { uid } from '@luma.gl/core';\nimport { Vector3 } from '@math.gl/core';\nimport { Geometry } from \"../geometry/geometry.js\";\n/* eslint-disable comma-spacing, max-statements, complexity */\nconst ICO_POSITIONS = [-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0];\nconst ICO_INDICES = [3, 4, 5, 3, 5, 1, 3, 1, 0, 3, 0, 4, 4, 0, 2, 4, 2, 5, 2, 0, 1, 5, 2, 1];\nexport class IcoSphereGeometry extends Geometry {\n constructor(props = {}) {\n const { id = uid('ico-sphere-geometry') } = props;\n const { indices, attributes } = tesselateIcosaHedron(props);\n super({\n ...props,\n id,\n topology: 'triangle-list',\n indices,\n attributes: { ...attributes, ...props.attributes }\n });\n }\n}\nfunction tesselateIcosaHedron(props) {\n const { iterations = 0 } = props;\n const PI = Math.PI;\n const PI2 = PI * 2;\n const positions = [...ICO_POSITIONS];\n let indices = [...ICO_INDICES];\n positions.push();\n indices.push();\n const getMiddlePoint = (() => {\n const pointMemo = {};\n return (i1, i2) => {\n i1 *= 3;\n i2 *= 3;\n const mini = i1 < i2 ? i1 : i2;\n const maxi = i1 > i2 ? i1 : i2;\n const key = `${mini}|${maxi}`;\n if (key in pointMemo) {\n return pointMemo[key];\n }\n const x1 = positions[i1];\n const y1 = positions[i1 + 1];\n const z1 = positions[i1 + 2];\n const x2 = positions[i2];\n const y2 = positions[i2 + 1];\n const z2 = positions[i2 + 2];\n let xm = (x1 + x2) / 2;\n let ym = (y1 + y2) / 2;\n let zm = (z1 + z2) / 2;\n const len = Math.sqrt(xm * xm + ym * ym + zm * zm);\n xm /= len;\n ym /= len;\n zm /= len;\n positions.push(xm, ym, zm);\n return (pointMemo[key] = positions.length / 3 - 1);\n };\n })();\n for (let i = 0; i < iterations; i++) {\n const indices2 = [];\n for (let j = 0; j < indices.length; j += 3) {\n const a = getMiddlePoint(indices[j + 0], indices[j + 1]);\n const b = getMiddlePoint(indices[j + 1], indices[j + 2]);\n const c = getMiddlePoint(indices[j + 2], indices[j + 0]);\n indices2.push(c, indices[j + 0], a, a, indices[j + 1], b, b, indices[j + 2], c, a, b, c);\n }\n indices = indices2;\n }\n // Calculate texCoords and normals\n const normals = new Array(positions.length);\n const texCoords = new Array((positions.length / 3) * 2);\n const l = indices.length;\n for (let i = l - 3; i >= 0; i -= 3) {\n const i1 = indices[i + 0];\n const i2 = indices[i + 1];\n const i3 = indices[i + 2];\n const in1 = i1 * 3;\n const in2 = i2 * 3;\n const in3 = i3 * 3;\n const iu1 = i1 * 2;\n const iu2 = i2 * 2;\n const iu3 = i3 * 2;\n const x1 = positions[in1 + 0];\n const y1 = positions[in1 + 1];\n const z1 = positions[in1 + 2];\n const theta1 = Math.acos(z1 / Math.sqrt(x1 * x1 + y1 * y1 + z1 * z1));\n const phi1 = Math.atan2(y1, x1) + PI;\n const v1 = theta1 / PI;\n const u1 = 1 - phi1 / PI2;\n const x2 = positions[in2 + 0];\n const y2 = positions[in2 + 1];\n const z2 = positions[in2 + 2];\n const theta2 = Math.acos(z2 / Math.sqrt(x2 * x2 + y2 * y2 + z2 * z2));\n const phi2 = Math.atan2(y2, x2) + PI;\n const v2 = theta2 / PI;\n const u2 = 1 - phi2 / PI2;\n const x3 = positions[in3 + 0];\n const y3 = positions[in3 + 1];\n const z3 = positions[in3 + 2];\n const theta3 = Math.acos(z3 / Math.sqrt(x3 * x3 + y3 * y3 + z3 * z3));\n const phi3 = Math.atan2(y3, x3) + PI;\n const v3 = theta3 / PI;\n const u3 = 1 - phi3 / PI2;\n const vec1 = [x3 - x2, y3 - y2, z3 - z2];\n const vec2 = [x1 - x2, y1 - y2, z1 - z2];\n const normal = new Vector3(vec1).cross(vec2).normalize();\n let newIndex;\n if ((u1 === 0 || u2 === 0 || u3 === 0) &&\n (u1 === 0 || u1 > 0.5) &&\n (u2 === 0 || u2 > 0.5) &&\n (u3 === 0 || u3 > 0.5)) {\n positions.push(positions[in1 + 0], positions[in1 + 1], positions[in1 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v1;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n positions.push(positions[in2 + 0], positions[in2 + 1], positions[in2 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v2;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n positions.push(positions[in3 + 0], positions[in3 + 1], positions[in3 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v3;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n }\n normals[in1 + 0] = normals[in2 + 0] = normals[in3 + 0] = normal.x;\n normals[in1 + 1] = normals[in2 + 1] = normals[in3 + 1] = normal.y;\n normals[in1 + 2] = normals[in2 + 2] = normals[in3 + 2] = normal.z;\n texCoords[iu1 + 0] = u1;\n texCoords[iu1 + 1] = v1;\n texCoords[iu2 + 0] = u2;\n texCoords[iu2 + 1] = v2;\n texCoords[iu3 + 0] = u3;\n texCoords[iu3 + 1] = v3;\n }\n return {\n indices: { size: 1, value: new Uint16Array(indices) },\n attributes: {\n POSITION: { size: 3, value: new Float32Array(positions) },\n NORMAL: { size: 3, value: new Float32Array(normals) },\n TEXCOORD_0: { size: 2, value: new Float32Array(texCoords) }\n }\n };\n}\n", "import { uid } from '@luma.gl/core';\nimport { Geometry } from \"../geometry/geometry.js\";\nimport { unpackIndexedGeometry } from \"../geometry/geometry-utils.js\";\n// Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n// copyright 2011 Google Inc. new BSD License\n// (http://www.opensource.org/licenses/bsd-license.php).\nexport class PlaneGeometry extends Geometry {\n constructor(props = {}) {\n const { id = uid('plane-geometry') } = props;\n const { indices, attributes } = tesselatePlane(props);\n super({\n ...props,\n id,\n topology: 'triangle-list',\n indices,\n attributes: { ...attributes, ...props.attributes }\n });\n }\n}\n/* eslint-disable complexity, max-statements */\nfunction tesselatePlane(props) {\n const { type = 'x,y', offset = 0, flipCull = false, unpack = false } = props;\n const coords = type.split(',');\n // width, height\n let c1len = props[`${coords[0]}len`] || 1;\n const c2len = props[`${coords[1]}len`] || 1;\n // subdivisionsWidth, subdivisionsDepth\n const subdivisions1 = props[`n${coords[0]}`] || 1;\n const subdivisions2 = props[`n${coords[1]}`] || 1;\n const numVertices = (subdivisions1 + 1) * (subdivisions2 + 1);\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n if (flipCull) {\n c1len = -c1len;\n }\n let i2 = 0;\n let i3 = 0;\n for (let z = 0; z <= subdivisions2; z++) {\n for (let x = 0; x <= subdivisions1; x++) {\n const u = x / subdivisions1;\n const v = z / subdivisions2;\n texCoords[i2 + 0] = flipCull ? 1 - u : u;\n texCoords[i2 + 1] = v;\n switch (type) {\n case 'x,y':\n positions[i3 + 0] = c1len * u - c1len * 0.5;\n positions[i3 + 1] = c2len * v - c2len * 0.5;\n positions[i3 + 2] = offset;\n normals[i3 + 0] = 0;\n normals[i3 + 1] = 0;\n normals[i3 + 2] = flipCull ? 1 : -1;\n break;\n case 'x,z':\n positions[i3 + 0] = c1len * u - c1len * 0.5;\n positions[i3 + 1] = offset;\n positions[i3 + 2] = c2len * v - c2len * 0.5;\n normals[i3 + 0] = 0;\n normals[i3 + 1] = flipCull ? 1 : -1;\n normals[i3 + 2] = 0;\n break;\n case 'y,z':\n positions[i3 + 0] = offset;\n positions[i3 + 1] = c1len * u - c1len * 0.5;\n positions[i3 + 2] = c2len * v - c2len * 0.5;\n normals[i3 + 0] = flipCull ? 1 : -1;\n normals[i3 + 1] = 0;\n normals[i3 + 2] = 0;\n break;\n default:\n throw new Error('PlaneGeometry: unknown type');\n }\n i2 += 2;\n i3 += 3;\n }\n }\n const numVertsAcross = subdivisions1 + 1;\n const indices = new Uint16Array(subdivisions1 * subdivisions2 * 6);\n for (let z = 0; z < subdivisions2; z++) {\n for (let x = 0; x < subdivisions1; x++) {\n const index = (z * subdivisions1 + x) * 6;\n // Make triangle 1 of quad.\n indices[index + 0] = (z + 0) * numVertsAcross + x;\n indices[index + 1] = (z + 1) * numVertsAcross + x;\n indices[index + 2] = (z + 0) * numVertsAcross + x + 1;\n // Make triangle 2 of quad.\n indices[index + 3] = (z + 1) * numVertsAcross + x;\n indices[index + 4] = (z + 1) * numVertsAcross + x + 1;\n indices[index + 5] = (z + 0) * numVertsAcross + x + 1;\n }\n }\n const geometry = {\n indices: { size: 1, value: indices },\n attributes: {\n POSITION: { size: 3, value: positions },\n NORMAL: { size: 3, value: normals },\n TEXCOORD_0: { size: 2, value: texCoords }\n }\n };\n // Optionally, unpack indexed geometry\n return unpack ? unpackIndexedGeometry(geometry) : geometry;\n}\n", "// import type {Geometry} from './geometry';\nexport function unpackIndexedGeometry(geometry) {\n const { indices, attributes } = geometry;\n if (!indices) {\n return geometry;\n }\n const vertexCount = indices.value.length;\n const unpackedAttributes = {};\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n const { constant, value, size } = attribute;\n if (constant || !size) {\n continue; // eslint-disable-line\n }\n const unpackedValue = new value.constructor(vertexCount * size);\n for (let x = 0; x < vertexCount; ++x) {\n const index = indices.value[x];\n for (let i = 0; i < size; i++) {\n unpackedValue[x * size + i] = value[index * size + i];\n }\n }\n unpackedAttributes[attributeName] = { size, value: unpackedValue };\n }\n return {\n attributes: Object.assign({}, attributes, unpackedAttributes)\n };\n}\n// export function calculateVertexNormals(positions: Float32Array): Uint8Array {\n// let normals = new Uint8Array(positions.length / 3);\n// for (let i = 0; i < positions.length; i++) {\n// const vec1 = new Vector3(positions.subarray(i * 3, i + 0, i + 3));\n// const vec2 = new Vector3(positions.subarray(i + 3, i + 6));\n// const vec3 = new Vector3(positions.subarray(i + 6, i + 9));\n// const normal = new Vector3(vec1).cross(vec2).normalize();\n// normals.set(normal[0], i + 4);\n// normals.set(normal[1], i + 4 + 1);\n// normals.set(normal[2], i + 2);\n// }\n// const normal = new Vector3(vec1).cross(vec2).normalize();\n// }\n", "import { uid } from '@luma.gl/core';\nimport { Geometry } from \"../geometry/geometry.js\";\n// Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n// copyright 2011 Google Inc. new BSD License\n// (http://www.opensource.org/licenses/bsd-license.php).\nexport class SphereGeometry extends Geometry {\n constructor(props = {}) {\n const { id = uid('sphere-geometry') } = props;\n const { indices, attributes } = tesselateSphere(props);\n super({\n ...props,\n id,\n topology: 'triangle-list',\n indices,\n attributes: { ...attributes, ...props.attributes }\n });\n }\n}\n/* eslint-disable max-statements, complexity */\nfunction tesselateSphere(props) {\n const { nlat = 10, nlong = 10 } = props;\n const startLat = 0;\n const endLat = Math.PI;\n const latRange = endLat - startLat;\n const startLong = 0;\n const endLong = 2 * Math.PI;\n const longRange = endLong - startLong;\n const numVertices = (nlat + 1) * (nlong + 1);\n const radius = (n1, n2, n3, u, v) => props.radius || 1;\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n const IndexType = numVertices > 0xffff ? Uint32Array : Uint16Array;\n const indices = new IndexType(nlat * nlong * 6);\n // Create positions, normals and texCoords\n for (let y = 0; y <= nlat; y++) {\n for (let x = 0; x <= nlong; x++) {\n const u = x / nlong;\n const v = y / nlat;\n const index = x + y * (nlong + 1);\n const i2 = index * 2;\n const i3 = index * 3;\n const theta = longRange * u;\n const phi = latRange * v;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n const sinPhi = Math.sin(phi);\n const cosPhi = Math.cos(phi);\n const ux = cosTheta * sinPhi;\n const uy = cosPhi;\n const uz = sinTheta * sinPhi;\n const r = radius(ux, uy, uz, u, v);\n positions[i3 + 0] = r * ux;\n positions[i3 + 1] = r * uy;\n positions[i3 + 2] = r * uz;\n normals[i3 + 0] = ux;\n normals[i3 + 1] = uy;\n normals[i3 + 2] = uz;\n texCoords[i2 + 0] = u;\n texCoords[i2 + 1] = 1 - v;\n }\n }\n // Create indices\n const numVertsAround = nlong + 1;\n for (let x = 0; x < nlong; x++) {\n for (let y = 0; y < nlat; y++) {\n const index = (x * nlat + y) * 6;\n indices[index + 0] = y * numVertsAround + x;\n indices[index + 1] = y * numVertsAround + x + 1;\n indices[index + 2] = (y + 1) * numVertsAround + x;\n indices[index + 3] = (y + 1) * numVertsAround + x;\n indices[index + 4] = y * numVertsAround + x + 1;\n indices[index + 5] = (y + 1) * numVertsAround + x + 1;\n }\n }\n return {\n indices: { size: 1, value: indices },\n attributes: {\n POSITION: { size: 3, value: positions },\n NORMAL: { size: 3, value: normals },\n TEXCOORD_0: { size: 2, value: texCoords }\n }\n };\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Buffer, ComputePipeline, UniformStore } from '@luma.gl/core';\nimport { log, uid, isNumberArray } from '@luma.gl/core';\nimport { getTypedArrayFromDataType } from '@luma.gl/core';\nimport { ShaderAssembler, getShaderLayoutFromWGSL } from '@luma.gl/shadertools';\nimport { ShaderInputs } from \"./shader-inputs.js\";\nimport { PipelineFactory } from \"./lib/pipeline-factory.js\";\nimport { ShaderFactory } from \"./lib/shader-factory.js\";\n// import {getDebugTableForShaderLayout} from '../debug/debug-shader-layout';\nconst LOG_DRAW_PRIORITY = 2;\nconst LOG_DRAW_TIMEOUT = 10000;\n/**\n * v9 Model API\n * A model\n * - automatically reuses pipelines (programs) when possible\n * - automatically rebuilds pipelines if necessary to accommodate changed settings\n * shadertools integration\n * - accepts modules and performs shader transpilation\n */\nexport class Computation {\n static defaultProps = {\n ...ComputePipeline.defaultProps,\n id: 'unnamed',\n handle: undefined,\n userData: {},\n source: '',\n modules: [],\n defines: {},\n bindings: undefined,\n shaderInputs: undefined,\n pipelineFactory: undefined,\n shaderFactory: undefined,\n shaderAssembler: ShaderAssembler.getDefaultShaderAssembler(),\n debugShaders: undefined\n };\n device;\n id;\n pipelineFactory;\n shaderFactory;\n userData = {};\n /** Bindings (textures, samplers, uniform buffers) */\n bindings = {};\n /** The underlying GPU \"program\". @note May be recreated if parameters change */\n pipeline;\n /** the underlying compiled compute shader */\n shader;\n source;\n /** ShaderInputs instance */\n shaderInputs;\n _uniformStore;\n _pipelineNeedsUpdate = 'newly created';\n _getModuleUniforms;\n props;\n _destroyed = false;\n constructor(device, props) {\n if (device.type !== 'webgpu') {\n throw new Error('Computation is only supported in WebGPU');\n }\n this.props = { ...Computation.defaultProps, ...props };\n props = this.props;\n this.id = props.id || uid('model');\n this.device = device;\n Object.assign(this.userData, props.userData);\n // Setup shader module inputs\n const moduleMap = Object.fromEntries(this.props.modules?.map(module => [module.name, module]) || []);\n this.setShaderInputs(props.shaderInputs || new ShaderInputs(moduleMap));\n // Support WGSL shader layout introspection\n // TODO - Don't modify props!!\n this.props.shaderLayout ||= getShaderLayoutFromWGSL(this.props.source);\n // Setup shader assembler\n const platformInfo = getPlatformInfo(device);\n // Extract modules from shader inputs if not supplied\n const modules = (this.props.modules?.length > 0 ? this.props.modules : this.shaderInputs?.getModules()) || [];\n this.pipelineFactory =\n props.pipelineFactory || PipelineFactory.getDefaultPipelineFactory(this.device);\n this.shaderFactory = props.shaderFactory || ShaderFactory.getDefaultShaderFactory(this.device);\n const { source, getUniforms } = this.props.shaderAssembler.assembleShader({\n platformInfo,\n ...this.props,\n modules\n });\n this.source = source;\n this._getModuleUniforms = getUniforms;\n // Create the pipeline\n // @note order is important\n this.pipeline = this._updatePipeline();\n // Apply any dynamic settings that will not trigger pipeline change\n if (props.bindings) {\n this.setBindings(props.bindings);\n }\n // Catch any access to non-standard props\n Object.seal(this);\n }\n destroy() {\n if (this._destroyed)\n return;\n this.pipelineFactory.release(this.pipeline);\n this.shaderFactory.release(this.shader);\n this._uniformStore.destroy();\n this._destroyed = true;\n }\n // Draw call\n predraw() {\n // Update uniform buffers if needed\n this.updateShaderInputs();\n }\n dispatch(computePass, x, y, z) {\n try {\n this._logDrawCallStart();\n // Check if the pipeline is invalidated\n // TODO - this is likely the worst place to do this from performance perspective. Perhaps add a predraw()?\n this.pipeline = this._updatePipeline();\n // Set pipeline state, we may be sharing a pipeline so we need to set all state on every draw\n // Any caching needs to be done inside the pipeline functions\n this.pipeline.setBindings(this.bindings);\n computePass.setPipeline(this.pipeline);\n // @ts-expect-error\n computePass.setBindings([]);\n computePass.dispatch(x, y, z);\n }\n finally {\n this._logDrawCallEnd();\n }\n }\n // Update fixed fields (can trigger pipeline rebuild)\n // Update dynamic fields\n /**\n * Updates the vertex count (used in draw calls)\n * @note Any attributes with stepMode=vertex need to be at least this big\n */\n setVertexCount(vertexCount) {\n // this.vertexCount = vertexCount;\n }\n /**\n * Updates the instance count (used in draw calls)\n * @note Any attributes with stepMode=instance need to be at least this big\n */\n setInstanceCount(instanceCount) {\n // this.instanceCount = instanceCount;\n }\n setShaderInputs(shaderInputs) {\n this.shaderInputs = shaderInputs;\n this._uniformStore = new UniformStore(this.shaderInputs.modules);\n // Create uniform buffer bindings for all modules\n for (const moduleName of Object.keys(this.shaderInputs.modules)) {\n const uniformBuffer = this._uniformStore.getManagedUniformBuffer(this.device, moduleName);\n this.bindings[`${moduleName}Uniforms`] = uniformBuffer;\n }\n }\n /**\n * Updates shader module settings (which results in uniforms being set)\n */\n setShaderModuleProps(props) {\n const uniforms = this._getModuleUniforms(props);\n // Extract textures & framebuffers set by the modules\n // TODO better way to extract bindings\n const keys = Object.keys(uniforms).filter(k => {\n const uniform = uniforms[k];\n return !isNumberArray(uniform) && typeof uniform !== 'number' && typeof uniform !== 'boolean';\n });\n const bindings = {};\n for (const k of keys) {\n bindings[k] = uniforms[k];\n delete uniforms[k];\n }\n }\n updateShaderInputs() {\n this._uniformStore.setUniforms(this.shaderInputs.getUniformValues());\n }\n /**\n * Sets bindings (textures, samplers, uniform buffers)\n */\n setBindings(bindings) {\n Object.assign(this.bindings, bindings);\n }\n _setPipelineNeedsUpdate(reason) {\n this._pipelineNeedsUpdate = this._pipelineNeedsUpdate || reason;\n }\n _updatePipeline() {\n if (this._pipelineNeedsUpdate) {\n let prevShader = null;\n if (this.pipeline) {\n log.log(1, `Model ${this.id}: Recreating pipeline because \"${this._pipelineNeedsUpdate}\".`)();\n prevShader = this.shader;\n }\n this._pipelineNeedsUpdate = false;\n this.shader = this.shaderFactory.createShader({\n id: `${this.id}-fragment`,\n stage: 'compute',\n source: this.source,\n debug: this.props.debugShaders\n });\n this.pipeline = this.pipelineFactory.createComputePipeline({\n ...this.props,\n shader: this.shader\n });\n if (prevShader) {\n this.shaderFactory.release(prevShader);\n }\n }\n return this.pipeline;\n }\n /** Throttle draw call logging */\n _lastLogTime = 0;\n _logOpen = false;\n _logDrawCallStart() {\n // IF level is 4 or higher, log every frame.\n const logDrawTimeout = log.level > 3 ? 0 : LOG_DRAW_TIMEOUT;\n if (log.level < 2 || Date.now() - this._lastLogTime < logDrawTimeout) {\n return;\n }\n this._lastLogTime = Date.now();\n this._logOpen = true;\n log.group(LOG_DRAW_PRIORITY, `>>> DRAWING MODEL ${this.id}`, { collapsed: log.level <= 2 })();\n }\n _logDrawCallEnd() {\n if (this._logOpen) {\n // const shaderLayoutTable = getDebugTableForShaderLayout(this.pipeline.props.shaderLayout, this.id);\n // log.table(logLevel, attributeTable)();\n // log.table(logLevel, uniformTable)();\n // log.table(LOG_DRAW_PRIORITY, shaderLayoutTable)();\n const uniformTable = this.shaderInputs.getDebugTable();\n log.table(LOG_DRAW_PRIORITY, uniformTable)();\n log.groupEnd(LOG_DRAW_PRIORITY)();\n this._logOpen = false;\n }\n }\n _drawCount = 0;\n // TODO - fix typing of luma data types\n _getBufferOrConstantValues(attribute, dataType) {\n const TypedArrayConstructor = getTypedArrayFromDataType(dataType);\n const typedArray = attribute instanceof Buffer ? new TypedArrayConstructor(attribute.debugData) : attribute;\n return typedArray.toString();\n }\n}\n/** Create a shadertools platform info from the Device */\nexport function getPlatformInfo(device) {\n return {\n type: device.type,\n shaderLanguage: device.info.shadingLanguage,\n shaderLanguageVersion: device.info.shadingLanguageVersion,\n gpu: device.info.gpu,\n // HACK - we pretend that the DeviceFeatures is a Set, it has a similar API\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A,SAAK,eAAe,KAAK,IAAI;AAC7B,SAAK,WAAW;AAChB,sBAAI,MAAMD,oBAAmB,qBAAqB,KAAK,MAAM,EAAE,WAAW,kBAAI,SAAS,EAAE,CAAC,EAAE;AAAA,EAChG;AAAA,EACA,kBAAkB;AACd,QAAI,KAAK,UAAU;AAKf,YAAM,eAAe,KAAK,aAAa,cAAc;AACrD,wBAAI,MAAMA,oBAAmB,YAAY,EAAE;AAC3C,wBAAI,SAASA,kBAAiB,EAAE;AAChC,WAAK,WAAW;AAAA,IACpB;AAAA,EACJ;AAAA,EACA,aAAa;AAAA;AAAA,EAEb,2BAA2B,WAAW,UAAU;AAC5C,UAAM,4BAAwB,yCAA0B,QAAQ;AAChE,UAAM,aAAa,qBAAqB,uBAAS,IAAI,sBAAsB,UAAU,SAAS,IAAI;AAClG,WAAO,WAAW,SAAS;AAAA,EAC/B;AACJ;AAvNO,IAAM,cAAN;AACH,cADS,aACF,gBAAe;AAAA,EAClB,GAAG,8BAAgB;AAAA,EACnB,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,UAAU,CAAC;AAAA,EACX,QAAQ;AAAA,EACR,SAAS,CAAC;AAAA,EACV,SAAS,CAAC;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,iBAAiB,oCAAgB,0BAA0B;AAAA,EAC3D,cAAc;AAClB;AA0MG,SAASG,iBAAgB,QAAQ;AACpC,SAAO;AAAA,IACH,MAAM,OAAO;AAAA,IACb,gBAAgB,OAAO,KAAK;AAAA,IAC5B,uBAAuB,OAAO,KAAK;AAAA,IACnC,KAAK,OAAO,KAAK;AAAA;AAAA,IAEjB,UAAU,OAAO;AAAA,EACrB;AACJ;", "names": ["import_core", "canvas", "import_core", "import_core", "import_shadertools", "import_core", "import_core", "module", "import_core", "import_core", "module", "import_core", "import_shadertools", "import_shadertools", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_shadertools", "LOG_DRAW_PRIORITY", "LOG_DRAW_TIMEOUT", "module", "getPlatformInfo"] }