hilo3d 1.19.1 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web_naga-D4FbPGzE.js","names":[],"sources":["../node_modules/web-naga/web_naga.js"],"sourcesContent":["let wasm;\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_0.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n/**\n * @enum {0 | 1 | 2 | 4 | 16 | 32}\n */\nexport const GlslWriterFlags = Object.freeze({\n None: 0, \"0\": \"None\",\n AdjustCoordinateSpace: 1, \"1\": \"AdjustCoordinateSpace\",\n TextureShadowLod: 2, \"2\": \"TextureShadowLod\",\n DrawParameters: 4, \"4\": \"DrawParameters\",\n IncludeUnusedItems: 16, \"16\": \"IncludeUnusedItems\",\n ForcePointSize: 32, \"32\": \"ForcePointSize\",\n});\n/**\n * @enum {0 | 1 | 2}\n */\nexport const ShaderStage = Object.freeze({\n Vertex: 0, \"0\": \"Vertex\",\n Fragment: 1, \"1\": \"Fragment\",\n Compute: 2, \"2\": \"Compute\",\n});\n\nconst GlslBackendOptionsFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslbackendoptions_free(ptr >>> 0, 1));\n\nexport class GlslBackendOptions {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslBackendOptions.prototype);\n obj.__wbg_ptr = ptr;\n GlslBackendOptionsFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslBackendOptionsFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslbackendoptions_free(ptr, 0);\n }\n /**\n * @returns {GlslVersion}\n */\n get version() {\n const ret = wasm.__wbg_get_glslbackendoptions_version(this.__wbg_ptr);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {GlslVersion} arg0\n */\n set version(arg0) {\n _assertClass(arg0, GlslVersion);\n var ptr0 = arg0.__destroy_into_raw();\n wasm.__wbg_set_glslbackendoptions_version(this.__wbg_ptr, ptr0);\n }\n /**\n * @returns {ShaderStage}\n */\n get stage() {\n const ret = wasm.__wbg_get_glslbackendoptions_stage(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {ShaderStage} arg0\n */\n set stage(arg0) {\n wasm.__wbg_set_glslbackendoptions_stage(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get flags() {\n const ret = wasm.__wbg_get_glslbackendoptions_flags(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set flags(arg0) {\n wasm.__wbg_set_glslbackendoptions_flags(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {GlslBackendOptions}\n */\n static new() {\n const ret = wasm.glslbackendoptions_new();\n return GlslBackendOptions.__wrap(ret);\n }\n}\n\nconst GlslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslfrontend_free(ptr >>> 0, 1));\n\nexport class GlslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n GlslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslfrontend_free(ptr, 0);\n }\n /**\n * @returns {GlslFrontend}\n */\n static new() {\n const ret = wasm.glslfrontend_new();\n return GlslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @param {ShaderStage} stage\n * @returns {ShaderModule}\n */\n parse(source, stage) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.glslfrontend_parse(this.__wbg_ptr, ptr0, len0, stage);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nconst GlslVersionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslversion_free(ptr >>> 0, 1));\n\nexport class GlslVersion {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslVersion.prototype);\n obj.__wbg_ptr = ptr;\n GlslVersionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslVersionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslversion_free(ptr, 0);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static desktop(version) {\n const ret = wasm.glslversion_desktop(version);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static embedded(version) {\n const ret = wasm.glslversion_embedded(version);\n return GlslVersion.__wrap(ret);\n }\n}\n\nconst ShaderModuleFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_shadermodule_free(ptr >>> 0, 1));\n\nexport class ShaderModule {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ShaderModule.prototype);\n obj.__wbg_ptr = ptr;\n ShaderModuleFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ShaderModuleFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_shadermodule_free(ptr, 0);\n }\n /**\n * @param {string} entry_point\n * @param {GlslBackendOptions} opts\n * @returns {string}\n */\n to_glsl(entry_point, opts) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(opts, GlslBackendOptions);\n var ptr1 = opts.__destroy_into_raw();\n const ret = wasm.shadermodule_to_glsl(this.__wbg_ptr, ptr0, len0, ptr1);\n deferred3_0 = ret[0];\n deferred3_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n /**\n * @returns {string}\n */\n to_wgsl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.shadermodule_to_wgsl(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst WgslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_wgslfrontend_free(ptr >>> 0, 1));\n\nexport class WgslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(WgslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n WgslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n WgslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_wgslfrontend_free(ptr, 0);\n }\n /**\n * @returns {WgslFrontend}\n */\n static new() {\n const ret = wasm.wgslfrontend_new();\n return WgslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @returns {ShaderModule}\n */\n parse(source) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.wgslfrontend_parse(this.__wbg_ptr, ptr0, len0);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_0;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('web_naga_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAAA,IAAI,GAEE,IAAqB,OAAO,cAAgB,MAAc,IAAI,YAAY,SAAS;CAAE,WAAW;CAAM,OAAO;AAAK,CAAC,IAAI,EAAE,cAAc;CAAE,MAAM,MAAM,2BAA2B;AAAE,EAAE;AAEtL,OAA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ED
@@ -1,94 +1,157 @@
1
1
  {
2
2
  "name": "hilo3d",
3
- "version": "1.19.1",
4
- "description": "Hilo3d, a WebGL 3d engine.",
5
- "main": "build/Hilo3d.js",
6
- "types": "types/index.d.ts",
3
+ "version": "2.0.0-alpha.2",
4
+ "description": "A TypeScript-first 3D engine with explicit WebGL 2 and WebGPU backends.",
5
+ "type": "module",
6
+ "types": "./dist/Hilo3d.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/Hilo3d.d.ts",
10
+ "import": "./dist/Hilo3d.js",
11
+ "default": "./dist/Hilo3d.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "dist/",
17
+ "CHANGELOG.md",
18
+ "LICENSE",
19
+ "README.md",
20
+ "README_ZH.md"
21
+ ],
7
22
  "scripts": {
8
- "test": "npm run eslint && gulp test",
9
- "watch": "webpack --watch --env.development",
10
- "dev": "npm run watch",
11
- "debug": "webpack --watch --env.debug",
12
- "build": " webpack",
13
- "release": "tnpm update && webpack -p",
14
- "doc": "gulp readme && jsdoc -c doc.conf.json",
15
- "doc-tsd": "jsdoc -c tsd-doc.conf.json && gulp addHilo3dTSD",
16
- "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r",
17
- "eslint": "eslint ./src",
18
- "eslint-fix": "eslint --fix ./src",
19
- "seinjs-dev": "webpack --watch --env.development --seinjs",
20
- "seinjs-build": "webpack --env.development --seinjs",
21
- "preversion": "npm run build && npm test",
22
- "version": "npm run release && npm run doc && npm run doc-tsd && npm run changelog && git add -A",
23
- "postpublish": "git push --tags",
24
- "major": "npm version major",
25
- "minor": "npm version minor",
26
- "patch": "npm version patch"
23
+ "clean": "rimraf .cache coverage dist dist-examples docs playwright-report reports site test-results",
24
+ "clean:build": "rimraf .cache/types .cache/tsconfig.lib.tsbuildinfo dist",
25
+ "dev": "vite --host 0.0.0.0",
26
+ "examples:dev": "vite --config vite.examples.config.ts --host 0.0.0.0",
27
+ "examples:serve": "vite --config vite.examples.config.ts --host 0.0.0.0 --port 4173 --strictPort --open /examples/index.html",
28
+ "examples:build": "vite build --config vite.examples.config.ts",
29
+ "examples:test": "npm run test:ui",
30
+ "build": "npm run clean:build && npm run build:js && npm run build:types",
31
+ "build:js": "vite build",
32
+ "build:types": "tsc -p tsconfig.lib.json && jiti scripts/build-types.ts",
33
+ "check:modernity": "jiti scripts/check-modernity.ts",
34
+ "typecheck": "tsc -b --force --pretty",
35
+ "typecheck:ci": "tsc -b --pretty",
36
+ "typecheck:clean": "tsc -b --clean",
37
+ "lint": "npm run build:types && npm run lint:built",
38
+ "lint:built": "eslint . --max-warnings 0",
39
+ "lint:fix": "npm run build:types && npm run lint:built -- --fix",
40
+ "format": "prettier --write .",
41
+ "format:check": "prettier --check .",
42
+ "test": "npm run test:unit",
43
+ "test:unit": "vitest run",
44
+ "test:skill": "jiti scripts/check-hilo3d-skill.ts",
45
+ "test:rhi": "vitest run --config vitest.rhi.config.ts test/spec/rhi/portable && vitest run --config vitest.rhi-native.config.ts test/spec/rhi/portable/WebGPUBackend.native.test.ts",
46
+ "test:rhi-benchmark-contract": "vitest run --config test/performance/vitest.config.ts",
47
+ "test:rhi-benchmark-smoke": "jiti scripts/performance/smoke-rhi-production-fixture.ts",
48
+ "test:rhi-benchmark-smoke:ci": "npm run test:rhi-benchmark-smoke -- --backend=webgl2",
49
+ "benchmark:rhi:audit-environment": "jiti scripts/performance/audit-rhi-benchmark-environment.ts",
50
+ "benchmark:rhi:preflight": "jiti scripts/performance/rhi-phase0-preflight.ts",
51
+ "benchmark:rhi:collect": "jiti scripts/performance/collect-rhi-benchmark.ts",
52
+ "benchmark:rhi:summarize": "jiti scripts/performance/summarize-rhi-benchmark.ts",
53
+ "benchmark:rhi:verify": "jiti scripts/performance/verify-rhi-baseline.ts",
54
+ "benchmark:rhi:freeze": "jiti scripts/performance/freeze-rhi-baseline.ts",
55
+ "benchmark:rhi:report": "jiti scripts/performance/render-rhi-benchmark-report.ts",
56
+ "test:render:architecture": "vitest run test/spec/renderer/Renderer.test.ts test/spec/renderer/RenderPerformanceArchitecture.test.ts test/spec/rhi/RHIArchitecture.test.ts test/spec/rhi/portable/RHIArchitecture.test.ts test/spec/rhi/portable/WebGL2Backend.test.ts test/spec/rhi/portable/WebGPUBackend.test.ts",
57
+ "test:coverage": "vitest run --coverage",
58
+ "test:watch": "vitest",
59
+ "test:ui:contract": "vitest run --config test/ui/vitest-contract.config.ts",
60
+ "test:ui": "npm run test:ui:contract && playwright test test/ui/examples.spec.ts test/ui/post-processing.spec.ts test/ui/runtime-parity.spec.ts --project=chromium",
61
+ "test:ui:webgl2": "npm run test:ui:contract && playwright test test/ui/examples.spec.ts test/ui/post-processing.spec.ts test/ui/runtime-parity.spec.ts --project=chromium --grep @webgl2",
62
+ "test:ui:webgl2:ci": "playwright test test/ui/examples.spec.ts test/ui/post-processing.spec.ts test/ui/runtime-parity.spec.ts test/ui/visual.spec.ts --project=chromium --grep \"@webgl2|through webgl2\"",
63
+ "test:ui:webgpu": "npm run test:ui:contract && playwright test test/ui/examples.spec.ts test/ui/post-processing.spec.ts test/ui/runtime-parity.spec.ts --project=chromium --grep @webgpu",
64
+ "test:webgpu": "playwright test test/ui/webgpu.spec.ts test/ui/compute-effects.spec.ts test/ui/compute-particles.spec.ts test/ui/compute-raytracing.spec.ts --project=chromium",
65
+ "test:webgpu:native": "playwright test test/ui/native-webgpu.spec.ts --project=chromium-native-webgpu",
66
+ "test:visual": "playwright test --project=chromium --grep @visual",
67
+ "test:visual:webgl2": "playwright test test/ui/visual.spec.ts --project=chromium --grep \"through webgl2\"",
68
+ "test:browser": "npm run test:webgpu && npm run test:ui && npm run test:visual",
69
+ "test:browser:ci": "npm run test:ui:webgl2 && npm run test:visual:webgl2",
70
+ "test:types": "tsc -p test/types/tsconfig.bundler.json && tsc -p test/types/tsconfig.nodenext.json",
71
+ "test:package": "npm run build && npm run test:package:built",
72
+ "test:package:built": "publint && attw --pack . --profile esm-only && jiti scripts/test-package.ts",
73
+ "api:update": "npm run build:types && api-extractor run --local --typescript-compiler-folder node_modules/typescript",
74
+ "api:check": "npm run build:types && npm run api:check:built",
75
+ "api:check:built": "api-extractor run --typescript-compiler-folder node_modules/typescript",
76
+ "docs:build": "npm run build:types && npm run docs:build:built",
77
+ "docs:build:built": "typedoc",
78
+ "docs:check": "npm run build:types && npm run docs:check:built",
79
+ "docs:check:built": "typedoc --emit none",
80
+ "site:build": "npm run build:types && npm run site:build:built",
81
+ "site:build:built": "npm run docs:build:built && npm run examples:build && jiti scripts/build-site.ts && npm run site:check:links",
82
+ "site:check:links": "jiti scripts/check-site-links.ts",
83
+ "pack:check": "npm pack --dry-run --ignore-scripts",
84
+ "publish:check": "npm run check:modernity && npm run test:skill",
85
+ "release:check": "npm run validate",
86
+ "validate": "npm run clean && npm run check:modernity && npm run format:check && npm run lint && npm run typecheck && npm run test:skill && npm run test:coverage && npm run test:rhi && npm run test:rhi-benchmark-contract && npm run build && npm run test:types && npm run test:browser && npm run examples:build && npm run docs:check:built && npm run api:check:built && npm run test:package:built && npm run pack:check",
87
+ "validate:ci": "npm run clean && npm run check:modernity && npm run format:check && npm run lint && npm run typecheck:ci && npm run test:skill && npm run test:rhi-benchmark-contract && npm run test:coverage && npm run test:rhi && npm run build && npm run test:types && npm run test:browser:ci && npm run examples:build && npm run docs:check:built && npm run api:check:built && npm run test:package:built && npm run pack:check",
88
+ "prepack": "npm run build",
89
+ "prepublishOnly": "npm run publish:check"
27
90
  },
28
91
  "repository": {
29
92
  "type": "git",
30
- "url": "https://github.com/hiloteam/Hilo3d.git"
93
+ "url": "git+https://github.com/hiloteam/Hilo3d.git"
31
94
  },
32
95
  "keywords": [
33
96
  "hilo",
34
97
  "3d",
35
- "WebGL"
98
+ "webgl",
99
+ "webgl2",
100
+ "webgpu",
101
+ "typescript"
36
102
  ],
37
103
  "author": "06wj",
38
104
  "license": "MIT",
39
105
  "bugs": {
40
106
  "url": "https://github.com/hiloteam/Hilo3d/issues"
41
107
  },
42
- "homepage": "https://hiloteam.github.io/Hilo3d",
43
- "devDependencies": {
44
- "@babel/core": "^7.1.0",
45
- "@babel/preset-env": "^7.1.0",
46
- "@hilo/tsd-jsdoc": "^0.1.5",
47
- "babel-loader": "^8.0.2",
48
- "conventional-changelog-cli": "^2.0.31",
49
- "del": "^3.0.0",
50
- "eslint": "^5.6.0",
51
- "eslint-config-airbnb-base": "^13.1.0",
52
- "eslint-loader": "^2.1.1",
53
- "eslint-plugin-import": "~2.22.0",
54
- "glslify": "^6.0.1",
55
- "glslify-import-loader": "^0.1.2",
56
- "glslify-loader": "^1.0.2",
57
- "gulp": "^4.0.2",
58
- "gulp-concat": "^2.6.1",
59
- "gulp-replace": "^1.0.0",
60
- "gulp-uitest": "^13.0.0",
61
- "jsdoc": "^3.6.4",
62
- "mocha": "^5.2.0",
63
- "raw-loader": "^0.5.1",
64
- "should": "^13.2.3",
65
- "should-sinon": "^0.0.6",
66
- "sinon": "^6.3.4",
67
- "string-replace-loader": "^2.1.1",
68
- "webpack": "^4.20.2",
69
- "webpack-cli": "^3.1.1",
70
- "wrapper-webpack-plugin": "^2.0.0"
108
+ "homepage": "https://hilo3d.js.org",
109
+ "publishConfig": {
110
+ "access": "public",
111
+ "registry": "https://registry.npmjs.org/"
112
+ },
113
+ "engines": {
114
+ "node": ">=20.19.0"
115
+ },
116
+ "packageManager": "npm@10.9.4",
117
+ "devEngines": {
118
+ "runtime": {
119
+ "name": "node",
120
+ "version": ">=20.19.0",
121
+ "onFail": "error"
122
+ },
123
+ "packageManager": {
124
+ "name": "npm",
125
+ "onFail": "error"
126
+ }
71
127
  },
72
128
  "dependencies": {
73
- "amc": "^1.0.6",
74
- "gl-matrix": "^2.4.0",
75
- "glsl-transpose": "^1.0.0",
76
- "object-assign": "^4.1.1",
77
- "object-values": "^2.0.0",
78
- "object.keys": "^0.1.0",
79
- "parse-hdr": "^1.0.0",
80
- "pinkie-promise": "^2.0.1",
81
- "ray-3d": "^1.1.1",
82
- "webgl-debug": "^2.0.1"
129
+ "gl-matrix": "^3.4.4",
130
+ "web-naga": "1.0.1"
83
131
  },
84
- "files": [
85
- "build/",
86
- "examples/js/",
87
- "types/",
88
- "CHANGELOG.md",
89
- "LICENSE",
90
- "package.json",
91
- "README.md",
92
- "README_ZH.md"
93
- ]
132
+ "devDependencies": {
133
+ "@arethetypeswrong/cli": "^0.18.5",
134
+ "@eslint/js": "^10.0.1",
135
+ "@microsoft/api-extractor": "^7.58.11",
136
+ "@playwright/test": "^1.61.1",
137
+ "@types/node": "^20.19.43",
138
+ "@types/webxr": "0.5.24",
139
+ "@vitest/browser-playwright": "^4.1.10",
140
+ "@vitest/coverage-v8": "^4.1.10",
141
+ "cannon-es": "0.20.0",
142
+ "eslint": "^10.7.0",
143
+ "eslint-config-prettier": "^10.1.8",
144
+ "jiti": "^2.7.0",
145
+ "playwright": "^1.61.1",
146
+ "prettier": "^3.9.5",
147
+ "publint": "^0.3.21",
148
+ "rimraf": "^6.1.3",
149
+ "rollup": "^4.62.2",
150
+ "rollup-plugin-dts": "^6.4.1",
151
+ "typedoc": "^0.28.20",
152
+ "typescript": "^6.0.3",
153
+ "typescript-eslint": "^8.64.0",
154
+ "vite": "^8.1.5",
155
+ "vitest": "^4.1.10"
156
+ }
94
157
  }