├── settings └── v2 │ └── packages │ ├── device.json │ ├── builder.json │ ├── program.json │ ├── project.json │ ├── cocos-service.json │ └── engine.json ├── assets ├── res │ ├── sprites │ │ ├── auto-atlas.pac │ │ ├── off.png │ │ ├── on.png │ │ ├── bmfont.png │ │ ├── sprite_splash.png │ │ ├── auto-atlas.pac.meta │ │ ├── on.png.meta │ │ ├── off.png.meta │ │ ├── bmfont.png.meta │ │ ├── sprite_splash.png.meta │ │ └── bmfont.fnt │ ├── model │ │ ├── Atlas.png │ │ ├── normal │ │ │ ├── ao.jpg │ │ │ ├── pbr.jpg │ │ │ ├── normal.jpg │ │ │ ├── diffuse.jpg │ │ │ ├── ao.jpg.meta │ │ │ ├── pbr.jpg.meta │ │ │ ├── normal.jpg.meta │ │ │ └── diffuse.jpg.meta │ │ ├── Mech_BarbaraTheBee.fbx │ │ ├── normal.meta │ │ └── Atlas.png.meta │ ├── mat │ │ ├── floor │ │ │ ├── Tile_Albedo.jpg │ │ │ ├── Tile_Normal.jpg │ │ │ ├── floorBlinnPhong.mtl.meta │ │ │ ├── floorPBR.mtl.meta │ │ │ ├── Tile_Albedo.jpg.meta │ │ │ ├── Tile_Normal.jpg.meta │ │ │ ├── floorBlinnPhong.mtl │ │ │ └── floorPBR.mtl │ │ ├── ball │ │ │ ├── Lambert.mtl.meta │ │ │ ├── unlit.mtl.meta │ │ │ ├── HalfLambert.mtl.meta │ │ │ ├── pbr.mtl.meta │ │ │ ├── toon.mtl.meta │ │ │ ├── blinnphong.mtl.meta │ │ │ ├── unlit.mtl │ │ │ ├── Lambert.mtl │ │ │ ├── HalfLambert.mtl │ │ │ ├── blinnphong.mtl │ │ │ ├── pbr.mtl │ │ │ └── toon.mtl │ │ ├── robot │ │ │ ├── Lambert.mtl.meta │ │ │ ├── PBR.mtl.meta │ │ │ ├── Toon.mtl.meta │ │ │ ├── unlit.mtl.meta │ │ │ ├── HalfLambert.mtl.meta │ │ │ ├── instancing.mtl.meta │ │ │ ├── Blinn-Phong.mtl.meta │ │ │ ├── ToonOutline.mtl.meta │ │ │ ├── unlit.mtl │ │ │ ├── Lambert.mtl │ │ │ ├── Blinn-Phong.mtl │ │ │ ├── HalfLambert.mtl │ │ │ ├── instancing.mtl │ │ │ ├── PBR.mtl │ │ │ ├── Toon.mtl │ │ │ └── ToonOutline.mtl │ │ ├── Depth-Text.mtl.meta │ │ ├── ball.meta │ │ ├── floor.meta │ │ ├── robot.meta │ │ └── Depth-Text.mtl │ ├── skybox │ │ ├── anime_cyberpunk_factory_no_human.jpg │ │ ├── anime_cyberpunk_factory_no_human_reflection.png │ │ ├── anime_cyberpunk_factory_no_human_reflection_convolution │ │ │ ├── mipmap_0.png │ │ │ ├── mipmap_1.png │ │ │ ├── mipmap_2.png │ │ │ ├── mipmap_3.png │ │ │ ├── mipmap_4.png │ │ │ ├── mipmap_5.png │ │ │ ├── mipmap_0.png.meta │ │ │ ├── mipmap_1.png.meta │ │ │ ├── mipmap_2.png.meta │ │ │ ├── mipmap_3.png.meta │ │ │ ├── mipmap_4.png.meta │ │ │ └── mipmap_5.png.meta │ │ ├── anime_cyberpunk_factory_no_human_reflection_convolution.meta │ │ ├── anime_cyberpunk_factory_no_human.jpg.meta │ │ └── anime_cyberpunk_factory_no_human_reflection.png.meta │ ├── effect │ │ ├── Lambert.effect.meta │ │ ├── HalfLambert.effect.meta │ │ ├── Blinn-Phong.effect.meta │ │ ├── Toon-Shading.effect.meta │ │ ├── Lambert.effect │ │ ├── HalfLambert.effect │ │ ├── Blinn-Phong.effect │ │ └── Toon-Shading.effect │ ├── effect.meta │ ├── mat.meta │ ├── model.meta │ ├── prefabs.meta │ ├── skybox.meta │ ├── sprites.meta │ └── prefabs │ │ ├── menuItem.prefab.meta │ │ ├── SelectMenu.prefab.meta │ │ ├── menuItem.prefab │ │ └── SelectMenu.prefab ├── scripts │ ├── sceneMgr.ts.meta │ ├── menu │ │ ├── MenuItem.ts.meta │ │ ├── MenuContainer.ts.meta │ │ ├── MenuItem.ts │ │ └── MenuContainer.ts │ ├── menu.meta │ ├── orbit-camera.ts.meta │ ├── sceneMgr.ts │ └── orbit-camera.ts ├── scene.scene.meta ├── res.meta ├── prefabs.meta ├── scripts.meta └── prefabs │ ├── PBR Test.prefab.meta │ ├── Toon Test.prefab.meta │ ├── Unlit Test.prefab.meta │ ├── DefaultScene.prefab.meta │ ├── Lambert Test.prefab.meta │ ├── Outline Test.prefab.meta │ ├── BlinnPhong Test.prefab.meta │ ├── HalfLambert Test.prefab.meta │ └── Instancing Test.prefab.meta ├── package.json ├── tsconfig.json └── README.md /settings/v2/packages/device.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.1" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.3.4" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/program.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.3" 3 | } 4 | -------------------------------------------------------------------------------- /assets/res/sprites/auto-atlas.pac: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.SpriteAtlas" 3 | } 4 | -------------------------------------------------------------------------------- /assets/res/model/Atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/Atlas.png -------------------------------------------------------------------------------- /assets/res/sprites/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/sprites/off.png -------------------------------------------------------------------------------- /assets/res/sprites/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/sprites/on.png -------------------------------------------------------------------------------- /assets/res/sprites/bmfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/sprites/bmfont.png -------------------------------------------------------------------------------- /assets/res/model/normal/ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/normal/ao.jpg -------------------------------------------------------------------------------- /assets/res/model/normal/pbr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/normal/pbr.jpg -------------------------------------------------------------------------------- /assets/res/model/normal/normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/normal/normal.jpg -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Albedo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/mat/floor/Tile_Albedo.jpg -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/mat/floor/Tile_Normal.jpg -------------------------------------------------------------------------------- /assets/res/model/normal/diffuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/normal/diffuse.jpg -------------------------------------------------------------------------------- /assets/res/sprites/sprite_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/sprites/sprite_splash.png -------------------------------------------------------------------------------- /assets/res/model/Mech_BarbaraTheBee.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/model/Mech_BarbaraTheBee.fbx -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human.jpg -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LightModel", 3 | "uuid": "a2e5a39d-3c09-441b-a1f6-bdaf3cf8d754", 4 | "creator": { 5 | "version": "3.7.2" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /assets/res/effect/Lambert.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.6.3","importer":"effect","imported":true,"uuid":"0cc8d39a-486b-417f-86ab-d81d643f002a","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/Lambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"f678f34c-6815-4be6-97e7-f60bd5f3bbf2","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/unlit.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"4c204c88-aa8f-421a-b195-d6ea9a402989","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Lambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"9270e552-cc2f-43c0-aee2-54876cebefa1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/PBR.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"bf1a5b33-e7c0-41d8-a072-a1ad468aa5e5","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Toon.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"618747a5-49b4-4d2b-90ed-b15f27197b5d","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/unlit.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"adc63bf0-3824-4432-a629-b409d82e43c7","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection.png -------------------------------------------------------------------------------- /assets/res/effect/HalfLambert.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.6.3","importer":"effect","imported":true,"uuid":"1b403630-12eb-4b45-b0f6-a64c80b89d58","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/HalfLambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"62724f57-4bd4-4002-859d-5e295aa73eba","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/HalfLambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"3fff4d99-a683-491c-97fc-747b7507af0b","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/instancing.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"35361dec-d382-4c3d-b2f4-4d4b127a5bb8","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorBlinnPhong.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"d4412da5-69a5-43d4-ad62-b85bb66b53af","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /settings/v2/packages/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.4", 3 | "general": { 4 | "designResolution": { 5 | "width": 1334, 6 | "height": 750 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_0.png -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_1.png -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_2.png -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_3.png -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_4.png -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/LightingModel/HEAD/assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_5.png -------------------------------------------------------------------------------- /assets/scripts/sceneMgr.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "e71e6041-5944-40e3-803d-c49ddfe38b9b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/menu/MenuItem.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "296065f6-8830-48a4-ae91-0875b89a0fb9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | /* Base configuration. Do not edit this field. */ 3 | "extends": "./temp/tsconfig.cocos.json", 4 | 5 | /* Add your custom configuration here. */ 6 | "compilerOptions": { 7 | "strict": false 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/menu/MenuContainer.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6d258c91-78d5-421e-9ddb-1ec8bfc4e307", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scene.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "9ba17609-ceb2-40ee-baa0-4c9be490ebc8", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/pbr.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "da8459fd-00d3-4c5d-96be-dd6af6321467", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/toon.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "6bb6cd6d-61da-465d-8e32-01b462c05474", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/effect/Blinn-Phong.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.6.3", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "26d250a3-731a-4886-a39d-4464727e18e9", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/Depth-Text.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "14f5bd40-dc98-49b6-b524-016ca00dcda3", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorPBR.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "9411b7df-bb2c-409c-9f23-a41d46d325ca", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/effect/Toon-Shading.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.6.3", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/blinnphong.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "c0f80241-b441-456d-bf09-d70972dc275d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Blinn-Phong.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "1f6cd25a-05a1-4625-93e2-984cc2933ef4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/robot/ToonOutline.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "fac91bfb-a21a-425f-8ead-e3c5106e86db", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0e75ae5b-da7f-4a6d-a3c8-fdcce2f1cd01", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f1e231de-6c71-45b8-8f37-a44d9ec32f66", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0f9c12ec-6221-420a-ba6f-b171a97ac923", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "87fd4071-06e8-4d4a-8b0a-7831003e73e0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/model.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "50010d68-4e78-47da-becb-7df6fafafae5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "3922ce52-7972-4709-bb67-39aeeaa508a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/skybox.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ea598ebd-b8b4-4f11-a104-677491ffb5bd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/sprites.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "415b6772-fb56-4452-bcf9-2f378bfb4b03", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/scripts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "1d417d61-5905-4957-b23d-7355bbcb601d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/ball.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "5aa83ff9-7db6-4c22-9440-2d49c84d0179", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/floor.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d7ff399a-a854-4009-8877-7f184a8265ce", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/robot.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "12122200-4f40-423c-8e85-5d81f3f83159", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/model/normal.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "fffd6858-3212-4edc-bb52-3d99ed805496", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/scripts/menu.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "78e9aac2-c12a-49a5-93d8-fbf43fce638c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/prefabs/PBR Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "db416a7a-ef50-4c24-b749-1780b81ee556", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "PBR Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Toon Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "31514b02-a618-4ee4-acfa-a2b5b215730a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Toon Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Unlit Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "c974daa1-812c-40d3-bbb1-c65328082b95", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Unlit Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/res/prefabs/menuItem.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "cc9403fe-0b8e-4f43-afca-42fe22b9d9f2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "menuItem" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/DefaultScene.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "56172057-5403-41cd-8526-921a8b49ff52", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "DefaultScene" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Lambert Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "2bf0d501-6245-4dc4-9eb2-42e1535e9112", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Lambert Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Outline Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "6a241440-d903-4869-a21e-867939eb6aed", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Outline Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/res/prefabs/SelectMenu.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "253d3103-f912-4892-a436-ef886a66baab", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "SelectMenu" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/BlinnPhong Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "16289bab-2c64-4055-af8f-423b03fc4457", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "BlinnPhong Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/HalfLambert Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "da73c735-2798-449b-9cb3-1411a4b4a33f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "HalfLambert Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Instancing Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "57c9dcbb-cdf5-4d38-94ab-1a2371c1c1c0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Instancing Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "45cd3162-a1a5-464d-92a6-84aa9d532500", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/scripts/orbit-camera.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6be7df01-865a-4916-86ed-324c4c5ef55a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "moduleId": "project:///assets/src/utils/orbit-camera.js", 10 | "importerSettings": 4, 11 | "simulateGlobals": [] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /settings/v2/packages/cocos-service.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "3.0.7", 3 | "game": { 4 | "name": "UNKNOW GAME", 5 | "app_id": "UNKNOW", 6 | "c_id": "0" 7 | }, 8 | "appConfigMaps": [ 9 | { 10 | "app_id": "UNKNOW", 11 | "config_id": "3ec565" 12 | } 13 | ], 14 | "configs": [ 15 | { 16 | "app_id": "UNKNOW", 17 | "config_id": "3ec565", 18 | "config_name": "Default", 19 | "config_remarks": "", 20 | "services": [] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /assets/res/mat/Depth-Text.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "60f7195c-ec2a-45eb-ba94-8955f60e81d0", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true 14 | } 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": { 20 | "depthTest": true, 21 | "depthWrite": true 22 | }, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | } 29 | ], 30 | "_props": [ 31 | {} 32 | ] 33 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/unlit.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true 14 | } 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | } 26 | ], 27 | "_props": [ 28 | { 29 | "mainTexture": { 30 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 31 | "__expectedType__": "cc.Texture2D" 32 | } 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/unlit.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true, 14 | "ALPHA_TEST_CHANNEL": "r" 15 | } 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | } 27 | ], 28 | "_props": [ 29 | { 30 | "mainTexture": { 31 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 32 | "__expectedType__": "cc.Texture2D" 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /assets/res/sprites/auto-atlas.pac.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.8", 3 | "importer": "auto-atlas", 4 | "imported": true, 5 | "uuid": "c586bb4a-9ba9-4da0-9107-74f250d7f5ca", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "maxWidth": 1024, 12 | "maxHeight": 1024, 13 | "padding": 2, 14 | "allowRotation": true, 15 | "forceSquared": false, 16 | "powerOfTwo": false, 17 | "algorithm": "MaxRects", 18 | "format": "png", 19 | "quality": 80, 20 | "contourBleed": true, 21 | "paddingBleed": true, 22 | "filterUnused": true, 23 | "removeTextureInBundle": true, 24 | "removeImageInBundle": true, 25 | "removeSpriteAtlasInBundle": true, 26 | "compressSettings": {}, 27 | "textureSetting": { 28 | "wrapModeS": "repeat", 29 | "wrapModeT": "repeat", 30 | "minfilter": "linear", 31 | "magfilter": "linear", 32 | "mipfilter": "none", 33 | "anisotropy": 0 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /assets/res/model/Atlas.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f6991aef-7f02-4d23-b5f1-48040b943c9a", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 14 | "displayName": "Atlas", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f6991aef-7f02-4d23-b5f1-48040b943c9a", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/ao.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6ee1a690-5763-4496-90d5-b8895bd3d249", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6ee1a690-5763-4496-90d5-b8895bd3d249@6c48a", 14 | "displayName": "ao", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6ee1a690-5763-4496-90d5-b8895bd3d249", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "6ee1a690-5763-4496-90d5-b8895bd3d249@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/pbr.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f6134021-c72b-4a0b-8c14-b9e6e454925a", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a", 14 | "displayName": "pbr", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f6134021-c72b-4a0b-8c14-b9e6e454925a", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/normal.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f0f6ff34-bd30-4d43-a22c-d675857c244e", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 14 | "displayName": "normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f0f6ff34-bd30-4d43-a22c-d675857c244e", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/diffuse.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 14 | "displayName": "diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Albedo.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 14 | "displayName": "Tile_Albedo", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Normal.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "8b42b8da-a486-4495-8f73-45db33830247", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 14 | "displayName": "Tile_Normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "8b42b8da-a486-4495-8f73-45db33830247", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "8b42b8da-a486-4495-8f73-45db33830247@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_0.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "13a19b17-1944-4260-8cc8-3e4cad5d7b89", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "13a19b17-1944-4260-8cc8-3e4cad5d7b89@6c48a", 14 | "displayName": "mipmap_0", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "13a19b17-1944-4260-8cc8-3e4cad5d7b89", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "13a19b17-1944-4260-8cc8-3e4cad5d7b89@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_1.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "ef57404e-d223-4c51-aa8a-7a340754681b", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "ef57404e-d223-4c51-aa8a-7a340754681b@6c48a", 14 | "displayName": "mipmap_1", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "ef57404e-d223-4c51-aa8a-7a340754681b", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "ef57404e-d223-4c51-aa8a-7a340754681b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_2.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "9321212b-d1d6-40e4-bd35-64bbb65f1cd4", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "9321212b-d1d6-40e4-bd35-64bbb65f1cd4@6c48a", 14 | "displayName": "mipmap_2", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "9321212b-d1d6-40e4-bd35-64bbb65f1cd4", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "9321212b-d1d6-40e4-bd35-64bbb65f1cd4@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_3.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "7a306139-c3e8-42b6-8d58-8f1bc229b224", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "7a306139-c3e8-42b6-8d58-8f1bc229b224@6c48a", 14 | "displayName": "mipmap_3", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "7a306139-c3e8-42b6-8d58-8f1bc229b224", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "7a306139-c3e8-42b6-8d58-8f1bc229b224@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_4.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6b821945-fdc4-4d5d-a093-e73dfde7dd4d", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6b821945-fdc4-4d5d-a093-e73dfde7dd4d@6c48a", 14 | "displayName": "mipmap_4", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6b821945-fdc4-4d5d-a093-e73dfde7dd4d", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "6b821945-fdc4-4d5d-a093-e73dfde7dd4d@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection_convolution/mipmap_5.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "e87fb51b-dd7c-4904-ba39-803653b04c3a", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "e87fb51b-dd7c-4904-ba39-803653b04c3a@6c48a", 14 | "displayName": "mipmap_5", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "e87fb51b-dd7c-4904-ba39-803653b04c3a", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "e87fb51b-dd7c-4904-ba39-803653b04c3a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Lambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "0cc8d39a-486b-417f-86ab-d81d643f002a", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "shininess": 0 58 | }, 59 | {} 60 | ] 61 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/Blinn-Phong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "shininess": 0.5 58 | }, 59 | {} 60 | ] 61 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/Lambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "0cc8d39a-486b-417f-86ab-d81d643f002a", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 255, 47 | "g": 255, 48 | "b": 255, 49 | "a": 255 50 | }, 51 | "normalMap": { 52 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 53 | "__expectedType__": "cc.Texture2D" 54 | }, 55 | "normalStrength": 1.795 56 | }, 57 | {} 58 | ] 59 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/HalfLambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1b403630-12eb-4b45-b0f6-a64c80b89d58", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 255, 47 | "g": 255, 48 | "b": 255, 49 | "a": 255 50 | }, 51 | "normalMap": { 52 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 53 | "__expectedType__": "cc.Texture2D" 54 | }, 55 | "normalStrength": 2.185 56 | }, 57 | {} 58 | ] 59 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/HalfLambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1b403630-12eb-4b45-b0f6-a64c80b89d58", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "diffuseWrap": 0.573, 58 | "shininess": 0 59 | }, 60 | {} 61 | ] 62 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/instancing.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_INSTANCING": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | { 17 | "USE_INSTANCING": true 18 | } 19 | ], 20 | "_states": [ 21 | { 22 | "rasterizerState": {}, 23 | "depthStencilState": {}, 24 | "blendState": { 25 | "targets": [ 26 | {} 27 | ] 28 | } 29 | }, 30 | { 31 | "rasterizerState": {}, 32 | "depthStencilState": {}, 33 | "blendState": { 34 | "targets": [ 35 | {} 36 | ] 37 | } 38 | } 39 | ], 40 | "_props": [ 41 | { 42 | "mainTexture": { 43 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 44 | "__expectedType__": "cc.Texture2D" 45 | }, 46 | "mainColor": { 47 | "__type__": "cc.Color", 48 | "r": 240, 49 | "g": 240, 50 | "b": 240, 51 | "a": 255 52 | }, 53 | "rimLightColor": { 54 | "__type__": "cc.Color", 55 | "r": 255, 56 | "g": 255, 57 | "b": 255, 58 | "a": 0 59 | } 60 | }, 61 | {} 62 | ] 63 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/blinnphong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 238, 47 | "g": 238, 48 | "b": 238, 49 | "a": 255 50 | }, 51 | "shininess": 0.456, 52 | "normalMap": { 53 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 54 | "__expectedType__": "cc.Texture2D" 55 | }, 56 | "normalStrength": 2 57 | }, 58 | {} 59 | ] 60 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/PBR.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {}, 16 | {}, 17 | {} 18 | ], 19 | "_states": [ 20 | { 21 | "rasterizerState": {}, 22 | "depthStencilState": {}, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | { 30 | "rasterizerState": {}, 31 | "depthStencilState": {}, 32 | "blendState": { 33 | "targets": [ 34 | {} 35 | ] 36 | } 37 | }, 38 | { 39 | "rasterizerState": {}, 40 | "depthStencilState": {}, 41 | "blendState": { 42 | "targets": [ 43 | {} 44 | ] 45 | } 46 | }, 47 | { 48 | "rasterizerState": {}, 49 | "depthStencilState": {}, 50 | "blendState": { 51 | "targets": [ 52 | {} 53 | ] 54 | } 55 | } 56 | ], 57 | "_props": [ 58 | { 59 | "roughness": 0.395, 60 | "metallic": 0.296, 61 | "specularIntensity": 0.279, 62 | "mainTexture": { 63 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 64 | "__expectedType__": "cc.Texture2D" 65 | } 66 | }, 67 | {}, 68 | {}, 69 | {} 70 | ] 71 | } -------------------------------------------------------------------------------- /assets/res/mat/floor/floorBlinnPhong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true, 15 | "USE_IBL": true 16 | }, 17 | {} 18 | ], 19 | "_states": [ 20 | { 21 | "rasterizerState": {}, 22 | "depthStencilState": {}, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | { 30 | "rasterizerState": {}, 31 | "depthStencilState": {}, 32 | "blendState": { 33 | "targets": [ 34 | {} 35 | ] 36 | } 37 | } 38 | ], 39 | "_props": [ 40 | { 41 | "mainTexture": { 42 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 43 | "__expectedType__": "cc.Texture2D" 44 | }, 45 | "tilingOffset": { 46 | "__type__": "cc.Vec4", 47 | "x": 35, 48 | "y": 35, 49 | "z": 0, 50 | "w": 0 51 | }, 52 | "mainColor": { 53 | "__type__": "cc.Color", 54 | "r": 255, 55 | "g": 255, 56 | "b": 255, 57 | "a": 255 58 | }, 59 | "shininess": 0.662, 60 | "roughness": 0.06, 61 | "emissive": { 62 | "__type__": "cc.Color", 63 | "r": 14, 64 | "g": 14, 65 | "b": 14, 66 | "a": 255 67 | }, 68 | "normalMap": { 69 | "__uuid__": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 70 | "__expectedType__": "cc.Texture2D" 71 | }, 72 | "normalStrength": 1.2 73 | }, 74 | {} 75 | ] 76 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/pbr.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true, 14 | "USE_NORMAL_MAP": true, 15 | "USE_PBR_MAP": true 16 | }, 17 | {}, 18 | {}, 19 | {} 20 | ], 21 | "_states": [ 22 | { 23 | "rasterizerState": {}, 24 | "depthStencilState": {}, 25 | "blendState": { 26 | "targets": [ 27 | {} 28 | ] 29 | } 30 | }, 31 | { 32 | "rasterizerState": {}, 33 | "depthStencilState": {}, 34 | "blendState": { 35 | "targets": [ 36 | {} 37 | ] 38 | } 39 | }, 40 | { 41 | "rasterizerState": {}, 42 | "depthStencilState": {}, 43 | "blendState": { 44 | "targets": [ 45 | {} 46 | ] 47 | } 48 | }, 49 | { 50 | "rasterizerState": {}, 51 | "depthStencilState": {}, 52 | "blendState": { 53 | "targets": [ 54 | {} 55 | ] 56 | } 57 | } 58 | ], 59 | "_props": [ 60 | { 61 | "occlusion": 0.635, 62 | "normalStrength": 2, 63 | "mainTexture": { 64 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 65 | "__expectedType__": "cc.Texture2D" 66 | }, 67 | "normalMap": { 68 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 69 | "__expectedType__": "cc.Texture2D" 70 | }, 71 | "pbrMap": { 72 | "__uuid__": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a", 73 | "__expectedType__": "cc.Texture2D" 74 | } 75 | }, 76 | {}, 77 | {}, 78 | {} 79 | ] 80 | } -------------------------------------------------------------------------------- /assets/scripts/menu/MenuItem.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, director, EventHandler, Label, Node, Sprite } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | 4 | @ccclass('MenuItem') 5 | @executeInEditMode(true) 6 | 7 | export class MenuItem extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | @property(Color) 15 | set MenuItemBgColor(v) { 16 | this.BgColor = v; 17 | this.resetColor(); 18 | } 19 | get MenuItemBgColor() { 20 | return this.BgColor; 21 | } 22 | @property(Color) 23 | set MenuItemSideColor(v) { 24 | this.SideColor = v; 25 | this.resetColor(); 26 | } 27 | get MenuItemSideColor() { 28 | return this.SideColor; 29 | } 30 | @property({ visible: false }) 31 | private BgColor: Color = new Color(40, 40, 40, 255); 32 | @property({ visible: false }) 33 | private SideColor: Color = new Color(0, 130, 180, 255); 34 | 35 | private pressStrenth = 0.75; 36 | private _uuid; 37 | public callback: Function; 38 | public eventData: any; 39 | 40 | 41 | init(name: string, uuid, cb: Function) { 42 | this.NameLable.string = name; 43 | this._uuid = uuid; 44 | cb && (this.callback = cb); 45 | } 46 | 47 | onEnable() { 48 | this.resetColor(); 49 | this.node.on(Node.EventType.TOUCH_END, this.onClick, this); 50 | } 51 | onDisable() { 52 | this.node.off(Node.EventType.TOUCH_END, this.onClick, this); 53 | } 54 | 55 | resetColor() { 56 | this.BgSprite && (this.BgSprite.color = this.BgColor); 57 | this.SideSprite && (this.SideSprite.color = this.SideColor); 58 | } 59 | 60 | onClick() { 61 | this.callback(); 62 | this.BgSprite.color = new Color(this.BgColor.r * this.pressStrenth, this.BgColor.g * this.pressStrenth, this.BgColor.b * this.pressStrenth); 63 | director.emit(this._uuid, this.getComponent(MenuItem)); 64 | } 65 | 66 | } 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorPBR.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true, 14 | "USE_NORMAL_MAP": true, 15 | "USE_PBR_MAP": true 16 | }, 17 | {}, 18 | {}, 19 | {} 20 | ], 21 | "_states": [ 22 | { 23 | "rasterizerState": {}, 24 | "depthStencilState": {}, 25 | "blendState": { 26 | "targets": [ 27 | {} 28 | ] 29 | } 30 | }, 31 | { 32 | "rasterizerState": {}, 33 | "depthStencilState": {}, 34 | "blendState": { 35 | "targets": [ 36 | {} 37 | ] 38 | } 39 | }, 40 | { 41 | "rasterizerState": {}, 42 | "depthStencilState": {}, 43 | "blendState": { 44 | "targets": [ 45 | {} 46 | ] 47 | } 48 | }, 49 | { 50 | "rasterizerState": {}, 51 | "depthStencilState": {}, 52 | "blendState": { 53 | "targets": [ 54 | {} 55 | ] 56 | } 57 | } 58 | ], 59 | "_props": [ 60 | { 61 | "tilingOffset": { 62 | "__type__": "cc.Vec4", 63 | "x": 35, 64 | "y": 35, 65 | "z": 0, 66 | "w": 0 67 | }, 68 | "occlusion": 1, 69 | "roughness": 0, 70 | "metallic": 0.801, 71 | "specularIntensity": 0.589, 72 | "emissive": { 73 | "__type__": "cc.Color", 74 | "r": 14, 75 | "g": 14, 76 | "b": 14, 77 | "a": 255 78 | }, 79 | "normalStrength": 1.121, 80 | "anisotropyRotation": 0.0256, 81 | "mainTexture": { 82 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 83 | "__expectedType__": "cc.Texture2D" 84 | }, 85 | "normalMap": { 86 | "__uuid__": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 87 | "__expectedType__": "cc.Texture2D" 88 | }, 89 | "pbrMap": { 90 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 91 | "__expectedType__": "cc.Texture2D" 92 | } 93 | }, 94 | {}, 95 | {}, 96 | {} 97 | ] 98 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/Toon.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | {}, 13 | { 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {}, 17 | {}, 18 | {} 19 | ], 20 | "_states": [ 21 | { 22 | "rasterizerState": {}, 23 | "depthStencilState": {}, 24 | "blendState": { 25 | "targets": [ 26 | {} 27 | ] 28 | } 29 | }, 30 | { 31 | "rasterizerState": {}, 32 | "depthStencilState": {}, 33 | "blendState": { 34 | "targets": [ 35 | {} 36 | ] 37 | } 38 | }, 39 | { 40 | "rasterizerState": {}, 41 | "depthStencilState": {}, 42 | "blendState": { 43 | "targets": [ 44 | {} 45 | ] 46 | } 47 | }, 48 | { 49 | "rasterizerState": {}, 50 | "depthStencilState": {}, 51 | "blendState": { 52 | "targets": [ 53 | {} 54 | ] 55 | } 56 | }, 57 | { 58 | "rasterizerState": {}, 59 | "depthStencilState": {}, 60 | "blendState": { 61 | "targets": [ 62 | {} 63 | ] 64 | } 65 | } 66 | ], 67 | "_props": [ 68 | { 69 | "lineWidth": 18.18, 70 | "baseColor": { 71 | "__type__": "cc.Color", 72 | "r": 222, 73 | "g": 255, 74 | "b": 117, 75 | "a": 255 76 | } 77 | }, 78 | { 79 | "mainTexture": { 80 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 81 | "__expectedType__": "cc.Texture2D" 82 | }, 83 | "mainColor": { 84 | "__type__": "cc.Color", 85 | "r": 255, 86 | "g": 255, 87 | "b": 255, 88 | "a": 255 89 | }, 90 | "shadeStep": 0.622, 91 | "baseStep": 0.403, 92 | "shadeFeather": 0.046, 93 | "shadeStrength": 0.642, 94 | "specularStep": 0.324, 95 | "specularFeather": 0.019, 96 | "specularStrength": 1.98 97 | }, 98 | {}, 99 | {}, 100 | {} 101 | ] 102 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/ToonOutline.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_OUTLINE_PASS": true 14 | }, 15 | { 16 | "USE_RIM_LIGHT": true, 17 | "USE_ALBEDO_MAP": true 18 | }, 19 | {}, 20 | {}, 21 | {} 22 | ], 23 | "_states": [ 24 | { 25 | "rasterizerState": {}, 26 | "depthStencilState": {}, 27 | "blendState": { 28 | "targets": [ 29 | {} 30 | ] 31 | } 32 | }, 33 | { 34 | "rasterizerState": {}, 35 | "depthStencilState": {}, 36 | "blendState": { 37 | "targets": [ 38 | {} 39 | ] 40 | } 41 | }, 42 | { 43 | "rasterizerState": {}, 44 | "depthStencilState": {}, 45 | "blendState": { 46 | "targets": [ 47 | {} 48 | ] 49 | } 50 | }, 51 | { 52 | "rasterizerState": {}, 53 | "depthStencilState": {}, 54 | "blendState": { 55 | "targets": [ 56 | {} 57 | ] 58 | } 59 | }, 60 | { 61 | "rasterizerState": {}, 62 | "depthStencilState": {}, 63 | "blendState": { 64 | "targets": [ 65 | {} 66 | ] 67 | } 68 | } 69 | ], 70 | "_props": [ 71 | { 72 | "lineWidth": 30, 73 | "depthBias": 0.1, 74 | "baseColor": { 75 | "__type__": "cc.Color", 76 | "r": 227, 77 | "g": 255, 78 | "b": 116, 79 | "a": 255 80 | } 81 | }, 82 | { 83 | "mainTexture": { 84 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 85 | "__expectedType__": "cc.Texture2D" 86 | }, 87 | "mainColor": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "shadeStep": 0.622, 95 | "baseStep": 0.403, 96 | "shadeFeather": 0.046, 97 | "shadeStrength": 0.642, 98 | "specularStep": 0.324, 99 | "specularFeather": 0.006, 100 | "specularStrength": 6.48, 101 | "rimLightColor": { 102 | "__type__": "cc.Color", 103 | "r": 243, 104 | "g": 191, 105 | "b": 191, 106 | "a": 23 107 | } 108 | }, 109 | {}, 110 | {}, 111 | {} 112 | ] 113 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/toon.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_OUTLINE_PASS": true 14 | }, 15 | { 16 | "USE_NORMAL_MAP": true, 17 | "USE_RIM_LIGHT": true, 18 | "USE_ALBEDO_MAP": true 19 | }, 20 | {}, 21 | {}, 22 | {} 23 | ], 24 | "_states": [ 25 | { 26 | "rasterizerState": {}, 27 | "depthStencilState": {}, 28 | "blendState": { 29 | "targets": [ 30 | {} 31 | ] 32 | } 33 | }, 34 | { 35 | "rasterizerState": {}, 36 | "depthStencilState": {}, 37 | "blendState": { 38 | "targets": [ 39 | {} 40 | ] 41 | } 42 | }, 43 | { 44 | "rasterizerState": {}, 45 | "depthStencilState": {}, 46 | "blendState": { 47 | "targets": [ 48 | {} 49 | ] 50 | } 51 | }, 52 | { 53 | "rasterizerState": {}, 54 | "depthStencilState": {}, 55 | "blendState": { 56 | "targets": [ 57 | {} 58 | ] 59 | } 60 | }, 61 | { 62 | "rasterizerState": {}, 63 | "depthStencilState": {}, 64 | "blendState": { 65 | "targets": [ 66 | {} 67 | ] 68 | } 69 | } 70 | ], 71 | "_props": [ 72 | { 73 | "lineWidth": 18.51, 74 | "baseColor": { 75 | "__type__": "cc.Color", 76 | "r": 75, 77 | "g": 82, 78 | "b": 126, 79 | "a": 255 80 | } 81 | }, 82 | { 83 | "mainTexture": { 84 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 85 | "__expectedType__": "cc.Texture2D" 86 | }, 87 | "mainColor": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "shadeStep": 0.642, 95 | "baseStep": 0.47, 96 | "shadeFeather": 0.032, 97 | "shadeStrength": 0.648, 98 | "normalMap": { 99 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 100 | "__expectedType__": "cc.Texture2D" 101 | }, 102 | "normalStrength": 2, 103 | "specularStep": 0.39, 104 | "specularFeather": 0.079, 105 | "specularStrength": 7.14, 106 | "rimLightColor": { 107 | "__type__": "cc.Color", 108 | "r": 211, 109 | "g": 184, 110 | "b": 184, 111 | "a": 40 112 | } 113 | }, 114 | {}, 115 | {}, 116 | {} 117 | ] 118 | } -------------------------------------------------------------------------------- /assets/scripts/sceneMgr.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Component, DirectionalLight, director, instantiate, Node, Prefab, profiler, Toggle } from 'cc'; 2 | import { MenuContainer } from './menu/MenuContainer'; 3 | const { ccclass, property } = _decorator; 4 | 5 | @ccclass('sceneMgr') 6 | export class sceneMgr extends Component { 7 | @property(Node) scene: Node; 8 | @property(Prefab) default: Prefab; 9 | @property(Prefab) cases: Prefab[] = []; 10 | @property(Toggle) shadowToggle: Toggle; 11 | @property(Toggle) iblToggle: Toggle; 12 | @property(Toggle) csmToggle: Toggle; 13 | @property(Toggle) fogToggle: Toggle; 14 | 15 | @property(MenuContainer) menu: MenuContainer; 16 | test = 200; 17 | private _index = 0; 18 | private _prefab: Prefab = null; 19 | private _amount = 0; 20 | start() { 21 | 22 | this.configGlobals(); 23 | this.configMenu(); 24 | 25 | profiler.showStats(); 26 | } 27 | configGlobals() { 28 | const scene = director.getScene(); 29 | const globals = scene.globals; 30 | this.shadowToggle.node.on("toggle", (t: Toggle) => { 31 | globals.shadows.enabled = t.isChecked; 32 | }) 33 | this.iblToggle.node.on("toggle", (t: Toggle) => { 34 | globals.skybox.useIBL = t.isChecked; 35 | }) 36 | this.fogToggle.node.on("toggle", (t: Toggle) => { 37 | globals.fog.enabled = t.isChecked; 38 | }) 39 | const light = scene.getComponentInChildren(DirectionalLight); 40 | this.csmToggle.node.on("toggle", (t: Toggle) => { 41 | light.enableCSM = t.isChecked; 42 | }) 43 | } 44 | 45 | configMenu() { 46 | this.menu.addMenuItem("DefaultScene", () => { 47 | this.defaultScene(); 48 | }) 49 | this.cases.forEach((c, i) => { 50 | this.menu.addMenuItem(c.name, () => { 51 | this.changePrefab(c, i + 1); 52 | }) 53 | }) 54 | 55 | } 56 | 57 | defaultScene() { 58 | if (this._index == 0) return; 59 | this._amount = 0; 60 | this._index = 0; 61 | this.scene.destroyAllChildren(); 62 | const defaultScene = instantiate(this.default); 63 | defaultScene.parent = this.scene; 64 | } 65 | changePrefab(pfb: Prefab, index = 2) { 66 | if (this._index == index) return 67 | this.scene.destroyAllChildren(); 68 | this._index = index; 69 | this._prefab = pfb; 70 | this._amount = this.test; 71 | } 72 | 73 | update(deltaTime: number) { 74 | if (this._amount > 0) { 75 | const x = (this._amount % 10 - 5) * 2.6; 76 | const z = -Math.floor(this._amount / 10) * 2; 77 | const node = instantiate(this._prefab); 78 | node.parent = this.scene; 79 | node.setPosition(x, 0, z); 80 | this._amount--; 81 | } 82 | 83 | } 84 | } 85 | 86 | -------------------------------------------------------------------------------- /settings/v2/packages/engine.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.7", 3 | "modules": { 4 | "cache": { 5 | "base": { 6 | "_value": true 7 | }, 8 | "graphcis": { 9 | "_value": true 10 | }, 11 | "gfx-webgl": { 12 | "_value": true 13 | }, 14 | "gfx-webgl2": { 15 | "_value": true 16 | }, 17 | "animation": { 18 | "_value": true 19 | }, 20 | "skeletal-animation": { 21 | "_value": true 22 | }, 23 | "3d": { 24 | "_value": true 25 | }, 26 | "2d": { 27 | "_value": true 28 | }, 29 | "xr": { 30 | "_value": false 31 | }, 32 | "ui": { 33 | "_value": true 34 | }, 35 | "particle": { 36 | "_value": false 37 | }, 38 | "physics": { 39 | "_value": false, 40 | "_option": "physics-ammo" 41 | }, 42 | "physics-ammo": { 43 | "_value": false 44 | }, 45 | "physics-cannon": { 46 | "_value": false 47 | }, 48 | "physics-physx": { 49 | "_value": false 50 | }, 51 | "physics-builtin": { 52 | "_value": false 53 | }, 54 | "physics-2d": { 55 | "_value": false, 56 | "_option": "physics-2d-box2d" 57 | }, 58 | "physics-2d-box2d": { 59 | "_value": false 60 | }, 61 | "physics-2d-builtin": { 62 | "_value": false 63 | }, 64 | "intersection-2d": { 65 | "_value": false 66 | }, 67 | "primitive": { 68 | "_value": true 69 | }, 70 | "profiler": { 71 | "_value": true 72 | }, 73 | "occlusion-query": { 74 | "_value": false 75 | }, 76 | "geometry-renderer": { 77 | "_value": false 78 | }, 79 | "debug-renderer": { 80 | "_value": false 81 | }, 82 | "particle-2d": { 83 | "_value": false 84 | }, 85 | "audio": { 86 | "_value": false 87 | }, 88 | "video": { 89 | "_value": false 90 | }, 91 | "webview": { 92 | "_value": false 93 | }, 94 | "tween": { 95 | "_value": false 96 | }, 97 | "websocket": { 98 | "_value": true 99 | }, 100 | "websocket-server": { 101 | "_value": false 102 | }, 103 | "terrain": { 104 | "_value": false 105 | }, 106 | "light-probe": { 107 | "_value": false 108 | }, 109 | "tiled-map": { 110 | "_value": false 111 | }, 112 | "spine": { 113 | "_value": false 114 | }, 115 | "dragon-bones": { 116 | "_value": false 117 | }, 118 | "marionette": { 119 | "_value": false 120 | }, 121 | "custom-pipeline": { 122 | "_value": false 123 | } 124 | }, 125 | "flags": {}, 126 | "includeModules": [ 127 | "2d", 128 | "3d", 129 | "animation", 130 | "base", 131 | "gfx-webgl", 132 | "gfx-webgl2", 133 | "primitive", 134 | "profiler", 135 | "skeletal-animation", 136 | "ui", 137 | "websocket" 138 | ], 139 | "noDeprecatedFeatures": { 140 | "value": false, 141 | "version": "" 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /assets/res/sprites/on.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "311eec67-dcba-4ada-a09d-83738e8c1f26", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "311eec67-dcba-4ada-a09d-83738e8c1f26@6c48a", 14 | "displayName": "on", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "311eec67-dcba-4ada-a09d-83738e8c1f26", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "311eec67-dcba-4ada-a09d-83738e8c1f26@f9941", 38 | "displayName": "on", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 1, 48 | "trimY": 1, 49 | "width": 30, 50 | "height": 30, 51 | "rawWidth": 32, 52 | "rawHeight": 32, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -15, 65 | -15, 66 | 0, 67 | 15, 68 | -15, 69 | 0, 70 | -15, 71 | 15, 72 | 0, 73 | 15, 74 | 15, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 1, 87 | 31, 88 | 31, 89 | 31, 90 | 1, 91 | 1, 92 | 31, 93 | 1 94 | ], 95 | "nuv": [ 96 | 0.03125, 97 | 0.03125, 98 | 0.96875, 99 | 0.03125, 100 | 0.03125, 101 | 0.96875, 102 | 0.96875, 103 | 0.96875 104 | ], 105 | "minPos": [ 106 | -15, 107 | -15, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 15, 112 | 15, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "311eec67-dcba-4ada-a09d-83738e8c1f26@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": true, 131 | "type": "sprite-frame", 132 | "redirect": "311eec67-dcba-4ada-a09d-83738e8c1f26@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/res/sprites/off.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9@6c48a", 14 | "displayName": "off", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9@f9941", 38 | "displayName": "off", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 3, 48 | "trimY": 3, 49 | "width": 26, 50 | "height": 26, 51 | "rawWidth": 32, 52 | "rawHeight": 32, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -13, 65 | -13, 66 | 0, 67 | 13, 68 | -13, 69 | 0, 70 | -13, 71 | 13, 72 | 0, 73 | 13, 74 | 13, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 3, 87 | 29, 88 | 29, 89 | 29, 90 | 3, 91 | 3, 92 | 29, 93 | 3 94 | ], 95 | "nuv": [ 96 | 0.09375, 97 | 0.09375, 98 | 0.90625, 99 | 0.09375, 100 | 0.09375, 101 | 0.90625, 102 | 0.90625, 103 | 0.90625 104 | ], 105 | "minPos": [ 106 | -13, 107 | -13, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 13, 112 | 13, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": true, 131 | "type": "sprite-frame", 132 | "redirect": "106dd77a-06b8-4b22-8a7e-70ee9b8ba8f9@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/res/sprites/bmfont.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6@6c48a", 14 | "displayName": "bmfont", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6844f69d-0d8f-4950-afc8-aba514477da6", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6@f9941", 38 | "displayName": "bmfont", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 1, 48 | "trimY": 1, 49 | "width": 197, 50 | "height": 195, 51 | "rawWidth": 199, 52 | "rawHeight": 197, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -98.5, 65 | -97.5, 66 | 0, 67 | 98.5, 68 | -97.5, 69 | 0, 70 | -98.5, 71 | 97.5, 72 | 0, 73 | 98.5, 74 | 97.5, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 1, 87 | 196, 88 | 198, 89 | 196, 90 | 1, 91 | 1, 92 | 198, 93 | 1 94 | ], 95 | "nuv": [ 96 | 0.005025125628140704, 97 | 0.005076142131979695, 98 | 0.9949748743718593, 99 | 0.005076142131979695, 100 | 0.005025125628140704, 101 | 0.9949238578680203, 102 | 0.9949748743718593, 103 | 0.9949238578680203 104 | ], 105 | "minPos": [ 106 | -98.5, 107 | -97.5, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 98.5, 112 | 97.5, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "6844f69d-0d8f-4950-afc8-aba514477da6@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": true, 131 | "type": "sprite-frame", 132 | "redirect": "6844f69d-0d8f-4950-afc8-aba514477da6@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/res/sprites/sprite_splash.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "ver": "1.0.22", 13 | "importer": "texture", 14 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@6c48a", 15 | "imported": true, 16 | "files": [ 17 | ".json" 18 | ], 19 | "subMetas": {}, 20 | "userData": { 21 | "wrapModeS": "clamp-to-edge", 22 | "wrapModeT": "clamp-to-edge", 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "premultiplyAlpha": false, 27 | "anisotropy": 0, 28 | "isUuid": true, 29 | "imageUuidOrDatabaseUri": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad", 30 | "visible": false 31 | }, 32 | "displayName": "sprite_splash", 33 | "id": "6c48a", 34 | "name": "texture" 35 | }, 36 | "f9941": { 37 | "ver": "1.0.11", 38 | "importer": "sprite-frame", 39 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 40 | "imported": true, 41 | "files": [ 42 | ".json" 43 | ], 44 | "subMetas": {}, 45 | "userData": { 46 | "wrapModeS": "clamp-to-edge", 47 | "wrapModeT": "clamp-to-edge", 48 | "minfilter": "linear", 49 | "magfilter": "linear", 50 | "premultiplyAlpha": false, 51 | "generateMipmap": false, 52 | "anisotropy": 1, 53 | "trimType": "auto", 54 | "trimThreshold": 1, 55 | "rotated": false, 56 | "offsetX": 0, 57 | "offsetY": 0, 58 | "trimX": 0, 59 | "trimY": 0, 60 | "width": 2, 61 | "height": 2, 62 | "rawWidth": 2, 63 | "rawHeight": 2, 64 | "borderTop": 0, 65 | "borderBottom": 0, 66 | "borderLeft": 0, 67 | "borderRight": 0, 68 | "isUuid": true, 69 | "imageUuidOrDatabaseUri": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@6c48a", 70 | "atlasUuid": "", 71 | "mipfilter": "none", 72 | "packable": true, 73 | "vertices": { 74 | "rawPosition": [ 75 | -1, 76 | -1, 77 | 0, 78 | 1, 79 | -1, 80 | 0, 81 | -1, 82 | 1, 83 | 0, 84 | 1, 85 | 1, 86 | 0 87 | ], 88 | "indexes": [ 89 | 0, 90 | 1, 91 | 2, 92 | 2, 93 | 1, 94 | 3 95 | ], 96 | "uv": [ 97 | 0, 98 | 2, 99 | 2, 100 | 2, 101 | 0, 102 | 0, 103 | 2, 104 | 0 105 | ], 106 | "nuv": [ 107 | 0, 108 | 0, 109 | 1, 110 | 0, 111 | 0, 112 | 1, 113 | 1, 114 | 1 115 | ], 116 | "minPos": [ 117 | -1, 118 | -1, 119 | 0 120 | ], 121 | "maxPos": [ 122 | 1, 123 | 1, 124 | 0 125 | ] 126 | }, 127 | "pixelsToUnit": 100, 128 | "pivotX": 0.5, 129 | "pivotY": 0.5, 130 | "meshType": 0 131 | }, 132 | "displayName": "sprite_splash", 133 | "id": "f9941", 134 | "name": "spriteFrame" 135 | } 136 | }, 137 | "userData": { 138 | "type": "sprite-frame", 139 | "redirect": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 140 | "hasAlpha": false, 141 | "fixAlphaTransparencyArtifacts": false 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "b47c0": { 12 | "importer": "erp-texture-cube", 13 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0", 14 | "displayName": "anime_cyberpunk_factory_no_human", 15 | "id": "b47c0", 16 | "name": "textureCube", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isRGBE": false, 25 | "imageDatabaseUri": "41d761cf-4717-49eb-9972-043e14111aa0" 26 | }, 27 | "ver": "1.0.10", 28 | "imported": true, 29 | "files": [ 30 | ".json" 31 | ], 32 | "subMetas": { 33 | "74afd": { 34 | "importer": "texture-cube-face", 35 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@74afd", 36 | "displayName": "", 37 | "id": "74afd", 38 | "name": "right", 39 | "userData": {}, 40 | "ver": "1.0.0", 41 | "imported": true, 42 | "files": [ 43 | ".jpg", 44 | ".json" 45 | ], 46 | "subMetas": {} 47 | }, 48 | "8fd34": { 49 | "importer": "texture-cube-face", 50 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@8fd34", 51 | "displayName": "", 52 | "id": "8fd34", 53 | "name": "left", 54 | "userData": {}, 55 | "ver": "1.0.0", 56 | "imported": true, 57 | "files": [ 58 | ".jpg", 59 | ".json" 60 | ], 61 | "subMetas": {} 62 | }, 63 | "bb97f": { 64 | "importer": "texture-cube-face", 65 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@bb97f", 66 | "displayName": "", 67 | "id": "bb97f", 68 | "name": "top", 69 | "userData": {}, 70 | "ver": "1.0.0", 71 | "imported": true, 72 | "files": [ 73 | ".jpg", 74 | ".json" 75 | ], 76 | "subMetas": {} 77 | }, 78 | "7d38f": { 79 | "importer": "texture-cube-face", 80 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@7d38f", 81 | "displayName": "", 82 | "id": "7d38f", 83 | "name": "bottom", 84 | "userData": {}, 85 | "ver": "1.0.0", 86 | "imported": true, 87 | "files": [ 88 | ".jpg", 89 | ".json" 90 | ], 91 | "subMetas": {} 92 | }, 93 | "e9a6d": { 94 | "importer": "texture-cube-face", 95 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@e9a6d", 96 | "displayName": "", 97 | "id": "e9a6d", 98 | "name": "front", 99 | "userData": {}, 100 | "ver": "1.0.0", 101 | "imported": true, 102 | "files": [ 103 | ".jpg", 104 | ".json" 105 | ], 106 | "subMetas": {} 107 | }, 108 | "40c10": { 109 | "importer": "texture-cube-face", 110 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@40c10", 111 | "displayName": "", 112 | "id": "40c10", 113 | "name": "back", 114 | "userData": {}, 115 | "ver": "1.0.0", 116 | "imported": true, 117 | "files": [ 118 | ".jpg", 119 | ".json" 120 | ], 121 | "subMetas": {} 122 | } 123 | } 124 | } 125 | }, 126 | "userData": { 127 | "fixAlphaTransparencyArtifacts": true, 128 | "hasAlpha": false, 129 | "type": "texture cube", 130 | "redirect": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0" 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /assets/res/skybox/anime_cyberpunk_factory_no_human_reflection.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "b47c0": { 12 | "importer": "erp-texture-cube", 13 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0", 14 | "displayName": "anime_cyberpunk_factory_no_human_reflection", 15 | "id": "b47c0", 16 | "name": "textureCube", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isRGBE": false, 25 | "imageDatabaseUri": "6278d4ca-640b-4a18-8dbd-490958ce2f99", 26 | "mipBakeMode": 2 27 | }, 28 | "ver": "1.0.10", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": { 34 | "74afd": { 35 | "importer": "texture-cube-face", 36 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@74afd", 37 | "displayName": "", 38 | "id": "74afd", 39 | "name": "right", 40 | "userData": {}, 41 | "ver": "1.0.0", 42 | "imported": true, 43 | "files": [ 44 | ".json", 45 | ".png" 46 | ], 47 | "subMetas": {} 48 | }, 49 | "8fd34": { 50 | "importer": "texture-cube-face", 51 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@8fd34", 52 | "displayName": "", 53 | "id": "8fd34", 54 | "name": "left", 55 | "userData": {}, 56 | "ver": "1.0.0", 57 | "imported": true, 58 | "files": [ 59 | ".json", 60 | ".png" 61 | ], 62 | "subMetas": {} 63 | }, 64 | "bb97f": { 65 | "importer": "texture-cube-face", 66 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@bb97f", 67 | "displayName": "", 68 | "id": "bb97f", 69 | "name": "top", 70 | "userData": {}, 71 | "ver": "1.0.0", 72 | "imported": true, 73 | "files": [ 74 | ".json", 75 | ".png" 76 | ], 77 | "subMetas": {} 78 | }, 79 | "7d38f": { 80 | "importer": "texture-cube-face", 81 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@7d38f", 82 | "displayName": "", 83 | "id": "7d38f", 84 | "name": "bottom", 85 | "userData": {}, 86 | "ver": "1.0.0", 87 | "imported": true, 88 | "files": [ 89 | ".json", 90 | ".png" 91 | ], 92 | "subMetas": {} 93 | }, 94 | "e9a6d": { 95 | "importer": "texture-cube-face", 96 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@e9a6d", 97 | "displayName": "", 98 | "id": "e9a6d", 99 | "name": "front", 100 | "userData": {}, 101 | "ver": "1.0.0", 102 | "imported": true, 103 | "files": [ 104 | ".json", 105 | ".png" 106 | ], 107 | "subMetas": {} 108 | }, 109 | "40c10": { 110 | "importer": "texture-cube-face", 111 | "uuid": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0@40c10", 112 | "displayName": "", 113 | "id": "40c10", 114 | "name": "back", 115 | "userData": {}, 116 | "ver": "1.0.0", 117 | "imported": true, 118 | "files": [ 119 | ".json", 120 | ".png" 121 | ], 122 | "subMetas": {} 123 | } 124 | } 125 | } 126 | }, 127 | "userData": { 128 | "type": "texture cube", 129 | "isRGBE": false, 130 | "fixAlphaTransparencyArtifacts": false, 131 | "hasAlpha": true, 132 | "redirect": "6278d4ca-640b-4a18-8dbd-490958ce2f99@b47c0" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/scripts/menu/MenuContainer.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, director, EventHandler, instantiate, Label, Layout, Node, Prefab, Size, UITransform, Vec3 } from 'cc'; 2 | import { MenuItem } from './MenuItem'; 3 | import { EDITOR } from 'cc/env'; 4 | const { ccclass, property, executeInEditMode } = _decorator; 5 | 6 | @ccclass('MenuContainer') 7 | @executeInEditMode(true) 8 | export class MenuContainer extends Component { 9 | @property(Size) 10 | set MenuItemSize(v) { 11 | this.Size = v; 12 | this.setMenuNode(); 13 | } 14 | get MenuItemSize() { 15 | return this.Size; 16 | } 17 | @property(Prefab) 18 | MenuItem: Prefab = null; 19 | @property(Node) 20 | MenuRootNode: Node = null; 21 | @property(Node) 22 | BtnNode: Node = null; 23 | @property({ visible: false }) 24 | private Size: Size = new Size(200, 30); 25 | private _item: MenuItem = null; 26 | private _isVisible: boolean = true; 27 | 28 | 29 | onEnable() { 30 | this.initLayout(); 31 | if (this.BtnNode) { 32 | this.BtnNode.on(Node.EventType.TOUCH_END, this.changeVisible, this); 33 | } 34 | director.on(this.node.uuid, this.resetItem, this); 35 | } 36 | 37 | onDisable() { 38 | if (this.BtnNode) { 39 | this.BtnNode.off(Node.EventType.TOUCH_END, this.changeVisible, this); 40 | } 41 | director.off(this.node.uuid, this.resetItem, this); 42 | } 43 | addMenuItem(name: string, cb: Function) { 44 | const item = instantiate(this.MenuItem); 45 | const tranform = item.getComponent(UITransform); 46 | tranform.height = this.MenuItemSize.height; 47 | tranform.width = this.MenuItemSize.width; 48 | item.parent = this.MenuRootNode; 49 | const menuItem = item.getComponent(MenuItem); 50 | menuItem && menuItem.init(name, this.node.uuid, cb); 51 | } 52 | setMenuNode() { 53 | if (this.MenuRootNode) { 54 | this.MenuRootNode.on(Node.EventType.CHILD_ADDED, this.resetSize, this); 55 | const root = this.node.getComponent(UITransform); 56 | root && (root.width = this.MenuItemSize.width); 57 | const tranform = this.MenuRootNode.getComponent(UITransform); 58 | tranform && (tranform.width = this.MenuItemSize.width); 59 | const children = this.MenuRootNode.children; 60 | if (children.length > 0) { 61 | children.forEach((c) => { 62 | this.resetSize(c); 63 | }) 64 | if (!EDITOR) { 65 | const firstItem = children[0].getComponent(MenuItem); 66 | firstItem.onClick() 67 | } 68 | } 69 | } 70 | if (this.BtnNode) { 71 | const tranform = this.BtnNode.getComponent(UITransform); 72 | tranform && tranform.setContentSize(this.MenuItemSize); 73 | } 74 | } 75 | initLayout() { 76 | let layout = this.node.getComponent(Layout); 77 | if (!layout) { 78 | layout = this.node.addComponent(Layout); 79 | layout.type = 2; 80 | layout.resizeMode = 1; 81 | layout.spacingY = 1; 82 | } 83 | let rootlayout = this.MenuRootNode.getComponent(Layout); 84 | if (!rootlayout) { 85 | rootlayout = this.MenuRootNode.addComponent(Layout); 86 | rootlayout.type = 2; 87 | rootlayout.resizeMode = 1; 88 | rootlayout.spacingY = 1; 89 | } 90 | } 91 | resetItem(item: MenuItem) { 92 | if (this._item != item && this._item) this._item.resetColor(); 93 | this._item = item; 94 | } 95 | changeVisible() { 96 | this._isVisible = !this._isVisible; 97 | if (this.MenuRootNode) { 98 | this.MenuRootNode.active = this._isVisible; 99 | if (this.BtnNode) { 100 | const lable = this.BtnNode.getComponentInChildren(Label); 101 | if (lable) { 102 | lable.string = this._isVisible ? "Hide Menu" : "Show Menu"; 103 | } 104 | } 105 | } 106 | } 107 | resetSize(node) { 108 | const tranform = node.getComponent(UITransform); 109 | tranform && tranform.setContentSize(this.MenuItemSize); 110 | } 111 | 112 | } 113 | 114 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Basic Lighting Models 2 | Created with Cocos Creator 3.8 ( https://www.cocos.com/en/creator-download ) 3 | 4 | Preview: http://learncocos.com/light 5 | 6 | ![image](https://github.com/iwae/LightingModel/assets/26038745/4173da1d-33f0-41c4-8a72-e27021d1aa39) 7 | 8 | 9 | ## Unlit (No Lighting) 10 | The unlit model does not consider the effects of lighting and directly renders the object's color or texture to the screen. This model is suitable for scenes that do not require the effects of lighting, such as billboards or ground guidance. It's not quite suitable for low-poly or color-card-textured models, like the mecha bee in this demo. 11 | 12 | ```glsl 13 | void main() 14 | { 15 | vec4 o = mainColor; // Material color 16 | return CCFragOutput(o); 17 | } 18 | ``` 19 | ## Lambert Model 20 | The Lambert model is a lighting model that describes diffuse reflection, assuming that the surface of an object reflects light independent of the viewer's position. This model is commonly used to simulate non-metallic, non-mirrored object surfaces. 21 | 22 | ```glsl 23 | 24 | void Lambert(inout vec4 diffuseColor, in vec3 normal) 25 | { 26 | vec3 N = normalize(normal); 27 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 28 | float NL = max(dot(N, L), 0.0); 29 | vec3 diffuse = NL * (diffuseColor.rgb * cc_mainLitColor.xyz); 30 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 31 | diffuseColor.rgb = ambient + diffuse; 32 | } 33 | ``` 34 | ## Half Lambert Model 35 | The Half Lambert model is a variant of the Lambert model. It changes the interpretation of light reflection so that when the light is at a 90-degree angle to the normal, the reflection intensity is 0.5 instead of 0, making the shadow part not so dark. This model is often used for cartoon or non-realistic rendering. 36 | 37 | ```glsl 38 | void HalfLambert(inout vec4 diffuseColor, in vec3 normal) 39 | { 40 | vec3 N = normalize(normal); 41 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 42 | float NL = max(dot(N, L), 0.0); 43 | vec3 diffuse = pow(NL * diffuseWrap + (1.-diffuseWrap),2.0) * (diffuseColor.rgb * cc_mainLitColor.xyz); 44 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 45 | diffuseColor.rgb = ambient + diffuse; 46 | } 47 | ``` 48 | 49 | ## Blinn-Phong Model 50 | The Blinn-Phong model is an improved version of the Phong model. It introduces the concept of "half vector", making the calculation of specular highlights closer to the micro-surface theory. It is suitable for simulating glossy object surfaces. 51 | 52 | ```glsl 53 | void blinnPhong(inout vec4 diffuseColor, in vec3 normal) 54 | { 55 | vec3 N = normalize(normal); 56 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 57 | float NL = max(dot(N, L), 0.0); 58 | vec3 diffuse = NL * diffuseColor.rgb * cc_mainLitColor.xyz; 59 | vec3 position; 60 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 61 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 62 | vec3 V = normalize(cameraPosition - position); 63 | vec3 H = normalize(L + V); 64 | float specularFactor = pow(max(0.0, dot(H,N)), bpParams.x * 50.); 65 | vec3 specular = (specularFactor * cc_ambientSky.rgb * cc_mainLitColor.xyz); 66 | float shadowCtrl = 1.0; 67 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 68 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 69 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 70 | #endif 71 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 72 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 73 | #endif 74 | #endif 75 | diffuse = (diffuse + specular) * (shadowCtrl); 76 | } 77 | ``` 78 | ## Toon Model 79 | The Toon model, or Cel-shading, discretizes the light intensity into several levels to simulate the effect of hand-drawn animation. It is suitable for cartoon or art style rendering. 80 | 81 | ```glsl 82 | 83 | void ToonShading (inout vec4 diffuseColor, in vec3 normal) { 84 | vec3 position; 85 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 86 | vec3 V = normalize(cc_cameraPos.xyz - position); 87 | vec3 N = normalize(normal); 88 | vec3 L = normalize(-cc_mainLitDir.xyz); 89 | float NL = 0.5 * dot(N, L) + 0.5; 90 | float NH = 0.5 * dot(normalize(V + L), N) + 0.5; 91 | vec3 lightColor = cc_mainLitColor.rgb * (cc_mainLitColor.w * shadeParams.x); 92 | float shadeFeather = shadeParams.y; 93 | float shadeCtrl = mix(1., (1.-shadeParams.z), clamp(1.0 + (shadeParams.x - shadeFeather - NL) / shadeFeather, 0.0, 1.0)); 94 | shadeCtrl *= mix(1., (1.-shadeParams.z*0.5), clamp(1.0 + (shadeParams.w - shadeFeather - NL) / shadeFeather, 0.0, 1.0)); 95 | float specularWeight = 1.0 - pow(specularParams.x, 5.0); 96 | float specularMask = 1.0-smoothstep( NH, NH+ specularParams.y, specularWeight + EPSILON_LOWP); 97 | float shadowCtrl = 1.0; 98 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 99 | if (NL > 0.0) { 100 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 101 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias+0.1); 102 | #endif 103 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 104 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias+0.1); 105 | #endif 106 | } 107 | #endif 108 | float diffuseCtrl = (shadowCtrl+specularMask*specularParams.z)*shadeCtrl; 109 | vec3 envColor = cc_ambientGround.rgb*cc_ambientSky.w; 110 | diffuseColor.rgb *= (envColor + (lightColor*diffuseCtrl)); 111 | } 112 | } 113 | ``` 114 | ## PBR (Physically Based Rendering) 115 | PBR is the latest lighting model, which tries to more realistically simulate the interaction between light and the surface of an object, including diffuse and specular reflection. PBR models usually include principles of physics like energy conservation and Fresnel effect, and they are suitable for simulating rendering in the real world. 116 | 117 | PBR's GLSL code is quite long, typically including calculations for multiple physical characteristics, such as roughness, metallicity, etc. Therefore, the complete PBR GLSL code is not provided here. 118 | 119 | Also, since this model does not have PBR textures, the effect is not significantly different from Blinn-Phong. 120 | -------------------------------------------------------------------------------- /assets/scripts/orbit-camera.ts: -------------------------------------------------------------------------------- 1 | import { Component, _decorator, Vec3, EventTouch, Touch, Quat, Vec2, Node, EventMouse, lerp, macro, input, Input,sys } from 'cc' 2 | import { EDITOR } from 'cc/env'; 3 | 4 | const { ccclass, property, type, executeInEditMode } = _decorator; 5 | 6 | let tempVec3 = new Vec3(); 7 | let tempVec3_2 = new Vec3(); 8 | let tempQuat = new Quat(); 9 | let tempVec2 = new Vec2(); 10 | let tempVec2_2 = new Vec2(); 11 | let DeltaFactor = 1 / 200; 12 | 13 | @ccclass('OrbitCamera') 14 | @executeInEditMode(true) 15 | export default class OrbitCamera extends Component { 16 | 17 | @property enableTouch = true; 18 | @property enableScaleRadius = false; 19 | @property rotateSpeed = 1; 20 | @property followSpeed = 1; 21 | @property xRotationRange = new Vec2(5, 70); 22 | @type(Node) _target: Node; 23 | @property radiusScaleSpeed = 1; 24 | @property minRadius = 5; 25 | @property maxRadius = 10; 26 | @property followTargetRotationY = true; 27 | 28 | @property 29 | get radius() { 30 | return this._targetRadius; 31 | } 32 | set radius(v) { 33 | this._targetRadius = v; 34 | } 35 | 36 | @type(Node) 37 | get target() { 38 | return this._target; 39 | } 40 | set target(v) { 41 | this._target = v; 42 | this._targetRotation.set(this._startRotation); 43 | this._targetCenter.set(v!.worldPosition); 44 | } 45 | 46 | @property 47 | get preview() { 48 | return false 49 | } 50 | set preview(v) { 51 | this.resetCam(1); 52 | } 53 | 54 | @property 55 | get targetRotation(): Vec3 { 56 | return this._startRotation; 57 | } 58 | set targetRotation(v: Vec3) { 59 | this._targetRotation.set(v); 60 | this._startRotation.set(v); 61 | } 62 | 63 | 64 | @property({ visible: false }) private _startRotation = new Vec3; 65 | @property({ visible: false }) private _targetRadius = 10; 66 | 67 | private _center = new Vec3; 68 | private _targetCenter = new Vec3; 69 | private _touched = false; 70 | private _targetRotation = new Vec3; 71 | private _rotation = new Quat 72 | private _radius = 10; 73 | private dis = 0; 74 | 75 | start() { 76 | 77 | if (EDITOR) { 78 | this.resetCam(1); 79 | return; 80 | } 81 | 82 | this.init(); 83 | 84 | } 85 | 86 | init() { 87 | macro.ENABLE_MULTI_TOUCH = true; 88 | 89 | input.on(Input.EventType.TOUCH_START, this.onTouchStart, this) 90 | input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this) 91 | input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this) 92 | input.on(Input.EventType.TOUCH_CANCEL, this.onTouchEnd, this) 93 | 94 | this.resetTargetRotation(); 95 | Quat.fromEuler(this._rotation, this._targetRotation.x, this._targetRotation.y, this._targetRotation.z); 96 | 97 | if (this.target) { 98 | this._targetCenter.set(this.target.worldPosition); 99 | this._center.set(this._targetCenter); 100 | } 101 | 102 | this._radius = this.radius; 103 | 104 | this.limitRotation() 105 | 106 | if (this.enableScaleRadius && sys.platform == sys.Platform.DESKTOP_BROWSER) { 107 | input.on(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this) 108 | } 109 | 110 | } 111 | 112 | resetTargetRotation() { 113 | let targetRotation = this._targetRotation.set(this._startRotation); 114 | if (this.followTargetRotationY) { 115 | targetRotation = tempVec3_2.set(targetRotation); 116 | Quat.toEuler(tempVec3, this.target!.worldRotation); 117 | targetRotation.y += tempVec3.y; 118 | } 119 | } 120 | 121 | onTouchStart(event?: EventTouch) { 122 | this._touched = true; 123 | } 124 | 125 | 126 | onTouchMove(event?: EventTouch) { 127 | 128 | if (!this._touched) return; 129 | 130 | const touch = event.touch; 131 | 132 | const touches = event.getAllTouches(); 133 | /* scale radius for mobile multi touch */ 134 | if (touches.length > 1) { 135 | const changedTouches = event.getTouches(); 136 | 137 | let touch1: Touch = null!; 138 | let touch2: Touch = null!; 139 | if (changedTouches.length > 1) { 140 | touch1 = touches[0]; 141 | touch2 = touches[1]; 142 | 143 | } else { 144 | touch1 = touch; 145 | const diffID = touch1.getID(); 146 | for (let i = 0; i < touches.length; i++) { 147 | const element = touches[i]; 148 | if (element.getID() !== diffID) { 149 | touch2 = element; 150 | break; 151 | } 152 | } 153 | } 154 | touch1.getLocation(tempVec2); 155 | touch2.getLocation(tempVec2_2); 156 | let dis = Vec2.distance(tempVec2, tempVec2_2) 157 | let delta = dis - this.dis 158 | this._targetRadius += this.radiusScaleSpeed * -Math.sign(delta) * 0.3; 159 | this._targetRadius = Math.min(this.maxRadius, Math.max(this.minRadius, this._targetRadius)); 160 | this.dis = dis; 161 | } 162 | 163 | tempVec2 = touch!.getDelta() 164 | 165 | this.setRotate(tempVec2) 166 | } 167 | 168 | onTouchEnd() { 169 | this._touched = false; 170 | } 171 | 172 | setRotate(v2: Vec2) { 173 | Quat.fromEuler(tempQuat, this._targetRotation.x, this._targetRotation.y, this._targetRotation.z); 174 | 175 | Quat.rotateX(tempQuat, tempQuat, -v2.y * DeltaFactor); 176 | Quat.rotateAround(tempQuat, tempQuat, Vec3.UP, -v2.x * DeltaFactor); 177 | 178 | Quat.toEuler(this._targetRotation, tempQuat); 179 | 180 | this.limitRotation() 181 | } 182 | 183 | 184 | onMouseWheel(event: EventMouse) { 185 | let scrollY = event.getScrollY(); 186 | this._targetRadius += this.radiusScaleSpeed * -Math.sign(scrollY); 187 | this._targetRadius = Math.min(this.maxRadius, Math.max(this.minRadius, this._targetRadius)); 188 | } 189 | 190 | limitRotation() { 191 | let rotation = this._targetRotation; 192 | if (rotation.x < this.xRotationRange.x) { 193 | rotation.x = this.xRotationRange.x 194 | } 195 | else if (rotation.x > this.xRotationRange.y) { 196 | rotation.x = this.xRotationRange.y 197 | } 198 | rotation.z = 0; 199 | } 200 | 201 | 202 | lateUpdate(dt) { 203 | this.resetCam(dt); 204 | } 205 | 206 | resetCam(dt) { 207 | 208 | let targetRotation = this._targetRotation; 209 | this._targetCenter.set(this.target.worldPosition); 210 | 211 | if (this.followTargetRotationY) { 212 | targetRotation = tempVec3_2.set(targetRotation); 213 | Quat.toEuler(tempVec3, this.target.worldRotation); 214 | targetRotation.y += tempVec3.y; 215 | } 216 | 217 | Quat.fromEuler(tempQuat, targetRotation.x, targetRotation.y, targetRotation.z); 218 | 219 | Quat.slerp(this._rotation, this._rotation, tempQuat, dt * 7 * this.rotateSpeed); 220 | 221 | Vec3.lerp(this._center, this._center, this._targetCenter, dt * 5 * this.followSpeed); 222 | 223 | this._radius = lerp(this._radius, this._targetRadius, dt * 10); 224 | 225 | Vec3.transformQuat(tempVec3, Vec3.FORWARD, this._rotation); 226 | 227 | Vec3.multiplyScalar(tempVec3, tempVec3, this._radius) 228 | tempVec3.add(this._center) 229 | 230 | this.node.position = tempVec3; 231 | this.node.lookAt(this._center); 232 | } 233 | 234 | } 235 | -------------------------------------------------------------------------------- /assets/res/sprites/bmfont.fnt: -------------------------------------------------------------------------------- 1 | info face="" size=30 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=1,1 2 | common lineHeight=30 base=24 scaleW=199 scaleH=197 pages=1 packed=0 3 | page id=0 file="bmfont.png" 4 | chars count=91 5 | char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15 6 | char id=33 x=21 y=134 width=6 height=24 xoffset=2 yoffset=1 xadvance=9 page=0 chnl=15 7 | char id=34 x=85 y=179 width=10 height=12 xoffset=0 yoffset=1 xadvance=11 page=0 chnl=15 8 | char id=35 x=92 y=134 width=19 height=24 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 9 | char id=36 x=78 y=0 width=18 height=29 xoffset=-1 yoffset=0 xadvance=17 page=0 chnl=15 10 | char id=37 x=171 y=109 width=28 height=24 xoffset=-1 yoffset=2 xadvance=27 page=0 chnl=15 11 | char id=38 x=0 y=58 width=21 height=25 xoffset=0 yoffset=1 xadvance=21 page=0 chnl=15 12 | char id=39 x=96 y=179 width=5 height=12 xoffset=1 yoffset=1 xadvance=6 page=0 chnl=15 13 | char id=40 x=9 y=0 width=9 height=31 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=15 14 | char id=41 x=19 y=0 width=10 height=31 xoffset=-1 yoffset=1 xadvance=10 page=0 chnl=15 15 | char id=42 x=186 y=134 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 16 | char id=43 x=49 y=179 width=18 height=17 xoffset=0 yoffset=8 xadvance=18 page=0 chnl=15 17 | char id=44 x=186 y=147 width=6 height=10 xoffset=1 yoffset=20 xadvance=9 page=0 chnl=15 18 | char id=45 x=121 y=179 width=10 height=5 xoffset=0 yoffset=13 xadvance=10 page=0 chnl=15 19 | char id=46 x=121 y=185 width=6 height=5 xoffset=1 yoffset=20 xadvance=9 page=0 chnl=15 20 | char id=47 x=73 y=134 width=12 height=24 xoffset=-1 yoffset=1 xadvance=9 page=0 chnl=15 21 | char id=48 x=22 y=58 width=18 height=24 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 22 | char id=49 x=188 y=32 width=11 height=23 xoffset=1 yoffset=2 xadvance=17 page=0 chnl=15 23 | char id=50 x=112 y=134 width=18 height=23 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 24 | char id=51 x=41 y=58 width=18 height=24 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 25 | char id=52 x=131 y=134 width=18 height=23 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 26 | char id=53 x=60 y=58 width=18 height=24 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 27 | char id=54 x=79 y=58 width=17 height=24 xoffset=0 yoffset=2 xadvance=17 page=0 chnl=15 28 | char id=55 x=150 y=134 width=17 height=23 xoffset=0 yoffset=2 xadvance=17 page=0 chnl=15 29 | char id=56 x=97 y=58 width=18 height=24 xoffset=-1 yoffset=2 xadvance=17 page=0 chnl=15 30 | char id=57 x=116 y=58 width=17 height=24 xoffset=0 yoffset=2 xadvance=17 page=0 chnl=15 31 | char id=58 x=42 y=179 width=6 height=18 xoffset=2 yoffset=7 xadvance=9 page=0 chnl=15 32 | char id=59 x=179 y=134 width=6 height=23 xoffset=2 yoffset=7 xadvance=9 page=0 chnl=15 33 | char id=61 x=102 y=179 width=18 height=11 xoffset=0 yoffset=11 xadvance=18 page=0 chnl=15 34 | char id=63 x=56 y=134 width=16 height=24 xoffset=1 yoffset=1 xadvance=17 page=0 chnl=15 35 | char id=64 x=160 y=32 width=27 height=25 xoffset=2 yoffset=1 xadvance=31 page=0 chnl=15 36 | char id=65 x=23 y=84 width=22 height=24 xoffset=-1 yoffset=1 xadvance=21 page=0 chnl=15 37 | char id=66 x=46 y=84 width=19 height=24 xoffset=1 yoffset=1 xadvance=21 page=0 chnl=15 38 | char id=67 x=54 y=32 width=22 height=25 xoffset=0 yoffset=1 xadvance=22 page=0 chnl=15 39 | char id=68 x=66 y=84 width=21 height=24 xoffset=1 yoffset=1 xadvance=22 page=0 chnl=15 40 | char id=69 x=88 y=84 width=19 height=24 xoffset=1 yoffset=1 xadvance=21 page=0 chnl=15 41 | char id=70 x=108 y=84 width=18 height=24 xoffset=1 yoffset=1 xadvance=19 page=0 chnl=15 42 | char id=71 x=176 y=0 width=23 height=25 xoffset=0 yoffset=1 xadvance=24 page=0 chnl=15 43 | char id=72 x=127 y=84 width=20 height=24 xoffset=1 yoffset=1 xadvance=22 page=0 chnl=15 44 | char id=73 x=148 y=84 width=6 height=24 xoffset=1 yoffset=1 xadvance=9 page=0 chnl=15 45 | char id=74 x=77 y=32 width=15 height=25 xoffset=-1 yoffset=1 xadvance=15 page=0 chnl=15 46 | char id=75 x=155 y=84 width=20 height=24 xoffset=1 yoffset=1 xadvance=21 page=0 chnl=15 47 | char id=76 x=0 y=109 width=17 height=24 xoffset=1 yoffset=1 xadvance=17 page=0 chnl=15 48 | char id=77 x=176 y=84 width=23 height=24 xoffset=1 yoffset=1 xadvance=25 page=0 chnl=15 49 | char id=78 x=18 y=109 width=20 height=24 xoffset=1 yoffset=1 xadvance=22 page=0 chnl=15 50 | char id=79 x=93 y=32 width=24 height=25 xoffset=0 yoffset=1 xadvance=24 page=0 chnl=15 51 | char id=80 x=39 y=109 width=19 height=24 xoffset=1 yoffset=1 xadvance=21 page=0 chnl=15 52 | char id=81 x=97 y=0 width=24 height=26 xoffset=0 yoffset=1 xadvance=24 page=0 chnl=15 53 | char id=82 x=59 y=109 width=21 height=24 xoffset=1 yoffset=1 xadvance=22 page=0 chnl=15 54 | char id=83 x=118 y=32 width=20 height=25 xoffset=0 yoffset=1 xadvance=21 page=0 chnl=15 55 | char id=84 x=81 y=109 width=20 height=24 xoffset=-1 yoffset=1 xadvance=19 page=0 chnl=15 56 | char id=85 x=139 y=32 width=20 height=25 xoffset=1 yoffset=1 xadvance=22 page=0 chnl=15 57 | char id=86 x=102 y=109 width=22 height=24 xoffset=-1 yoffset=1 xadvance=21 page=0 chnl=15 58 | char id=87 x=169 y=58 width=30 height=24 xoffset=-1 yoffset=1 xadvance=29 page=0 chnl=15 59 | char id=88 x=125 y=109 width=22 height=24 xoffset=-1 yoffset=1 xadvance=21 page=0 chnl=15 60 | char id=89 x=148 y=109 width=22 height=24 xoffset=-1 yoffset=1 xadvance=21 page=0 chnl=15 61 | char id=90 x=0 y=134 width=20 height=24 xoffset=-1 yoffset=1 xadvance=19 page=0 chnl=15 62 | char id=91 x=58 y=0 width=9 height=30 xoffset=0 yoffset=1 xadvance=9 page=0 chnl=15 63 | char id=93 x=68 y=0 width=9 height=30 xoffset=-1 yoffset=1 xadvance=9 page=0 chnl=15 64 | char id=94 x=68 y=179 width=16 height=16 xoffset=0 yoffset=1 xadvance=15 page=0 chnl=15 65 | char id=95 x=132 y=179 width=19 height=4 xoffset=-1 yoffset=25 xadvance=17 page=0 chnl=15 66 | char id=97 x=0 y=159 width=18 height=19 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=15 67 | char id=98 x=122 y=0 width=17 height=25 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 68 | char id=99 x=19 y=159 width=17 height=19 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 69 | char id=100 x=140 y=0 width=17 height=25 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 70 | char id=101 x=37 y=159 width=17 height=19 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=15 71 | char id=102 x=134 y=58 width=10 height=24 xoffset=-1 yoffset=1 xadvance=9 page=0 chnl=15 72 | char id=103 x=158 y=0 width=17 height=25 xoffset=-1 yoffset=7 xadvance=17 page=0 chnl=15 73 | char id=104 x=145 y=58 width=16 height=24 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 74 | char id=105 x=162 y=58 width=6 height=24 xoffset=0 yoffset=1 xadvance=7 page=0 chnl=15 75 | char id=106 x=0 y=0 width=8 height=31 xoffset=-2 yoffset=1 xadvance=7 page=0 chnl=15 76 | char id=107 x=0 y=84 width=16 height=24 xoffset=0 yoffset=1 xadvance=15 page=0 chnl=15 77 | char id=108 x=17 y=84 width=5 height=24 xoffset=1 yoffset=1 xadvance=7 page=0 chnl=15 78 | char id=109 x=108 y=159 width=25 height=18 xoffset=0 yoffset=7 xadvance=25 page=0 chnl=15 79 | char id=110 x=134 y=159 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=15 80 | char id=111 x=55 y=159 width=18 height=19 xoffset=-1 yoffset=7 xadvance=17 page=0 chnl=15 81 | char id=112 x=0 y=32 width=17 height=25 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=15 82 | char id=113 x=18 y=32 width=17 height=25 xoffset=-1 yoffset=7 xadvance=17 page=0 chnl=15 83 | char id=114 x=151 y=159 width=10 height=18 xoffset=1 yoffset=7 xadvance=10 page=0 chnl=15 84 | char id=115 x=74 y=159 width=16 height=19 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 85 | char id=116 x=168 y=134 width=10 height=23 xoffset=-1 yoffset=3 xadvance=9 page=0 chnl=15 86 | char id=117 x=91 y=159 width=16 height=19 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=15 87 | char id=118 x=162 y=159 width=17 height=18 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 88 | char id=119 x=0 y=179 width=24 height=18 xoffset=-1 yoffset=7 xadvance=22 page=0 chnl=15 89 | char id=120 x=180 y=159 width=17 height=18 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 90 | char id=121 x=36 y=32 width=17 height=25 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 91 | char id=122 x=25 y=179 width=16 height=18 xoffset=-1 yoffset=7 xadvance=15 page=0 chnl=15 92 | char id=123 x=30 y=0 width=13 height=31 xoffset=-2 yoffset=1 xadvance=11 page=0 chnl=15 93 | char id=124 x=86 y=134 width=5 height=24 xoffset=1 yoffset=1 xadvance=8 page=0 chnl=15 94 | char id=125 x=44 y=0 width=13 height=31 xoffset=-1 yoffset=1 xadvance=11 page=0 chnl=15 95 | char id=8470 x=28 y=134 width=27 height=24 xoffset=0 yoffset=1 xadvance=28 page=0 chnl=15 96 | -------------------------------------------------------------------------------- /assets/res/effect/Lambert.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: Lambert-vs 7 | frag: Lambert-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | shininess: { value: 0.5,target: bpParams.x, editor: { parent: USE_IBL,slide: true, range: [0., 1.0], step: 0.001 } } 14 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL,slide: true, range: [0.0, 1.0], step: 0.01 } } 15 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 16 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 17 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 18 | emissiveMap: { value: grey } 19 | normalMap: { value: normal } 20 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 21 | - &shadow-caster 22 | vert: shadow-caster-vs:vert 23 | frag: shadow-caster-fs:frag 24 | phase: shadow-caster 25 | propertyIndex: 1 26 | rasterizerState: 27 | cullMode: front 28 | properties: 29 | - name: transparent 30 | passes: 31 | - vert: Lambert-vs 32 | frag: Lambert-fs:frag 33 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 34 | depthStencilState: &d1 35 | depthTest: true 36 | depthWrite: false 37 | blendState: &b1 38 | targets: 39 | - blend: true 40 | blendSrc: src_alpha 41 | blendDst: one_minus_src_alpha 42 | blendDstAlpha: one_minus_src_alpha 43 | properties: *props 44 | - *shadow-caster 45 | }% 46 | 47 | CCProgram shared-ubos %{ 48 | uniform Constants { 49 | vec4 tilingOffset; 50 | vec4 albedoColor; 51 | vec4 albedoScaleAndCutoff; 52 | vec4 rimColor; 53 | vec4 emissive; 54 | vec4 bpParams; 55 | }; 56 | }% 57 | 58 | CCProgram Lambert-vs %{ 59 | precision highp float; 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | 68 | #if CC_RECEIVE_SHADOW 69 | out mediump vec2 v_shadowBias; 70 | #endif 71 | 72 | #if USE_NORMAL_MAP 73 | out mediump vec4 v_tangent; 74 | #endif 75 | 76 | #if USE_VERTEX_COLOR 77 | in vec4 a_color; 78 | out vec4 v_color; 79 | #endif 80 | #if USE_RIM_LIGHT 81 | out vec3 v_view_normal; 82 | #endif 83 | 84 | 85 | out vec3 v_position; 86 | out vec3 v_normal; 87 | out vec2 v_uv; 88 | 89 | void main () { 90 | 91 | StandardVertInput In; 92 | CCVertInput(In); 93 | mat4 matWorld, matWorldIT; 94 | CCGetWorldMatrixFull(matWorld, matWorldIT); 95 | vec4 pos = matWorld * In.position; 96 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 97 | CC_TRANSFER_SHADOW(pos); 98 | #endif 99 | v_position = pos.xyz; 100 | #if CC_RECEIVE_SHADOW 101 | v_shadowBias = CCGetShadowBias(); 102 | #endif 103 | CC_TRANSFER_FOG(pos); 104 | 105 | vec4 position = cc_matView * pos; 106 | 107 | vec4 normal = vec4(In.normal,0.0); 108 | 109 | #if USE_RIM_LIGHT 110 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 111 | #endif 112 | 113 | v_normal = normalize((matWorldIT * normal).xyz); 114 | 115 | #if USE_NORMAL_MAP 116 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 117 | v_tangent.w = In.tangent.w; 118 | #endif 119 | 120 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 121 | 122 | #if USE_VERTEX_COLOR 123 | v_color = a_color; 124 | #endif 125 | gl_Position = cc_matProj * position; 126 | } 127 | }% 128 | 129 | CCProgram Lambert-fs %{ 130 | precision highp float; 131 | #include 132 | #include 133 | #include 134 | #include 135 | #include 136 | 137 | #if CC_RECEIVE_SHADOW 138 | #include 139 | in mediump vec2 v_shadowBias; 140 | #endif 141 | 142 | in vec3 v_position; 143 | in vec2 v_uv; 144 | in vec3 v_normal; 145 | 146 | #if USE_ALBEDO_MAP 147 | uniform sampler2D albedoMap; 148 | #endif 149 | 150 | #if USE_VERTEX_COLOR 151 | in vec4 v_color; 152 | #endif 153 | 154 | #if USE_ALPHA_TEST 155 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 156 | #endif 157 | 158 | #if USE_EMISSIVE_MAP 159 | uniform sampler2D emissiveMap; 160 | #endif 161 | 162 | #if USE_NORMAL_MAP 163 | in mediump vec4 v_tangent; 164 | uniform sampler2D normalMap; 165 | #endif 166 | 167 | #if USE_RIM_LIGHT 168 | in vec3 v_view_normal; 169 | #endif 170 | 171 | #if USE_IBL 172 | #include 173 | #include 174 | #include 175 | #endif 176 | 177 | 178 | void Lambert(inout vec4 diffuseColor,in vec3 normal){ 179 | vec3 N = normalize(normal); 180 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 181 | float NL = max(dot(N, L), 0.0); 182 | vec3 diffuse = NL * (diffuseColor.rgb * cc_mainLitColor.xyz); 183 | vec3 position; 184 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 185 | float shadowCtrl = 1.0; 186 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 187 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 188 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 189 | #endif 190 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 191 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 192 | #endif 193 | #endif 194 | diffuse *= shadowCtrl; 195 | 196 | //IBL 197 | #if CC_USE_IBL && USE_IBL 198 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 199 | vec3 V = normalize(cameraPosition- position); 200 | vec3 env = vec3(1.); 201 | vec3 R = normalize(reflect(-V, N)); 202 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 203 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 204 | #if CC_USE_IBL == IBL_RGBE 205 | env = unpackRGBE(envmap); 206 | #else 207 | env = SRGBToLinear(envmap.rgb); 208 | #endif 209 | diffuse = mix(env, diffuse, bpParams.x); 210 | #endif 211 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 212 | diffuseColor.rgb = ambient + diffuse; 213 | } 214 | 215 | vec4 frag () { 216 | //Blinn-Phong from GPT4.0&&iwae 217 | vec4 color = albedoColor; 218 | color.rgb *= albedoScaleAndCutoff.xyz; 219 | #if USE_VERTEX_COLOR 220 | color *= v_color; 221 | #endif 222 | //Albedo 223 | #if USE_ALBEDO_MAP 224 | color *= texture(albedoMap, v_uv); 225 | color.rgb = SRGBToLinear(color.rgb); 226 | #endif 227 | // Alpha Test 228 | #if USE_ALPHA_TEST 229 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 230 | #endif 231 | 232 | vec3 normal = v_normal; 233 | //Normal 234 | #if USE_NORMAL_MAP 235 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 236 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 237 | normal = 238 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 239 | (nmmp.y * bpParams.w) * normalize(bitangent) + 240 | nmmp.z * normalize(normal); 241 | #endif 242 | 243 | //Lambert 244 | Lambert(color,normal); 245 | 246 | //Emmissive 247 | vec3 emissiveCol = emissive.rgb; 248 | 249 | #if USE_EMISSIVE_MAP 250 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 251 | #endif 252 | color.rgb +=emissiveCol; 253 | 254 | //RimLight 255 | #if USE_RIM_LIGHT 256 | vec4 rim; 257 | rim = rimColor; 258 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 259 | color.rgb = mix(color.rgb,rim.rgb,fRim); 260 | #endif 261 | 262 | //Fog 263 | CC_APPLY_FOG(color); 264 | 265 | //Output 266 | return CCFragOutput(color); 267 | } 268 | }% 269 | 270 | 271 | CCProgram shadow-caster-vs %{ 272 | precision mediump float; 273 | #include 274 | #include 275 | #include 276 | #include 277 | #include 278 | 279 | out vec4 v_worldPos; 280 | out highp vec2 v_clip_depth; 281 | 282 | vec4 vert () { 283 | StandardVertInput In; 284 | CCVertInput(In); 285 | 286 | mat4 matWorld, matWorldIT; 287 | CCGetWorldMatrixFull(matWorld, matWorldIT); 288 | 289 | v_worldPos = matWorld * In.position; 290 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 291 | v_clip_depth = clipPos.zw; 292 | 293 | return clipPos; 294 | } 295 | }% 296 | 297 | CCProgram shadow-caster-fs %{ 298 | precision mediump float; 299 | #include 300 | #include 301 | #include 302 | 303 | in vec4 v_worldPos; 304 | in highp vec2 v_clip_depth; 305 | 306 | vec4 frag () { 307 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 308 | // spot use linear 309 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 310 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 311 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 312 | } 313 | #endif 314 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 315 | return packDepthToRGBA(clipDepth); 316 | #else 317 | return vec4(clipDepth, 1.0, 1.0, 1.0); 318 | #endif 319 | } 320 | }% 321 | 322 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /assets/res/effect/HalfLambert.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: HalfLambert-vs 7 | frag: HalfLambert-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | diffuseWrap: { value: 0.5,target: bpParams.z, editor: { slide: true, range: [0.5, 1.0], step: 0.001 } } 14 | shininess: { value: 0.5,target: bpParams.x, editor: { parent: USE_IBL, slide: true, range: [0., 1.0], step: 0.001 } } 15 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL, slide: true, range: [0.0, 1.0], step: 0.01 } } 16 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 17 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 18 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 19 | emissiveMap: { value: grey } 20 | normalMap: { value: normal } 21 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 22 | - &shadow-caster 23 | vert: shadow-caster-vs:vert 24 | frag: shadow-caster-fs:frag 25 | phase: shadow-caster 26 | propertyIndex: 1 27 | rasterizerState: 28 | cullMode: front 29 | properties: 30 | - name: transparent 31 | passes: 32 | - vert: HalfLambert-vs 33 | frag: HalfLambert-fs:frag 34 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 35 | depthStencilState: &d1 36 | depthTest: true 37 | depthWrite: false 38 | blendState: &b1 39 | targets: 40 | - blend: true 41 | blendSrc: src_alpha 42 | blendDst: one_minus_src_alpha 43 | blendDstAlpha: one_minus_src_alpha 44 | properties: *props 45 | - *shadow-caster 46 | }% 47 | 48 | CCProgram shared-ubos %{ 49 | uniform Constants { 50 | vec4 tilingOffset; 51 | vec4 albedoColor; 52 | vec4 albedoScaleAndCutoff; 53 | vec4 rimColor; 54 | vec4 emissive; 55 | vec4 bpParams; 56 | }; 57 | }% 58 | 59 | CCProgram HalfLambert-vs %{ 60 | precision highp float; 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | 69 | #if CC_RECEIVE_SHADOW 70 | out mediump vec2 v_shadowBias; 71 | #endif 72 | 73 | #if USE_NORMAL_MAP 74 | out mediump vec4 v_tangent; 75 | #endif 76 | 77 | #if USE_VERTEX_COLOR 78 | in vec4 a_color; 79 | out vec4 v_color; 80 | #endif 81 | #if USE_RIM_LIGHT 82 | out vec3 v_view_normal; 83 | #endif 84 | 85 | 86 | out vec3 v_position; 87 | out vec3 v_normal; 88 | out vec2 v_uv; 89 | 90 | void main () { 91 | 92 | StandardVertInput In; 93 | CCVertInput(In); 94 | mat4 matWorld, matWorldIT; 95 | CCGetWorldMatrixFull(matWorld, matWorldIT); 96 | vec4 pos = matWorld * In.position; 97 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 98 | CC_TRANSFER_SHADOW(pos); 99 | #endif 100 | v_position = pos.xyz; 101 | #if CC_RECEIVE_SHADOW 102 | v_shadowBias = CCGetShadowBias(); 103 | #endif 104 | CC_TRANSFER_FOG(pos); 105 | 106 | vec4 position = cc_matView * pos; 107 | 108 | vec4 normal = vec4(In.normal,0.0); 109 | 110 | #if USE_RIM_LIGHT 111 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 112 | #endif 113 | 114 | v_normal = normalize((matWorldIT * normal).xyz); 115 | 116 | #if USE_NORMAL_MAP 117 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 118 | v_tangent.w = In.tangent.w; 119 | #endif 120 | 121 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 122 | 123 | #if USE_VERTEX_COLOR 124 | v_color = a_color; 125 | #endif 126 | gl_Position = cc_matProj * position; 127 | } 128 | }% 129 | 130 | CCProgram HalfLambert-fs %{ 131 | precision highp float; 132 | #include 133 | #include 134 | #include 135 | #include 136 | #include 137 | 138 | #if CC_RECEIVE_SHADOW 139 | #include 140 | in mediump vec2 v_shadowBias; 141 | #endif 142 | 143 | in vec3 v_position; 144 | in vec2 v_uv; 145 | in vec3 v_normal; 146 | 147 | #if USE_ALBEDO_MAP 148 | uniform sampler2D albedoMap; 149 | #endif 150 | 151 | #if USE_VERTEX_COLOR 152 | in vec4 v_color; 153 | #endif 154 | 155 | #if USE_ALPHA_TEST 156 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 157 | #endif 158 | 159 | #if USE_EMISSIVE_MAP 160 | uniform sampler2D emissiveMap; 161 | #endif 162 | 163 | #if USE_NORMAL_MAP 164 | in mediump vec4 v_tangent; 165 | uniform sampler2D normalMap; 166 | #endif 167 | 168 | #if USE_RIM_LIGHT 169 | in vec3 v_view_normal; 170 | #endif 171 | 172 | #if USE_IBL 173 | #include 174 | #include 175 | #include 176 | #endif 177 | 178 | 179 | void HalfLambert(inout vec4 diffuseColor,in vec3 normal){ 180 | vec3 N = normalize(normal); 181 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 182 | float NL = max(dot(N, L), 0.0); 183 | vec3 diffuse = pow(NL * bpParams.z + (1.-bpParams.z),2.0) * (diffuseColor.rgb * cc_mainLitColor.xyz); 184 | vec3 position; 185 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 186 | float shadowCtrl = 1.0; 187 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 188 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 189 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 190 | #endif 191 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 192 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 193 | #endif 194 | #endif 195 | diffuse *= shadowCtrl; 196 | 197 | //IBL 198 | #if CC_USE_IBL && USE_IBL 199 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 200 | vec3 V = normalize(cameraPosition- position); 201 | vec3 env = vec3(1.); 202 | vec3 R = normalize(reflect(-V, N)); 203 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 204 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 205 | #if CC_USE_IBL == IBL_RGBE 206 | env = unpackRGBE(envmap); 207 | #else 208 | env = SRGBToLinear(envmap.rgb); 209 | #endif 210 | diffuse = mix(env, diffuse, bpParams.x); 211 | #endif 212 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 213 | diffuseColor.rgb = ambient + diffuse; 214 | } 215 | 216 | vec4 frag () { 217 | //Blinn-Phong from GPT4.0&&iwae 218 | vec4 color = albedoColor; 219 | color.rgb *= albedoScaleAndCutoff.xyz; 220 | #if USE_VERTEX_COLOR 221 | color *= v_color; 222 | #endif 223 | //Albedo 224 | #if USE_ALBEDO_MAP 225 | color *= texture(albedoMap, v_uv); 226 | color.rgb = SRGBToLinear(color.rgb); 227 | #endif 228 | 229 | vec3 normal = v_normal; 230 | //Normal 231 | #if USE_NORMAL_MAP 232 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 233 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 234 | normal = 235 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 236 | (nmmp.y * bpParams.w) * normalize(bitangent) + 237 | nmmp.z * normalize(normal); 238 | #endif 239 | 240 | //HalfLambert 241 | HalfLambert(color,normal); 242 | 243 | //Emmissive 244 | vec3 emissiveCol = emissive.rgb; 245 | 246 | #if USE_EMISSIVE_MAP 247 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 248 | #endif 249 | color.rgb +=emissiveCol; 250 | 251 | // Alpha Test 252 | #if USE_ALPHA_TEST 253 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 254 | #endif 255 | 256 | //RimLight 257 | #if USE_RIM_LIGHT 258 | vec4 rim; 259 | rim = rimColor; 260 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 261 | color.rgb = mix(color.rgb,rim.rgb,fRim); 262 | #endif 263 | 264 | //Fog 265 | CC_APPLY_FOG(color); 266 | 267 | //Output 268 | return CCFragOutput(color); 269 | } 270 | }% 271 | 272 | 273 | CCProgram shadow-caster-vs %{ 274 | precision mediump float; 275 | #include 276 | #include 277 | #include 278 | #include 279 | #include 280 | 281 | out vec4 v_worldPos; 282 | out highp vec2 v_clip_depth; 283 | 284 | vec4 vert () { 285 | StandardVertInput In; 286 | CCVertInput(In); 287 | 288 | mat4 matWorld, matWorldIT; 289 | CCGetWorldMatrixFull(matWorld, matWorldIT); 290 | 291 | v_worldPos = matWorld * In.position; 292 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 293 | v_clip_depth = clipPos.zw; 294 | 295 | return clipPos; 296 | } 297 | }% 298 | 299 | CCProgram shadow-caster-fs %{ 300 | precision mediump float; 301 | #include 302 | #include 303 | #include 304 | 305 | in vec4 v_worldPos; 306 | in highp vec2 v_clip_depth; 307 | 308 | vec4 frag () { 309 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 310 | // spot use linear 311 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 312 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 313 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 314 | } 315 | #endif 316 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 317 | return packDepthToRGBA(clipDepth); 318 | #else 319 | return vec4(clipDepth, 1.0, 1.0, 1.0); 320 | #endif 321 | } 322 | }% 323 | 324 | 325 | 326 | 327 | 328 | 329 | -------------------------------------------------------------------------------- /assets/res/effect/Blinn-Phong.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: blinnPhong-vs 7 | frag: blinnPhong-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | shininess: { value: 0.5,target: bpParams.x, editor: { slide: true, range: [0., 1.0], step: 0.001 } } 14 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL, slide: true, range: [0.0, 1.0], step: 0.01 } } 15 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 16 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 17 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 18 | emissiveMap: { value: grey } 19 | normalMap: { value: normal } 20 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 21 | - &shadow-caster 22 | vert: shadow-caster-vs:vert 23 | frag: shadow-caster-fs:frag 24 | phase: shadow-caster 25 | propertyIndex: 1 26 | rasterizerState: 27 | cullMode: front 28 | properties: 29 | - name: transparent 30 | passes: 31 | - vert: blinnPhong-vs 32 | frag: blinnPhong-fs:frag 33 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 34 | depthStencilState: &d1 35 | depthTest: true 36 | depthWrite: false 37 | blendState: &b1 38 | targets: 39 | - blend: true 40 | blendSrc: src_alpha 41 | blendDst: one_minus_src_alpha 42 | blendDstAlpha: one_minus_src_alpha 43 | properties: *props 44 | - *shadow-caster 45 | }% 46 | 47 | 48 | CCProgram shared-ubos %{ 49 | uniform Constants { 50 | vec4 tilingOffset; 51 | vec4 albedoColor; 52 | vec4 albedoScaleAndCutoff; 53 | vec4 rimColor; 54 | vec4 emissive; 55 | vec4 bpParams; 56 | }; 57 | }% 58 | 59 | CCProgram blinnPhong-vs %{ 60 | precision highp float; 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | 69 | #if CC_RECEIVE_SHADOW 70 | out mediump vec2 v_shadowBias; 71 | #endif 72 | 73 | #if USE_NORMAL_MAP 74 | out mediump vec4 v_tangent; 75 | #endif 76 | 77 | #if USE_VERTEX_COLOR 78 | in vec4 a_color; 79 | out vec4 v_color; 80 | #endif 81 | #if USE_RIM_LIGHT 82 | out vec3 v_view_normal; 83 | #endif 84 | 85 | 86 | out vec3 v_position; 87 | out vec3 v_normal; 88 | out vec2 v_uv; 89 | 90 | void main () { 91 | 92 | StandardVertInput In; 93 | CCVertInput(In); 94 | mat4 matWorld, matWorldIT; 95 | CCGetWorldMatrixFull(matWorld, matWorldIT); 96 | vec4 pos = matWorld * In.position; 97 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 98 | CC_TRANSFER_SHADOW(pos); 99 | #endif 100 | v_position = pos.xyz; 101 | #if CC_RECEIVE_SHADOW 102 | v_shadowBias = CCGetShadowBias(); 103 | #endif 104 | CC_TRANSFER_FOG(pos); 105 | 106 | vec4 position = cc_matView * pos; 107 | 108 | vec4 normal = vec4(In.normal,0.0); 109 | 110 | #if USE_RIM_LIGHT 111 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 112 | #endif 113 | 114 | v_normal = normalize((matWorldIT * normal).xyz); 115 | 116 | #if USE_NORMAL_MAP 117 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 118 | v_tangent.w = In.tangent.w; 119 | #endif 120 | 121 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 122 | 123 | #if USE_VERTEX_COLOR 124 | v_color = a_color; 125 | #endif 126 | gl_Position = cc_matProj * position; 127 | } 128 | }% 129 | 130 | CCProgram blinnPhong-fs %{ 131 | precision highp float; 132 | #include 133 | #include 134 | #include 135 | #include 136 | #include 137 | 138 | #if CC_RECEIVE_SHADOW 139 | #include 140 | in mediump vec2 v_shadowBias; 141 | #endif 142 | 143 | in vec3 v_position; 144 | in vec2 v_uv; 145 | in vec3 v_normal; 146 | 147 | #if USE_ALBEDO_MAP 148 | uniform sampler2D albedoMap; 149 | #endif 150 | 151 | #if USE_VERTEX_COLOR 152 | in vec4 v_color; 153 | #endif 154 | 155 | #if USE_ALPHA_TEST 156 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 157 | #endif 158 | 159 | #if USE_EMISSIVE_MAP 160 | uniform sampler2D emissiveMap; 161 | #endif 162 | 163 | #if USE_NORMAL_MAP 164 | in mediump vec4 v_tangent; 165 | uniform sampler2D normalMap; 166 | #endif 167 | 168 | #if USE_RIM_LIGHT 169 | in vec3 v_view_normal; 170 | #endif 171 | 172 | #if USE_IBL 173 | #include 174 | #include 175 | #include 176 | #endif 177 | 178 | 179 | void blinnPhong(inout vec4 diffuseColor,in vec3 normal){ 180 | vec3 N = normalize(normal); 181 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 182 | float NL = max(dot(N, L), 0.0); 183 | vec3 diffuse = NL * diffuseColor.rgb * cc_mainLitColor.xyz; 184 | vec3 position; 185 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 186 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 187 | vec3 V = normalize(cameraPosition- position); 188 | vec3 H = normalize(L + V); 189 | float specularFactor = pow(max(0.0, dot(H,N)), bpParams.x*50.); 190 | vec3 specular = (specularFactor * cc_ambientSky.rgb * cc_mainLitColor.xyz); 191 | float shadowCtrl = 1.0; 192 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 193 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 194 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 195 | #endif 196 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 197 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 198 | #endif 199 | #endif 200 | diffuse = (diffuse + specular) * (shadowCtrl); 201 | 202 | //IBL 203 | #if CC_USE_IBL && USE_IBL 204 | vec3 env = vec3(1.); 205 | vec3 R = normalize(reflect(-V, N)); 206 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 207 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 208 | #if CC_USE_IBL == IBL_RGBE 209 | env = unpackRGBE(envmap); 210 | #else 211 | env = SRGBToLinear(envmap.rgb); 212 | #endif 213 | diffuse = mix(env, diffuse, specularFactor + bpParams.x); 214 | #endif 215 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 216 | diffuseColor.rgb = ambient + diffuse; 217 | } 218 | 219 | vec4 frag () { 220 | //Blinn-Phong from GPT4.0&&iwae 221 | vec4 color = albedoColor; 222 | color.rgb *= albedoScaleAndCutoff.xyz; 223 | #if USE_VERTEX_COLOR 224 | color *= v_color; 225 | #endif 226 | //Albedo 227 | #if USE_ALBEDO_MAP 228 | color *= texture(albedoMap, v_uv); 229 | color.rgb = SRGBToLinear(color.rgb); 230 | #endif 231 | 232 | vec3 normal = v_normal; 233 | //Normal 234 | #if USE_NORMAL_MAP 235 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 236 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 237 | normal = 238 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 239 | (nmmp.y * bpParams.w) * normalize(bitangent) + 240 | nmmp.z * normalize(normal); 241 | #endif 242 | 243 | //BlinnPhong 244 | blinnPhong(color,normal); 245 | 246 | //Emmissive 247 | vec3 emissiveCol = emissive.rgb; 248 | #if USE_EMISSIVE_MAP 249 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 250 | #endif 251 | color.rgb +=emissiveCol; 252 | 253 | // Alpha Test 254 | #if USE_ALPHA_TEST 255 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 256 | #endif 257 | 258 | //RimLight 259 | #if USE_RIM_LIGHT 260 | vec4 rim; 261 | rim = rimColor; 262 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 263 | color.rgb = mix(color.rgb,rim.rgb,fRim); 264 | #endif 265 | 266 | //Fog 267 | CC_APPLY_FOG(color); 268 | 269 | //Output 270 | return CCFragOutput(color); 271 | } 272 | }% 273 | 274 | 275 | CCProgram shadow-caster-vs %{ 276 | precision mediump float; 277 | #include 278 | #include 279 | #include 280 | #include 281 | #include 282 | 283 | out vec4 v_worldPos; 284 | out highp vec2 v_clip_depth; 285 | 286 | vec4 vert () { 287 | StandardVertInput In; 288 | CCVertInput(In); 289 | 290 | mat4 matWorld, matWorldIT; 291 | CCGetWorldMatrixFull(matWorld, matWorldIT); 292 | 293 | v_worldPos = matWorld * In.position; 294 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 295 | v_clip_depth = clipPos.zw; 296 | 297 | return clipPos; 298 | } 299 | }% 300 | 301 | CCProgram shadow-caster-fs %{ 302 | precision mediump float; 303 | #include 304 | #include 305 | #include 306 | 307 | in vec4 v_worldPos; 308 | in highp vec2 v_clip_depth; 309 | 310 | vec4 frag () { 311 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 312 | // spot use linear 313 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 314 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 315 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 316 | } 317 | #endif 318 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 319 | return packDepthToRGBA(clipDepth); 320 | #else 321 | return vec4(clipDepth, 1.0, 1.0, 1.0); 322 | #endif 323 | } 324 | }% 325 | 326 | 327 | 328 | 329 | 330 | 331 | -------------------------------------------------------------------------------- /assets/res/effect/Toon-Shading.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | 3 | CCEffect %{ 4 | techniques: 5 | - passes: 6 | - switch: USE_OUTLINE_PASS 7 | vert: outline-vs:vert 8 | frag: outline-fs:frag 9 | rasterizerState: &r1 10 | cullMode: front 11 | depthStencilState: &d1 12 | depthFunc: less_equal 13 | depthTest: true 14 | depthWrite: true 15 | properties: 16 | lineWidth: { value: 10, target: outlineParams.x ,editor: {slide: true, range: [0, 50.0], step: 0.01}} 17 | depthBias: { value: 0, target: outlineParams.y ,editor: {slide: true, range: [0, 2.0], step: 0.001}} 18 | baseColor: { editor: { type: color } } 19 | - vert: toon-vs:vert 20 | frag: toon-fs:frag 21 | properties: &props 22 | mainTexture: { value: white, target: albedoMap, editor: { displayName: AlbedoMap } } 23 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 24 | tilingOffset: { value: [1.0, 1.0, 0.0, 0.0] } 25 | colorScale: { value: [1.0, 1.0, 1.0], target: colorScaleAndCutoff.xyz } 26 | alphaThreshold: { value: 0.5, target: colorScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 27 | shadeStep: { value: 0.6, target: shadeParams.x , editor: {slide: true, range: [0, 1.0], step: 0.001}} 28 | baseStep: { value: 0.4, target: shadeParams.w , editor: {slide: true, range: [0, 1.0], step: 0.001}} 29 | shadeFeather: { value: 0.002, target: shadeParams.y , editor: {slide: true, range: [0, 1.0], step: 0.001}} 30 | shadeStrength: { value: 0.5, target: shadeParams.z, editor: {slide: true, range: [0, 1.0], step: 0.001}} 31 | normalMap: { value: normal } 32 | normalStrength: { value: 1.0, target: specularParams.w, editor: { parent: USE_NORMAL_MAP }, slide: true, range: [0, 5.0], step: 0.001 } 33 | specularStep: { value: 0.5, target: specularParams.x, editor: {slide: true, range: [0, 1.0], step: 0.001}} 34 | specularFeather: { value: 0.001, target: specularParams.y, editor: {slide: true, range: [0, 1.0], step: 0.001}} 35 | specularStrength: { value: 0.5, target: specularParams.z, editor: {slide: true, range: [0, 20.0], step: 0.01}} 36 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 37 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 38 | emissiveMap: { value: grey } 39 | - vert: toon-vs:vert 40 | frag: toon-fs:frag 41 | phase: forward-add 42 | propertyIndex: 1 43 | embeddedMacros: { CC_FORWARD_ADD: true } 44 | depthStencilState: 45 | depthFunc: equal 46 | depthTest: true 47 | depthWrite: false 48 | blendState: 49 | targets: 50 | - blend: true 51 | blendSrc: one 52 | blendDst: one 53 | blendSrcAlpha: zero 54 | blendDstAlpha: one 55 | properties: *props 56 | - vert: shadow-caster-vs:vert 57 | frag: shadow-caster-fs:frag 58 | phase: shadow-caster 59 | propertyIndex: 1 60 | rasterizerState: 61 | cullMode: front 62 | properties: 63 | - vert: toon-vs:vert 64 | frag: toon-fs:frag 65 | phase: deferred-forward 66 | propertyIndex: 1 67 | }% 68 | 69 | CCProgram shared-ubos %{ 70 | uniform Constants { 71 | vec4 tilingOffset; 72 | vec4 albedoColor; 73 | vec4 colorScaleAndCutoff; 74 | vec4 specularParams; 75 | vec4 shadeParams; 76 | vec4 emissive; 77 | vec4 rimColor; 78 | }; 79 | }% 80 | 81 | CCProgram outline-vs %{ 82 | precision highp float; 83 | #include 84 | #include 85 | #include 86 | 87 | uniform OutlineVert { 88 | vec4 outlineParams; // x: line width, y: depth hack 89 | }; 90 | vec4 vert () { 91 | StandardVertInput In; 92 | CCVertInput(In); 93 | mat4 matWorld; 94 | CCGetWorldMatrix(matWorld); 95 | float width = outlineParams.x * 0.001; 96 | #if USE_POSITION_SCALING 97 | vec3 dir = normalize(In.position.xyz); 98 | float flip = dot(dir, normalize(In.normal)) < 0.0 ? -1.0 : 1.0; 99 | In.position.xyz += flip * dir * width * 2.0; 100 | vec4 pos = cc_matProj * (cc_matView * matWorld) * In.position; 101 | #else 102 | In.position.xyz += normalize(In.normal) * width; 103 | vec4 pos = cc_matProj * (cc_matView * matWorld) * In.position; 104 | #endif 105 | 106 | float scaleZ = cc_nearFar.z == 0.0 ? 0.5 : 1.0; 107 | pos.z -= outlineParams.y * 0.002 * scaleZ; 108 | 109 | return pos; 110 | } 111 | }% 112 | 113 | CCProgram outline-fs %{ 114 | precision highp float; 115 | #include 116 | #include 117 | 118 | uniform OutlineFrag { 119 | vec4 baseColor; 120 | }; 121 | 122 | vec4 frag () { 123 | vec4 color = baseColor * cc_mainLitColor; 124 | return CCFragOutput(vec4(color.rgb, 1.0)); 125 | } 126 | 127 | }% 128 | 129 | CCProgram toon-vs %{ 130 | precision highp float; 131 | #include 132 | #include 133 | #include 134 | #include 135 | #include 136 | #include 137 | #include 138 | 139 | out vec3 v_position; 140 | out vec2 v_uv; 141 | out mediump vec3 v_normal; 142 | #if CC_RECEIVE_SHADOW 143 | out mediump vec2 v_shadowBias; 144 | #endif 145 | #if USE_NORMAL_MAP 146 | out mediump vec4 v_tangent; 147 | #endif 148 | 149 | #if USE_RIM_LIGHT 150 | out vec3 v_view_normal; 151 | #endif 152 | 153 | vec4 vert () { 154 | StandardVertInput In; 155 | CCVertInput(In); 156 | mat4 matWorld, matWorldIT; 157 | CCGetWorldMatrixFull(matWorld, matWorldIT); 158 | vec4 pos = matWorld * In.position; 159 | CC_TRANSFER_FOG(pos); 160 | 161 | v_position = pos.xyz; 162 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 163 | 164 | vec4 normal = vec4(In.normal,0.0); 165 | 166 | #if USE_RIM_LIGHT 167 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 168 | #endif 169 | v_normal = (matWorldIT * normal).xyz; 170 | #if USE_NORMAL_MAP 171 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 172 | v_tangent.w = In.tangent.w; 173 | #endif 174 | #if CC_RECEIVE_SHADOW 175 | v_shadowBias = CCGetShadowBias(); 176 | #endif 177 | CC_TRANSFER_SHADOW(pos); 178 | 179 | return cc_matProj * (cc_matView * matWorld) * In.position; 180 | } 181 | }% 182 | 183 | CCProgram toon-fs %{ 184 | precision highp float; 185 | #include 186 | #include 187 | #include 188 | #include 189 | #include 190 | #include 191 | #include 192 | #include 193 | 194 | 195 | #if CC_RECEIVE_SHADOW 196 | in mediump vec2 v_shadowBias; 197 | #endif 198 | 199 | #if CC_RECEIVE_SHADOW 200 | #include 201 | #endif 202 | 203 | in vec3 v_position; 204 | in vec2 v_uv; 205 | 206 | #if USE_ALBEDO_MAP 207 | uniform sampler2D albedoMap; 208 | #endif 209 | 210 | in mediump vec3 v_normal; 211 | #if USE_NORMAL_MAP 212 | in mediump vec4 v_tangent; 213 | uniform sampler2D normalMap; 214 | #endif 215 | 216 | #if USE_EMISSIVE_MAP 217 | uniform sampler2D emissiveMap; 218 | #endif 219 | 220 | #if USE_ALPHA_TEST 221 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 222 | #endif 223 | 224 | #if USE_RIM_LIGHT 225 | in vec3 v_view_normal; 226 | #endif 227 | 228 | void ToonShading (inout vec4 diffuseColor,in vec3 normal) { 229 | vec3 position; 230 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 231 | vec3 V = normalize(cc_cameraPos.xyz - position); 232 | vec3 N = normalize(normal); 233 | vec3 L = normalize(-cc_mainLitDir.xyz); 234 | float NL = 0.5 * dot(N, L) + 0.5; 235 | float NH = 0.5 * dot(normalize(V + L), N) + 0.5; 236 | vec3 lightColor = cc_mainLitColor.rgb * (cc_mainLitColor.w * shadeParams.x); 237 | float shadeFeather = shadeParams.y; 238 | float shadeCtrl = mix(1., (1.-shadeParams.z), clamp(1.0 + (shadeParams.x - shadeFeather - NL) / shadeFeather, 0.0, 1.0)); 239 | shadeCtrl *= mix(1., (1.-shadeParams.z*0.5), clamp(1.0 + (shadeParams.w - shadeFeather - NL) / shadeFeather, 0.0, 1.0)); 240 | float specularWeight = 1.0 - pow(specularParams.x, 5.0); 241 | float specularMask = 1.0-smoothstep( NH, NH+ specularParams.y, specularWeight + EPSILON_LOWP); 242 | float shadowCtrl = 1.0; 243 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 244 | if (NL > 0.0) { 245 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 246 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias+0.1); 247 | #endif 248 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 249 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias+0.1); 250 | #endif 251 | } 252 | #endif 253 | float diffuseCtrl = (shadowCtrl+specularMask*specularParams.z)*shadeCtrl; 254 | vec3 envColor = cc_ambientGround.rgb*cc_ambientSky.w; 255 | diffuseColor.rgb *= (envColor + (lightColor*diffuseCtrl)); 256 | } 257 | 258 | vec4 frag () { 259 | //base color 260 | vec4 color = albedoColor; 261 | color.rgb *= colorScaleAndCutoff.xyz; 262 | //albedo map 263 | #if USE_ALBEDO_MAP 264 | color *= texture(albedoMap, v_uv); 265 | color.rgb = SRGBToLinear(color.rgb); 266 | #endif 267 | 268 | //normal 269 | vec3 normal = v_normal; 270 | #if USE_NORMAL_MAP 271 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 272 | vec3 bitangent = cross(v_normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 273 | normal = 274 | (nmmp.x * specularParams.w) * normalize(v_tangent.xyz) + 275 | (nmmp.y * specularParams.w) * normalize(bitangent) + 276 | nmmp.z * normalize(normal); 277 | #endif 278 | 279 | //toon shading 280 | ToonShading(color,normal); 281 | 282 | //emmissive 283 | vec3 emissiveCol = emissive.rgb; 284 | #if USE_EMISSIVE_MAP 285 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 286 | #endif 287 | color.rgb +=emissiveCol; 288 | 289 | //alpha test 290 | #if USE_ALPHA_TEST 291 | if (color.ALPHA_TEST_CHANNEL < colorScaleAndCutoff.w) discard; 292 | #endif 293 | 294 | //rimLight 295 | #if USE_RIM_LIGHT 296 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rimColor.w; 297 | color.rgb = mix(color.rgb,rimColor.rgb,fRim); 298 | #endif 299 | //fog 300 | CC_APPLY_FOG(color); 301 | 302 | return CCFragOutput(color); 303 | } 304 | }% 305 | 306 | CCProgram shadow-caster-vs %{ 307 | precision highp float; 308 | #include 309 | #include 310 | #include 311 | #include 312 | 313 | out vec4 v_worldPos; 314 | out highp vec2 v_clip_depth; 315 | 316 | vec4 vert () { 317 | StandardVertInput In; 318 | CCVertInput(In); 319 | 320 | mat4 matWorld, matWorldIT; 321 | CCGetWorldMatrixFull(matWorld, matWorldIT); 322 | 323 | v_worldPos = matWorld * In.position; 324 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 325 | v_clip_depth = clipPos.zw; 326 | 327 | return clipPos; 328 | } 329 | }%SA 330 | 331 | CCProgram shadow-caster-fs %{ 332 | precision highp float; 333 | #include 334 | #include 335 | 336 | in vec4 v_worldPos; 337 | in highp vec2 v_clip_depth; 338 | 339 | vec4 frag () { 340 | 341 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 342 | // spot use linear 343 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 344 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 345 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 346 | } 347 | #endif 348 | 349 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 350 | return packDepthToRGBA(clipDepth); 351 | #else 352 | return vec4(clipDepth, 1.0, 1.0, 1.0); 353 | #endif 354 | } 355 | }% 356 | 357 | -------------------------------------------------------------------------------- /assets/res/prefabs/menuItem.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "menuItem", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "persistent": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "menuItem", 16 | "_objFlags": 0, 17 | "__editorExtras__": {}, 18 | "_parent": null, 19 | "_children": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 10 25 | }, 26 | { 27 | "__id__": 18 28 | } 29 | ], 30 | "_active": true, 31 | "_components": [ 32 | { 33 | "__id__": 26 34 | }, 35 | { 36 | "__id__": 28 37 | } 38 | ], 39 | "_prefab": { 40 | "__id__": 30 41 | }, 42 | "_lpos": { 43 | "__type__": "cc.Vec3", 44 | "x": 0, 45 | "y": -15, 46 | "z": 0 47 | }, 48 | "_lrot": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_lscale": { 56 | "__type__": "cc.Vec3", 57 | "x": 1, 58 | "y": 1, 59 | "z": 1 60 | }, 61 | "_mobility": 0, 62 | "_layer": 33554432, 63 | "_euler": { 64 | "__type__": "cc.Vec3", 65 | "x": 0, 66 | "y": 0, 67 | "z": 0 68 | }, 69 | "_id": "" 70 | }, 71 | { 72 | "__type__": "cc.Node", 73 | "_name": "BgSp", 74 | "_objFlags": 0, 75 | "_parent": { 76 | "__id__": 1 77 | }, 78 | "_children": [], 79 | "_active": true, 80 | "_components": [ 81 | { 82 | "__id__": 3 83 | }, 84 | { 85 | "__id__": 5 86 | }, 87 | { 88 | "__id__": 7 89 | } 90 | ], 91 | "_prefab": { 92 | "__id__": 9 93 | }, 94 | "_lpos": { 95 | "__type__": "cc.Vec3", 96 | "x": 0, 97 | "y": 0, 98 | "z": 0 99 | }, 100 | "_lrot": { 101 | "__type__": "cc.Quat", 102 | "x": 0, 103 | "y": 0, 104 | "z": 0, 105 | "w": 1 106 | }, 107 | "_lscale": { 108 | "__type__": "cc.Vec3", 109 | "x": 1, 110 | "y": 1, 111 | "z": 1 112 | }, 113 | "_mobility": 0, 114 | "_layer": 33554432, 115 | "_euler": { 116 | "__type__": "cc.Vec3", 117 | "x": 0, 118 | "y": 0, 119 | "z": 0 120 | }, 121 | "_id": "" 122 | }, 123 | { 124 | "__type__": "cc.UITransform", 125 | "_name": "", 126 | "_objFlags": 0, 127 | "node": { 128 | "__id__": 2 129 | }, 130 | "_enabled": true, 131 | "__prefab": { 132 | "__id__": 4 133 | }, 134 | "_contentSize": { 135 | "__type__": "cc.Size", 136 | "width": 200, 137 | "height": 30 138 | }, 139 | "_anchorPoint": { 140 | "__type__": "cc.Vec2", 141 | "x": 0.5, 142 | "y": 0.5 143 | }, 144 | "_id": "" 145 | }, 146 | { 147 | "__type__": "cc.CompPrefabInfo", 148 | "fileId": "030OFPj1JEtbstuIC+BATO" 149 | }, 150 | { 151 | "__type__": "cc.Sprite", 152 | "_name": "", 153 | "_objFlags": 0, 154 | "node": { 155 | "__id__": 2 156 | }, 157 | "_enabled": true, 158 | "__prefab": { 159 | "__id__": 6 160 | }, 161 | "_customMaterial": null, 162 | "_srcBlendFactor": 2, 163 | "_dstBlendFactor": 4, 164 | "_color": { 165 | "__type__": "cc.Color", 166 | "r": 51, 167 | "g": 51, 168 | "b": 51, 169 | "a": 255 170 | }, 171 | "_spriteFrame": { 172 | "__uuid__": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 173 | "__expectedType__": "cc.SpriteFrame" 174 | }, 175 | "_type": 0, 176 | "_fillType": 0, 177 | "_sizeMode": 0, 178 | "_fillCenter": { 179 | "__type__": "cc.Vec2", 180 | "x": 0, 181 | "y": 0 182 | }, 183 | "_fillStart": 0, 184 | "_fillRange": 0, 185 | "_isTrimmedMode": true, 186 | "_useGrayscale": false, 187 | "_atlas": null, 188 | "_id": "" 189 | }, 190 | { 191 | "__type__": "cc.CompPrefabInfo", 192 | "fileId": "0eDb7keDZH67kSfKcuZFR4" 193 | }, 194 | { 195 | "__type__": "cc.Widget", 196 | "_name": "", 197 | "_objFlags": 0, 198 | "node": { 199 | "__id__": 2 200 | }, 201 | "_enabled": true, 202 | "__prefab": { 203 | "__id__": 8 204 | }, 205 | "_alignFlags": 45, 206 | "_target": null, 207 | "_left": 0, 208 | "_right": 0, 209 | "_top": 0, 210 | "_bottom": 0, 211 | "_horizontalCenter": 0, 212 | "_verticalCenter": 0, 213 | "_isAbsLeft": true, 214 | "_isAbsRight": true, 215 | "_isAbsTop": true, 216 | "_isAbsBottom": true, 217 | "_isAbsHorizontalCenter": true, 218 | "_isAbsVerticalCenter": true, 219 | "_originalWidth": 250, 220 | "_originalHeight": 28, 221 | "_alignMode": 2, 222 | "_lockFlags": 0, 223 | "_id": "" 224 | }, 225 | { 226 | "__type__": "cc.CompPrefabInfo", 227 | "fileId": "002MuqyWhMEqH1OrNOqYKB" 228 | }, 229 | { 230 | "__type__": "cc.PrefabInfo", 231 | "root": { 232 | "__id__": 1 233 | }, 234 | "asset": { 235 | "__id__": 0 236 | }, 237 | "fileId": "ecLeJMwyBFQJZz1v9HobP+", 238 | "instance": null, 239 | "targetOverrides": null, 240 | "nestedPrefabInstanceRoots": null 241 | }, 242 | { 243 | "__type__": "cc.Node", 244 | "_name": "SideSp", 245 | "_objFlags": 0, 246 | "_parent": { 247 | "__id__": 1 248 | }, 249 | "_children": [], 250 | "_active": true, 251 | "_components": [ 252 | { 253 | "__id__": 11 254 | }, 255 | { 256 | "__id__": 13 257 | }, 258 | { 259 | "__id__": 15 260 | } 261 | ], 262 | "_prefab": { 263 | "__id__": 17 264 | }, 265 | "_lpos": { 266 | "__type__": "cc.Vec3", 267 | "x": -97.5, 268 | "y": 0, 269 | "z": 0 270 | }, 271 | "_lrot": { 272 | "__type__": "cc.Quat", 273 | "x": 0, 274 | "y": 0, 275 | "z": 0, 276 | "w": 1 277 | }, 278 | "_lscale": { 279 | "__type__": "cc.Vec3", 280 | "x": 1, 281 | "y": 1, 282 | "z": 1 283 | }, 284 | "_mobility": 0, 285 | "_layer": 33554432, 286 | "_euler": { 287 | "__type__": "cc.Vec3", 288 | "x": 0, 289 | "y": 0, 290 | "z": 0 291 | }, 292 | "_id": "" 293 | }, 294 | { 295 | "__type__": "cc.UITransform", 296 | "_name": "", 297 | "_objFlags": 0, 298 | "node": { 299 | "__id__": 10 300 | }, 301 | "_enabled": true, 302 | "__prefab": { 303 | "__id__": 12 304 | }, 305 | "_contentSize": { 306 | "__type__": "cc.Size", 307 | "width": 5, 308 | "height": 30 309 | }, 310 | "_anchorPoint": { 311 | "__type__": "cc.Vec2", 312 | "x": 0.5, 313 | "y": 0.5 314 | }, 315 | "_id": "" 316 | }, 317 | { 318 | "__type__": "cc.CompPrefabInfo", 319 | "fileId": "29EHO7VCBOwKubjmCeJhEF" 320 | }, 321 | { 322 | "__type__": "cc.Sprite", 323 | "_name": "", 324 | "_objFlags": 0, 325 | "node": { 326 | "__id__": 10 327 | }, 328 | "_enabled": true, 329 | "__prefab": { 330 | "__id__": 14 331 | }, 332 | "_customMaterial": null, 333 | "_srcBlendFactor": 2, 334 | "_dstBlendFactor": 4, 335 | "_color": { 336 | "__type__": "cc.Color", 337 | "r": 0, 338 | "g": 130, 339 | "b": 180, 340 | "a": 255 341 | }, 342 | "_spriteFrame": { 343 | "__uuid__": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 344 | "__expectedType__": "cc.SpriteFrame" 345 | }, 346 | "_type": 0, 347 | "_fillType": 0, 348 | "_sizeMode": 0, 349 | "_fillCenter": { 350 | "__type__": "cc.Vec2", 351 | "x": 0, 352 | "y": 0 353 | }, 354 | "_fillStart": 0, 355 | "_fillRange": 0, 356 | "_isTrimmedMode": true, 357 | "_useGrayscale": false, 358 | "_atlas": null, 359 | "_id": "" 360 | }, 361 | { 362 | "__type__": "cc.CompPrefabInfo", 363 | "fileId": "e5uV27awVGKJt+fhwuccav" 364 | }, 365 | { 366 | "__type__": "cc.Widget", 367 | "_name": "", 368 | "_objFlags": 0, 369 | "node": { 370 | "__id__": 10 371 | }, 372 | "_enabled": true, 373 | "__prefab": { 374 | "__id__": 16 375 | }, 376 | "_alignFlags": 13, 377 | "_target": null, 378 | "_left": 0, 379 | "_right": 0, 380 | "_top": 0, 381 | "_bottom": 0, 382 | "_horizontalCenter": 0, 383 | "_verticalCenter": 0, 384 | "_isAbsLeft": true, 385 | "_isAbsRight": true, 386 | "_isAbsTop": true, 387 | "_isAbsBottom": true, 388 | "_isAbsHorizontalCenter": true, 389 | "_isAbsVerticalCenter": true, 390 | "_originalWidth": 0, 391 | "_originalHeight": 28, 392 | "_alignMode": 2, 393 | "_lockFlags": 0, 394 | "_id": "" 395 | }, 396 | { 397 | "__type__": "cc.CompPrefabInfo", 398 | "fileId": "7db822yktJhYLpBs/PlHfw" 399 | }, 400 | { 401 | "__type__": "cc.PrefabInfo", 402 | "root": { 403 | "__id__": 1 404 | }, 405 | "asset": { 406 | "__id__": 0 407 | }, 408 | "fileId": "eelvugUTRCQrN9snmw121a", 409 | "instance": null, 410 | "targetOverrides": null, 411 | "nestedPrefabInstanceRoots": null 412 | }, 413 | { 414 | "__type__": "cc.Node", 415 | "_name": "NameLabel", 416 | "_objFlags": 0, 417 | "_parent": { 418 | "__id__": 1 419 | }, 420 | "_children": [], 421 | "_active": true, 422 | "_components": [ 423 | { 424 | "__id__": 19 425 | }, 426 | { 427 | "__id__": 21 428 | }, 429 | { 430 | "__id__": 23 431 | } 432 | ], 433 | "_prefab": { 434 | "__id__": 25 435 | }, 436 | "_lpos": { 437 | "__type__": "cc.Vec3", 438 | "x": -80, 439 | "y": 0, 440 | "z": 0 441 | }, 442 | "_lrot": { 443 | "__type__": "cc.Quat", 444 | "x": 0, 445 | "y": 0, 446 | "z": 0, 447 | "w": 1 448 | }, 449 | "_lscale": { 450 | "__type__": "cc.Vec3", 451 | "x": 1, 452 | "y": 1, 453 | "z": 1 454 | }, 455 | "_mobility": 0, 456 | "_layer": 33554432, 457 | "_euler": { 458 | "__type__": "cc.Vec3", 459 | "x": 0, 460 | "y": 0, 461 | "z": 0 462 | }, 463 | "_id": "" 464 | }, 465 | { 466 | "__type__": "cc.UITransform", 467 | "_name": "", 468 | "_objFlags": 0, 469 | "node": { 470 | "__id__": 18 471 | }, 472 | "_enabled": true, 473 | "__prefab": { 474 | "__id__": 20 475 | }, 476 | "_contentSize": { 477 | "__type__": "cc.Size", 478 | "width": 114.6, 479 | "height": 40 480 | }, 481 | "_anchorPoint": { 482 | "__type__": "cc.Vec2", 483 | "x": 0, 484 | "y": 0.5 485 | }, 486 | "_id": "" 487 | }, 488 | { 489 | "__type__": "cc.CompPrefabInfo", 490 | "fileId": "fcwuntegNGrawcQS3xnJ9e" 491 | }, 492 | { 493 | "__type__": "cc.Label", 494 | "_name": "", 495 | "_objFlags": 0, 496 | "node": { 497 | "__id__": 18 498 | }, 499 | "_enabled": true, 500 | "__prefab": { 501 | "__id__": 22 502 | }, 503 | "_customMaterial": null, 504 | "_srcBlendFactor": 2, 505 | "_dstBlendFactor": 4, 506 | "_color": { 507 | "__type__": "cc.Color", 508 | "r": 255, 509 | "g": 255, 510 | "b": 255, 511 | "a": 255 512 | }, 513 | "_string": "Effect Name 1", 514 | "_horizontalAlign": 1, 515 | "_verticalAlign": 1, 516 | "_actualFontSize": 18, 517 | "_fontSize": 18, 518 | "_fontFamily": "Arial", 519 | "_lineHeight": 40, 520 | "_overflow": 0, 521 | "_enableWrapText": true, 522 | "_font": { 523 | "__uuid__": "b33d50da-3253-4a7e-b9f0-cce67cd578e0", 524 | "__expectedType__": "cc.BitmapFont" 525 | }, 526 | "_isSystemFontUsed": false, 527 | "_spacingX": 0, 528 | "_isItalic": false, 529 | "_isBold": false, 530 | "_isUnderline": false, 531 | "_underlineHeight": 2, 532 | "_cacheMode": 2, 533 | "_id": "" 534 | }, 535 | { 536 | "__type__": "cc.CompPrefabInfo", 537 | "fileId": "7akl2p4C1Hh4vqN5nl9Tk6" 538 | }, 539 | { 540 | "__type__": "cc.Widget", 541 | "_name": "", 542 | "_objFlags": 0, 543 | "node": { 544 | "__id__": 18 545 | }, 546 | "_enabled": true, 547 | "__prefab": { 548 | "__id__": 24 549 | }, 550 | "_alignFlags": 8, 551 | "_target": null, 552 | "_left": 20, 553 | "_right": 0, 554 | "_top": 0, 555 | "_bottom": 0, 556 | "_horizontalCenter": 0, 557 | "_verticalCenter": 0, 558 | "_isAbsLeft": true, 559 | "_isAbsRight": true, 560 | "_isAbsTop": true, 561 | "_isAbsBottom": true, 562 | "_isAbsHorizontalCenter": true, 563 | "_isAbsVerticalCenter": true, 564 | "_originalWidth": 0, 565 | "_originalHeight": 0, 566 | "_alignMode": 2, 567 | "_lockFlags": 0, 568 | "_id": "" 569 | }, 570 | { 571 | "__type__": "cc.CompPrefabInfo", 572 | "fileId": "c6gxCtpDRAHqiAo3IG2+N1" 573 | }, 574 | { 575 | "__type__": "cc.PrefabInfo", 576 | "root": { 577 | "__id__": 1 578 | }, 579 | "asset": { 580 | "__id__": 0 581 | }, 582 | "fileId": "f7QXkYY59LnpQ2J51x99eT", 583 | "instance": null, 584 | "targetOverrides": null, 585 | "nestedPrefabInstanceRoots": null 586 | }, 587 | { 588 | "__type__": "cc.UITransform", 589 | "_name": "", 590 | "_objFlags": 0, 591 | "node": { 592 | "__id__": 1 593 | }, 594 | "_enabled": true, 595 | "__prefab": { 596 | "__id__": 27 597 | }, 598 | "_contentSize": { 599 | "__type__": "cc.Size", 600 | "width": 200, 601 | "height": 30 602 | }, 603 | "_anchorPoint": { 604 | "__type__": "cc.Vec2", 605 | "x": 0.5, 606 | "y": 0.5 607 | }, 608 | "_id": "" 609 | }, 610 | { 611 | "__type__": "cc.CompPrefabInfo", 612 | "fileId": "1askF6Y4FJgJn0CaBFK/fL" 613 | }, 614 | { 615 | "__type__": "29606X2iDBIpK6RCHW4mg+5", 616 | "_name": "", 617 | "_objFlags": 0, 618 | "__editorExtras__": {}, 619 | "node": { 620 | "__id__": 1 621 | }, 622 | "_enabled": true, 623 | "__prefab": { 624 | "__id__": 29 625 | }, 626 | "BgSprite": { 627 | "__id__": 5 628 | }, 629 | "SideSprite": { 630 | "__id__": 13 631 | }, 632 | "NameLable": { 633 | "__id__": 21 634 | }, 635 | "BgColor": { 636 | "__type__": "cc.Color", 637 | "r": 51, 638 | "g": 51, 639 | "b": 51, 640 | "a": 255 641 | }, 642 | "SideColor": { 643 | "__type__": "cc.Color", 644 | "r": 0, 645 | "g": 130, 646 | "b": 180, 647 | "a": 255 648 | }, 649 | "_id": "" 650 | }, 651 | { 652 | "__type__": "cc.CompPrefabInfo", 653 | "fileId": "e2VcbsK3pOgqOojlIxUg+y" 654 | }, 655 | { 656 | "__type__": "cc.PrefabInfo", 657 | "root": { 658 | "__id__": 1 659 | }, 660 | "asset": { 661 | "__id__": 0 662 | }, 663 | "fileId": "14zvwt07hMH6xm7IhW9E9S", 664 | "targetOverrides": [] 665 | } 666 | ] -------------------------------------------------------------------------------- /assets/res/prefabs/SelectMenu.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "SelectMenu", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "persistent": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "SelectMenu", 16 | "_objFlags": 0, 17 | "__editorExtras__": {}, 18 | "_parent": null, 19 | "_children": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 12 25 | } 26 | ], 27 | "_active": true, 28 | "_components": [ 29 | { 30 | "__id__": 32 31 | }, 32 | { 33 | "__id__": 34 34 | }, 35 | { 36 | "__id__": 36 37 | }, 38 | { 39 | "__id__": 38 40 | } 41 | ], 42 | "_prefab": { 43 | "__id__": 40 44 | }, 45 | "_lpos": { 46 | "__type__": "cc.Vec3", 47 | "x": 552, 48 | "y": 365, 49 | "z": 0 50 | }, 51 | "_lrot": { 52 | "__type__": "cc.Quat", 53 | "x": 0, 54 | "y": 0, 55 | "z": 0, 56 | "w": 1 57 | }, 58 | "_lscale": { 59 | "__type__": "cc.Vec3", 60 | "x": 1, 61 | "y": 1, 62 | "z": 1 63 | }, 64 | "_mobility": 0, 65 | "_layer": 33554432, 66 | "_euler": { 67 | "__type__": "cc.Vec3", 68 | "x": 0, 69 | "y": 0, 70 | "z": 0 71 | }, 72 | "_id": "" 73 | }, 74 | { 75 | "__type__": "cc.Node", 76 | "_name": "MenuGroup", 77 | "_objFlags": 0, 78 | "_parent": { 79 | "__id__": 1 80 | }, 81 | "_children": [], 82 | "_active": true, 83 | "_components": [ 84 | { 85 | "__id__": 3 86 | }, 87 | { 88 | "__id__": 5 89 | }, 90 | { 91 | "__id__": 7 92 | }, 93 | { 94 | "__id__": 9 95 | } 96 | ], 97 | "_prefab": { 98 | "__id__": 11 99 | }, 100 | "_lpos": { 101 | "__type__": "cc.Vec3", 102 | "x": 0, 103 | "y": -2, 104 | "z": 0 105 | }, 106 | "_lrot": { 107 | "__type__": "cc.Quat", 108 | "x": 0, 109 | "y": 0, 110 | "z": 0, 111 | "w": 1 112 | }, 113 | "_lscale": { 114 | "__type__": "cc.Vec3", 115 | "x": 1, 116 | "y": 1, 117 | "z": 1 118 | }, 119 | "_mobility": 0, 120 | "_layer": 33554432, 121 | "_euler": { 122 | "__type__": "cc.Vec3", 123 | "x": 0, 124 | "y": 0, 125 | "z": 0 126 | }, 127 | "_id": "" 128 | }, 129 | { 130 | "__type__": "cc.UITransform", 131 | "_name": "", 132 | "_objFlags": 0, 133 | "node": { 134 | "__id__": 2 135 | }, 136 | "_enabled": true, 137 | "__prefab": { 138 | "__id__": 4 139 | }, 140 | "_contentSize": { 141 | "__type__": "cc.Size", 142 | "width": 180, 143 | "height": -1 144 | }, 145 | "_anchorPoint": { 146 | "__type__": "cc.Vec2", 147 | "x": 0.5, 148 | "y": 1 149 | }, 150 | "_id": "" 151 | }, 152 | { 153 | "__type__": "cc.CompPrefabInfo", 154 | "fileId": "7a9bfN8KxNeIqY+rwg0055" 155 | }, 156 | { 157 | "__type__": "cc.Sprite", 158 | "_name": "", 159 | "_objFlags": 0, 160 | "node": { 161 | "__id__": 2 162 | }, 163 | "_enabled": true, 164 | "__prefab": { 165 | "__id__": 6 166 | }, 167 | "_customMaterial": null, 168 | "_srcBlendFactor": 2, 169 | "_dstBlendFactor": 4, 170 | "_color": { 171 | "__type__": "cc.Color", 172 | "r": 70, 173 | "g": 70, 174 | "b": 70, 175 | "a": 255 176 | }, 177 | "_spriteFrame": { 178 | "__uuid__": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 179 | "__expectedType__": "cc.SpriteFrame" 180 | }, 181 | "_type": 0, 182 | "_fillType": 0, 183 | "_sizeMode": 0, 184 | "_fillCenter": { 185 | "__type__": "cc.Vec2", 186 | "x": 0, 187 | "y": 0 188 | }, 189 | "_fillStart": 0, 190 | "_fillRange": 0, 191 | "_isTrimmedMode": true, 192 | "_useGrayscale": false, 193 | "_atlas": null, 194 | "_id": "" 195 | }, 196 | { 197 | "__type__": "cc.CompPrefabInfo", 198 | "fileId": "efKW9JEi1D2YLGLI9JSHpD" 199 | }, 200 | { 201 | "__type__": "cc.Layout", 202 | "_name": "", 203 | "_objFlags": 0, 204 | "node": { 205 | "__id__": 2 206 | }, 207 | "_enabled": true, 208 | "__prefab": { 209 | "__id__": 8 210 | }, 211 | "_resizeMode": 1, 212 | "_layoutType": 2, 213 | "_cellSize": { 214 | "__type__": "cc.Size", 215 | "width": 40, 216 | "height": 40 217 | }, 218 | "_startAxis": 0, 219 | "_paddingLeft": 0, 220 | "_paddingRight": 0, 221 | "_paddingTop": 0, 222 | "_paddingBottom": 0, 223 | "_spacingX": 0, 224 | "_spacingY": 1, 225 | "_verticalDirection": 1, 226 | "_horizontalDirection": 0, 227 | "_constraint": 0, 228 | "_constraintNum": 2, 229 | "_affectedByScale": true, 230 | "_isAlign": false, 231 | "_id": "" 232 | }, 233 | { 234 | "__type__": "cc.CompPrefabInfo", 235 | "fileId": "83sHfyPVlNlY1RpGMUsKSd" 236 | }, 237 | { 238 | "__type__": "cc.Widget", 239 | "_name": "", 240 | "_objFlags": 0, 241 | "node": { 242 | "__id__": 2 243 | }, 244 | "_enabled": true, 245 | "__prefab": { 246 | "__id__": 10 247 | }, 248 | "_alignFlags": 32, 249 | "_target": null, 250 | "_left": 0, 251 | "_right": 0, 252 | "_top": 0, 253 | "_bottom": 0, 254 | "_horizontalCenter": 0, 255 | "_verticalCenter": 0, 256 | "_isAbsLeft": true, 257 | "_isAbsRight": true, 258 | "_isAbsTop": true, 259 | "_isAbsBottom": true, 260 | "_isAbsHorizontalCenter": true, 261 | "_isAbsVerticalCenter": true, 262 | "_originalWidth": 0, 263 | "_originalHeight": 0, 264 | "_alignMode": 2, 265 | "_lockFlags": 0, 266 | "_id": "" 267 | }, 268 | { 269 | "__type__": "cc.CompPrefabInfo", 270 | "fileId": "aeja1kfSFJp4dx6B4jMgay" 271 | }, 272 | { 273 | "__type__": "cc.PrefabInfo", 274 | "root": { 275 | "__id__": 1 276 | }, 277 | "asset": { 278 | "__id__": 0 279 | }, 280 | "fileId": "0eR3lO0NdADKYCIo/6zh6U", 281 | "instance": null, 282 | "targetOverrides": null, 283 | "nestedPrefabInstanceRoots": null 284 | }, 285 | { 286 | "__type__": "cc.Node", 287 | "_name": "menuItem", 288 | "_objFlags": 0, 289 | "__editorExtras__": {}, 290 | "_parent": { 291 | "__id__": 1 292 | }, 293 | "_children": [ 294 | { 295 | "__id__": 13 296 | }, 297 | { 298 | "__id__": 21 299 | } 300 | ], 301 | "_active": true, 302 | "_components": [ 303 | { 304 | "__id__": 29 305 | } 306 | ], 307 | "_prefab": { 308 | "__id__": 31 309 | }, 310 | "_lpos": { 311 | "__type__": "cc.Vec3", 312 | "x": 0, 313 | "y": -17, 314 | "z": 0 315 | }, 316 | "_lrot": { 317 | "__type__": "cc.Quat", 318 | "x": 0, 319 | "y": 0, 320 | "z": 0, 321 | "w": 1 322 | }, 323 | "_lscale": { 324 | "__type__": "cc.Vec3", 325 | "x": 1, 326 | "y": 1, 327 | "z": 1 328 | }, 329 | "_mobility": 0, 330 | "_layer": 33554432, 331 | "_euler": { 332 | "__type__": "cc.Vec3", 333 | "x": 0, 334 | "y": 0, 335 | "z": 0 336 | }, 337 | "_id": "" 338 | }, 339 | { 340 | "__type__": "cc.Node", 341 | "_name": "BgSp", 342 | "_objFlags": 0, 343 | "_parent": { 344 | "__id__": 12 345 | }, 346 | "_children": [], 347 | "_active": true, 348 | "_components": [ 349 | { 350 | "__id__": 14 351 | }, 352 | { 353 | "__id__": 16 354 | }, 355 | { 356 | "__id__": 18 357 | } 358 | ], 359 | "_prefab": { 360 | "__id__": 20 361 | }, 362 | "_lpos": { 363 | "__type__": "cc.Vec3", 364 | "x": 0, 365 | "y": 0, 366 | "z": 0 367 | }, 368 | "_lrot": { 369 | "__type__": "cc.Quat", 370 | "x": 0, 371 | "y": 0, 372 | "z": 0, 373 | "w": 1 374 | }, 375 | "_lscale": { 376 | "__type__": "cc.Vec3", 377 | "x": 1, 378 | "y": 1, 379 | "z": 1 380 | }, 381 | "_mobility": 0, 382 | "_layer": 33554432, 383 | "_euler": { 384 | "__type__": "cc.Vec3", 385 | "x": 0, 386 | "y": 0, 387 | "z": 0 388 | }, 389 | "_id": "" 390 | }, 391 | { 392 | "__type__": "cc.UITransform", 393 | "_name": "", 394 | "_objFlags": 0, 395 | "node": { 396 | "__id__": 13 397 | }, 398 | "_enabled": true, 399 | "__prefab": { 400 | "__id__": 15 401 | }, 402 | "_contentSize": { 403 | "__type__": "cc.Size", 404 | "width": 180, 405 | "height": 30 406 | }, 407 | "_anchorPoint": { 408 | "__type__": "cc.Vec2", 409 | "x": 0.5, 410 | "y": 0.5 411 | }, 412 | "_id": "" 413 | }, 414 | { 415 | "__type__": "cc.CompPrefabInfo", 416 | "fileId": "a6fX9CSuZNjJgkcwFY5frH" 417 | }, 418 | { 419 | "__type__": "cc.Sprite", 420 | "_name": "", 421 | "_objFlags": 0, 422 | "node": { 423 | "__id__": 13 424 | }, 425 | "_enabled": true, 426 | "__prefab": { 427 | "__id__": 17 428 | }, 429 | "_customMaterial": null, 430 | "_srcBlendFactor": 2, 431 | "_dstBlendFactor": 4, 432 | "_color": { 433 | "__type__": "cc.Color", 434 | "r": 40, 435 | "g": 40, 436 | "b": 40, 437 | "a": 255 438 | }, 439 | "_spriteFrame": { 440 | "__uuid__": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 441 | "__expectedType__": "cc.SpriteFrame" 442 | }, 443 | "_type": 0, 444 | "_fillType": 0, 445 | "_sizeMode": 0, 446 | "_fillCenter": { 447 | "__type__": "cc.Vec2", 448 | "x": 0, 449 | "y": 0 450 | }, 451 | "_fillStart": 0, 452 | "_fillRange": 0, 453 | "_isTrimmedMode": true, 454 | "_useGrayscale": false, 455 | "_atlas": null, 456 | "_id": "" 457 | }, 458 | { 459 | "__type__": "cc.CompPrefabInfo", 460 | "fileId": "daIgqRGGZGyIi5wiz2tEfu" 461 | }, 462 | { 463 | "__type__": "cc.Widget", 464 | "_name": "", 465 | "_objFlags": 0, 466 | "node": { 467 | "__id__": 13 468 | }, 469 | "_enabled": true, 470 | "__prefab": { 471 | "__id__": 19 472 | }, 473 | "_alignFlags": 45, 474 | "_target": null, 475 | "_left": 0, 476 | "_right": 0, 477 | "_top": 0, 478 | "_bottom": 0, 479 | "_horizontalCenter": 0, 480 | "_verticalCenter": 0, 481 | "_isAbsLeft": true, 482 | "_isAbsRight": true, 483 | "_isAbsTop": true, 484 | "_isAbsBottom": true, 485 | "_isAbsHorizontalCenter": true, 486 | "_isAbsVerticalCenter": true, 487 | "_originalWidth": 250, 488 | "_originalHeight": 28, 489 | "_alignMode": 2, 490 | "_lockFlags": 0, 491 | "_id": "" 492 | }, 493 | { 494 | "__type__": "cc.CompPrefabInfo", 495 | "fileId": "d6aUYjAPVIl66vSVSNeaWR" 496 | }, 497 | { 498 | "__type__": "cc.PrefabInfo", 499 | "root": { 500 | "__id__": 1 501 | }, 502 | "asset": { 503 | "__id__": 0 504 | }, 505 | "fileId": "a2LcTmZwVNm4t+uCxVtyVO", 506 | "instance": null, 507 | "targetOverrides": null, 508 | "nestedPrefabInstanceRoots": null 509 | }, 510 | { 511 | "__type__": "cc.Node", 512 | "_name": "Label", 513 | "_objFlags": 0, 514 | "_parent": { 515 | "__id__": 12 516 | }, 517 | "_children": [], 518 | "_active": true, 519 | "_components": [ 520 | { 521 | "__id__": 22 522 | }, 523 | { 524 | "__id__": 24 525 | }, 526 | { 527 | "__id__": 26 528 | } 529 | ], 530 | "_prefab": { 531 | "__id__": 28 532 | }, 533 | "_lpos": { 534 | "__type__": "cc.Vec3", 535 | "x": 0, 536 | "y": 0, 537 | "z": 0 538 | }, 539 | "_lrot": { 540 | "__type__": "cc.Quat", 541 | "x": 0, 542 | "y": 0, 543 | "z": 0, 544 | "w": 1 545 | }, 546 | "_lscale": { 547 | "__type__": "cc.Vec3", 548 | "x": 1, 549 | "y": 1, 550 | "z": 1 551 | }, 552 | "_mobility": 0, 553 | "_layer": 33554432, 554 | "_euler": { 555 | "__type__": "cc.Vec3", 556 | "x": 0, 557 | "y": 0, 558 | "z": 0 559 | }, 560 | "_id": "" 561 | }, 562 | { 563 | "__type__": "cc.UITransform", 564 | "_name": "", 565 | "_objFlags": 0, 566 | "node": { 567 | "__id__": 21 568 | }, 569 | "_enabled": true, 570 | "__prefab": { 571 | "__id__": 23 572 | }, 573 | "_contentSize": { 574 | "__type__": "cc.Size", 575 | "width": 88.2, 576 | "height": 40 577 | }, 578 | "_anchorPoint": { 579 | "__type__": "cc.Vec2", 580 | "x": 0.5, 581 | "y": 0.5 582 | }, 583 | "_id": "" 584 | }, 585 | { 586 | "__type__": "cc.CompPrefabInfo", 587 | "fileId": "602IJIcgxIvbmmEGjzdOI2" 588 | }, 589 | { 590 | "__type__": "cc.Label", 591 | "_name": "", 592 | "_objFlags": 0, 593 | "node": { 594 | "__id__": 21 595 | }, 596 | "_enabled": true, 597 | "__prefab": { 598 | "__id__": 25 599 | }, 600 | "_customMaterial": null, 601 | "_srcBlendFactor": 2, 602 | "_dstBlendFactor": 4, 603 | "_color": { 604 | "__type__": "cc.Color", 605 | "r": 255, 606 | "g": 255, 607 | "b": 255, 608 | "a": 255 609 | }, 610 | "_string": "Hide Menu", 611 | "_horizontalAlign": 1, 612 | "_verticalAlign": 1, 613 | "_actualFontSize": 18, 614 | "_fontSize": 18, 615 | "_fontFamily": "Arial", 616 | "_lineHeight": 40, 617 | "_overflow": 0, 618 | "_enableWrapText": true, 619 | "_font": { 620 | "__uuid__": "b33d50da-3253-4a7e-b9f0-cce67cd578e0", 621 | "__expectedType__": "cc.BitmapFont" 622 | }, 623 | "_isSystemFontUsed": false, 624 | "_spacingX": 0, 625 | "_isItalic": false, 626 | "_isBold": false, 627 | "_isUnderline": false, 628 | "_underlineHeight": 2, 629 | "_cacheMode": 2, 630 | "_id": "" 631 | }, 632 | { 633 | "__type__": "cc.CompPrefabInfo", 634 | "fileId": "bcOr/xGQhHtLpOeropVHTY" 635 | }, 636 | { 637 | "__type__": "cc.Widget", 638 | "_name": "", 639 | "_objFlags": 0, 640 | "node": { 641 | "__id__": 21 642 | }, 643 | "_enabled": true, 644 | "__prefab": { 645 | "__id__": 27 646 | }, 647 | "_alignFlags": 8, 648 | "_target": null, 649 | "_left": 45.9, 650 | "_right": 0, 651 | "_top": 0, 652 | "_bottom": 0, 653 | "_horizontalCenter": 0, 654 | "_verticalCenter": 0, 655 | "_isAbsLeft": true, 656 | "_isAbsRight": true, 657 | "_isAbsTop": true, 658 | "_isAbsBottom": true, 659 | "_isAbsHorizontalCenter": true, 660 | "_isAbsVerticalCenter": true, 661 | "_originalWidth": 0, 662 | "_originalHeight": 0, 663 | "_alignMode": 2, 664 | "_lockFlags": 0, 665 | "_id": "" 666 | }, 667 | { 668 | "__type__": "cc.CompPrefabInfo", 669 | "fileId": "8bIWTX+i5OCotUZuBVOaXi" 670 | }, 671 | { 672 | "__type__": "cc.PrefabInfo", 673 | "root": { 674 | "__id__": 1 675 | }, 676 | "asset": { 677 | "__id__": 0 678 | }, 679 | "fileId": "ddaCOWHFRJtIS7PTtl6xes", 680 | "instance": null, 681 | "targetOverrides": null, 682 | "nestedPrefabInstanceRoots": null 683 | }, 684 | { 685 | "__type__": "cc.UITransform", 686 | "_name": "", 687 | "_objFlags": 0, 688 | "node": { 689 | "__id__": 12 690 | }, 691 | "_enabled": true, 692 | "__prefab": { 693 | "__id__": 30 694 | }, 695 | "_contentSize": { 696 | "__type__": "cc.Size", 697 | "width": 180, 698 | "height": 30 699 | }, 700 | "_anchorPoint": { 701 | "__type__": "cc.Vec2", 702 | "x": 0.5, 703 | "y": 0.5 704 | }, 705 | "_id": "" 706 | }, 707 | { 708 | "__type__": "cc.CompPrefabInfo", 709 | "fileId": "a2hSYLt7hGrKndNJ5XDs7T" 710 | }, 711 | { 712 | "__type__": "cc.PrefabInfo", 713 | "root": { 714 | "__id__": 1 715 | }, 716 | "asset": { 717 | "__id__": 0 718 | }, 719 | "fileId": "b504TOn4FJEJmLqXnTuNe8", 720 | "instance": null, 721 | "targetOverrides": null, 722 | "nestedPrefabInstanceRoots": null 723 | }, 724 | { 725 | "__type__": "cc.UITransform", 726 | "_name": "", 727 | "_objFlags": 0, 728 | "node": { 729 | "__id__": 1 730 | }, 731 | "_enabled": true, 732 | "__prefab": { 733 | "__id__": 33 734 | }, 735 | "_contentSize": { 736 | "__type__": "cc.Size", 737 | "width": 180, 738 | "height": 32 739 | }, 740 | "_anchorPoint": { 741 | "__type__": "cc.Vec2", 742 | "x": 0.5, 743 | "y": 1 744 | }, 745 | "_id": "" 746 | }, 747 | { 748 | "__type__": "cc.CompPrefabInfo", 749 | "fileId": "56KWT4MzhMwqenlEjZzVBr" 750 | }, 751 | { 752 | "__type__": "cc.Widget", 753 | "_name": "", 754 | "_objFlags": 0, 755 | "node": { 756 | "__id__": 1 757 | }, 758 | "_enabled": true, 759 | "__prefab": { 760 | "__id__": 35 761 | }, 762 | "_alignFlags": 33, 763 | "_target": null, 764 | "_left": 0, 765 | "_right": 25, 766 | "_top": 10, 767 | "_bottom": 325, 768 | "_horizontalCenter": 0, 769 | "_verticalCenter": 0, 770 | "_isAbsLeft": true, 771 | "_isAbsRight": true, 772 | "_isAbsTop": true, 773 | "_isAbsBottom": true, 774 | "_isAbsHorizontalCenter": true, 775 | "_isAbsVerticalCenter": true, 776 | "_originalWidth": 0, 777 | "_originalHeight": 100, 778 | "_alignMode": 2, 779 | "_lockFlags": 0, 780 | "_id": "" 781 | }, 782 | { 783 | "__type__": "cc.CompPrefabInfo", 784 | "fileId": "97Klz/BGVMNZyblsC3fp86" 785 | }, 786 | { 787 | "__type__": "6d258yReNVCHp3bHsi/xOMH", 788 | "_name": "", 789 | "_objFlags": 0, 790 | "node": { 791 | "__id__": 1 792 | }, 793 | "_enabled": true, 794 | "__prefab": { 795 | "__id__": 37 796 | }, 797 | "MenuItem": { 798 | "__uuid__": "cc9403fe-0b8e-4f43-afca-42fe22b9d9f2", 799 | "__expectedType__": "cc.Prefab" 800 | }, 801 | "MenuRootNode": { 802 | "__id__": 2 803 | }, 804 | "BtnNode": { 805 | "__id__": 12 806 | }, 807 | "Size": { 808 | "__type__": "cc.Size", 809 | "width": 180, 810 | "height": 30 811 | }, 812 | "_id": "" 813 | }, 814 | { 815 | "__type__": "cc.CompPrefabInfo", 816 | "fileId": "08+lIGs+5O2qFANgMthkqG" 817 | }, 818 | { 819 | "__type__": "cc.Layout", 820 | "_name": "", 821 | "_objFlags": 0, 822 | "node": { 823 | "__id__": 1 824 | }, 825 | "_enabled": true, 826 | "__prefab": { 827 | "__id__": 39 828 | }, 829 | "_resizeMode": 1, 830 | "_layoutType": 2, 831 | "_cellSize": { 832 | "__type__": "cc.Size", 833 | "width": 40, 834 | "height": 40 835 | }, 836 | "_startAxis": 0, 837 | "_paddingLeft": 0, 838 | "_paddingRight": 0, 839 | "_paddingTop": 2, 840 | "_paddingBottom": 0, 841 | "_spacingX": 0, 842 | "_spacingY": 1, 843 | "_verticalDirection": 1, 844 | "_horizontalDirection": 0, 845 | "_constraint": 0, 846 | "_constraintNum": 2, 847 | "_affectedByScale": false, 848 | "_isAlign": false, 849 | "_id": "" 850 | }, 851 | { 852 | "__type__": "cc.CompPrefabInfo", 853 | "fileId": "12Y2HPk49J8bSYyy/9xyHT" 854 | }, 855 | { 856 | "__type__": "cc.PrefabInfo", 857 | "root": { 858 | "__id__": 1 859 | }, 860 | "asset": { 861 | "__id__": 0 862 | }, 863 | "fileId": "f9RqIhIdtNsZgOyNpkC7Ry", 864 | "targetOverrides": [] 865 | } 866 | ] --------------------------------------------------------------------------------