mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
f570c1f02d
* feat(pal): declare startup maximum DPR configuration Add an optional maximum DPR to screen initialization and readonly access to the original DPR and explicitly configured cap. An omitted or null cap retains the platform's existing policy. This is the engine type contract for the staged PAL implementation. Public Screen configuration methods and Native render-target integration remain separate work; this commit does not change runtime rendering. Validated against the PAL engine/four-platform contract check and full npm test (65 source tests, 4 build tests, release/debug module validation). * feat(screen): expose startup maximum DPR configuration Allow applications to set, reset and read a pending maximum DPR before Screen initialization while preserving platform defaults when unconfigured. Lock the configuration at initialization and reject unsupported PAL implementations or options that PAL silently ignores. Add startup validation and compatibility tests. Only implementation and tests are included; local documentation and generated validation artifacts remain outside this commit. Companion PAL commit: 2959778b7acf83dd84e3aab5957d60d80e20c461. Native render-target integration, device acceptance, runtime changes and editor configuration remain separate work. Validation recorded on 2026-09-29: tsc --noEmit; 20 Screen and 6 View tests; public declaration generation; real WebGL demo with simulated host DPR, first-draw, input, reset, late-call rejection and resize checks. Screen source SHA-256 still matches that verified build. * fix(screen): restrict startup DPR configuration to Web * fix(screen): ignore DPR cap calls on non-Web platforms * fix(screen): preserve optional DPR types in native builds * refactor(screen): configure Web DPR through startup settings * refactor(screen): delegate DPR policy and validation to PAL * style(screen): wrap fullscreen method signatures * perf(screen): simplify startup DPR null checks * version update
95 lines
3.4 KiB
JSON
95 lines
3.4 KiB
JSON
{
|
|
"name": "cocos-creator",
|
|
"version": "4.0.0-beta.0",
|
|
"description": "Cocos Creator is a cross-platform 2D & 3D game engine written in C++ and TypeScript, licensed under MIT.",
|
|
"homepage": "http://www.cocos.com",
|
|
"license": "MIT",
|
|
"authors": [
|
|
"AUTHORS.txt"
|
|
],
|
|
"module": "index.js",
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"scripts": {
|
|
"postinstall": "node scripts/spread-pal.cjs && npm run build:debug-infos && npm run build:declaration && node scripts/spread-adapter.cjs && npm run build:native-pack-tool",
|
|
"build": "npm run build:min && npm run build:declaration",
|
|
"build:cli": "npm run build:cli-min && npm run build:declaration",
|
|
"build:adapter": "node ./scripts/build-adapter.js",
|
|
"build:const": "node ./scripts/build-const.js",
|
|
"build:dev": "npm run build:debug-infos && node ./scripts/build-h5-source",
|
|
"build:debug-infos": "node ./scripts/build-debug-infos",
|
|
"build:declaration": "npm run build:const && node ./scripts/build-declarations",
|
|
"build:min": "npm run build:debug-infos && node ./scripts/build-h5-minified",
|
|
"build:native-pack-tool": "cd ./scripts/native-pack-tool && npm install && npm run build",
|
|
"build:cli-min": "npm run build:debug-infos && node ./scripts/build-cli-minified",
|
|
"clear": "node ./scripts/clear-cache.js",
|
|
"clear:platform": "node ./native/utils/clear-platform.js && node ./scripts/clear-file.js",
|
|
"test": "tsc --noEmit && jest",
|
|
"test:dts": "npx tsc ./scripts/test-declarations/test.d.ts",
|
|
"update:engine-version": "node ./scripts/checkout-engine-version.js",
|
|
"update:native-external": "node ./native/utils/update-external.js",
|
|
"verify:engine-version": "node ./scripts/verify-engine-version.js"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/cocos-creator/engine.git"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.13.10",
|
|
"@babel/plugin-proposal-export-default-from": "^7.17.12",
|
|
"@babel/preset-env": "7.8.7",
|
|
"@cocos/babel-preset-cc": "2.2.0",
|
|
"@types/fs-extra": "^5.0.4",
|
|
"@types/yargs": "^12.0.14",
|
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
"@typescript-eslint/parser": "^6.0.0",
|
|
"async": "^2.6.4",
|
|
"axios": "^1.8.2",
|
|
"babelify": "^10.0.0",
|
|
"browserify": "^17.0.0",
|
|
"chalk": "^4.1.2",
|
|
"del": "^6.0.0",
|
|
"eslint": "^8.44.0",
|
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
"eslint-plugin-import": "^2.27.5",
|
|
"fs": "^0.0.1-security",
|
|
"fs-extra": "^7.0.1",
|
|
"ftp": "0.3.10",
|
|
"gulp": "^4.0.2",
|
|
"gulp-rename": "^2.0.0",
|
|
"gulp-uglify": "^3.0.2",
|
|
"jest": "^28.0.2",
|
|
"jest-environment-jsdom": "^28.0.2",
|
|
"jest-extended": "^1.1.0",
|
|
"jest-matcher-deep-close-to": "^2.0.1",
|
|
"node-fetch": "^2.6.1",
|
|
"pngjs": "^6.0.0",
|
|
"progress": "^2.0.3",
|
|
"tar": "^6.1.15",
|
|
"tmp": "^0.2.1",
|
|
"tree-kill": "^1.2.0",
|
|
"ts-jest": "^28.0.8",
|
|
"tslib": "^2.8.1",
|
|
"typescript": "^4.9.5",
|
|
"vinyl-buffer": "^1.0.1",
|
|
"vinyl-source-stream": "^2.0.0",
|
|
"which": "^2.0.2",
|
|
"yargs": "^12.0.5"
|
|
},
|
|
"dependencies": {
|
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
"@cocos/box2d": "1.0.2",
|
|
"@cocos/cannon": "1.2.8",
|
|
"@cocos/ccbuild": "^2.3.21",
|
|
"@cocos/dragonbones-js": "^1.0.1",
|
|
"@cocos/engine-pal": "^1.0.5",
|
|
"@cocos/engine-platforms": "^1.0.6",
|
|
"@types/jest": "^24.9.1"
|
|
},
|
|
"creator": {
|
|
"version": "3.8.8"
|
|
},
|
|
"uuid": "8be51d4a-79ad-481c-adbf-265693b5adbf"
|
|
}
|