@lightningjs/solid
Advanced tools
Comparing version 0.8.7 to 0.9.0
@@ -44,24 +44,5 @@ import { createSignal, createEffect, mergeProps as mergeProps$1, createRoot, createRenderEffect, createMemo, createComponent as createComponent$1, untrack } from 'solid-js'; | ||
let createShader; | ||
const defaultOptions = { | ||
appWidth: 1920, | ||
appHeight: 1080, | ||
deviceLogicalPixelRatio: 0.6666667, | ||
devicePhysicalPixelRatio: 1, | ||
rootId: 'app', | ||
threadXCoreWorkerUrl: undefined | ||
}; | ||
function startLightningRenderer(options = {}) { | ||
const driver = new MainRenderDriver(); | ||
const resolvedOptions = { | ||
...defaultOptions, | ||
...options | ||
}; | ||
renderer = new RendererMain({ | ||
appWidth: resolvedOptions.appWidth, | ||
appHeight: resolvedOptions.appHeight, | ||
deviceLogicalPixelRatio: resolvedOptions.deviceLogicalPixelRatio, | ||
devicePhysicalPixelRatio: resolvedOptions.devicePhysicalPixelRatio, | ||
clearColor: resolvedOptions.clearColor, | ||
coreExtensionModule: resolvedOptions.coreExtensionModule | ||
}, resolvedOptions.rootId, driver); | ||
renderer = new RendererMain(options, options.rootId || 'app', driver); | ||
createShader = renderer.createShader.bind(renderer); | ||
@@ -68,0 +49,0 @@ return renderer; |
@@ -20,26 +20,7 @@ /* | ||
export let createShader; | ||
const defaultOptions = { | ||
appWidth: 1920, | ||
appHeight: 1080, | ||
deviceLogicalPixelRatio: 0.6666667, | ||
devicePhysicalPixelRatio: 1, | ||
rootId: 'app', | ||
threadXCoreWorkerUrl: undefined, | ||
}; | ||
export function startLightningRenderer(options = {}) { | ||
const driver = new MainRenderDriver(); | ||
const resolvedOptions = { | ||
...defaultOptions, | ||
...options, | ||
}; | ||
renderer = new RendererMain({ | ||
appWidth: resolvedOptions.appWidth, | ||
appHeight: resolvedOptions.appHeight, | ||
deviceLogicalPixelRatio: resolvedOptions.deviceLogicalPixelRatio, | ||
devicePhysicalPixelRatio: resolvedOptions.devicePhysicalPixelRatio, | ||
clearColor: resolvedOptions.clearColor, | ||
coreExtensionModule: resolvedOptions.coreExtensionModule, | ||
}, resolvedOptions.rootId, driver); | ||
renderer = new RendererMain(options, options.rootId || 'app', driver); | ||
createShader = renderer.createShader.bind(renderer); | ||
return renderer; | ||
} |
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.8.7", | ||
"version": "0.9.0", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -32,11 +32,2 @@ /* | ||
const defaultOptions: SolidRendererOptions = { | ||
appWidth: 1920, | ||
appHeight: 1080, | ||
deviceLogicalPixelRatio: 0.6666667, | ||
devicePhysicalPixelRatio: 1, | ||
rootId: 'app', | ||
threadXCoreWorkerUrl: undefined, | ||
}; | ||
export function startLightningRenderer( | ||
@@ -46,19 +37,4 @@ options: Partial<SolidRendererOptions> = {}, | ||
const driver = new MainRenderDriver(); | ||
const resolvedOptions: SolidRendererOptions = { | ||
...defaultOptions, | ||
...options, | ||
}; | ||
renderer = new RendererMain( | ||
{ | ||
appWidth: resolvedOptions.appWidth, | ||
appHeight: resolvedOptions.appHeight, | ||
deviceLogicalPixelRatio: resolvedOptions.deviceLogicalPixelRatio, | ||
devicePhysicalPixelRatio: resolvedOptions.devicePhysicalPixelRatio, | ||
clearColor: resolvedOptions.clearColor, | ||
coreExtensionModule: resolvedOptions.coreExtensionModule, | ||
}, | ||
resolvedOptions.rootId, | ||
driver, | ||
); | ||
renderer = new RendererMain(options, options.rootId || 'app', driver); | ||
@@ -65,0 +41,0 @@ createShader = renderer.createShader.bind(renderer); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285043
4441